Grub vs updates

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Fred

Re: Grub vs updates

Post by Fred »

kenberto wrote:
I'm getting pretty frustrated with having to manually muck around with these things.
It sounds as if you are not setting the options in the menu.lst necessary to make your corrections to the menu.lst permanent. Sometimes during an update your grub install is reconstituted for one reason or another related to the specific files that are changed during the update. A kernel update is an example of this.

When you changed your menu.lst did you also set your

# kopt=root=
# groot=
# defoptions=
# updatedefaultentry=
# savedefault=
# howmany=

lines to reflect any changes you made to the menu.lst? If not then this is most likely the problem.

Fred
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
merlwiz79
Level 8
Level 8
Posts: 2418
Joined: Wed Apr 04, 2007 1:50 pm
Location: Here again :)

Re: Grub vs updates

Post by merlwiz79 »

Linux Mint uses grub-gfxboot.
I am the one who maintains this package.
I have updated it a few times and it shouldn't change anything below:

Code: Select all

### END DEBIAN AUTOMAGIC KERNELS LIST
It should only add or remove kernels that have been installed or uninstalled.
I have Windows 7 beta and XP Pro installed and the entry to boot those never disappear.
Image
Fred

Re: Grub vs updates

Post by Fred »

merlwiz79,

Yes, but he could have changed his boot preference incorrectly by the placement of the boot stanza, as an example.

Actually there are a number of things that can be done that would wipe out the Windows boot with a update-grub command.

You are making the assumption that any changes he has made were done properly, which is obviously not the case since update-grub seems to be wiping out the apparent ability to boot Windows from his visible menu.

Fred
Fred

Re: Grub vs updates

Post by Fred »

kenberto,

It appears that you put your Windows boot stanza in with the automagic boot stanzas. Probably to get it to boot by default. Up toward the top of that file is an entry you can use to select the default boot. You want it set as shown below to get Windows to boot by default. The numbering starts at 0 and you count the number of title lines that aren't commented.

## 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.
default 4

The boot stanzas at the bottom should look like I have shown below.

## ## End Default Options ##

title Linux Mint, kernel 2.6.22-16-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.22-16-generic root=/dev/sda2 ro quiet splash
initrd /boot/initrd.img-2.6.22-16-generic
boot

title Linux Mint, kernel 2.6.22-16-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.22-16-generic root=/dev/sda2 ro single
initrd /boot/initrd.img-2.6.22-16-generic
boot

title Linux Mint, kernel memtest86+
root (hd0,1)
kernel /boot/memtest86+.bin
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.

title Other operating systems:
#

title Win XP
root (hd0,0)
savedefault
makeactive
chainloader +1

As merlwiz79 pointed out, the stanzas not within the automagic section are not tampered with. Any boot stanzas you want to manually add and be persistent must be before the line:

### BEGIN AUTOMAGIC KERNELS LIST

or after the line:

### END DEBIAN AUTOMAGIC KERNELS LIST

You select the stanza you want to boot by default with the setting I showed you above. By counting the number of "title" lines from the top to the stanza you want to boot, less one. If you want your Windows stanza to appear at the top of your menu you would put that stanza above the "begin" line and leave the default set to 0 to boot it by default.

I hope this helps you. :-)

Fred
Locked

Return to “Beginner Questions”