I received errors when performing an upgrade just now. Here are the steps.

apt-get upgrade:

Code:

The following packages will be upgraded:
bash grub-common grub-pc grub-pc-bin grub2-common liblua5.1-0 libmusicbrainz3-6
7 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 5,496 kB of archives.
After this operation, 34.8 kB disk space will be freed.
Do you want to continue [Y/n]? y

The reason why the last section erors are repeated 3 times is because in between them a blue background screen appeared in terminal and told me grub failed to install and asked should I continue. It said if I answer "Yes", my PC may not boot properly, so I answer "No" and another blue box appears asking which partition to install GRUB. As recommended, I select both options, /sda and /sda1, and after a few seconds I get the same error blue box again, repeating the process. Then same errors again. Sorry for not taking screenshot, but I think you know that type of error box.

I cannot reproduce that issue over here, but it looks a bit strange that grub-install appears to be triggered 3 times ("Installation finished. No error reported."). What I would try is, considering that you only have one OS and a single HDD to bother about, to "dpkg-reconfigure grub-pc" and select only /dev/sda as installation target (but please report here what's set up at the moment), hopefully that avoids the warnings.

If that doesn't work - and as a last resort, revert grub2 to the version in testing:

No, no. Sorry, English is not my first language. I regret not taking a screenshot.
I mean that I am the one who triggered it 3 times. Because I got the error and the "Grub install failed" blue box appeared again, so I repeated again. Only the 3rd time I selected "Yes" and the process finished.

I try your recommendation of "dpkg-reconfigure grub-pc" and first I get this screen:

I did not change just left it as "vga=791" and hit <Ok>. Is this correct?

and then I get this screen:

That is the default where both /dev/sda and /dev/sda1 are selected, just like the first time I get this message (in my first post on top). This time, I follow your words and unselect the second option, only first option, /dev/sda selected as per your advice. I press <Ok> again, and the process completes.

"File descriptor 6 (pipe:[3429]) leaked on lvs invocation. Parent PID 1880: /bin/sh" is not a grub2 problem itself, but triggered by os-prober on its hunt to find other operating systems on your harddisks. Given that you have none, you could also just "apt-get purge os-prober" - but again, that warning is harmless (and kind of to be expected).

Same for "No volume groups found", which isn't even a warning but stating the fact that you aren't using lvm2 (if you're annoyed about it, you could likewise "apt-get purge lvm2" (and probably mdadm and dmsetup as well)).

As a suggestion, you should usually leave "Linux command line" in your first screen empty, because KMS capable graphics drivers like intel, nouveau or radeon don't like it and often fail with this set. For non-KMS capable drivers like (the non-free nvidia or) basically everything else, this vga=791 setting is still valid and may be useful (it determines the tty resolution, the console font sizes before X/ KDE (or XFCE) starts). The "Linux default command line" can be left at "quiet" (you didn't fetch a screenshot of that one, and don't need to).
In your second screenshot, grub2's install target selection, you should usually only select your base drive ("[*] /dev/sda (160041 MB; ST3160815AS)"), which corresponds to the MBR of your drive(s); "[ ] - /dev/sda1 (15728 MB; /)" would correspond to your / partition and install grub2 into partition as well - which usually doesn't hurt (unless you have picky filesystems like XFS or JFS), but isn't necessary.

It is weird that your earlier upgrade attempts of grub2 failed, while it just goes through now, but bootloaders are walking on a thin line. Finding enough room in the "embedding area" to store stage1, which still needs to read contemporary filesystems to load stage2, without having to resort to fragile and easy to break blocklists.

Last edited by slh on 03.04.2012, 03:05; edited 1 time in total

lithium17

Post subject: RE: GRUB Problems. Posted: 03.04.2012, 02:14

Joined: 2012-01-31
Posts: 9

Status: Offline

slh,

Thank you for all your help, and I must say your kernels are great too.
I am also grateful for your explanation on the background process.

I have rebooted, and everything seems well. I was often been distressed about the "leaked on lvs invocation" messages, but am happy to hear it is harmless. Maybe later I shall try the "dpkg-reconfigure grub-pc" command again and remove the "vga=791" since I'm using Intel video (see below), but must I delete the whole line or just the 791 (vga=<blank>)?? Also, sorry for not fetching the "Linux default command line" screenshot, but you say is not needed.

This is my only PC currently and I'm happy to be able to reboot without problems. I have always been scared of GRUB or LILO things.

the error messages promised that my system won't be bootable but fortunately it worked now!?
Is it recommended to install a BBIOS Boot Partition? How can this be done on an already installed System?

slh

Post subject:Posted: 03.04.2012, 11:32

Joined: 2010-08-25
Posts: 949

Status: Offline

With GPT, it is strongly recommended (read required) to set up a small (16 MB is plenty, but if your system is UEFI capable it might make sense to reserve 200-300 MB, to allow re-designating it as EFI System partition (partition label ef00) at a later time) BIOS boot partition (partition label ef02) as well. The BIOS boot partition will hold stage1 of grub2 (core.img), for which traditionally (grub-legacy) a size limitation of 22.5 KB was claimed, these days it's rather about 28-30 KB in size. Without a BIOS boot partition, this needs to fit into the so called "embedding area", unused space before the partitions or their filesystems (in case you install grub2 into partition) begins, as you can imagine this is a very tight space and especially partitions created more than ~2 years ago might not offer enough room (for alignment reasons newer partition programs default to reserving more space for this these days). If you system doesn't support UEFI, you need to make sure that the BIOS boot partition is located (in its entirety) below 2 TB, which shouldn't be a problem for a SSD, while usually a good idea, it doesn't strictly need to be the first partition on the disk.

While I'm not 100% positive that the quoted warning is correct (due to the recent influx of those messages, but it might just be that grub2's stage1 grew a couple of bytes too much for your environment), using block lists is an alternative to embedding stage1 - but it is much more fragile and better avoided. stage1 contains enough code to read your /boot/ filesystems (ext4 in most cases), so it can locate second stage grub2 modules by their filename, just like the kernel images or initrds. If grub2 has to resort to blocklists, it has no concept or the used filesystem and has to fall back to absolute block addresses on your harddisk, this breaks if these changes (grub2 updating --> rewriting the modules at another, random, block address, the same might happen if your initrd is regenerated). Therefore grub2's blocklist fallback is strongly discourages, as your system can easily fail booting without prior warning after upgrading or other kinds of file movements.

leonidas

Post subject:Posted: 03.04.2012, 17:44

Joined: 2011-09-21
Posts: 5

Status: Offline

I think this grub cannot be installed to PBR at all. I have the same error messages as above while upgrade or grub-install --force /dev/sda6.
Had to go back to the testing version to make it work again.

slh

Post subject:Posted: 03.04.2012, 19:17

Joined: 2010-08-25
Posts: 949

Status: Offline

Many of these issues seem to be a result of #666992, which ought to be fixed in grub2 >=1.99-21 - coming to a mirror close to your with the next mirror sync.

leonidas

Post subject:Posted: 10.04.2012, 17:06

Joined: 2011-09-21
Posts: 5

Status: Offline

I can confirm that the installation-to-PBR-issue is gone and it works now with 1.99-21.

hy

Post subject:Posted: 10.04.2012, 17:44

Joined: 2010-09-14
Posts: 194
Location: Costa Teguise
Status: Offline

My laptop takes more than a minut to load the bios after latest du.
Usually it took <3 seconds to show the bios-pwd-dialogue.
The bios splash screen shows a little progress bar that seems to hang after about 75%
Could that be related to DU?
There was no other change to the machine...
[Admittedly my common sense tells me that anything before boot menu might not be related to the OS - but there is no new hardware or stuff like that. It just seems to hang on BIOS start-up]

slam

Post subject:Posted: 11.04.2012, 08:31

Team Member

Joined: 1970-01-01
Posts: 607
Location: w3
Status: Offline

hy wrote:

My laptop takes more than a minut to load the bios after latest du.
Usually it took <3 seconds to show the bios-pwd-dialogue.
The bios splash screen shows a little progress bar that seems to hang after about 75%
Could that be related to DU?
There was no other change to the machine...
[Admittedly my common sense tells me that anything before boot menu might not be related to the OS - but there is no new hardware or stuff like that. It just seems to hang on BIOS start-up]

Definitely a hardware/bios problem and not related to the operating system.
Greetings,
Chris