You are not logged in.

#1 2013-04-14 09:01:52

atomicpookavirus
Member
Registered: 2009-06-28
Posts: 43

New install doesn't boot...

Just installed arch on an old 32bit laptop.

Partitioned with 300MB for /boot and the rest for /,
/boot is type b, fat32
using grub 2

when I went to reboot into my new install, the bios says that it isn't a valid boot media and to insert a floppy.

The chances of the hdd being bad are low. Windows XP booted fine until I formatted over it and the laptop has seen very little use, despite being old.

Your thoughts? I can provide more details, if you think it will help. Just let me know.

Offline

#2 2013-04-14 09:33:22

HalosGhost
Member
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 1,486
Website

Re: New install doesn't boot...

Do you have the /boot partition marked as bootable? Because it sounds like either that is the issue, or the MBR is invalid.

All the best,

-HG


"All errors are ᴘᴇʙᴋᴀᴄ errors—It's just a matter of narrowing down which keyboard and chair." -Trilby
\ldots

Offline

#3 2013-04-14 09:47:47

atomicpookavirus
Member
Registered: 2009-06-28
Posts: 43

Re: New install doesn't boot...

/dev/sda1 is marked bootable

How can I inspect the mbr?

Last edited by atomicpookavirus (2013-04-14 09:48:45)

Offline

#4 2013-04-14 09:55:40

HalosGhost
Member
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 1,486
Website

Re: New install doesn't boot...

Alright, given that you've said it's a 32-bit machine, I imagine you're using BIOS, not UEFI? Either way, the ArchWiki page for GRUB2 happens to have some useful information in this regard.

All the best,

-HG


"All errors are ᴘᴇʙᴋᴀᴄ errors—It's just a matter of narrowing down which keyboard and chair." -Trilby
\ldots

Offline

#5 2013-04-14 10:03:05

atomicpookavirus
Member
Registered: 2009-06-28
Posts: 43

Re: New install doesn't boot...

Yes, to the best of my knowledge I am using bios. That wiki page is illegible on my tablet, I will check back on the desktop...

Offline

#6 2013-04-14 18:09:36

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 20,104
Website

Re: New install doesn't boot...

atomicpookavirus wrote:

That wiki page is illegible on my tablet...


There is an app for that.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#7 2013-04-14 20:36:32

jacobopantoja
Member
From: Madrid
Registered: 2011-03-16
Posts: 44

Re: New install doesn't boot...

atomicpookavirus wrote:

/dev/sda1 is marked bootable

How can I inspect the mbr?

How are you so sure that it is marked bootable if you are asking how to inspect MBR? ;-)

I don't know if it is the easiest way (may be you can from GRUB but I don't know), but I would boot with e.g. a LiveCD and then run

# fdisk /dev/sda

and then "p" command prints out the partitions. An asterisk besides a partition means that is marked as bootable (and you should have only one marked).

Offline

#8 2013-04-14 23:43:05

atomicpookavirus
Member
Registered: 2009-06-28
Posts: 43

Re: New install doesn't boot...

I figured it out, I got confused, following the archwiki installation guide.

Install a bootloader
GRUB
For BIOS:
# arch-chroot /mnt pacman -S grub-bios

I just assumed that was it, because that's where that section of the guide ends and I didn't think to click the hyperlink to the wiki page on grub.
Turns out, I needed to -

Install to 440-byte MBR boot code region
To setup grub-bios in the 440-byte Master Boot Record boot code region, populate the /boot/grub directory, generate the /boot/grub/i386-pc/core.img file, embed it in the 31 KiB (minimum size - varies depending on partition alignment) post-MBR gap, and generate the configuration file, run:
# modprobe dm-mod
# grub-install --recheck /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg

Thanks, Halos Ghost

Jason, thanks for the tip - /most/ sites respect my browser setting for enlarged text. Some sites, for whatever reason force tiny text. I don't know if this is a problem with my brower (dolphin) or the website.

jacob, yeah, I used fdisk to partition the drive and mkfs to format the respective partitions. I still don't know how to inspect the MBR, so far as I can tell that's a far more involved task than simply running a command line utility with human readable output.
Searching the internet, I found the same question, and the answer was to use dd to dump the binary code and then to read it as hexadecimal. That doesn't help me because I don't have the skillset to distinguish good grub hexadecimal from - anyhing else, hexadecimal.

Last edited by atomicpookavirus (2013-04-14 23:46:37)

Offline

#9 2013-04-15 01:46:50

ght
Member
From: Germany
Registered: 2013-04-13
Posts: 3

Re: New install doesn't boot...

I don't know if this works for Grub too, but for Syslinux you could check if your MBR boot sector is correct by doing a byte-by-byte compare of your disk and all the available boot sectors, so if that doesn't output anything, you're not using any of them, otherwise it will show you which one matched, for example:

# for i in /usr/lib/syslinux/*.bin; do cmp "$i" /dev/sda; done | grep EOF
cmp: EOF on /usr/lib/syslinux/mbr.bin

I'm not using Grub, but in theory you could just compare against every file it comes with wink :

# for i in $(pacman -Qql grub-bios | grep -v '/$'); do cmp "$i" /dev/sda; done | grep EOF

That obviously won't be able to check anything in the post-MBR gap though, so for grub this is probably not a sufficient check.

Also, for simply checking the partition table, doing

# fdisk -l /dev/sda

is faster than starting it and pressing "p".

Offline

#10 2013-04-15 04:52:41

atomicpookavirus
Member
Registered: 2009-06-28
Posts: 43

Re: New install doesn't boot...

Wow, protip! Thanks ght. This is why I love archlinux - really awesome community and documentation!
The shell script syntax isn't something I'm very familiar with yet, I've spent more time studying c and friends. I do get the gist of it, though.

Offline

Board footer

Powered by FluxBB