<br><font size=2 face="sans-serif">Douglas -</font>
<br>
<br><font size=2 face="sans-serif">Thanks again for the reply.</font>
<br>
<br><font size=2 face="sans-serif">Douglas McClendon <dmc.fedora@filteredperception.org>
wrote:</font>
<br><font size=2 face="sans-serif">> Message: 1</font>
<br><font size=2 face="sans-serif">> Date: Fri, 25 Jul 2008 23:53:41
-0700</font>
<br><font size=2 face="sans-serif">> From: Douglas McClendon <dmc.fedora@filteredperception.org></font>
<br><font size=2 face="sans-serif">> Subject: Re: [Fedora-livecd-list]
Re:  How do I save and restore my</font>
<br><font size=2 face="sans-serif">>          
       overlay?</font>
<br><font size=2 face="sans-serif">> To: fedora-livecd-list@redhat.com</font>
<br><font size=2 face="sans-serif">> Message-ID: <488AC9F5.5060905@filteredperception.org></font>
<br><font size=2 face="sans-serif">> Content-Type: text/plain; charset=ISO-8859-1;
format=flowed</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> martin.x.long@jpmchase.com wrote:
</font>
<br><font size=2 face="sans-serif">> > Douglas McClendon <dmc.fedora@filteredperception.or
wrote:</font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> >  >If that doesn't
help or answer you question, try to add more detail to</font>
<br><font size=2 face="sans-serif">> >  >your question.</font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> > Douglas -</font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> > Thanks for the reply.  </font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> > I use the live usb tools to
create my live USB stick with a 2047 MB </font>
<br><font size=2 face="sans-serif">> > overlay.  I boot from
it and let it run updates. I reboot the LiveUSB to </font>
<br><font size=2 face="sans-serif">> > make sure it still boots,
then I shut down.  I boot a system on a copy </font>
<br><font size=2 face="sans-serif">> > of Fedora 9 on the hard drive
and plug in my Live USB so I can see the </font>
<br><font size=2 face="sans-serif">> > files on my USB stick.  </font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> > I see 2 folders:</font>
<br><font size=2 face="sans-serif">> > LiveOS</font>
<br><font size=2 face="sans-serif">> > and</font>
<br><font size=2 face="sans-serif">> > syslinux</font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> > in the LiveOS folder I see
three files:</font>
<br><font size=2 face="sans-serif">> > osmin.img</font>
<br><font size=2 face="sans-serif">> > overlay-FEDORA-3099-53F2</font>
<br><font size=2 face="sans-serif">> > and</font>
<br><font size=2 face="sans-serif">> > squashfs.img</font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> > ======</font>
<br><font size=2 face="sans-serif">> > assumptions</font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> > squashfs.img looks to be the
size of the live iso</font>
<br><font size=2 face="sans-serif">> > overlay-FEDORA-3099-53F2 looks
to be the size of the overlay and has </font>
<br><font size=2 face="sans-serif">> > overlay in the file name</font>
<br><font size=2 face="sans-serif">> > osmin.img is only 8k probably
a boot strap, I'm not sure.</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> osmin.img is part of an optimization
used during the install-to-disk</font>
<br><font size=2 face="sans-serif">> process.  Interesting long
story, but should not be relevant here.</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> > =======</font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> > I'm sorry, I can't find anything
on the LiveUSB file structure on the </font>
<br><font size=2 face="sans-serif">> > WiKi.  I've signed on
as a writer for the Fedore project so I'd like to </font>
<br><font size=2 face="sans-serif">> > write it once I figure out
what it is.</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> Sounds like a good plan.  I
don't have the free time I used to when I</font>
<br><font size=2 face="sans-serif">> was happily unemployed, but I'll
try to help.</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> > I was hoping that I could
backup the overlay file and the syslinux </font>
<br><font size=2 face="sans-serif">> > folder from my completely
updated LiveUSB stick and restore them to a </font>
<br><font size=2 face="sans-serif">> > newly built LiveUSB from my
backup.</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> I think this should work, but there
may be some subtle wording here.</font>
<br><font size=2 face="sans-serif">> What you said almost sounds like
boiling down to doing a straight</font>
<br><font size=2 face="sans-serif">> duplication of a LiveUSB, which
AFAIK should work.  To the extent that</font>
<br><font size=2 face="sans-serif">> it doesn't work, we should focus
on how what you are doing is different</font>
<br><font size=2 face="sans-serif">> than a pure duplication.</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> >  > I'm not entirely
sure what you mean.  One thing that is possible is to</font>
<br><font size=2 face="sans-serif">> >  > copy the overlay
file from one liveusb and put it on another.  Though</font>
<br><font size=2 face="sans-serif">> >  > the format of the
overlay file is inherently tied to the specific liveos</font>
<br><font size=2 face="sans-serif">> >  > it was originally
with.  I.e. you won't be able to copy an overlay file</font>
<br><font size=2 face="sans-serif">> >  > from an f9-x86
liveusb onto an f9-x64 or f10-x86 liveusb.  Or even a</font>
<br><font size=2 face="sans-serif">> >  > customized f9-x86
liveusb that you created with livecd-creator/tools.</font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> > Nothing fancy - The same USB
stick, built in the same way with the same </font>
<br><font size=2 face="sans-serif">> > iso and the same overlay size.</font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> > The overlay file name changes.
 I've given the updated file (the overlay </font>
<br><font size=2 face="sans-serif">> > that was part of the LiveUSB
for all of the updates) the same name as </font>
<br><font size=2 face="sans-serif">> > the new file that is created
and left the updated file with its original </font>
<br><font size=2 face="sans-serif">> > name. I've overwritten just
the overlay itself and the overlay and every </font>
<br><font size=2 face="sans-serif">> > combinarion of the osmin.img
and squashfs.img files.</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> This sounds reasonable.  Now,
if this is a new LiveUSB built from the</font>
<br><font size=2 face="sans-serif">> same LiveCD, the osmin.img and
squashfs.img should be 100% identical.</font>
<br><font size=2 face="sans-serif">> Same file sizes, same md5sums.
 If they aren't, mention that.</font>
<br><font size=2 face="sans-serif">> </font>
<br>
<br><font size=2 face="sans-serif">I always build from the same .iso using
a script so everything is built identically.  The overlay file name
does change every time though.</font>
<br>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> > I could never get it to boot.
 The boot starts but then hangs.</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> What is the last thing you see
when it hangs?</font>
<br><font size=2 face="sans-serif">> </font>
<br>
<br><font size=2 face="sans-serif">=================================================</font>
<br><font size=2 face="sans-serif">Decompressing Linux... done.</font>
<br><font size=2 face="sans-serif">Booting the kernel.</font>
<br><font size=2 face="sans-serif">sd 2:0:0:0: [sdb] Assuming drive cache:
write through</font>
<br><font size=2 face="sans-serif">sd 2:0:0:0: [sdb] Assuming drive cache:
write through</font>
<br>
<br><font size=2 face="sans-serif">----------------------------------------------------------</font>
<br><font size=2 face="sans-serif">WARNING: Cannot find root file system!</font>
<br><font size=2 face="sans-serif">----------------------------------------------------------</font>
<br>
<br><font size=2 face="sans-serif">Create symlink /dev/root and then exit
this shell to continue the boot sequence.</font>
<br>
<br><font size=2 face="sans-serif">bash-3.2#</font>
<br><font size=2 face="sans-serif">=================================================</font>
<br>
<br><font size=2 face="sans-serif">I can't find the symlink command anywhere
in this limited recovery shell.  I don't know where this little root
directory is so I can move commands and scripts into it (before I back
up) to help me recover or avoid banging out to this shell.</font>
<br>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> > Ideally, it would be great
to specify the overlay and the syslinyx </font>
<br><font size=2 face="sans-serif">> > folder that goes with that
overlay in the command line to build the </font>
<br><font size=2 face="sans-serif">> > LiveUSB.</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> Unfortunately the syslinux folder
is hard coded and is a limitation of</font>
<br><font size=2 face="sans-serif">> syslinux (actually you get 2 or
3 choices, but not an arbitrary choice).</font>
<br><font size=2 face="sans-serif">>   The overlay file name is
part of our code, and is keyed off of the</font>
<br><font size=2 face="sans-serif">> UUID of the usb disk (in this case).
 I can't say off the top of my head</font>
<br><font size=2 face="sans-serif">> (it's been awhile) whether making
the filename specifiable on the</font>
<br><font size=2 face="sans-serif">> commandline is trivial or not.</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> > At this point I would be thrilled
if I could get a set of manual steps </font>
<br><font size=2 face="sans-serif">> > together to have an updated
system without going through the update </font>
<br><font size=2 face="sans-serif">> > process.  I loose a day
each time.</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> If I find the time, I'll try to
reproduce your problem.  An absolute</font>
<br><font size=2 face="sans-serif">> brute-force method that should
work for identical sized usbsticks would</font>
<br><font size=2 face="sans-serif">> be a bit for bit copy.  I.e.
if you set up one 4G LiveUSB and it works,</font>
<br><font size=2 face="sans-serif">> you should be able to plug it in,
and if it is seen as perhaps /dev/sdX</font>
<br><font size=2 face="sans-serif">> and then you plug in another 4G
usbstick seen as /dev/sdY, you should be</font>
<br><font size=2 face="sans-serif">> able to run</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> dd if=/dev/sdX of=/dev/sdY</font>
<br>
<br><font size=2 face="sans-serif">I actually started with something like
this only created an output file of /usr/MLONG01/usbiso.  This was
ok with my 1 gig stick but it was to small to install apps and run updates,
so I upgraded.</font>
<br>
<br><font size=2 face="sans-serif">I could actually restore a bootable
USB from that file which would work in a pinch.  The problem is that
I'm using a 16Gig USB stick and my back up files would be 16Gig each and
take hours to create and restore.  It actually takes longer than building
the bootable USB and running the updates.  On the plus side I can
do a restore without an internet connection or interaction.  Unfortunately,
these files are just too big to work with.  </font>
<br>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> and get a working clone.  (note,
you may have the partition visible as</font>
<br><font size=2 face="sans-serif">> /dev/sdX1, but use the whole device
as above for the duplication).</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> >  > From an engineering
standpoint, of course anything is possible.  One</font>
<br><font size=2 face="sans-serif">> >  > use case I see,
is to use the persistence feature to add an entry to</font>
<br><font size=2 face="sans-serif">> >  > fstab, such that
say, /mnt/data mounts to a ext3fs image located on a</font>
<br><font size=2 face="sans-serif">> >  > file on your liveusb.
 You can then add a user that has a home directory</font>
<br><font size=2 face="sans-serif">> >  > under there, and
perhaps install applications under there.  In this way,</font>
<br><font size=2 face="sans-serif">> >  > you could then
copy that ext3fs image file to an f10 liveusb, and then</font>
<br><font size=2 face="sans-serif">> >  > only have to re-do
the fstab and passwd modifications, such that</font>
<br><font size=2 face="sans-serif">> >  > everything now
pretty much looks the same.</font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> > Your suggestion of building
a file structure that would transcend </font>
<br><font size=2 face="sans-serif">> > different releases would be
awesome but alas I need to crawl before I </font>
<br><font size=2 face="sans-serif">> > can run.</font>
<br><font size=2 face="sans-serif">> > </font>
<br><font size=2 face="sans-serif">> > Any help would be greatly
appreciated.</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> Hope the above helps.  And
as mentioned, if I find the time, I'll try to</font>
<br><font size=2 face="sans-serif">> reproduce your less brute-force
method of copying, which sounds pretty</font>
<br><font size=2 face="sans-serif">> reasonable, but clearly isn't working
for some reason or another.</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> And just post any wiki/work-in-progress
and I'll be happy to provide</font>
<br><font size=2 face="sans-serif">> feedback.</font>
<br>
<br><font size=2 face="sans-serif">What I know of the LiveUSB file structure
is not yet WiKiworthy.</font>
<br><font size=2 face="sans-serif">Are my assumptions correct regarding
squashfs.img and overlay-FEDORA-3099-53F2?</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">> -dmc</font>
<br><font size=2 face="sans-serif">> </font>
<br><font size=2 face="sans-serif">Thanks Again</font>
<br>
<br><font size=2 face="sans-serif">Martin</font>
<P><hr size=1></P>
<P>
This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates.

This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.

Please refer to http://www.jpmorgan.com/pages/disclosures for disclosures relating to UK legal entities.
</P>