Mailing List Archive

Boots from prompt but not from syslinux.cfg
Hi,

I have a problem with syslinux.cfg. I can boot successfully by typing
on the boot: prompt but not from an entry in syslinux.cfg.

The command line is
boot: vmlinuz initrd=dvzip1.img root=/dev/ram ramdisk_size=8192<enter>

However if I enter the label of the kernel to boot, it fails to run
/sbin/init and in its absence /sbin/sh. The kernel boots correctly but
gets stuck after the following messages, after which I have to do a hard
reboot.

autodetecting RAID arrays
autorun ...
... autorun DONE.
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 64k freed

Could it be that the kernel command line is not formed correctly? Is
there a way to print out the kernel command line.

I am trying to create a bootable Iomega Zip disk using an internal Zip
drive. After some experimenting, I managed to boot off the disk but am
getting stuck at what is probably the last step.

Thanks in advance.
CheeChun

syslinux.cfg
============
DEFAULT dvs
PROMPT 1

LABEL dvs
KERNEL vmlinuz
APPEND initrd=dvzip1.img root=/dev/ram ramdisk_size=8192

Software version
================
syslinux version 1.66
kernel 2.2-15 (RedHat 6.2)
Boots from prompt but not from syslinux.cfg [ In reply to ]
Hi,

CheeChun Kok <cheech@pixelmetrix.com> schrieb am 30.01.02:
> I have a problem with syslinux.cfg. I can boot successfully by typing
> on the boot: prompt but not from an entry in syslinux.cfg.
>
> The command line is
> boot: vmlinuz initrd=dvzip1.img root=/dev/ram ramdisk_size=8192<enter>

There was some problem with a trailing space at the end of the
commandline. Maybe this hits you?

> However if I enter the label of the kernel to boot, it fails to run
> /sbin/init and in its absence /sbin/sh. The kernel boots correctly but
> gets stuck after the following messages, after which I have to do a hard
> reboot.
>
> autodetecting RAID arrays
> autorun ...
> ... autorun DONE.
> VFS: Mounted root (ext2 filesystem) readonly.
> Freeing unused kernel memory: 64k freed
>
> Could it be that the kernel command line is not formed correctly? Is
> there a way to print out the kernel command line.

You could patch the kernel, if you get it to boot it's in
/proc/cmdline.

> I am trying to create a bootable Iomega Zip disk using an internal Zip
> drive. After some experimenting, I managed to boot off the disk but am
> getting stuck at what is probably the last step.

> syslinux.cfg
> ============
> DEFAULT dvs
> PROMPT 1
>
> LABEL dvs
> KERNEL vmlinuz
> APPEND initrd=dvzip1.img root=/dev/ram ramdisk_size=8192
>
> Software version
> ================
> syslinux version 1.66
> kernel 2.2-15 (RedHat 6.2)

Regards,

Josef

________________________________________________________________
Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr!
Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13
Boots from prompt but not from syslinux.cfg [ In reply to ]
CheeChun Kok wrote:

> Hi,
>
> I have a problem with syslinux.cfg. I can boot successfully by typing
> on the boot: prompt but not from an entry in syslinux.cfg.
>
> The command line is
> boot: vmlinuz initrd=dvzip1.img root=/dev/ram ramdisk_size=8192<enter>
>
> However if I enter the label of the kernel to boot, it fails to run
> /sbin/init and in its absence /sbin/sh. The kernel boots correctly but
> gets stuck after the following messages, after which I have to do a hard
> reboot.
>


Dumb question: could you please make sure the last line of your
syslinux.cfg ends with a newline?

-hpa
Boots from prompt but not from syslinux.cfg [ In reply to ]
Josef Siemes wrote:
>
> There was some problem with a trailing space at the end of the
> commandline. Maybe this hits you?
>
> > syslinux.cfg
> > ============
> > DEFAULT dvs
> > PROMPT 1
> >
> > LABEL dvs
> > KERNEL vmlinuz
> > APPEND initrd=dvzip1.img root=/dev/ram ramdisk_size=8192
> >

You are right about the whitespace
I had vmlinuz<whitespace><newline> in the entry for KERNEL. This caused
argv_init array in the kernel code (init/main.c) to have two entries :
"init" and '\0'.

So, if you do not have /sbin/init in your root filesystem, the kernel
will try to start /bin/sh with these two parameters and falls over.

David,
You may want to include the above in the instruction page, if it is
indeed true.

Thanks
CheeChun