Skip to content

Booting from USB stick on older hardware

I spent the better part of the weekend with trying to get an older Athlon XP mainboard to boot grub from an USB stick. Unfortunately, without success.

Since a few months, my notebook boots Windows XP when it is booted naively. Only if the correct USB stick is plugged in on boot, the Debian system that I work with comes up. The USB stick has grub, a kernel and an initrd which is used to boot and unlock the crypto file systems (crypted LVs) on the disk and can be removed once the system has booted.

I wanted to use the same scheme for a "newly built" new desktop from old parts. Unfortunately, this was much harder than I expected.

Since a few years, I use the USB-ZIP format for USB sticks that need to boot. It has shown that this format has the best chance to successfully boot. For more information about this format and about how to build it, see /usr/share/syslinux/README.usbkey on any recent Debian system with syslinux installed.

My grml USB stick that I always have on me is formatted like this, and the "new" desktop boots it just fine. The boot stick for my notebook is an USB-ZIP as well, only that its primary partition is not FAT, but ext3. Unfortunately, the BIOS of the "new" desktop seems to refuse booting grub. Neither my notebook's stick nor the new stick even come to the "loading stage x" output of grub, let alone to the menu. syslinux works fine, and both sticks boot just fine on my notebook and on a qemu on the "new" desktop.

Since the grub command line has saved me multiple times in the past, I didn't really like the idea of having to use syslinux, and decided to boot the "new" desktop conventionally from hard disk without the use of an USB boot stick. Until I got this far, the complete saturday and the better part of sunday was wasted. Darn.

This reminds me of a mainboard from 2002 (incidentally from the same vendor), which checked whether the first hard disk had an active primary partition on it before it even tried to execute the MBR code. If no primary partition was found (which was common case with the partitioning scheme that I used back then which only had logical drives - this was before I discovered LVM), the BIOS gave the error message "Not found active primary partition" (sic!) and refused to boot. Stupid programmers trying to outsmart the sysadmins of their products. But at least, the error message was reasonably clear back then.

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

chithanh on :

two remarks: 1) you can use GRLDR to integrate Debian in your Windows boot menu. This is being used by http://goodbye-microsoft.com/ among others.

2) you can mark an extended partition as active (if your partitioning tool allows this). BIOS knows no logical drives and therefore cannot distinguish a "real" primary from an extended partition.

Marc 'Zugschlus' Haber on :

(1) That was not desired. The notebook should not boot the Linux system without the USB stick. If I wanted real dual boot, I'd have integrated Windows into the grub menu.

(2) Tried that back then, didn't work. The BIOS obviously checked the partition type.

chithanh on :

1) Of course the USB stick could still contain the dm-crypt key that is necessary to bring up the system. The initrd would just wait until the stick is plugged in. So no BIOS support for booting from USB is necessary.

2) There are several types of extended partitions (0x5, 0xF, 0x85). Did you try all of them?

Marc 'Zugschlus' Haber on :

(1) Tried that, system is so broken that it doesn't boot from HD while the stick is plugged in.

(2) No. That was years ago.

macdet on :

Please feel free to look my notes:

http://wiki.mobbing-gegner.de/LebensRetter/grmlundgrubaufdem_stick

Add Comment

Markdown format allowed
Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
Form options