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

Re: Moving from single to multipartition



Bob Alexander wrote:

Dear Debian-friends,
I am moving my fully updated Debian sid from a single partition to a multipartition scheme.

My old "monopartition" which is currently alive is now on /dev/hda12 and is around 3.5 GB.

The doubt I am having is how to properly move the / data to the new 70MB filesystem/partition.

I have two hypothesis:

1) fresh install of sarge netinst to new filesystems, point apt-get to unstable, import dpkg --set-selections, dist-upgrade, upgrade, copy all old /etc data onto the new /etc and the old /home to the new /home.

2) Copy the old /var, /tmp, /usr and /home data onto the new partitions, delete them, copy the rest on the new /

Any advice ??

I did something similar back when I used Mepis, since Mepis installed everything to a single partition. If I remember correctly, it went something like this...

1: Create empty directories on / which will serve as your new mount points. For example...

/usr-new
/home-new

2:  Mount your new partitions.  Using /home and /usr as an example, I did:

mount /dev/hdb1 /home-new -t ext3
mount /dev/hda9 /usr-new -t ext3

3: Go to a command prompt and copy your data to the new partitions. If I remember correctly, the command was:

cp -dpr /home/* /home-new
cp -dpr /usr/* /usr-new

4: Rename the source directories. ie: change /home to /home-old and /usr to /usr-old

5:  Rename the new mount points:  /home-new to /home and /usr-new to /usr

6:  Unmount the new partitions and then remount them...

mount /dev/hdb1 /home -t ext3
mount /dev/hda9 /usr -t ext3

7:  Update your /etc/fstab file to mount those new partitions

And that is really all there is to it. Repeat the process with your other partitions. When you are certain that everything is working properly, you can safely delete the old directories off of /


Also, the above process is actually best when done from a LiveCD system like Mepis.






Reply to: