[Fedora-livecd-list] List of previous issues with livecd-tools which should be addressed

Jasper Hartline jasper.hartline at gmail.com
Tue Aug 17 06:19:28 UTC 2010


On Mon, Aug 16, 2010 at 7:56 PM, Richard Shaw <hobbes1069 at gmail.com> wrote:
>
> It's probably overkill but I know there's the optparse module for
> passing arguments and options. Not really necessary since the script
> requires exactly 3 arguments but it would add somewhat automagically
> things like --help and --version.

Right, these should be added.

> Is there any difference between os.stat().st_size and os.path.getsize()?

Not one I can think of, they both would require the os module.
Maybe there is something better in Python 2.7

> Do we care if one of the argument references is a symbolic link? I
> think it's just personal preference in coding style but I tend to use
> more high level functions like os.path.isfile() versus os.stat()

I just threw it together, so little things like that can and need to be changed.


> It looks like as this is a largely procedural style script that there
> is some things done twice (once for the 32bit image and once for the
> 64bit image) which could be generalized in a function.

That is true. I will see if I can do some more hacking on it..
Any patches are welcome.


> I think it could use quite a bit of comments because it took me a
> while to figure out what did what and I still don't see where the two
> images are combined but then again I'm not familiar with losetup.

Well. The most basic explanation is that
by using losetup on a file, we can make an image which can be written to a disk
without actually having a physical disk.

The script first makes a file which is the combined size of the x86 ISO
and the x64 ISO using dd. That file is then loopbacked using losetup.

We call our existing livecd-iso-to-disk which does some stuff and
isn't exactly perfect
for the purpose. In fact I'm not sure how to get it to be better
without doing some of it
all over again, instead of how livecd-iso-to-disk does.

livecd-iso-to-disk basically will format and partition the loopback device
(incorrectly I think, which is all based on it being a loopdevice, and the fact
it may be initializing it with some weird geometry it doesn't like)

Then it copies all the osmin.img and squashfs.img files to the loop device
(which is a file on the hard drive, remember)

We close it all up.
We run livecd-iso-to-disk on the second ISO, which does the same thing without
the --format or --reset-mbr options. Unfortunately I think parted is
still getting called on it
messing it up somehow, I am not sure yet. I need to look at that.

We create a syslinux.cfg with the ifcpu64.c32 comboot module from syslinux
and close it up. The result is a target Image File to be written to disk.
I would like it to be in a format that can just be dd'd.

I need to see where I am faouling up because it seems livecd-iso-to-disk
is stepping on my partition table from --reset-mbr and --format command.

Take a look at this:
http://autopsy.liveprojects.info/repo/SOURCES/c-section/live_generator/install-boot.sh
Just Edit -> Find in this page -> "kpartx"

That is a way to use dmsetup and kpartx (device mapper)
to actually make the loop device have partitions which we are more
used to using.

I think my offset into the original file is off in the second loop device setup.


More information about the livecd mailing list