On Tue, 2004-02-24 at 13:15, [EMAIL PROTECTED] wrote: > Paul Bolle wrote: > > It looks like I've managed to write a patch to GNU grub which makes grub > > accept "label syntax" (e.g. "LABEL=/boot") as the argument to the root > > command. With this patch one can use not only e.g. "root (hd0,2)" but > > also e.g. "root (LABEL=/boot)". In short: a second "naming convention" > > for the root command. > > Interesting, tough I do think initrd is the best place for it. > grub should deal with BIOS disks, initrd should deal with > usb/network/labels/higher level stuff. > > Can you send me the patch?
Of course, but I'm still working on it. In the last few days I did manage to get "label syntax" working for all commands (at least all commands I tested!). Right now I'm working on "completions" (think: "(LABEL=/bo" completed to "(LABEL=/boot)" on the grub command line). That is not really important, but I decided to give completion a try anyhow. I'm not entirely sure what you mean to say with your reference to initrd. However, it should be noted that in my patch I simply try to translate "label syntax" to the grub "naming convention" right away. So you could think of my patch as just a "wrapper". So in short: 1) grub is given a device in label syntax; 2) grub loops through all disk partitions looking for a matching label; 3) if a match is found, grub will use that device, but (so to speak) still in it's native naming convention. To give you an idea, here's an example (using the root command): grub> root (label=shrike/boot) Filesystem is ext2fs, type 0x83 (LABEL=shrike/boot) grub> root (hd0,3): Filesystem is ext2fs, type 0x83 (LABEL=shrike/boot) Maybe not too elegant, but it does seem to work. I would like to hear suggestions for a better approach ... I'll try to send you my patch (in a private mail) in the next few days. Maybe looking at my patch makes it easier to see what I'm trying to accomplish. By the way, I haven't yet "ported" it to grub 0.94. I hope to do that soon ... Unless you rather receive a patch to grub 0.94, but then I'm afraid you have to be more patient. Kind regards, Paul _______________________________________________ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub