[syslinux] Trying to create bootable USB flash drive WITHOUT persistence

Paul D. DeRocco pderocco at ix.netcom.com
Wed Sep 23 18:29:52 PDT 2015


I've got an embedded x86 system built with Yocto, which boots from a USB
flash drive. It uses a loop mount to give access to an ext3 root file
system contained within a FAT16 file, which means it has persistent
storage. What I want is something that boots from the flash drive, but
copies everything into a large RAM disk, and runs from there, so that it
doesn't touch the flash drive once it's booted, and has no persistence, so
that it's always a clean boot. My system has a gig of RAM, and the file
system is about a third of that, so there should be plenty of room. The
Yocto build also creates an .iso file, which I believe works that way,
although I haven't tried it. So I'm wondering if running isohybrid on this
.iso image will give me what I want.

If it does, I have a second question. My USB drive actually has two
partitions, the first of which is a small FAT partition that contains
persistent data, and is visible if the drive is ever plugged into a
Windows system; and a second partition which is the boot partition
containing the live image produced by the Yocto build. If I use isohybrid,
it will overwrite everything. Once I've done this, would it be possible to
manually extract the boot partition with dd, then repartition the device
the way I need it, and write the boot partition data back to the second
partition, and have it still work?

If so, a third question: If I do a new build, can I replace the ROOTFS.IMG
file in that second partition with the xxx.rootfs.ext3 file created by the
build, without having to go through all the repartitioning rigamarole?

-- 

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco at ix.netcom.com



More information about the Syslinux mailing list