[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to make more space available for /



On Sun, 28 Sep 2014, Rob Hurle wrote:

> I've had a very large job on the go and have only just now had the
> chance to upgrade from squeeze to wheezy.  I had to do the upgrade
> from DVDs because I live at the end of a piece of wet string (takes
> about a day to download one DVD).  The upgrade went reasonably well
> but I did run out of room on /usr.  I've now symlinked /usr/share
> and /usr/lib to a larger disc (200GB).  Now, I need to do the upgrade
> of the wheezy system and the complaint is that there's not enough
> room on / (I use apt-get to do upgrades and it appears that I need a
> new kernel and dpkg can't find room on /).  / is a partition of 330MB
> (seemed a lot when I installed squeeze  a jillion years ago), but
> what I'd like to do is to install a larger disc (maybe 200-500GB) and
> use it as my boot disc.  Any ideas on how I can copy my existing /
> partition and boot information to a new disc?  Would dd be a good
> idea?  How can I prepare the new disc to be the boot disc and have /
> on it without disturbing my current system?  Ideally I'd like to set
> the new disc up, alter the order of booting in the setup, reboot to
> the new disc, and then clean the system up.  Any ideas on how I can
> (for example) put a new /usr partition on the new disc and
> alter /etc/fstab to mount the new partition as /usr, safely without
> disturbing the existing system?  In these days of udev and UUIDs, can
> we just alter /etc/fstab and still expect partitions to be mounted?
> Any help would be appreciated.  Thanks in advance.

To do what you want is basically a straight "copy" operation.  Back
in March I transferred my Wheezy system from an aging 160GB HD to a
new 500GB one having never done it before.  Simply, here's what you do:

1. Install and partition the new drive

2. Copy (I used rsync) the system from the old drive to the new, 
partition by partition

3. Get UUIDs for each partition on the new drive.

4. Edit fstab on the new drive using the new UUIDs and any partitioning
differences between the new and old drives.

5. Set up chroot to the system on the new drive

6. Create a new initrd.img

7. Create a new device.map

8. Create a new grub.cfg

9. Install grub on MBR of new drive.

10. Exit chroot

11. Shutdown, remove old drive, reboot.  See if it took.


As I said, this is basic.  And from memory.  So, it's very general.  The
specifics are left to you to find out.


B

     


Reply to: