Re: Grub, default boot question.

From: Nathan (gangrif_at_mindless.com)
Date: 09/02/05


Date: Fri, 02 Sep 2005 16:55:57 -0400

Andy Fraser wrote:
> Sybren Stuvel <sybrenUSE@YOURthirdtower.com.imagination> wrote:
>
>
>>>Is there a way to tell grub to boot an OS other than the default for
>>>just one boot, and then go back to the usual default on the next
>>>boot?
>>
>>I don't know if it can. This is one of the reasons I use LILO.
>
>
> GRUB can do it. Back in my Debian days there was a command grub-reboot
> that did exactly what the OP wanted but I've only seen it on Debian.
> IIRC it was a shell script that just passed some commands to GRUB.
>
> I've just downloaded and unpacked Debian's GRUB package from Sarge.
> grub-reboot is indeed a shell script. The line that appears to do the
> magic is:
>
> savedefault --once --default=$default
> (run from within GRUB. See below)
>
> The whole code block is:
>
> default="$1" ; shift
> grub --batch $@ <<EOT
> savedefault --once --default=$default
> quit
> EOT
>
> The rest of the script is just checking that you're root, the usage info
> and a prompt to reboot now (you can run the script to set the temporary
> default without rebooting).
>
This is exactly what i want to accomplish. You're right, my Fedora core
3 install does not include the grub-reboot script. And i understand how
this command should be executed. But i'm not 100% sure what should be
entered in place of the $default variable. I;d assume that in that place
would be somethign that represents my Windows boot selection.. but i
cant quite decide what.
Thanks.

-- 
In a world with no fences, why do i need Gates?


Relevant Pages

  • Re: (no subject) [er...how to get rid of hibernate hooks in grub on F7]
    ... mentioned that the script I'm looking for is now located in ... see the grub screen so that I might select the windows OS instead? ... would just be handy in case I get a kernel update, but hibernate before ... I'm wondering how I can unhook the hibenate process in Fedora 7 from the ...
    (Fedora)
  • Re: Ultimate Fedora partition scheme ?
    ... Grub was installed for this one in the ... and this is the normal default boot system. ... title Boot other linux ... Here's the save-boot script that saves the ...
    (Fedora)
  • Re: How to dual boot Suse and Slackware.
    ... to never modify a script that may be overwritten by an update. ... have a patched version of grub, ... http://gag.sourceforge.net/ and install each distributions boot loader ... or changes with one distro do not effect any other distro. ...
    (comp.os.linux.misc)
  • Re: running scripts before x-server starts
    ... GRUB options were selected. ... Finding the right script to do it in is only half the solution: ... separate set of rc's.. ...
    (Ubuntu)
  • Re: SATA drive probs: Knoppix OK, but nothing else
    ... (and according to the grub manual that error means grub is halting because ... it is trying to mount an existant partition but the partition is formatted ... issue with Debian and this drive...:-(..was attemtping this all with Debian ... try running the grub installer from ...
    (Debian-User)