-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 It seems it works with some filesystem and do *NOT* work for swap partition. here as I show below, hde1 is swap partition and there are no label or uuid exists. as I know, tune2fs can add uuid or label for ext2/ext3 partitions. How can I add uuid or label for swap partition then?
Another question is, can I add uuid as device name in grub's menu.lst? (something like kernel /boot/vmlinuz-2.6.17-2-686 root=/dev/sde2 ro) cc:~# /lib/udev/vol_id /dev/hde1 ID_FS_USAGE=other ID_FS_TYPE=swap ID_FS_VERSION=2 ID_FS_UUID= ID_FS_UUID_ENC= ID_FS_LABEL= ID_FS_LABEL_ENC= ID_FS_LABEL_SAFE= cc:~# /lib/udev/vol_id /dev/hde2 ID_FS_USAGE=filesystem ID_FS_TYPE=ext3 ID_FS_VERSION=1.0 ID_FS_UUID=b9599834-8d37-41fb-9389-c3394c9ea21f ID_FS_UUID_ENC=b9599834-8d37-41fb-9389-c3394c9ea21f ID_FS_LABEL= ID_FS_LABEL_ENC= ID_FS_LABEL_SAFE= cc:~# tune2fs -l /dev/hde2 | grep UUID Filesystem UUID: b9599834-8d37-41fb-9389-c3394c9ea21f cc:~# Owen Townend 写道: > 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. > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) iD8DBQFHLn9sJo9Njjkvy34RAlgdAJ9dgWsVNFqNKcAA8DDgBFN/sQPizQCfdwNn Cxd1BCC8Se7pdPlPmvMKQsk= =0Vv3 -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]