[syslinux] Can't boot a kernel from usb drive

Nazo nazosan at gmail.com
Wed Mar 7 22:11:34 PST 2007


On 3/7/07, Brett <magnesium_ at yahoo.com> wrote:
> I have been trying to boot a kernel I compiled. I tried 2 different USB
> thumb drives. I tried win32 syslinux 3.31 and 3.36 with no luck. I even
> tried another known good kernel for testing purposes. After syslinux
> starts I get "Invalid or corrupt kernel image" but I don't think it is
> even really trying to run it.
>From what you're saying I wonder if it's even fully setup?  By default
it just looks for a generic file -- I think called simply "kernel" and
if it doesn't find it it gives an error, then drops you to the command
line.  Do you have a configuration file?

It could also be helpful to go into more detail as to exactly what it
says when it fails.

BTW, I've been booting stuff via syslinux on my USB drive for quite a
while without any problems, just for the record.  It shouldn't have
any troubles reading from a USB drive or anything, just as long as the
drive is FATxx as most are (or alternately, I once used ext3 with
extlinux also without troubles.)

 The last time I built a kernel about 1-1/2
> years ago you could put a custom kernel on a floppy disk and just boot
> your kernel from there. Since newer kernels are now larger than a floppy
> and that kind of booting is no longer supported in the kernel itself I
> hoped I could do this with syslinux.
I think kernels still support this.  I haven't booted one from a
floppy in a good while now, but not so very long ago I've used some
that were too big.  They just split the whole thing up into two parts
and read first one part from the one disk, then when you swapped disks
they read in the rest.  Mind you, it depends on how literal you were
when you said that the kernel was larger.  These examples I've seen in
the past had a kernel that could fit on one disk when gzipped but the
kernel + initrd was too large so the initrd was gzipped and placed on
the second disk, so I guess that did mean it had to have kernel
support specifically for getting the initrd from that second disk.  As
I said, it has been a while since I used any of these (I don't even
HAVE a floppy drive anymore -- at least not a working one) so I admit
it could have changed since then.  it has largely become unnecessary
since a lot of the things that used to be booted from floppy have been
placed on CDRs instead.  If you make use of memdisk you can even just
take an existing disk image (or if you have two, you can use combine
them into one) and boot it from a CDR.


> I basically just want to boot my hard
> drive from a usb drive like I used to be able to do with a floppy. Should
> I be able to do this with modern kernels and Syslinux?
Yes.  Look in the com32/modules folder of the syslinux archive and
you'll find a chain.32.  The syntax is simple, just append the word
hd# # with the first number being the drive number (starting from 1)
and the second number being the partition (starting from 0 -- with 0
being the MBR and 1 being the first partition.)




More information about the Syslinux mailing list