>And it works for every disk type, not only SCSI disks.
>
>You could have the kernel advertize these names in /proc/disks/ or
>something similar.
You don't really need kernel support for this; as long as you can find
your root filesystem, it's trivial to produce a set of symlinks to the
right devices. Here's a 2-minute perl script that creates
/dev/e2fs/UUID entries for all ext2 filesystems on the system (or at
least all on /dev/sd* or /dev/ha*). It's not great perl, but it
works.
#!/usr/bin/perl -w
@drives=`ls /dev/sd* /dev/hd*`;
foreach $drive (@drives) {
chomp($drive);
open(DUMPE2FS,"/sbin/dumpe2fs $drive 2>&1 |") or next;
while (<DUMPE2FS>) {
if(/Filesystem UUID:\W+([-0-9a-f]+)/) {
print "Drive: $drive ID: $1\n";
symlink("$drive","/dev/ext2/$1");
}
}
}
Scott