After Arch Linux install it just shows the text "No bootable device found"
Solution 1
I had same problem and by searching I found that uuid of root / partition is wrong in grub.cfg you can try this:
- Boot from live archlinux media
mount /dev/sdxx /mnt
(sdxx is your root partition)arch-chroot /mnt
grub-mkconfig -o /boot/grub/grub.cfg
grub-install
finish.
Solution 2
OK. Became a bit long for comment. This is not directly related, but only to explain the aa55
comment.
When the Basic Input/Output System (BIOS) starts it does a Power-On Self
Test (POST), check hardware etc. Then it looks for devices that are both
bootable and active by order given by CMOS (Your configuration in BIOS – which in turn is given by a Complementary Metal Oxide Semiconductor). When it finds a disk that has 0xaa55
at offset 510 it loads that section of the disk,
(sector 1), into memory and leave control to it on address 0x00000 of that
code. Those 512 bytes are the Master Boot Record (MBR).
That code, in this case "GRUB - boot", check various bytes of these 512 in addition to ask BIOS for various information. In this process it locates which disk has rest of GRUB and load that section of the disk into memory – then that part of code gets control. That one mounts kernel etc. and leaves control to that.
Using GPT the image GRUB loads from within MBR is located in the bios_grub
partition, - which you have, and is big enough, etc., so can't see how that
could be wrong.
On "No bootable device found." message from BIOS – one can have the case
that MBR of boot disk is corrupted, if MBR ends in 0xaa55
and the MBR is
corrupt one usually get an other error - or the system simply hangs.
Anyhow. This is weird. I notice you have no partition marked as "boot".
Using GPT that is correct, - but, though it is forbidden, you could try to
flag one e.g. sda5
as boot. In gparted: (learned that
(g)parted also alter GPT which whan do not want)fdisk :
# Toggle bootable:
a [DISK NUMBER]
# Check (could be an asterisk marking boot partition):
p
# Save changes:
w
It could be that your BIOS is doing more then it should and checking the partition table in MBR.
EDIT – Update to comment:
AFAIK it doesn't matter which one you set as it is not actually used.
Point being, for whom ever say no "bootable device found", they shall
be satisfied. The sda1
is not a boot partition in the traditional sense,
but space for GRUB boot files.
In a traditional partition layout (not GPT) you have typically something like:
0x000 [Master Boot Record] <- Partition table say Partition 2 is active
|
0x200 [ GRUB module 1 ] <- core.img from GRUB |
|
0x400 [ Partition 1 Swap ] |
| | |
| | |
|__________________| |
|
0x... [ Partition 2 ext4 ] |
| * Active | <- AKA boot ----------------+
| |
|__________________|
0x... [ Partition 3 ext4 ]
| |
| |
|__________________|
That would mean 3 partitions. Everything before offset 0x400 on the HDD i raw bytes – as in not part of any partition etc.
Here boot partition is Partition 2 which is system partition with linux.
The GRUB module 1 files reside just after MBR and before first partition. It can reside anywhere, but usually on same disk and at offset 512 of MBR disk.
Also on a GPT system – GPT uses that section of the disk for itself, thus
one have to move those GRUB files to another location. That is what the
bios_grub
is for - to store core.img
for GRUB 2.
The "set boot flag" is merely a shot in the dark, - and would be surprised if it works. But one has start somewhere.
EDIT2:
What if you do this:
Backup current MBR:
dd if=/dev/sda of=/path/mbr-backup bs=512 count=1
Create image from
Code TEST
below, saved to filetest.s
by:as -o test.o test.s objcopy -O binary test.o test.img
Copy the
test.img
file to MBR:dd if=test.img of=/dev/sda bs=512 count=1
Boot
Code TEST:
.file "test.s"
.text
.code16
.globl start, _start
start:
_start:
jmp go
nop
go:
movb $0x48, %al
call prnt_chr
movb $0x65, %al
call prnt_chr
movb $0x6c, %al
call prnt_chr
movb $0x6c, %al
call prnt_chr
movb $0x6f, %al
call prnt_chr
movb $0x21, %al
call prnt_chr
ret
prnt_chr:
movb $0x0e, %ah
int $0x10
ret
. = _start + 0x1fe
.word 0xaa55
To restore MBR do:
dd if=/path/mbr-backup of=/dev/sda bs=512 count=1
This should simply print "Hello!" to the screen if the MBR was loaded, then stop. Tested it by running under qemu-system-x86_64, qemu-system-i386, VirtualBox, stationary Intel PC 32 and 64 bit.
Related videos on Youtube
brgr
Updated on September 18, 2022Comments
-
brgr over 1 year
I've been trying to install Arch Linux. After the installation, it shows the BIOS screen and after that there just comes a message that says "No bootable device found".
I have retried the whole scenario now some times, still it just shows the same message...
At installing, I have followed the Unofficial Beginner's Guide from the ArchLinux wiki.
Here is what I did:
First of all, I wiped the hard drive (on which before the wipe was Windows Vista installed) and put GPT on it by using gdisk. Then I set up some partitions, which now look as the following (output of parted):
Model: ATA ST9160310AS (scsi) Disk /dev/sda: 160GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 2097kB 1049kB BIOS boot partition bios_grub 2 2097kB 107MB 105MB ext2 Linux filesystem 3 107MB 21.6GB 21.5GB ext4 Linux filesystem 4 21.6GB 30.2GB 8590MB linux-swap(v1) Linux swap 5 30.2GB 160GB 130GB ext4 Linux filesystem
Then I mounted the root partition (sda2) to /mnt, after that also the boot and the home partition (sda3 and sda5) to /mnt/boot and /mnt/home and at the end formatted and activated the swap partition (sda4).
Now I began installing the base system. After selecting the mirrors, I installed base and base-devel.
At the end of the install I generated an fstab.
Then I finally chrooted into /mnt, set up some Locales, set a root password and then installed and configured Grub2, exactly as it is explained here.
At the end I exited from the chroot environment, unmounted the partitions and rebooted. You know the rest... It just showed the message that it coudn't find any bootable devices.
By the way, I tried to install it on this computer.
-
Runium about 11 yearsIs the output of
dd if=/dev/sda bs=1 skip=510 count=2 2>&- | hexdump
(or xxd instead of hexdump) equal to 55aa? If not the MBR is bad. -
brgr about 11 yearsThe output was the following:
0000000 aa55 0000002
If the MBR is bad, how you say, is there something I can do to make it good again? -
Runium about 11 yearsNo. That looks OK. (0000000 and 0000002 are offset)
aa55
is correct MBR signature (55aa
on little endian system). -
Ievgen Chuchukalo about 10 years@Sukminder, I may be missing something, but the OP said he used GPT, not MBR.
-
Runium about 10 years@JMCF125: GPT also uses MBR. Instead of a full partition table it holds one partition of maximum size. The GPT data usually start at offset 512 (After MBR). upload.wikimedia.org/wikipedia/commons/0/07/… MBR holds stage one of boot loading. Logical Block Address 0 -> Legacy MBR.
-
Ievgen Chuchukalo about 10 years@Sukminder, indeed I was missing something. That also explains your answer/long-comment. Thanks for the info!
-
-
brgr about 11 yearsFirst of all thank you for your help. Could you please explain to me why I should set
sda5
as boot partition. Isn'tsda1
a better option to set as boot partition, as it is here just for that? -
brgr about 11 yearsOk, I've tried this now, but sadly with the same result...
-
brgr about 11 yearsWhat should it have listed?
-
brgr about 11 yearsI have done all this already at the first try. However, I tried to do it again as you explained and got an error on
grub-install
: it said there would be no Bios boot partition on/dev/sda
, while there actually is one. -
brgr about 11 yearsOk, I have now also tried your second advice, still with no result :(
-
brgr about 11 yearsYes it is listed.
-
Runium about 11 yearsThis would probably not lead many places, but could you post the MBR somewhere? E.g. paste.debian.net , Dump with xxd, hexdump or the like - copy and paste. - E.g.
hexdump -n 512 /dev/sda
orxxd -l 512 /dev/sda
. -
Runium about 11 years@bgr updated boot flag method.
-
brgr about 11 yearsHi Sukminder! I've got it now :). It was because my BIOS doesn't understand GPt, so I put MBR on /dev/sda and everything works well now. Thank you anyways for your help!
-
Runium about 11 years@brgr: That's great. And, yes, suspected as much as the "Hello!" thing didn't work. It is rather stupid actually, – as that means BIOS goes outside it's intended aarea. It has nothing to do checking the contents of your HDD other than that there is a MBR mark and load that. Found this link btw. Look at Sticking with the BIOS, event though you solved it it can be worth a read.
-
terdon about 8 yearsAnswering old posts is fine and even encouraged. However, please edit your answer and highlight the part that actually answers. What was the solution you found? What statement? Providing a link to another page that might contain an answer is not an answer. Instead, please quote the relevant section directly in your answer so all information is contained here.
-
Razakhel about 8 yearsThe answer was there, just quoted from the link I provided, not highlighted though. Thanks for pointing that out. Please tell me if you feel like something else is necessary.
-
Razakhel about 8 yearsReal quote added now. And corrected the
512MB (at least)
, it was the other way around...