Nikos Chantziaras wrote:
Mick wrote:
[...]
What would be the recommended way of upgrading from the /dev/hd to
/dev/sd then? I have held back doing this because I didn't have the
time to mess about with it. If I were to configure a new kernel
without legacy ATA drivers, how would I know what my devices will be
seen as in advance, so that I can change my /etc/fstab before I reboot?
The way I do it, is to label my partitions. If your partitions aren't
labeled yet, you can do so with 'tune2fs'. If your /dev/hda1 is your
root (/), /dev/hda2 your /home and /dev/hda3 your swap, you can label
them with:
tune2fs -L GentooRoot /dev/hda1
tune2fs -L GentooHome /dev/hda2
mkswap -L GentooSwap /dev/hda3
Then edit /etc/fstab and change the mount points from:
/dev/hda1 ...
/dev/hda2 ...
/dev/hda3 ...
to:
/dev/disk/by-label/GentooRoot
/dev/disk/by-label/GentooHome
/dev/disk/by-label/GentooSwap
As reference, here the relevant entries in my own /etc/fstab:
/dev/disk/by-label/GentooRoot / ext3 noatime 0 1
/dev/disk/by-label/GentooSwap none swap sw 0 0
/dev/disk/by-label/Suckage /windows/C ntfs-3g noatime 0 0
As you can see this even works for NTFS; you use the label you gave
the drive in Windows.
After you've done these changes, it doesn't matter the least anymore
what the actual device name is. You can even move the harddisk to
another computer (actually I'm doing exactly that) that totally
results in a re-ordering of /dev/sd* entries and it will still mount
correctly.
Question, if I were to label mine and then boot from a Gentoo or any
other bootable CD, would those labels still be there?
Dale
:-) :-)