HD Install :: separate /home /usr/local partitions... how?



I want to install DSL with separate /home and /usr/local and /opt partitions spread out over 2 drives, or be able to move these  partitions to another drive after installalation. Can this be done, and how? If I move them manually and update /etc/fstab accordingly, everything works... until I reboot and "KNOPPIX" adds those partitions to /etc/fstab again. (seems it rebuilds /etc/fstab each boot... can I inhibit this and make my own changes to /etc/fstab permanent? I -think- that's all it would take, no?)
Im not sure if the stock install will allow this, but there is a solution!!

1.  do a HD install on say /dev/hda1
2.  reboot using the cd version
3.  Mound /dev/hdb and /dev/hda1
4.  using cfdisk create whatever size partitions with their labels /home and /usr/local and /opt to whatever size you choose...remember to format them
5.  mount /dev/hda1 and do a
Code Sample
cp -f /mnt/hda1/home /mnt/hdb1/home
cp -f /mnt/hda1/usr/local /mnt/hdb2/usr/local
cp -f /mnt/hda1/opt /mnt/hdb3/opt
remember to go into the /mnt/hda1 and rm -rf /home
rm -rf /usr/local
rm -rf /opt before rebooting


you could also pre-edit your /mnt/hda1/etc/fstab with the new partition info as well

Backup anything you dont want to loose b4 you try this method..

When DSL reboots it should automatically see the /dev/hdb partitions labeled as above and use them just as if they were already there

Brian
AwPhuch

Thanks Brian,

That's pretty much what I did, and it all works just fine... until reboot when /etc/fstab get's re-written. Example: I mount /hdb6 and move /home to it, edit fstab, works fine (/home now on /dev/hda6 and I can mount/umount /home just fine). Next boot fails because /home expected to be on root fs, I have to re-edit /etc/fstab (to remove /hda6 /dev/hda6 and add /home /hda6). Something's re-writing /etc/fstab each boot, I want to stop it. Any hints?

did you label those partitions when you formatted them??

It might just see a blank ext2 and not assocaite the parititon with /home

Im checking now...might be the KNOPPIX autoscript you could edit..

Did you modify /etc/fstab above or below the line
# partitions found by dsl


Brian
AwPhuch

ok the /etc/init.d/knoppix-autoconfig finds extra partitions by using /proc/partitions info...

I think it truncates anything after the #partitions found by dsl part in /etc/fstab

Otherwise you might have to mke2fs those partitions and label them accordingly

Code Sample
e2label /dev/hda3 /work


however its going to be a bit tricky since you already have those filenames and whatnot in your / dir....

Next Page...
original here.