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

Jasper Hartline jasper.hartline at gmail.com
Thu Aug 19 04:00:31 UTC 2010


On Wed, Aug 18, 2010 at 7:15 PM, Richard Shaw <hobbes1069 at gmail.com> wrote:
>> Hm.
>> we divide (x86size + x64size) by block_size -> 2048 to get count for
>> passing to dd.
>> The way I understand it, mkisofs pads the ISO up to the last 2048
>> divisible block.
>> There shouldn't be a reason why a ISO file made with mkisofs is not
>> divisible by 2048.
>
> Ok, I guess I'm confused here. If mkisofs pads the data, why do we
> have to calculate the number of 2048k blocks at all? If we do need to
> know the number of 2048k blocks then we need floating point math since
> integer math will drop the remainder.

Just so we can pass a block size of 2048 to dd, and have the count we
need of the number of
blocks instead of using bs=1 count=sizeof ISO files.
The file dd creates will need to at least be as large as the two ISO
files combined.

>>> Ok, obviously the code isn't fully flushed out but it looks like
>>> currently the test for existence happens before it's created.
>>
>> Yeah I noticed that. I want to set it, but not test for it and produce
>> an error or usage.
>
> In that case we only need to test for existence of the two source
> images which could be done in an if statement:
>
>  if os.path.exists(x86) and os.path.exists(x64):

Just changed that earlier:

    def parse(x86, x64, multi):
        for file in x86, x64:
            if os.path.exists(file):
                pass
            else:
                usage()
        if not multi:
            usage()
        setup(x86, x64, multi)

usage() is also not all we want to do here, but for now
we exit.. so yeah it isn't done yet.



> It probably works as a good bandaid for now, but we could probably
> create a "check_requirements" or some other named function that would
> make sure all the bash commands are available and the arguments as
> passed are acceptable.

Exactly, some people may be running these scripts from git, from cron.
Who knows.


>> Hm. Right. so no string replace operations on a list, bummer.
>> But, we could create a new list out of the old.
>>
>> Read data we want from the old list,
>> create a new list, with the new inputs and write it to the file.
>
> Either that or have a separate source file that we can substitute the
> proper variables into before writing. I guess it depends if we want it
> to be the same as one of the source cfg files except what we need to
> be different or if we'd rather specify what it looks like.

I thought about that too. Which may work for the immediate case
but creating a new list will make it more elegant, and keep the number of files
required to run the operation to 1.

>> As far as keeping it simpler for now, you can see I've done that
>> by saying we need to partition the lodevivce type 0x83
>> We can expand this later.
>
> I guess I need clarification on what the objective is here. I can see
> 2 or 3 possible paths.
>
> One would be a script that takes two live CD ready images (ISOs) and
> creates a multiarch ISO out of it. This would not necessarily care
> about partitioning since the live-cd-iso-to-disk should be able to
> handle it.

No. I won't be using livecd-iso-to-disk because it was written to do some things
in a way I don't feel like patching to correct for using on a
kpartx/device-mapper
loopback file to get something simple done.

Instead I can dd an image file, loopback it, partition it
format it at an offset starting on partition 1. losetup with an offset
, mount ISO files, copy files, write syslinux.cfg and install syslinux to it.
Close it up and you have the resulting target.

I was looking at livecd-iso-to-disk long enough to say it wasn't worth
the trouble to patch it, just to move along with development on this one.

livecd-iso-to-disk has some problems, which can be fixed, but
I'm not sure how soon. Most of the patches to livecd-iso-to-disk
sent by Frederick Grose are in the original posting of this thread.

After those are merged and the support for syslinux on Ext4, and btrfs
which requires
syslinux 4.02 (F14) there is also a bug which is fixed by calling
checkFilesystem()
at the correct time, to make livecd-creator not default to using vfat
and claiming
your ext2/ext3 partitioned disk needs to be vfat or ext2/3 when it already is.

https://admin.fedoraproject.org/pkgdb/acls/bugs/livecd-tools?_csrf_token=e077005608e99f2683ea9d5a1835e9d6fd5f3ea3


> Another would be a script that only cared about creating a bootable
> partition (regardless of whether it's a hard disk or USB partition).

I don't know what this means.
Grub2 can boot ISO files directly, which is neat, but also isn't syslinux.

> The third would be a script that would handle both situations natively
> without relying on the livecd-iso-to-disk script.

The option last is the one we want for this mkbiarch.py script.
As I said, the earlier script was for to be used as a skeleton.
As a side effect I have decided to drop using livecd-iso-to-disk.
It needs it's holes plugged.. it was written to be used
to write this ISO to a real disk, and since that is the case, it just
doesn't work
like it should for what we are doing here in mkbiarch.py
which won't write anything to any disk, only make the image file.. so far.


More information about the livecd mailing list