Mailinglist Archive: opensuse (1239 mails)

< Previous Next >
Re: [opensuse] 12.3 boot woes, vanishing everything except memtest, how does grub2 populate the /boot/grub2/grub.cfg
Please stop replying as private messages, after all we are on a
mailing-list and everybody wants to profit from solutions and replies.

On Thu, Jun 20, 2013 at 12:05 PM, John Connor <jaconnor44@xxxxxxxxx> wrote:
Grub2 is a little confusing after grub legacy. The main (admin)
difference is that the menu is designed to be automatically produced.
Of course, it is possible to hand-edit /boot/grub2/grub.cfg, but this
file gets rewritten every time there is a kernel update.

How it works: /etc/grub.d contains a number of scripts which
basically look for operating systems on the HDD. The scripts are
executed by the grub update scripts (on my 12.2 Open Suse this is
actually grub2-mkconfig -o /boot/grub2/grub.cfg), each script
basically contributes part of the menu - for example, if you have
multi-boot, then the os-prober should find the other systems (Windows,
other Linuxes etc.) and create corresponding menu entries. You can
remove menu entries by changing the corresponding scripts from
executable to non-executable.

/etc/default/grub is used to set common parameters such as the menu
timeout, the default system to boot (for a multiboot system), kernel
boot parameters and so on. In the comments at the beginning of this
file it should tell you what you have to run if the file is changed -
in 12.2 the exact same script is also used for processing the
/etc/grub.d scripts to set up the whole menu.

So, I would suggest that you first check that all the scripts in
/etc/grub.d are in fact executable - if not, make them so and rerun
the grub update script (as noted in /etc/default/grub comments).

If the scripts are all executable and it still doesn't work, it means
that the update script can't find the kernel in the boot partition.
The specific script which makes the entry for booting the Open Suse
Linux kernel is /etc/grub.d/10_linux. It could be that this script is
missing or corrupt, or that grub2 itself was messed up by the update
(the script gets its boot device from grub2).

thanks for the reply, I kinda figured ballpark as you wrote down, and
also saw those scripts and roughly looked at them, still I wasnt
exactly sure how grubmkconfig was populating that cfg file, as I said,
when repairing the badly behaving 12.3 via usb key, it did show grub2
menu properly, and I managed to save that normally looking cfg file
too, but during the early runtime there was that additional script
executed which messed the cfg up again and reduced it to memtest as
the only entry.

so I was wondering if those grub2 scripts did look into the rpm
database for kernel packages, or into the /boot/ path for kernel
files or how that all worked, or why my entries got deleted :(

also when I was first experimenting and hadnt figured out that my cfg
had been reduced, I tried to mkinitrd and that wasnt outputting
anything at all, so maybe it was some messed up rpm database or

meanwhile I also figured that some rpm packages seem not to be listed
in the rpm database any more. I am a long time squid user, and it is
running in this apparently semi-fixed 12.3, but the rpm -aq doesnt
list any squid packages at all. so maybe I am gonna take a look at
packages and fore-reinstall packages that seem to be missing in the
rpm database.

is there a list of default (deployed via that images system during
clean install?) list of packages that get installed on a clean current
opensuse if I only click through the default buttons during clean
install and dont select any additional stuff? how can I reinstall all
default packages forcefully yet only write the binary files or
something to the disk, but not kill my config files wherever it

maybe this whole dang system is messed up beyond fixability. sigh.
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
This Thread