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

Nazo nazosan at gmail.com
Fri Mar 9 23:09:38 PST 2007


On 3/9/07, Brett <magnesium_ at yahoo.com> wrote:
>
> --- Nazo <nazosan at gmail.com> wrote:
>
> > 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.
>
> Message is exactly that:
> "invalid or corrupt kernel image"
>  I know what you mean, I have tried booting without a config file and it
> just says can't find kernel or something like that. Then I type bzImage at
> the boot prompt and then get the above error.
>
> I initialy just used dd to copy my kernel to the USB drive and after it
> boots I get something like "this is no longer supported by the kernel"
> immediatly after it trys to load the kernel. The kernel source docs
> mention that booting from a disk is no longer supported without a separate
> boot loader which is what brought me back to syslinux which always worked
> great in the past.
>
> My most recent config:
>
> default linux
> prompt 1
> timeout 100
> label linux
>         kernel bzImage
>         append root=/dev/hda2 initrd=usbKern
>
> I've been trying with and without a initrd also. All help much
> appreciated.
>
> Thanks,
> Brett
>
> > 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.)
> >
>
> > 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.
> >
>
>   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.)
> >

Hmm, "invalid or corrupt kernel image" should mean just what it says
-- that maybe there is something wrong with the file.  For starters,
I'm not sure if it supports bzip compression.  I've been using gzip
for all my kernel and image files as it at least used to be necessary
I think.  I wonder though if using the lable "linux" is wise since
when in a default unconfigured state it expects to find a kernel file
named "linux."

Anyway, toss on the chain.c32 file and try a configuration more like this:

default boothd
prompt 1
timeout 100
label boothd
        kernel chain.c32
        append hd0 2




More information about the Syslinux mailing list