On Sat, 2002-09-21 at 00:40, Fred Fraley wrote: > Last time I tried this I managed to lose my /home partition, so I'm going to > ask for help first, this time :-) How do I manage this without losing > anything? > I'm going to remove /dev/hda, the original 30 gig HD, from this machine. I > am keeping /dev/hdb (60 gig), which will become the only HD on the system for > the moment. > At this time the system boots from hda. hda has everything on it except one > user's home directory, /home/dad. > I have plenty of room to play with while switching things. Usage is: > > [root@[EMAIL PROTECTED] ffraley]$ df > Filesystem Size Used Avail Use% Mounted on > /dev/hda5 3.4G 1.4G 1.9G 41% / > /dev/hda6 15G 9.6G 4.4G 69% /home > /dev/hdb1 11G 132M 11G 2% /home/dad > /dev/hda1 11G 8.7G 1.4G 87% /mnt/windows > > I am not going to be reinstalling MSwindows on this machine but it does need > to be on the 30 gig HD and working (a relative term) when things are > finished. I will also be dual-booting MDK from the 30 gig after installing > it on my wife's new machine. > Can someone point me to a cheat sheet for this, or list the steps? > > Fred > > ---- > Fred,
If I understand correctly, you want to duplicate the linux partitions that are currently on hda onto hdb, but not the w$ stuff, then hdb becomes the sole drive in this box. I would do something like this: 1. move /home/dad that's currently the only occupant of hdb onto /home, so your hdb disk can be wiped. Do something like (as root): cp -Rp /home/dad /home/newdad then edit /etc/passwd to point the associated login (presumably dad) to the new home directory. Also remove the entry that mounts /dev/hdb1 from /etc/fstab. Log on as dad to check that all is well. At this point hdb has no "live" data. Run diskdrake and repartition hdb. You may want different sizes for some, but the sizes you have used look OK. Duplicate the structure of hda, except that hdb1 can now be a linux filesystem of your choice. Mount hdb5 and 6 on temporary mount points like /newroot and /newhome Copy hda6 to hdb6 with a command like: cp -Rp /home /newhome Copying hda5 is a little more complicated as you need to exclude home, mnt and proc Copy the other directories one at a time with the cp -Rp command like: cp -Rp /etc /newroot/ Now we just have to take care of the boot loader. I'm assuming lilo. edit /newroot/etc/lilo.conf and remove the stanza relating to windows. Having done this you should be ready to remove hda and boot with what was hdb now becoming hda. You will need to boot first from the distro install CD and allow it to rewrite the boot loader. Now (with any luck) you will have everything in place, with a blank partition on hda1 which you can mount as whatever and use for whatever. So, what have I missed? Anyone else want to point out the errors before Fred takes the plunge? Be aware that doing it this way, as long as you have copied /home/dad across correctly and checked that before repartitioning hdb, all your data remains intact on hda and at worst you can start all over without data loss. HTH Brian
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
