[syslinux] How to make a bootable USB flash drive manually?

Gene Cumm gene.cumm at gmail.com
Sat Jan 29 11:06:40 PST 2011


On Sat, Jan 29, 2011 at 13:00, Martin T <m4rtntns at gmail.com> wrote:
> Gene Cumm, Paul Bolle and Gert Hulselmans thank you for replies!
>
> At first I would like to boot from .iso. As I use SYSLINUX 3.63,
> according to this
> document(http://syslinux.zytor.com/wiki/index.php/SYSLINUX#INITRD_initrd_file),
> "INITRD" statement does not work(just to be sure I tried this and
> indeed initrd.gz did not load). However, it shouldn't harm if location
> of initrd.gz is specified using initrd=initrd.gz under APPEND.
>
> I tried with following:
>
> root at martin-desktop:~# cat /media/ubuntu/syslinux.cfg
> DEFAULT ubuntu
>
> LABEL ubuntu
> LINUX vmlinuz
> APPEND initrd=initrd.gz boot=casper
> iso-scan/filename=/ubuntu-8.04.4-desktop-i386.iso
> root at martin-desktop:~#
>
> ..and it loaded to Ubuntu! Basically problem is solved now. However, I
> tried to simplify configuration of syslinux.cfg and ended up with
> this:
>
> root at martin-desktop:~# cat /media/ubuntu/syslinux.cfg
> DEFAULT vmlinuz
> APPEND initrd=initrd.gz boot=casper
> iso-scan/filename=/ubuntu-8.04.4-desktop-i386.iso
> root at martin-desktop:~#
>
> This works as well. As I understand, DEFAULT points to executable
> kernel image(vmlinuz) and APPEND adds parameters to kernel: "initrd="
> points to initial ramdisk and "iso-scan/filename=" teaches Ubuntu
> distribution, that it should load from .iso image. Am I correct, that
> booting from .iso image needs to be supported by distribution boot
> scripts? In other words "iso-scan/filename=" might not always work? In
> addition, what does "boot=casper" do?

This config could be acceptable if that's the only thing you ever want
to use this USB flash drive for which is why I'd recommend the
previous config over the new one.  Both are under 512 bytes.  Both
would have the same disk I/O requirement and the processing difference
is indistinguishable to a human.

What this means is the global DEFAULT KERNEL/LABEL is "vmlinuz" and
the global APPEND is added to all commands that are executed.

-- 
-Gene

> 2011/1/29 Gert Hulselmans <gerth at zytor.com>:
>> Martin T wrote:
>>> 10) create /media/syslinux.cfg file
>>>
>>> root at martin-desktop:~# printf "default vmlinuz\nappend
>>> initrd=initrd.gz\n" > /media/syslinux.cfg
>>> root at martin-desktop:~#
>>>
>> Your syslinux.cfg file is wrong when you want to do boot from the ISO.
>>
>> Use this:
>> ========================================
>> DEFAULT ubuntu
>>
>> LABEL ubuntu
>> LINUX /vmlinuz
>> INITRD /initrd.gz
>> APPEND boot=casper iso-scan/filename=/ubuntu-8.04.4-desktop-i386.iso
>> ========================================
>>
>> - Gert Hulselmans




More information about the Syslinux mailing list