Bug#254475: savedefault --once --default=<number> still does not work

Modestas Vainius geromanas at mailas.com
Tue Jan 16 00:43:05 CET 2007


reopen 254475
found 254475 0.97-21
block 354003 by 254475
thanks

Hi,

sorry, but the bug is still not fixed or was reintroduced. When executing the 
command below in the grub shell (# grub) (when debian is up & running)

  savedefault --once --default=<number>

it does indeed modify /boot/grub/default, but the problem is that grub seems 
to no longer use this file when selecting the default title. I 
rm'ed /boot/grub/default and grub still knew on the next boot which title had 
been previously savedefault'ed (last booted).

I have "default saved" in /boot/grub/menu.lst and "savedefault" statements 
in /boot/grub/menu.lst work as expected, because grub selects the previously 
booted title as default on the next boot. It's just that savedefault in the # 
grub shell does not work. Neither does grub-reboot.

#254475 blocks #354003 because kdm uses the following code to set default 
title for the next boot:

----
commitGrub( void )
{
        FILE *f;
        int pid;
        static const char *args[] = { 0, "--batch", "--no-floppy", 0 };

        if (sdRec.bmstamp != mTime( GRUB_MENU ) &&
            setGrub( sdRec.osname, &sdRec ) != BO_OK)
                return;

        args[0] = grub;
        if ((f = pOpen( (char **)args, 'w', &pid ))) {
                fprintf( f, "savedefault --default=%d --once\n", 
sdRec.osindex );
                pClose( f, pid );
        }
}
-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20070116/843a1486/attachment.pgp


More information about the Pkg-grub-devel mailing list