[Fedora-livecd-list] [Revised PATCH 7/7] livecd: improve livecd install speed by about 20%: turboLiveInst/genMinInstDelta
Douglas McClendon
dmc.fedora at filteredperception.org
Tue Sep 18 06:55:49 UTC 2007
revised patch attached. Not tested, but I've convinced myself it does
the same thing. Feel free to prune my verbose comments...
-dmc
Douglas McClendon wrote:
> I agree with all of these. Revised patch forthcoming.
>
> -dmc
>
>
> Jeremy Katz wrote:
>> On Mon, 2007-09-17 at 12:37 -0500, Douglas McClendon wrote:
>>> diff -Naur
>>> livecd.3.resize2fsToMinimal_implicitsize/creator/livecd-creator
>>> livecd.turboliveinst/creator/livecd-creator
>>> ---
>>> livecd.3.resize2fsToMinimal_implicitsize/creator/livecd-creator
>>> 2007-09-17 17:09:57.000000000 +0000
>>> +++ livecd.turboliveinst/creator/livecd-creator 2007-09-14
>>> 17:40:21.000000000 +0000 + def genMinInstDelta(self):'
>> [snip]
>>> + # associate os image with loop device
>>> + osloop = LoopbackMount("%s/data/os.img" %(self.build_dir,),
>>> + "not_going_to_actually_get_mounted")
>>
>> Maybe just use None here instead of that. But nitpicky and not a big
>> deal
>>
>>> + # calculate how much delta data to keep
>> [snip]
>>> + try:
>>> + minInstDeltaDataLength =
>>> int((dmsetupOutput.split()[3]).split('/')[0])
>>
>> Ugh, depending on dmsetup's output to not change scares me. But I don't
>> see any alternative. Probably worth giving an example output of what's
>> being split apart just so that when it _does_ change, it's easier to
>> figure out what we were using.
>>
>>> diff -Naur livecd.3.resize2fsToMinimal_implicitsize/creator/mayflower
>>> livecd.turboliveinst/creator/mayflower
>>> --- livecd.3.resize2fsToMinimal_implicitsize/creator/mayflower
>>> 2007-09-14 05:49:42.000000000 +0000
>>> +++ livecd.turboliveinst/creator/mayflower 2007-09-14
>>> 18:28:20.000000000 +0000
>>> @@ -625,6 +625,24 @@
>>> mount -n -o ro,remount /sysroot
>>> }
>>>
>>> +modprobe loop max_loop=128
>>> +
>>> +# we might have a genMinInstDelta delta file for anaconda to take
>>> advantage of
>>> +if [ -e /sysroot/LiveOS/osmin.gz ]; then
>>> + mknod /dev/loop118 b 7 118
>>> + # note: osmin.gz should typically only be about 7kb. + dd
>>> if=/sysroot/LiveOS/osmin.gz of=/osmin.gz bs=512 2> /dev/null
>>> + # pad to at least next sector boundry
>>> + dd if=/dev/zero of=/osmin.gz bs=512 count=1 oflag=append
>>> conv=notrunc 2> /dev/null
>>> + losetup /dev/loop118 /osmin.gz
>>> +elif [ -e /sysroot/osmin.gz ] ; then
>>> + mknod /dev/loop118 b 7 118
>>> + dd if=/sysroot/osmin.gz of=/osmin.gz bs=512 2> /dev/null
>>> + # pad to at least next sector boundry
>>> + dd if=/dev/zero of=/osmin.gz bs=512 count=1 oflag=append
>>> conv=notrunc 2> /dev/null
>>> + losetup /dev/loop118 /osmin.gz
>>> +fi
>>
>> Better to check for the existence of the files and then set $MINIMG or
>> similar. That way, the rest of the check can avoid suffering cut and
>> paste problems
>>
>> Jeremy
>>
>> --
>> Fedora-livecd-list mailing list
>> Fedora-livecd-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/fedora-livecd-list
>
> --
> Fedora-livecd-list mailing list
> Fedora-livecd-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-livecd-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: livecd.7.turboLiveInst.revised.patch
Type: text/x-patch
Size: 10394 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-livecd-list/attachments/20070918/afac24b3/attachment.bin>
More information about the Fedora-livecd-list
mailing list