Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
lithium17Offline
Post subject: [SOLVED] GRUB Problems  PostPosted: 02.04.2012, 22:43



Joined: 2012-01-31
Posts: 9

Status: Offline
Good day,

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


and then:
      Code:
Get:1 http://ftp.debian.org/debian/ sid/main bash i386 4.2-2 [1,471 kB]
Get:2 http://ftp.debian.org/debian/ sid/main liblua5.1-0 i386 5.1.5-1 [184 kB]                                         
Get:3 http://ftp.debian.org/debian/ sid/main grub-pc i386 1.99-19 [139 kB]                                             
Get:4 http://ftp.debian.org/debian/ sid/main grub-pc-bin i386 1.99-19 [845 kB]                                         
Get:5 http://ftp.debian.org/debian/ sid/main grub2-common i386 1.99-19 [94.1 kB]                                       
Get:6 http://ftp.debian.org/debian/ sid/main grub-common i386 1.99-19 [2,632 kB]                                       
Get:7 http://ftp.debian.org/debian/ sid/main libmusicbrainz3-6 i386 3.0.2-2.1 [131 kB]                                 
Fetched 5,496 kB in 21s (255 kB/s)                                                                                     
Preconfiguring packages ...
(Reading database ... 134536 files and directories currently installed.)
Preparing to replace bash 4.2-1 (using .../archives/bash_4.2-2_i386.deb) ...
Unpacking replacement bash ...
Processing triggers for menu ...
Processing triggers for man-db ...
Setting up bash (4.2-2) ...
Installing new version of config file /etc/skel/.bashrc ...
Installing new version of config file /etc/bash.bashrc ...
update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode.
Processing triggers for menu ...
(Reading database ... 134536 files and directories currently installed.)
Preparing to replace liblua5.1-0:i386 5.1.4-12 (using .../liblua5.1-0_5.1.5-1_i386.deb) ...
Unpacking replacement liblua5.1-0:i386 ...
Preparing to replace grub-pc 1.99-18 (using .../grub-pc_1.99-19_i386.deb) ...
Unpacking replacement grub-pc ...
Preparing to replace grub-pc-bin 1.99-18 (using .../grub-pc-bin_1.99-19_i386.deb) ...
Unpacking replacement grub-pc-bin ...
Preparing to replace grub2-common 1.99-18 (using .../grub2-common_1.99-19_i386.deb) ...
Unpacking replacement grub2-common ...
Preparing to replace grub-common 1.99-18 (using .../grub-common_1.99-19_i386.deb) ...
Unpacking replacement grub-common ...
Preparing to replace libmusicbrainz3-6 3.0.2-2 (using .../libmusicbrainz3-6_3.0.2-2.1_i386.deb) ...
Unpacking replacement libmusicbrainz3-6 ...
Processing triggers for man-db ...
Processing triggers for install-info ...
Setting up liblua5.1-0:i386 (5.1.5-1) ...
Setting up grub-common (1.99-19) ...
Setting up grub2-common (1.99-19) ...
Setting up grub-pc-bin (1.99-19) ...
Setting up grub-pc (1.99-19) ...
Installation finished. No error reported.
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition.  This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: non-sector-aligned data is found in the core file.
Installation finished. No error reported.
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition.  This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: non-sector-aligned data is found in the core file.
Installation finished. No error reported.
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition.  This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: non-sector-aligned data is found in the core file.


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.

Then, after failing 3 times, I select 'Yes', and this output:
      Code:
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.3-0.slh.6-aptosid-686
Found initrd image: /boot/initrd.img-3.3-0.slh.6-aptosid-686
Found linux image: /boot/vmlinuz-3.2-11.slh.3-aptosid-686
Found initrd image: /boot/initrd.img-3.2-11.slh.3-aptosid-686
Found linux image: /boot/vmlinuz-2.6.39-3.slh.2-aptosid-686
Found initrd image: /boot/initrd.img-2.6.39-3.slh.2-aptosid-686
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
  No volume groups found
done
Setting up libmusicbrainz3-6 (3.0.2-2.1) ...


and then upgrade ends and returns me to root prompt like usual. No other error messages.

But I am afraid to reboot now.

This is just a regular upgrade, not dist-upgrade. It was conducted while X and fluxbox is running, fwiw

Should I be scared? Is there any way I can troubleshoot?

Thank you for the help.
 
 View user's profile Send private message  
Reply with quote Back to top
lithium17Offline
Post subject: RE: GRUB Problems.  PostPosted: 02.04.2012, 23:34



Joined: 2012-01-31
Posts: 9

Status: Offline
Also, aptosid is the only operating system on this computer. Root, swap and /home parition

Including output of "fdisk -l" below.

      Code:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1549f232

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    30722047    15360000   83  Linux
/dev/sda2        30722048    34916351     2097152   82  Linux swap / Solaris
/dev/sda3        34916352   312580095   138831872   83  Linux


Last edited by lithium17 on 03.04.2012, 02:20; edited 1 time in total
 
 View user's profile Send private message  
Reply with quote Back to top
slhOffline
Post subject: RE: GRUB Problems.  PostPosted: 03.04.2012, 00:44



Joined: 2010-08-25
Posts: 733

Status: Offline
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:
      Code:
apt-get install grub-common/testing grub-pc/testing grub-pc-bin/testing grub2/testing grub2-common/testing
and defer the actual debugging to a more convenient time.
 
 View user's profile Send private message  
Reply with quote Back to top
lithium17Offline
Post subject: RE: GRUB Problems.  PostPosted: 03.04.2012, 01:11



Joined: 2012-01-31
Posts: 9

Status: Offline
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.

This is my terminal output:
      Code:
root@sid:/home/litho# dpkg-reconfigure grub-pc
Installation finished. No error reported.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.3-0.slh.6-aptosid-686
Found initrd image: /boot/initrd.img-3.3-0.slh.6-aptosid-686
Found linux image: /boot/vmlinuz-3.2-11.slh.3-aptosid-686
Found initrd image: /boot/initrd.img-3.2-11.slh.3-aptosid-686
Found linux image: /boot/vmlinuz-2.6.39-3.slh.2-aptosid-686
Found initrd image: /boot/initrd.img-2.6.39-3.slh.2-aptosid-686
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
File descriptor 6 (pipe:[3429]) leaked on lvs invocation. Parent PID 1880: /bin/sh
File descriptor 8 (pipe:[3432]) leaked on lvs invocation. Parent PID 1880: /bin/sh
  No volume groups found
done
root@sid:/home/litho#


Is everything okay and is it safe to reboot? I shall wait for your advice.

Sorry to waste your time troubleshooting inexperienced users like me.

Thank you.


Last edited by lithium17 on 03.04.2012, 02:24; edited 2 times in total
 
 View user's profile Send private message  
Reply with quote Back to top
slhOffline
Post subject: RE: GRUB Problems.  PostPosted: 03.04.2012, 01:48



Joined: 2010-08-25
Posts: 733

Status: Offline
That looks good and should reboot just fine.

[feel free to ignore everything below, it's just explaining some background]

"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
 
 View user's profile Send private message  
Reply with quote Back to top
lithium17Offline
Post subject: RE: GRUB Problems.  PostPosted: 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.

Thank you for your time. Loving aptosid.


*lspci = VGA compatible controller: Intel Corporation 82G33/G31 Express Integrated Graphics Controller (rev 10)
 
 View user's profile Send private message  
Reply with quote Back to top
slhOffline
Post subject: RE: GRUB Problems.  PostPosted: 03.04.2012, 03:07



Joined: 2010-08-25
Posts: 733

Status: Offline
"vga=791" needs to go, so the whole line should be blank - and yes, particularly for intel this is pretty important.
 
 View user's profile Send private message  
Reply with quote Back to top
seagullOffline
Post subject:   PostPosted: 03.04.2012, 08:55



Joined: 2010-09-11
Posts: 42

Status: Offline
I use a ssd with GPT and experienced the following message after dpkg-reconfigure grub-pc:

      Quote:
dpkg-reconfigure grub-pc
/usr/sbin/grub-setup: Warnung: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!.
/usr/sbin/grub-setup: Warnung: Einbettung ist nicht möglich. GRUB kann in dieser Konfiguration nur mittels Blocklisten installiert werden. Blocklisten sind allerdings UNZUVERLÄSSIG und deren Verwendung wird daher nicht empfohlen..
/usr/sbin/grub-setup: Fehler: Nicht an Sektoren ausgerichtete Daten wurden in der Core-Datei gefunden.
Generating grub.cfg ...

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?
 
 View user's profile Send private message  
Reply with quote Back to top
slhOffline
Post subject:   PostPosted: 03.04.2012, 11:32



Joined: 2010-08-25
Posts: 733

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.
 
 View user's profile Send private message  
Reply with quote Back to top
leonidasOffline
Post subject:   PostPosted: 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.
 
 View user's profile Send private message  
Reply with quote Back to top
slhOffline
Post subject:   PostPosted: 03.04.2012, 19:17



Joined: 2010-08-25
Posts: 733

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.
 
 View user's profile Send private message  
Reply with quote Back to top
leonidasOffline
Post subject:   PostPosted: 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.
 
 View user's profile Send private message  
Reply with quote Back to top
hyOffline
Post subject:   PostPosted: 10.04.2012, 17:44



Joined: 2010-09-14
Posts: 163
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]
 
 View user's profile Send private message  
Reply with quote Back to top
slamOffline
Post subject:   PostPosted: 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

_________________
an operating system must operate
development is life
my Debian repo
 
 View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number 
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio