[lkml]   [2003]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Unable to boot a raw kernel image :??
H. Peter Anvin writes:
> Followup to: <>
> By author: Edgar Toernig <>
> In newsgroup:
> >
> > I had this problem a while ago. It turned out to be a (widespread)
> > BIOS bug triggered be the disk-size probe of the kernel's boot loader.
> >
> It's not a bug, really. The fact of the matter is that the disk
> geometry probe in bootsect.S pretty much only works for legacy
> floppies... no IDE floppies, no USB floppies, no virtual floppies.
> That, and the 1 MB limitation, is the reason it either needs to get
> nuked or get some massive surgery. I am currently trying to get Linus
> to accept a patch to put it out of its misery.

FWIW, I still use bzdisk images frequently, and the 1MB limit really
is a serious problem for 2.5 kernels, and 2.4 kernels build with gcc-3.
I'm currently using a patched kernel where `make bzdisk' invokes a
user-specified script, which in my case goes roughly like:


cat > $MTOOLSRC << EOF
drive v:
file="$FDIMAGE" cylinders=80 heads=2 sectors=18 filter

dd if=/dev/zero bs=72k count=20 of=$FDIMAGE
MTOOLSRC=$MTOOLSRC mcopy $LIBDIR/ldlinux.sys v:
dd bs=512 count=1 conv=notrunc if=$LIBDIR/bootsect.img of=$FDIMAGE

dd bs=72k if=$FDIMAGE of=/dev/fd0

The latest mtools are supposed to have direct support for image files,
which should eliminate the MTOOLSRC kludge.

All I'm really missing is a version of syslinux that understands enough
of MS-DOS FS layout to populate the FS and update the boot block without
having to mount the damn thing. That would eliminate the ldlinux.sys and
bootsect.img files, which I extracted from a syslinux-prepared floppy.

You can kill bootsect.S right now, IF you allow a user-specified script
to control how the boot floppy is prepared. Something like:


should be enough.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [W:0.106 / U:1.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site