Grub stripping out default option commands solved

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

Grub stripping out default option commands solved

Postby breusshe on Sat Dec 15, 2007 1:44 am

I'm trying to get Grub to use the "savedefault" command by using the following menu.lst entries:

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default saved

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=true

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=true

I can edit and successfully save the file (I've reopened it to make sure the changes are being saved), however, when I run update-grub, the "updatedefaultentry" and "savedefault" options are stripped out of menu.lst. I'm wondering why this is and how do I make Grub remember what OS I logged into last if I cannot use this method.

Thanks!
Brett
User avatar
breusshe
Level 1
Level 1
 
Posts: 23
Joined: Sat Dec 15, 2007 1:36 am

Linux Mint is funded by ads and donations.
 

Re: Grub stripping out default option commands

Postby Husse on Sat Dec 15, 2007 10:58 am

Welcome to Mint breusshe
I'm not absolutely sure but I think this does not work
You should remove the line
default saved
Instead every option should have savedefault added on a separate line, like so:

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda2.
title Linux Mint, kernel 2.6.20-15-generic (recovery mode) (on /dev/sda2)
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=/dev/sda2 ro single
initrd /boot/initrd.img-2.6.20-15-generic
savedefault
boot

However this has not worked for me, but is the correct method as far as I know
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19710
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Grub stripping out default option commands

Postby breusshe on Sat Dec 15, 2007 6:34 pm

I appreciate the time to reply to this post.

I should have also noted that the configuration I listed in my original post was what I used when I had Xunbuntu 7.10 installed. The "default saved" is necessary since that is what tells Grub how to go about finding out what the "default" entry is now. Using "saved" tells Grub to look up what was used last in a file. I forget what file this info is saved to, but that is what it has to do.

Thanks again!
Brett
User avatar
breusshe
Level 1
Level 1
 
Posts: 23
Joined: Sat Dec 15, 2007 1:36 am

Re: Grub stripping out default option commands

Postby breusshe on Fri Jan 18, 2008 7:03 pm

I finally uninstalled the grub_gfx package and just installed the regular grub package. This one understands "savedefault" and does not strip it out when you do an "update-grub".

No idea what is wrong with the gfx package, but I don't need pretty grub screens anyhow.
Brett
User avatar
breusshe
Level 1
Level 1
 
Posts: 23
Joined: Sat Dec 15, 2007 1:36 am


Return to Installation & Boot

Who is online

Users browsing this forum: bawldiggle, lostfarmer and 12 guests