Makefile | 2 imgcreate/live.py | 5 imgcreate/yuminst.py | 1 tools/edit-livecd | 32 +++-- tools/livecd-iso-to-disk.sh | 266 ++++++++++++++++++++++++++++++-------------- 5 files changed, 213 insertions(+), 93 deletions(-)
New commits: commit 2eea2cf8b3dc310d90783437124b90c0e0e6d612 Author: Brian C. Lane bcl@redhat.com Date: Wed Feb 29 17:27:16 2012 -0800
Version 15.12
diff --git a/Makefile b/Makefile index 6cb072b..8002575 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@
-VERSION = 15.11 +VERSION = 15.12
INSTALL = /usr/bin/install -c INSTALL_PROGRAM = ${INSTALL}
commit a30258704a30aac49ac1d5a2db3eb875a20eb628 Author: Brian C. Lane bcl@redhat.com Date: Wed Feb 29 16:24:37 2012 -0800
livecd-iso-to-disk: Add 2MB slop to calculation
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh index 41b514e..9d87eb2 100755 --- a/tools/livecd-iso-to-disk.sh +++ b/tools/livecd-iso-to-disk.sh @@ -428,7 +428,7 @@ createGPTLayout() { else p2_size=0 fi - p1_size=$(($dev_size - 1 - $p2_size)) + p1_size=$(($dev_size - 3 - $p2_size))
if [ $p1_size -le 0 ]; then echo "Your device isn't big enough to hold $SRC" @@ -481,7 +481,7 @@ createMSDOSLayout() { else p2_size=0 fi - p1_size=$(($dev_size - 1 - $p2_size)) + p1_size=$(($dev_size - 3 - $p2_size))
if [ $p1_size -le 0 ]; then echo "Your device isn't big enough to hold $SRC" @@ -538,7 +538,7 @@ createEXTFSLayout() { else p2_size=0 fi - p1_size=$(($dev_size - 1 - $p2_size)) + p1_size=$(($dev_size - 3 - $p2_size))
if [ $p1_size -le 0 ]; then echo "Your device isn't big enough to hold $SRC"
commit 79362d90f43aad3bc33574b68e2a565961bdc1ec Author: Brian C. Lane bcl@redhat.com Date: Tue Feb 21 14:55:51 2012 -0800
livecd-iso-to-disk: create partition for iso
In Fedora 17 the installer runs from the squashfs.img on the install media. This means that the installer environment doesn't have direct access to the install media, and it cannot mount it.
In order to support writing DVD's to USB sticks we now need to create a second partition just for the .iso image and direct the installer to it using the repo=UUID=... command
This patch adds creating the 2nd partition if needed and also cleans up some of the bootloader config editing code.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh index 7ce17d6..41b514e 100755 --- a/tools/livecd-iso-to-disk.sh +++ b/tools/livecd-iso-to-disk.sh @@ -1,7 +1,9 @@ #!/bin/bash # Transfer a Live image so that it's bootable off of a USB/SD device. -# Copyright 2007 Red Hat, Inc. +# Copyright 2007-2012 Red Hat, Inc. +# # Jeremy Katz katzj@redhat.com +# Brian C. Lane bcl@redhat.com # # overlay/persistence enhancements by Douglas McClendon dmc@viros.org # GPT+MBR hybrid enhancements by Stewart Adam s.adam@diffingo.com @@ -271,12 +273,19 @@ cleanup() { sleep 2 [ -d "$SRCMNT" ] && umount $SRCMNT && rmdir $SRCMNT [ -d "$TGTMNT" ] && umount $TGTMNT && rmdir $TGTMNT + if [ -n "$REPOMNT" ]; then + [ -d "$REPOMNT" ] && umount $REPOMNT && rmdir $REPOMNT + fi }
exitclean() { - echo "Cleaning up to exit..." - cleanup - exit 1 + RETVAL=$? + if [ -d "$SRCMNT" ] || [ -d "$TGTMNT" ] || [ -n "$REPOMNT" ]; + then + [ "$RETVAL" = 0 ] || echo "Cleaning up to exit..." + cleanup + fi + exit $RETVAL }
isdevloop() { @@ -312,13 +321,6 @@ getdisk() { partnum=${p##$device} }
-getpartition() { - DEV=$1 - pa=$( < /proc/partitions ) - pa=${pa##*$DEV} - partnum=${pa%% *} -} - resetMBR() { if isdevloop "$DEV"; then return @@ -415,18 +417,47 @@ createGPTLayout() { umount ${device}* &> /dev/null wipefs -a ${device} /sbin/parted --script $device mklabel gpt - partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep ^$device:) - size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//') - /sbin/parted --script $device unit b mkpart '"EFI System Partition"' fat32 1048576 $(($size - 1048576)) set 1 boot on + partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit MB print" |grep ^$device:) + dev_size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/MB$//') + + # Is a 2nd partition needed for package iso? + if [ -n "$packages" ]; then + src_size=$(du -s -B 1MB "$SRC" | awk {'print $1;'}) + # iso size + 7% of slop for filesystem metadata + p2_size=$(($src_size * 107 / 100)) + else + p2_size=0 + fi + p1_size=$(($dev_size - 1 - $p2_size)) + + if [ $p1_size -le 0 ]; then + echo "Your device isn't big enough to hold $SRC" + echo "It is $(($p1_size * -1)) MB too small" + exitclean + fi + p1_start=1 + p1_end=$(($p1_size + 1)) + /sbin/parted -s $device u MB mkpart '"EFI System Partition"' fat32 $p1_start $p1_end set 1 boot on + if [ $p2_size -gt 0 ]; then + p2_start=$p1_end + p2_end=$(($p2_size + $p2_start)) + /sbin/parted -s $device u MB mkpart '"LIVE REPO"' fat32 $p2_start $p2_end + fi # Sometimes automount can be _really_ annoying. echo "Waiting for devices to settle..." /sbin/udevadm settle sleep 5 - getpartition ${device#/dev/} - TGTDEV=${device}${partnum} - umount $TGTDEV &> /dev/null + TGTDEV=${device}1 + umount $TGTDEV &> /dev/null || : /sbin/mkdosfs -n LIVE $TGTDEV TGTLABEL="UUID=$(/sbin/blkid -s UUID -o value $TGTDEV)" + + if [ $p2_size -gt 0 ]; then + REPODEV=${device}2 + umount $REPODEV &> /dev/null || : + /sbin/mkdosfs -n LIVE-REPO $REPODEV + REPOLABEL="UUID=$(/sbin/blkid -s UUID -o value $REPODEV)" + fi }
createMSDOSLayout() { @@ -439,22 +470,51 @@ createMSDOSLayout() { umount ${device}* &> /dev/null wipefs -a ${device} /sbin/parted --script $device mklabel msdos - partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep ^$device:) - size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//') - /sbin/parted --script $device unit b mkpart primary fat32 1048576 $(($size - 1048576)) set 1 boot on + partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit MB print" |grep ^$device:) + dev_size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/MB$//') + + # Is a 2nd partition needed for package iso? + if [ -n "$packages" ]; then + src_size=$(du -s -B 1MB "$SRC" | awk {'print $1;'}) + # iso size + 7% of slop for filesystem metadata + p2_size=$(($src_size * 107 / 100)) + else + p2_size=0 + fi + p1_size=$(($dev_size - 1 - $p2_size)) + + if [ $p1_size -le 0 ]; then + echo "Your device isn't big enough to hold $SRC" + echo "It is $(($p1_size * -1)) MB too small" + exitclean + fi + p1_start=1 + p1_end=$(($p1_size + 1)) + /sbin/parted -s $device u MB mkpart primary fat32 $p1_start $p1_end set 1 boot on + if [ $p2_size -gt 0 ]; then + p2_start=$p1_end + p2_end=$(($p2_size + $p2_start)) + /sbin/parted -s $device u MB mkpart primary fat32 $p2_start $p2_end + fi # Sometimes automount can be _really_ annoying. echo "Waiting for devices to settle..." /sbin/udevadm settle sleep 5 if ! isdevloop "$DEV"; then - getpartition ${device#/dev/} - TGTDEV=${device}${partnum} + TGTDEV=${device}1 else TGTDEV=${device} fi umount $TGTDEV &> /dev/null /sbin/mkdosfs -n LIVE $TGTDEV TGTLABEL="UUID=$(/sbin/blkid -s UUID -o value $TGTDEV)" + + if [ $p2_size -gt 0 ]; then + REPODEV=${device}2 + umount $REPODEV &> /dev/null || : + /sbin/mkdosfs -n LIVE-REPO $REPODEV + REPOLABEL="UUID=$(/sbin/blkid -s UUID -o value $REPODEV)" + fi }
createEXTFSLayout() { @@ -466,19 +526,55 @@ createEXTFSLayout() { read umount ${device}* &> /dev/null wipefs -a ${device} - /sbin/parted --script $device mklabel msdos - partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit b print" |grep ^$device:) - size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/B$//') - /sbin/parted --script $device unit b mkpart primary ext2 1048576 $(($size - 1048576)) set 1 boot on + /sbin/parted -s $device mklabel msdos + partinfo=$(LC_ALL=C /sbin/parted -s -m $device "u MB print" |grep ^$device:) + dev_size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/MB$//') + + # Is a 2nd partition needed for package iso? + if [ -n "$packages" ]; then + src_size=$(du -s -B 1MB "$SRC" | awk {'print $1;'}) + # iso size + 7% of slop for filesystem metadata + p2_size=$(($src_size * 107 / 100)) + else + p2_size=0 + fi + p1_size=$(($dev_size - 1 - $p2_size)) + + if [ $p1_size -le 0 ]; then + echo "Your device isn't big enough to hold $SRC" + echo "It is $(($p1_size * -1)) MB too small" + exitclean + fi + p1_start=1 + p1_end=$(($p1_size + 1)) + /sbin/parted -s $device u MB mkpart primary ext2 $p1_start $p1_end set 1 boot on + if [ $p2_size -gt 0 ]; then + p2_start=$p1_end + p2_end=$(($p2_size + $p2_start)) + /sbin/parted -s $device u MB mkpart primary ext2 $p2_start $p2_end + fi # Sometimes automount can be _really_ annoying. echo "Waiting for devices to settle..." /sbin/udevadm settle sleep 5 - getpartition ${device#/dev/} - TGTDEV=${device}${partnum} - umount $TGTDEV &> /dev/null - /sbin/mkfs.ext4 -L LIVE $TGTDEV + TGTDEV=${device}1 + umount $TGTDEV &> /dev/null || : + + # Check extlinux version + if extlinux -v 2>&1 | grep -q 'extlinux 3'; then + mkfs=/sbin/mkfs.ext3 + else + mkfs=/sbin/mkfs.ext4 + fi + $mkfs -L LIVE $TGTDEV TGTLABEL="UUID=$(/sbin/blkid -s UUID -o value $TGTDEV)" + + if [ $p2_size -gt 0 ]; then + REPODEV=${device}2 + umount $REPODEV &> /dev/null || : + $mkfs -L LIVE-REPO $REPODEV + REPOLABEL="UUID=$(/sbin/blkid -s UUID -o value $REPODEV)" + fi }
checkGPT() { @@ -592,17 +688,24 @@ if [ $(id -u) != 0 ]; then fi
detectsrctype() { - if [[ -e $SRCMNT/LiveOS/squashfs.img ]]; then + if [[ -e "$SRCMNT/Packages" ]]; then + # This will cause the source .iso to be copied to a second partiton + # on the target and the boot args to have repo=... pointing to the iso + echo "/Packages found, will copy source .iso to target" + packages=1 + fi + if [[ -e "$SRCMNT/LiveOS/squashfs.img" ]]; then + # LiveOS style boot image srctype=live return fi if [ -e $SRCMNT/images/install.img -o $SRCMNT/isolinux/initrd.img ]; then - imgtype=install - if [ -e $SRCMNT/Packages ]; then + if [ -n "$packages" ]; then srctype=installer else srctype=netinst fi + imgtype=install if [ ! -e $SRCMNT/images/install.img ]; then echo "$SRC uses initrd.img w/o install.img" imgtype=initrd @@ -656,6 +759,7 @@ swapsizemb=0 overlaysizemb=0 srctype= imgtype= +packages= LIVEOS=LiveOS HOMEFILE="home.img"
@@ -794,6 +898,21 @@ fi #checkFilesystem $TGTDEV # do some basic sanity checks. checkMounted $TGTDEV + +# FIXME: would be better if we had better mountpoints +SRCMNT=$(mktemp -d /media/srctmp.XXXXXX) +if [ -b "$SRC" ]; then + mount -o ro "$SRC" $SRCMNT || exitclean +elif [ -f "$SRC" ]; then + mount -o loop,ro "$SRC" $SRCMNT || exitclean +else + echo "$SRC is not a file or block device." + exitclean +fi +# Figure out what needs to be done based on the source image +detectsrctype + +# Format the device if [ -n "$format" -a -z "$skipcopy" ]; then checkLVM $TGTDEV # checks for a valid filesystem @@ -839,23 +958,15 @@ if [ "$swapsizemb" -gt 0 -a "$TGTFS" = "vfat" ]; then fi fi
-# FIXME: would be better if we had better mountpoints -SRCMNT=$(mktemp -d /media/srctmp.XXXXXX) -if [ -b $SRC ]; then - mount -o ro "$SRC" $SRCMNT || exitclean -elif [ -f $SRC ]; then - mount -o loop,ro "$SRC" $SRCMNT || exitclean -else - echo "$SRC is not a file or block device." - exitclean -fi TGTMNT=$(mktemp -d /media/tgttmp.XXXXXX) mount $mountopts $TGTDEV $TGTMNT || exitclean +if [ -n "$REPODEV" ]; then + REPOMNT=$(mktemp -d /media/repotmp.XXXXXX) + mount $mountopts $REPODEV $REPOMNT || exitclean +fi
trap exitclean SIGINT SIGTERM
-detectsrctype - if [ -f "$TGTMNT/$LIVEOS/$HOMEFILE" -a -n "$keephome" -a "$homesizemb" -gt 0 ]; then echo "ERROR: Requested keeping existing /home and specified a size for /home" echo "Please either don't specify a size or specify --delete-home" @@ -944,11 +1055,6 @@ fi
# Verify available space for DVD installer if [ "$srctype" = "installer" ]; then - if [ -z "$skipcopy" ]; then - srcsize=$(du -s -B 1M $SRC | awk {'print $1;'}) - else - srcsize=0 - fi if [ "$imgtype" = "install" ]; then imgpath=images/install.img else @@ -963,10 +1069,9 @@ if [ "$srctype" = "installer" ]; then if [ -e $TGTMNT/$(basename $SRC) ]; then tbd=$(($tbd + $(du -s -B 1M $TGTMNT/$(basename $SRC) | awk {'print $1;'}))) fi - echo "Size of DVD image: $srcsize" echo "Size of $imgpath: $installimgsize" echo "Available space: $((freespace + tbd))" - if (( ((srcsize + installimgsize)) > ((freespace + tbd)) )); then + if (( installimgsize > ((freespace + tbd)) )); then echo "ERROR: Unable to fit DVD image + install.img on available space on the target device." exitclean fi @@ -1017,15 +1122,19 @@ if [ "$srctype" = "live" -a -z "$skipcopy" ]; then fi
# DVD installer copy +# Also copies over the source .iso if the image is a new-style LiveOS DVD (F17+) if [ ( "$srctype" = "installer" -o "$srctype" = "netinst" ) ]; then echo "Copying DVD image to target device." mkdir -p $TGTMNT/images/ if [ "$imgtype" = "install" ]; then copyFile $SRCMNT/images/install.img $TGTMNT/images/install.img || exitclean fi - if [ "$srctype" = "installer" -a -z "$skipcopy" ]; then - copyFile $SRC $TGTMNT/ - fi +fi + +# Copy source .iso to repo partition +if [ -n "$packages" -a -z "$skipcopy" ]; then + echo "Copying $SRC" + copyFile "$SRC" $REPOMNT/ sync fi
@@ -1100,40 +1209,45 @@ if [[ live == $srctype ]]; then -e "/^totaltimeout.*$/d" $BOOTCONFIG fi fi + + echo "Updating boot config file" # adjust label and fstype -if [ -n "$LANG" ]; then - kernelargs="$kernelargs LANG=$LANG" -fi sed -i -e "s/CDLABEL=[^ ]*/$TGTLABEL/" -e "s/rootfstype=[^ ]*/rootfstype=$TGTFS/" -e "s/LABEL=[^ ]*/$TGTLABEL/" $BOOTCONFIG $BOOTCONFIG_EFI if [ -n "$kernelargs" ]; then - sed -i -e "s/liveimg/liveimg ${kernelargs}/" $BOOTCONFIG $BOOTCONFIG_EFI + sed -i -e "s;initrd.img;initrd.img ${kernelargs};" $BOOTCONFIG + if [ -n "$efi" ]; then + sed -i -e "s;vmlinuz;vmlinuz ${kernelargs};" $BOOTCONFIG_EFI + fi fi if [ "$LIVEOS" != "LiveOS" ]; then sed -i -e "s;liveimg;liveimg live_dir=$LIVEOS;" $BOOTCONFIG $BOOTCONFIG_EFI fi
-# DVD Installer -if [ "$srctype" = "installer" ]; then - sed -i -e "s;initrd=initrd.img;initrd=initrd.img ${LANG:+LANG=$LANG} repo=hd:$TGTLABEL:/;g" $BOOTCONFIG - sed -i -e "s;stage2=\S*;;g" $BOOTCONFIG +# EFI images are in $SYSLINUXPATH now +if [ -n "$efi" ]; then + sed -i -e "s;/images/pxeboot/;/$SYSLINUXPATH/;g" $BOOTCONFIG_EFI + sed -i -e "s;findiso;;g" $BOOTCONFIG_EFI +fi + +# Add repo= to point to the source .iso with the packages +if [[ -n "$packages" ]]; then + sed -i -e "s;initrd.img;initrd.img repo=hd:$REPOLABEL:/;g" $BOOTCONFIG if [ -n "$efi" ]; then - # Images are in $SYSLINUXPATH now - sed -i -e "s;/images/pxeboot/;/$SYSLINUXPATH/;g" -e "s;vmlinuz;vmlinuz ${LANG:+LANG=$LANG} repo=hd:$TGTLABEL:/;g" $BOOTCONFIG_EFI + sed -i -e "s;vmlinuz;vmlinuz repo=hd:$REPOLABEL:/;g" $BOOTCONFIG_EFI fi fi
# DVD Installer for netinst -if [ "$srctype" = "netinst" ]; then +if [ "$srctype" != "live" ]; then if [ "$imgtype" = "install" ]; then - sed -i -e "s;stage2=\S*;stage2=hd:$TGTLABEL:/images/install.img;g" $BOOTCONFIG + sed -i -e "s;initrd.img;initrd.img stage2=hd:$TGTLABEL:/images/install.img;g" $BOOTCONFIG + if [ -n "$efi" ]; then + sed -i -e "s;vmlinuz;vmlinuz stage2=hd:$TGTLABEL:/images/install.img;g" $BOOTCONFIG_EFI + fi else # The initrd has everything, so no stage2 - sed -i -e "s;stage2=\S*;;g" $BOOTCONFIG - fi - if [ -n "$efi" ]; then - # Images are in $SYSLINUXPATH now - sed -ie "s;/images/pxeboot/;/$SYSLINUXPATH/;g" $BOOTCONFIG_EFI + sed -i -e "s;stage2=\S*;;g" $BOOTCONFIG $BOOTCONFIG_EFI fi fi
@@ -1145,14 +1259,6 @@ if [ -n "$totaltimeout" ]; then sed -i -e "/^timeout.*$/a\totaltimeout\ $totaltimeout" $BOOTCONFIG fi
-# Use repo if the .iso has the repository on it, otherwise use stage2 which -# will default to using the network mirror -if [ -e "$SRCMNT/.discinfo" ]; then - METHODSTR=repo -else - METHODSTR=stage2 -fi - if [ "$overlaysizemb" -gt 0 ]; then echo "Initializing persistent overlay file" OVERFILE="overlay-$( /sbin/blkid -s LABEL -o value $TGTDEV )-$( /sbin/blkid -s UUID -o value $TGTDEV )"
commit 1748df2126ae1db9819e48d5196a3232d10ff9ee Author: Joey Boggs jboggs@redhat.com Date: Mon Feb 13 21:40:56 2012 -0500
check for valid script path before editing livecd image and update usage options confusion
diff --git a/tools/edit-livecd b/tools/edit-livecd index 72ec059..0df2fa8 100755 --- a/tools/edit-livecd +++ b/tools/edit-livecd @@ -543,17 +543,17 @@ class LiveImageEditor(LiveImageCreator): def parse_options(args): parser = optparse.OptionParser(usage = """ %prog [-n=<name>] - [-o=<output>] - [-k=<kickstart-file>] - [-s=<script.sh>] - [-t=<tmpdir>] - [-e=<excludes>] - [-f=<exclude-file>] - [-i=<includes>] - [-r=<releasefile>] - [-b=<builder>] + [-o <output>] + [-k <kickstart-file>] + [-s <script.sh>] + [-t <tmpdir>] + [-e <excludes>] + [-f <exclude-file>] + [-i <includes>] + [-r <releasefile>] + [-b <builder>] [--clone] - [-c=<compress_type>] + [-c <compress_type>] [--skip-compression] [--skip-minimize] <LIVEIMG.src>""") @@ -690,6 +690,10 @@ def main(): editor.ks = read_kickstart(options.kscfg) # part / --size <new rootfs size to be resized to> editor._LoopImageCreator__image_size = kickstart.get_image_size(editor.ks) + if options.script: + if not os.path.exists(options.script): + print "Invalid Script Path '%s'" % options.script + return 1 editor.mount(LiveOS, cachedir = None) editor._configure_bootloader(editor._LiveImageCreatorBase__isodir) if editor.ks:
commit a55a3a872f77d27449d7b0764f57517addd41c6b Author: Joey Boggs jboggs@redhat.com Date: Tue Jan 24 13:54:18 2012 -0500
add missing selinux_mountpoint class object to edit-livecd
diff --git a/tools/edit-livecd b/tools/edit-livecd index ab86960..72ec059 100755 --- a/tools/edit-livecd +++ b/tools/edit-livecd @@ -117,6 +117,14 @@ class LiveImageEditor(LiveImageCreator): self.ks = None """optional kickstart file as a recipe for editing the image"""
+ self._ImageCreator__selinux_mountpoint = "/sys/fs/selinux" + with open("/proc/self/mountinfo", "r") as f: + for line in f.readlines(): + fields = line.split() + if fields[-2] == "selinuxfs": + self.__ImageCreator__selinux_mountpoint = fields[4] + break + # properties def __get_image(self): if self._LoopImageCreator__imagedir is None:
commit f7ce5a2532578e197e51c9efb0c41f57895692e3 Author: Brian C. Lane bcl@redhat.com Date: Wed Jan 18 15:32:06 2012 -0800
Set base_persistdir (#741614)
diff --git a/imgcreate/yuminst.py b/imgcreate/yuminst.py index 82a5788..d835d9f 100644 --- a/imgcreate/yuminst.py +++ b/imgcreate/yuminst.py @@ -164,6 +164,7 @@ class LiveCDYum(yum.YumBase): if v or not hasattr(repo, k): repo.setAttribute(k, v) repo.basecachedir = self.conf.cachedir + repo.base_persistdir = self.conf.cachedir repo.failovermethod = "priority" repo.metadata_expire = 0 repo.mirrorlist_expire = 0
commit 2fb795a6a735f20b28d9831caa90a87bb7ca69f7 Author: Brian C. Lane bcl@redhat.com Date: Wed Jan 18 14:29:20 2012 -0800
Fix the fix for dracut modules (#766955)
diff --git a/imgcreate/live.py b/imgcreate/live.py index 21c6942..ab84783 100755 --- a/imgcreate/live.py +++ b/imgcreate/live.py @@ -264,7 +264,7 @@ class LiveImageCreatorBase(LoopImageCreator): f = open(path, "a") f.write('filesystems+="' + self.__extra_filesystems() + ' "\n') f.write('drivers+="' + self.__extra_drivers() + ' "\n') - f.write('dracutdrivers+="dmsquash-live "') + f.write('add_dracutmodules+=" dmsquash-live "') f.close()
def __create_iso(self, isodir):
commit 49715bc2a94bb318dd5efe76708dd56245a1beb6 Author: Brian C. Lane bcl@redhat.com Date: Fri Jan 13 10:18:25 2012 -0800
Use dracut.conf.d instead fo dracut.conf
diff --git a/imgcreate/live.py b/imgcreate/live.py index 6e6e93d..21c6942 100755 --- a/imgcreate/live.py +++ b/imgcreate/live.py @@ -196,11 +196,11 @@ class LiveImageCreatorBase(LoopImageCreator): def _mount_instroot(self, base_on = None): LoopImageCreator._mount_instroot(self, base_on) self.__write_initrd_conf(self._instroot + "/etc/sysconfig/mkinitrd") - self.__write_dracut_conf(self._instroot + "/etc/dracut.conf") + self.__write_dracut_conf(self._instroot + "/etc/dracut.conf.d/02livecd.conf")
def _unmount_instroot(self): self.__restore_file(self._instroot + "/etc/sysconfig/mkinitrd") - self.__restore_file(self._instroot + "/etc/dracut.conf") + self.__restore_file(self._instroot + "/etc/dracut.conf.d/02livecd.conf") LoopImageCreator._unmount_instroot(self)
def __ensure_isodir(self): @@ -264,7 +264,7 @@ class LiveImageCreatorBase(LoopImageCreator): f = open(path, "a") f.write('filesystems+="' + self.__extra_filesystems() + ' "\n') f.write('drivers+="' + self.__extra_drivers() + ' "\n') - f.write('dracutdrivers+="dmsquash-live"') + f.write('dracutdrivers+="dmsquash-live "') f.close()
def __create_iso(self, isodir):
commit ce02a0c0c23db267f885ccdd42ff835c388c889e Author: Brian C. Lane bcl@redhat.com Date: Fri Jan 13 05:41:54 2012 -0800
dracut needs dmsquash-live explicitly included
diff --git a/imgcreate/live.py b/imgcreate/live.py index e640c67..6e6e93d 100755 --- a/imgcreate/live.py +++ b/imgcreate/live.py @@ -264,6 +264,7 @@ class LiveImageCreatorBase(LoopImageCreator): f = open(path, "a") f.write('filesystems+="' + self.__extra_filesystems() + ' "\n') f.write('drivers+="' + self.__extra_drivers() + ' "\n') + f.write('dracutdrivers+="dmsquash-live"') f.close()
def __create_iso(self, isodir):
livecd@lists.fedoraproject.org