Borrowing drive space to upgrade Jaunty to Karmic on an Eee PC
MatBoy: mhh, 9.10 upgrade on a eeepc 901 is not that easy with ssd
MatBoy: where does the 9.10 upgrade needs 1,5GB space ?
MatBoy: in /tmp ?
MatBoy: someone running 9.10 on a eeepc 901 with ssd ?
MatBoy: mhh, I can’t upgrade from 9.04 to 9.10… space issue of 1,5GB it says
MatBoy: LOL I removed my /home because I wanted to gpart the drives… which is ofcourse seperated :)
MatBoy: my install is on the 4GB part, so that might be too small by default…. I’m wondering if I move /tmp to the second drive if it works
MatBoy: I think I need a new install :(
Upgrading from Jaunty to Karmic through the Update Manager presented an interesting challenge on my Asus Eee PC 701. Since my / partition was only 4GB in size, there wasn’t enough room to download all of the necessary packages. Since there was no reason, or space, to put /var onto its own partition, the upgrade process was reliant on what the / partition contained. Fortunately, the Linux file system is very versatile making this more of an annoyance than a show-stopper.
Luckily for me, I had upgraded the SSD to a 32GB drive. I had it partitioned so that /home had its own 20GB partition. This gave me the option of “borrowing” space on that partition. Packages are downloaded to /var/cache/apt/archives/ regardless if they’re regular updates or part of a full system upgrade. What I did was create a symbolic link to a new location on the /home partition.
First, I had apt-get clean out any old updates. This would remove any old packages from the archives directory and free up a little more space on the / partition.
sudo apt-get clean
Next, I created the new temporary location with the included partial sub-directory and lock file.
sudo mkdir -p /home/temp_apt_cache/partial
sudo touch /home/temp_apt_cache/lock
Then, I temporarily changed the original location’s name to maintain a backup.
sudo mv /var/cache/apt/archives /var/cache/apt/archives_old
Lastly, I created a symbolic link to the new location.
sudo ln -s /home/temp_apt_cache /var/cache/apt/archives
I now had plenty of room for all of Karmic’s packages. The link does exactly what it sounds like, linking one location to another. When the upgrade process began downloading packages to the /var/cache/apt/archives/ directory, it was really saving them to the new /home location.
Since I wasn’t expecting to ever borrow more than about 1-1.5GB worth of space from my /home partition, I left it set up that way. To reverse the changes, I would remove the link, remove the temporary location, and rename the original location.
sudo rm /var/cache/apt/archives
sudo rm -rf /home/temp_apt_archive
sudo mv /var/cache/apt/archives_old /var/cache/apt/archives



December 6th, 2009 at 8:06 pm
I should add that you can do the same with an USB drive. Whether it is a thumb drive or an external hard drive, you can follow the same process as above by substituting the USB drive’s location for the /home partition I used above. As long as you have about 2GB free, it should work. The only major difference is that you would HAVE to remove the symbolic link and rename the original location back to /var/cache/apt/archives to prevent problems after removing the external drive.