[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

HURD booted!



I managed to boot the HURD last night!

As I wrote before, the GRUB boot floppy provided with gnu-0.2.tar.gz
doesn't work off my LS120 IDE floppy. Neither does the 0.5 release of
GRUB, which I built from source. However, after many failed
experiments, I managed to modify grub-0.5's boot sector so that it
works with both my ordinary and my IDE floppies. (I include the patch
below, and I will tell Erich about my experiences.)

Having got grub-0.5 to boot from floppy I found that GRUB can't see the
partition in which I unpacked the Hurd ("Disk geometry error"). This
was no surprise, as the partition starts more than 2 GB into the disc.
I was pleased to notice, however, that GRUB can see at least one of my
logical partitions: when I type "root= (hd0,4)" it finds an "ext2fs"
which is presumably my Linux /usr partition in /dev/hda5.

So, all I simply did was copy the Hurd's /boot/gnumach and
/boot/serverboot to a new directory /hurd.boot/ in my Linux root
partition, /dev/hda2, which is visible for the BIOS and GRUB. (I also
copied /boot/servers.boot, but that was unnecessary, I think.) I then
gave these instructions to GRUB:

root= (hda0,1)
kernel= /hurd.boot/gnumach root=hd0s6 -s
module= /hurd.boot/serverboot
boot

And it worked!

(It did, however, take quite a few attempts to get those partition
descriptions correct; this seems to be real defect in the existing
documentation.)

I didn't really try to do anything with the Hurd after booting it, as
it's good to go to bed after a success rather than a failure. It's also
good to get six hours of sleep, when possible ...

Edmund



My GRUB patch:

It's just a hack, not a serious attempt to improve the software, but it
did give a floppy that boots off both my ordinary and my IDE floppy drives.

In grub-0.5/stage1/stage1.S the patch is:

< 	andb	$BIOS_HD_FLAG, %al
< 
< 	/* jz	floppy_probe */
< 	.byte	0x0f, 0x84; REL(floppy_probe)
---
> 	orb	$BIOS_HD_FLAG, %al
>
> 	/* jz	floppy_probe */
> 	.byte	0x0f, 0x84; REL(floppy_probe)

If you prefer to patch the binary boot sector, the change is:

< 24 80
---
> 0c 80

That's at address 0x55 in grub-0.5/bin/stage1; the address is
different, no doubt, in the Hurd's boot floppy, which is based on an
earlier release of GRUB, but the same change might work for that too.

Edmund


Reply to: