5

When I boot from GRUB, I get various error messages from GRUB, apparently at random : "invalid arch independent ELF magic" or "incompatible license" or "file not found". I can boot from the rescue DVD and then the main disk, /dev/sda, seems OK. I can fsck it (no error), I can mount, it can even use it as root (from the rescue DVD, boot with root=/dev/sda1). But the machine cannot reboot without the DVD rescue.

What I tried (without any success):

  • grub-install /dev/sda No error but the problem stays the same
  • Boot repair no error message but not better aftwerwards. You can check its report
  • removing the kernel and reinstalling it
  • removing GRUB, moving /boot/grub and reinstalling it

Debian stable "wheezy". I am not aware of any external recent event (no upgrade, no physical problem on the hardware). The PC has a few years, no UEFI, a regular Dell BIOS.

Versions of grub:

% dpkg -l 'grub*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                   Version          Architecture     Description
+++-======================-================-================-==================================================
un  grub                   <none>                            (no description available)
ii  grub-common            1.99-27+deb7u1   i386             GRand Unified Bootloader (common files)
un  grub-coreboot          <none>                            (no description available)
un  grub-doc               <none>                            (no description available)
un  grub-efi               <none>                            (no description available)
un  grub-efi-amd64         <none>                            (no description available)
un  grub-efi-ia32          <none>                            (no description available)
un  grub-emu               <none>                            (no description available)
un  grub-ieee1275          <none>                            (no description available)
un  grub-legacy            <none>                            (no description available)
un  grub-legacy-doc        <none>                            (no description available)
un  grub-linuxbios         <none>                            (no description available)
ii  grub-pc                1.99-27+deb7u1   i386             GRand Unified Bootloader, version 2 (PC/BIOS versi
ii  grub-pc-bin            1.99-27+deb7u1   i386             GRand Unified Bootloader, version 2 (PC/BIOS binar
un  grub-yeeloong          <none>                            (no description available)
un  grub2                  <none>                            (no description available)
ii  grub2-common           1.99-27+deb7u1   i386             GRand Unified Bootloader (common files for version
  • Are you certain that these are from GRUB? Particularly incompatible license doesn't sound like GRUB to me. Exactly which version of GRUB is installed? (Post the output of dpkg -l 'grub*'.) – a CVn Jul 22 '13 at 13:20
  • Certain. I cannot copy-and-paste easily but just after, I had "Entering rescue mode... grub rescue>" Also, see unix.stackexchange.com/questions/74087/… – bortzmeyer Jul 22 '13 at 13:24
  • That's one I haven't heard of before. You learn something new every day I guess. I take it you have reinstalled the GRUB packages as well as grub-install the bootloader? Since obviously if the files on disk got corrupted for whatever reason, grub-install won't help you. I had some really weird boot problems a while ago and one of the things I did which ultimately helped solve the problem was installing a kernel upgrade; I imagine the kernel files had become corrupted somehow, but it still mostly worked. – a CVn Jul 22 '13 at 13:30
  • 1
    Yes, I aptitude remove grub* and then aptitude install them again before running grub-install. – bortzmeyer Jul 22 '13 at 13:32
  • OK, so that's not it then. Thanks for confirming. (Good question by the way.) – a CVn Jul 22 '13 at 13:33
1

Maybe you are suffering from corruption at that particular block. Sounds unlikely, but have you tried reading the first few hundred kBs of that disk 4-5 times, and running checksums on the resulting file?

dd if=/dev/sdX | shasum -a 256 ?
  • 1
    Always the same value. Isn't it normal, since the readings after the first one will be from the kernel I/O cache? – bortzmeyer Jul 22 '13 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.