Re: Confusion between hde1 and hda1
On Mon, Apr 16, 2007 at 04:00:52PM +0100, Steven Maddox (Architect) wrote:
>
> My first message, be kind!
>
> When I installed debian etch several weeks ago (the XFCE CD), the
> installer believed it could see hda and thus / became hda1. When
> booting debian for the first time it saw it as hde - GRR I thought, so I
> plodded along and altered the grub menu list and fstab - and it worked.
>
> Yesterday I restarted the box (after quite a while) and the grub menu
> seems to have back to being hda1 - probably because a kernel update or
> reinstall re-making the menu.
>
> I need to get my copy of debian to FORGET about hda1 - bah! Any ideas
> so this doesn't happen again?
>
Welcome.
Yes, the kernel seems to like to see interfaces in different orders,
thus naming them differently. The answer is to not use device names
like hd* but to use some other identifier. Personally, I use raid so
the md driver assembles md0 from that consistantly.
Two other ways may be useful to you, LABEL and UUID. Probably LABEL is
easiest.
Using the tool approprate to the filesystem (ext2, JFS, XFS, whatever),
label the partitions. For example, if you can get booted and find that
/dev/hde1 is currently /, then
# e2label /dev/hde1 ROOT
or
# tune2fs -L ROOT /dev/hde1
or
# jfs_tune -L ROOT /dev/hde1
Then in fstab, instead of the /dev/hde1, put LABEL=ROOT
Similar on the kernel command line in grub/menu.lst put LABEL=ROOT
Do this for all devices that may be renamed. This way, the kernel
checks all filesystems for labels and uses them instead.
Good luck,
Doug.
Reply to: