lkml.org 
[lkml]   [2003]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Bootable CD idea
Date
> > > > [1] I originally thought that the 2.4 kernel's in-built floppy
> > > > bootloader used BIOS calls to access the disk, and that a 2.4 kernel
> > > > image as the El-Torito boot image would work, as the kernel would be
> > > > accessing the emulated disk, but it didn't seem to when I tried it
> > > > just now - it failed with an error saying something along the lines of
> > > > it had run out of data to decompress.
> > >
> > > when you did "make bzImage", are you sure you didn't get the message about
> > > the kernel being too big for floppy booting?
> >
> > No, I've just checked - the same kernel image boots fine from a real floppy.
> >
>
> The boot sector bootloader is broken for anything but genuine legacy
> floppies, because it relies on getting the proper sector not found in
> order to determine the geometry. Most LBA<->CHS conversions -- and
> that includes El Torito, IDE floppies, USB floppies, and just about
> anything else that isn't a classical legacy floppy -- simply spill
> into the next track, confusing bootsect.S. This is part of why
> bootsect.S is gone in 2.5.

Ah, it makes more sense now :-). So, could I bodge 2.4 in to working
by modifying bootsect.S with something like this?


movw $disksizes+1, %si # Force 18 sectors/track
probe_loop:
lodsb
cbtw # extend to word
xchgw %cx, %ax # %cx = track and sector
xorw %dx, %dx # drive 0, head 0
movw $0x0200, %bx # address = 512, in INITSEG (%es = %cs)
movw $0x0201, %ax # service 2, 1 sector
int $0x13
movb $0x03, %ah # read cursor pos
xorb %bh, %bh

John.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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