0

my laptop has:

  1. 500gb hdd /dev/sda
  2. 22gb sdd /dev/sdb

I used to boot archlinux from a small ext2 partition on /dev/sda. The bios is set to use BIOS mode (not uefi), secure boot is disabled, AHCI is auto. This setup used to work.

Yesterday I did a lot of changes here: installed windows 7 and changed the partition. Now the situation is:

  1. /dev/sda1 windows 7 loader
  2. /dev/sda2 windows 7
  3. extended partition starting here
  4. /dev/sda5 boot (logical partition, flag "boot")
  5. /dev/sda6 swap (logical partition)
  6. /dev/sda7 home (logical partition)

Note: after the installation of win7, windows started just fine (its bootloader was installed correctly).

Once the restore of the linux partition was complete, I chrooted into my archlinux system and reinstalled grub on sda. The result was that the laptop starts but the bios complains about the lack of a bootable system.

I am able to start my archlinux from a supergrubdisk, and this confirm that the grub configuration is just fine. I tried one million times to reinstall grub on sda, it just completes without errors but the final result is always the same.

Unfortunately my archlinux original system was installed more than two years ago, and I can't be sure at that time I installed grub on the boot partition (not on the entire disk).

Am I missing something here?

The partition table is msdos, does it work with grub2? Does it require a GPT partition table?

The boot partition has the "boot" flag, is it enough?

Just to clarify: the bios starts but is unable to find something "bootable", thus I get an error at BIOS level. I never get to grub or a grub related error.

What can I do to make my laptop bootable again?

0

First, a useful tool for investigating almost any boot problem involving Linux is the Boot Info Script. This tool spits out a file called RESULTS.txt that includes most of the information necessary to troubleshoot most boot problems involving Linux. Please run that script and examine the results. If you can't figure it out yourself from there, you'll probably want to post it to a pastebin site and post the URL here for others to read.

Second, you wrote:

The bios is set to use BIOS mode (not uefi)

Although some computers do support such a configuration, many (I suspect most) do not; enabling BIOS/CSM/legacy mode simply makes using that boot mode possible. The firmware may still arbitrarily choose to boot in EFI/UEFI mode even when BIOS/CSM/legacy mode is enabled. This is relevant because it's entirely possible that you installed Windows in BIOS mode and Linux in EFI mode; or the machine may be trying an EFI-mode boot despite the fact that you have no EFI-mode boot loader. Mixed-mode configurations can be nightmares to maintain. (See my Web page on this subject for more information.)

You can test your Linux boot mode by looking for a directory called /sys/firmware/efi. If it's present, you've definitely booted in EFI mode; but if it's absent, you've probably booted in BIOS mode. (There are ways to boot to EFI mode and not have a /sys/firmware/efi directory, but this result is unusual.) Of course, since you've booting Linux via a separate boot disk, its boot mode will tell you nothing about what boot loader(s) you've installed to your hard disk.

I tried one million times to reinstall grub on sda, it just completes without errors but the final result is always the same.

What exact command did you use? What GRUB package(s) have you installed? (Most distributions have different packages for BIOS-mode and EFI-mode GRUB, although I'm not sure if that's true of Arch.)

The partition table is msdos, does it work with grub2? Does it require a GPT partition table?

GRUB 2 supports both MBR (msdos, as described by GParted and parted) and GPT. This is not your problem -- but an MBR partition table indicates that Windows is definitely installed in BIOS mode, since Windows ties boot mode to partition table type quite strongly. (MBR means BIOS, GPT means EFI.) Linux is much more flexible on this score, which can actually become a problem in cases like yours.

The boot partition has the "boot" flag, is it enough?

On an MBR disk, the "boot flag" identifies a partition that holds a second-stage boot loader. It's used by the Windows boot loader, SYSLINUX (IIRC), and a few other boot loaders. It is not (IIRC) used by GRUB, so it's basically irrelevant in your case.

Just to clarify: the bios starts but is unable to find something "bootable", thus I get an error at BIOS level. I never get to grub or a grub related error.

Always report the exact and complete error message. It's often helpful to take a screen shot (digital photo), since context may provide clues to those experienced in such things.

If I had to guess, I'd say that one of two things is happening:

  • Your firmware is trying to boot in BIOS mode, but something has wiped out or damaged the boot loader in the MBR, causing the boot to fail. In this case, re-installing GRUB should fix the problem. I know you say you've done so, but without knowing the exact command you used, I can't say if you've used the right command; and as I implied earlier, you may have repeatedly installed an EFI-mode boot loader, which will do you no good if the computer is attempting only a BIOS-mode boot.
  • Despite your enabling BIOS/CSM/legacy support in your firmware, it's trying to boot in EFI mode and is becoming confused by the lack of an EFI-mode boot loader -- or maybe it's finding something that's damaged and is therefore not falling back on a BIOS-mode boot.

The Boot Info Script output, and additional details I've requested, should help identify which of these two things is happening (or if it might be something else entirely).

Alternatively, if you want to start over from scratch, I recommend disabling BIOS/CSM/legacy mode. This usually results in a simpler boot path in the firmware, since all the BIOS options are closed off. You can then work through whatever problems both Windows and Linux present in booting their installers, and be assured you're installing both OSes in the machine's native boot mode.

  • I really thank you for your help and the time spent to try to help me. Long story short, I can't explain why, but the only way to get the bios to start grub is to set "active" one of the two partitions used by windows (sda1 or sda2): once booted into windows 7, I marked as active one of these partitions (which one is irrelevant, as a matter of act) and after the reboot, grub finally show up. This is completely non-sense. Just for trying, I booted a ubuntu liveusb, set the "boot" flag to sda5 (afaik it's the same of marking "active" from windows) and, here again, the pc is stucked at boot. – Desmond Jul 5 '15 at 15:23
  • If it could be of any use, or just interesing, I can still run the script you wrote about. In any case, thanks for your kind help. – Desmond Jul 5 '15 at 15:24
  • Chances are you're looking at a firmware bug. It may be insisting on seeing not just a partition with its boot flag set, but a partition with a particular type code with its boot flag set, before it will boot in BIOS/CSM/legacy mode. It's easiest and safest to just leave it as-is and not worry about it further; but you could try looking for a firmware update and, if none is available or if installing it changes nothing, report the bug to the manufacturer. – Rod Smith Jul 5 '15 at 16:47

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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