Re: hard disk device name change after reboot
On Sun, 2007-11-04 at 13:55 -0800, Andrew Sackville-West wrote:
> On Sun, Nov 04, 2007 at 10:49:49PM +0800, hhding.gnu wrote:
> > hi list,
> >
> > I run Debian 4.1.2-13 on Dell PowerEdge 650 with kernel
> > 2.6.21-2-686. When I install the debian, the device name of partition
> > is hda1, hda2. After install, I reboot it for times and it works. One
> > day, I find it fail to reboot, after waiting for root filesystem for a
> > while, Debian drop to shell(busybox). Then I notice the device name of
> > hard disk has automaticly changed to hde1,hde2. some times, the
> > devices name is changed to others like hdg1, hdg2, etc. after reboot.
> >
> > What's the problem then? Can I fix the device name? Any clue for it
> > is appreciated. :-)
> >
>
> Not sure specifically what is causing this problem, but in the
> meantime, switch to using LABEL's or UUID's to identify disks. That
> way you can continue booting until you figure it out.
>
> A
Hey,
To elaborate, vol_id can get the uuid for a volume which you can then
use in fstab. Eg this ntfs sata disk partition I called 'Y' in windows.
$ sudo vol_id /dev/sda1
ID_FS_USAGE=filesystem
ID_FS_TYPE=ntfs
ID_FS_VERSION=3.1
ID_FS_UUID=4862AAF824AADB2F <--This part
ID_FS_UUID_ENC=4862AAF824AADB2F
ID_FS_LABEL=Y <--Or this part
ID_FS_LABEL_ENC=Y
ID_FS_LABEL_SAFE=Y
This then translates to a line like this in /etc/fstab
# /dev/sda1
UUID=4862AAF824AADB2F /ntfs/Y ntfs-3g
rw,user,users,gid=users,umask=0002,en_AU.utf8 0 0
or 'LABEL=Y' would also work.
Doing this for all volumes renders device name changes a non-issue.
Hope this helps.
cheers,
Owen.
PS/NB: My linux partition uuids look slightly different e.g.
e029093d-b95f-434a-b005-ab4f807e2ca8
As generated by uuidgen.
Reply to: