[syslinux] order of APPEND and INITRD

Gene Cumm gene.cumm at gmail.com
Sat Mar 16 06:09:31 PDT 2013


On Fri, Mar 15, 2013 at 6:48 PM, Alexander Perlis <aperlis at math.lsu.edu> wrote:
> Igor asked about APPEND:
>> In other words: Can I break up a long line into multiple lines
>> in 5.01 or 5.10pre now or is that still not supported?

Multiple uses of APPEND functions to override at this time.  I
actually pull a trick like what you're looking for with cmd.c32.

LABEL linux
LINUX vmlinuz
APPEND initrd=base.gz base-options

LABEL linux2
COM32 cmd.32
APPEND linux initrd=rd1.gz,rd2.gz extended-options

LABEL linux3
COM32 cmd.c32
APPEND linux extra-option

Calling "linux" results in the command line "vmlinuz initrd=base.gz
base-options" with vmlinux loaded as a kernel and base.gz as the sole
initrd.  Calling "linux2" results in the command line "vmlinuz
initrd=base.gz base-options initrd=rd1,rd2 extended-options" with
vmlinuz loaded as a kernel and rd1 and rd2 loaded as initrds.  If
using initramfs (CPIO.GZ), rd1 will be unpacked first followed by rd2.
 Calling "linux3" results in the command line "vmlinuz initrd=base.gz
base-options extra-option" and the same kernel/initrd as "linux".

> I also wonder: can one control whether the INITRD parameter gets prepended
> or appended? Right now it seems to be placed after APPEND parameters, but
> might be more useful if it came first.

This is its definition: on the end of the line, append a
"initrd=myinitrd.gz" value.  Of course, IPAPPEND also gets in there

> The Debian/Ubuntu installers will copy parameters after "--" in the syslinux
> config into the grub.cfg to become permanent additional kernel parameters
> for the final installed kernel. Since syslinux seems to place the INITRD
> parameter *after* the APPEND parameters, you would end up with a bogus
> initrd parameter on the installed kernel. Consequently the Debian/Ubuntu
> installers don't seem to use INITRD at all and just have a really long
> APPEND statement.
>
> I recall seeing some discussion on this list of getting rid of INITRD, but
> meanwhile, any harm in having its value precede that of APPEND on the kernel
> parameter line? Then 'APPEND' would become true to its name!

But APPEND is true to its name as it appends parameters directly to
the target binary.  It's just a matter of perspective.  Personally, I
avoid INITRD in favor of the above techniques.

-- 
-Gene


More information about the Syslinux mailing list