1

I support a laptop running Ubuntu in another state (so I don't have physical access to it). It is an EeePC with two internal drives: a 4GB flash drive with the root fs, and a larger (~12GB) drive with the /home partition on it (and plenty of free space). The user tried to upgrade to 11.10, and the upgrade failed because the root partition doesn't have enough free space to perform the upgrade.

I remember running into a similar problem on a laptop once before, which just had one physical drive but a poorly-thought-out partition scheme; I think I just symlinked a directory from a too-small rootfs partition to a larger partition. In this case, I think the best solution is to bind-mount whatever directory Ubuntu wants to use to store its downloaded files to the larger drive.

  • What directory (or directories) is the important one that needs to be 'moved' to the larger drive?

  • If I can get away with just bind-mounting one directory, do I just need to do it once, at the beginning of the installation, or do I need to add the bind-mount to the fstab (i.e. because the files are still needed after reboot, so the bind-mount needs to be persistent)?

  • Is there an easier or better way to accomplish the upgrade? (Neither a fresh install nor a repartition is an option right now)

3 Answers 3

2

Well for the directory where apt, aptitude and whatever other package management system you use stores the packages downloaded is /var/cache/apt/archives. If you copy this files to another PCs same cache folder you save yourself from having to download them again from the internet.

For the rest I did not understand clearly. if you could please change or add more stuff I could elaborate more here. Sorry buddy.

0

Over half the small hard drive was in /usr, so I just moved /usr to (the unecrypted) /home partition, and bind-mounted /home/usr to /usr, like this:

sudo su -
mv /usr /home/
mkdir /usr
mount --bind /home/usr /usr
echo "/home/usr /usr bind defaults,bind 0 0" >> /etc/fstab

sudo is in /usr/bin, so it's best to login as root first, so you're not stuck without a root session if things go wrong (/home/usr was owned by root with 700 permissions during the mv operation). mount, ls, and mkdir are all in /bin.

Be sure to have a backup plan ready if you try this: I can't count the number of things that could go wrong. Also, if I was going to do it again, I'd probably try to copy /usr into /home first (probably using something like rsync, cpio, or tar to preserve file attributes?) and test the bind-mounting before deleting the original /usr. But this time I got lucky and everything worked out.

0

Open a terminal by searching for it in the dash, and then once you get the user@computer:~$ prompt, type exactly:

sudo apt-move path-to-your-12GB-device

and give your password when sudo prompts for it. It will not be shown(not even asterisks). Once you get the user@computer:~$ prompt again, you're good to go.

1
  • 2
    This answer would benefit substantially, if you were to edit it to add some explanation (or at least to tell the user exactly what to do with this line). Jul 20, 2012 at 22:10

You must log in to answer this question.