Click to See Complete Forum and Search --> : lilo -R equivalent in grub?


AlienNation
08-20-2005, 02:31 PM
Short question this time:

Is there a grub equivalent of the lilo -R functionality?

For example, when I'm in Linux and want to reboot to windows (ok no sarcastic comments on that one...), when using lilo I can just issue
lilo -R windows
and then when I reboot I won't have to chose windows in the lilo boot menu. Windows is automatically booted that one time. Is there a similar command for grub?

Thanks

serz
08-20-2005, 02:48 PM
haha, didn't know that you could do that with lilo :) it's good to know.

retsaw
08-20-2005, 03:21 PM
I think Debian (and probably other Debian-based distros) has a script which can do this with Grub, but I can't remember it's name (if you're using Debian try typing "grub-" and using tab-complete to find the likely candidate) and it isn't in other distros I've tried.

saikee
08-21-2005, 04:16 AM
Both Lilo and Grub can allow a user to select a default system to boot and reducing the waiting time. One just amends the Grub's /boot/grub/menu.lst or Lilo's /etc/lilo.conf, as both of them are simple text files.

Presumably you don't want to do that. I am not aware of an equivalent ready-made Grub script (assuming you are unwilling to write one to modify the boot menu) but the same thing can be achieved by having a bootable Grub floppy with only the stage1 and stage2 files and hence non-distro specific. Such disk can boot any system in DOS, Windows and Linux if that system has a bootloader in its root partition. Three lines of commands are needed; the root partition number, chainloading command and the green light to go ahead. As an example if you want your Windows to be booted in hda2, just type at Grunb prompt

root (hd0,1)
chainload +1
boot

I trust that since you are asking a Grub question you would already know Grub counts from 0 and (hd0,1) is equivalent to hda2.

A DOS/Windows would have its boot code in sector 0 of the partition when you install it. I always choose root partition for my Linux installation. Post-installation one just uses lilo -b for Lilo and grub-install in Grub to replicate it.

This way one can avoid booting problems for good.

One last thing if you have several DOS/Window partitions a few more lines are needed to hide the ones ahead of the target partition in the BIOS booting queue. Also the "map" command is needed if the taget DOS/Windows is situated other than the boot disk.

I feel embarrassed to sell the idea of using a simple Grub floppy to everyone but it boots every system indiscrimanately using the same 3-line commands (with partition number adjusted of course) and on any PC too. Must we try the hard way when there is a simple way out?

XiaoKJ
08-21-2005, 06:35 AM
there is. its even graphical. look at kde-apps.org or something that has grub next boot

AlienNation
08-22-2005, 02:14 AM
Ok, thanks. I'll see if I can find it on kde-apps.

Much prefer that to having a boot floppy... =)


Found it... Grub nextboot is a tool that seem to do just what I need:
http://www.kde-look.org/content/show.php?content=12140