imgcreate/live.py
by David Huff
imgcreate/live.py | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
New commits:
commit 5f42d465badfc2b172e0bb10a2c0d2a27a164d27
Author: Alan Pevec <apevec(a)redhat.com>
Date: Fri Apr 23 15:55:24 2010 +0000
livecd-creator ignores device directive
create dracut.conf not /etc/sysconfig/mkinitrd
Resolves: rhbz#585170
Signed-off-by: Alan Pevec <apevec(a)redhat.com>
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 78cbff7..0d044ee 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -181,11 +181,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_initrd_conf(self._instroot + "/etc/dracut.conf")
def _unmount_instroot(self):
try:
- os.unlink(self._instroot + "/etc/sysconfig/mkinitrd")
+ os.unlink(self._instroot + "/etc/dracut.conf")
except:
pass
LoopImageCreator._unmount_instroot(self)
@@ -212,24 +212,23 @@ class LiveImageCreatorBase(LoopImageCreator):
makedirs(os.path.dirname(path))
f = open(path, "a")
- f.write('LIVEOS="yes"\n')
f.write('PROBE="no"\n')
- f.write('MODULES+="squashfs ext4 ext3 ext2 vfat msdos "\n')
- f.write('MODULES+="sr_mod sd_mod ide-cd cdrom "\n')
+ f.write('add_drivers+="squashfs ext4 ext3 ext2 vfat msdos "\n')
+ f.write('add_drivers+="sr_mod sd_mod ide-cd cdrom "\n')
for module in self.__modules:
if module == "=usb":
- f.write('MODULES+="ehci_hcd uhci_hcd ohci_hcd "\n')
- f.write('MODULES+="usb_storage usbhid "\n')
+ f.write('add_drivers+="ehci_hcd uhci_hcd ohci_hcd "\n')
+ f.write('add_drivers+="usb_storage usbhid "\n')
elif module == "=firewire":
- f.write('MODULES+="firewire-sbp2 firewire-ohci "\n')
- f.write('MODULES+="sbp2 ohci1394 ieee1394 "\n')
+ f.write('add_drivers+="firewire-sbp2 firewire-ohci "\n')
+ f.write('add_drivers+="sbp2 ohci1394 ieee1394 "\n')
elif module == "=mmc":
- f.write('MODULES+="mmc_block sdhci sdhci-pci "\n')
+ f.write('add_drivers+="mmc_block sdhci sdhci-pci "\n')
elif module == "=pcmcia":
- f.write('MODULES+="pata_pcmcia "\n')
+ f.write('add_drivers+="pata_pcmcia "\n')
else:
- f.write('MODULES+="' + module + ' "\n')
+ f.write('add_drivers+="' + module + ' "\n')
f.close()
13 years, 11 months
tools/livecd-iso-to-disk.sh
by David Huff
tools/livecd-iso-to-disk.sh | 13 +++++++++++++
1 file changed, 13 insertions(+)
New commits:
commit a46804ad6a4e17f38bb226f9dee410727520277c
Author: Alan Pevec <apevec(a)redhat.com>
Date: Fri May 7 21:28:04 2010 +0000
livecd-iso-to-disk --format fails with existing LV on USB
Resolves: rhbz#583658
Signed-off-by: Alan Pevec <apevec(a)redhat.com>
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 3a4726d..f4d0855 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -138,6 +138,18 @@ checkPartActive() {
fi
}
+checkLVM() {
+ dev=$1
+
+ if [ -x /sbin/pvs -a \
+ "$(/sbin/pvs -o vg_name --noheadings $dev* 2>/dev/null)" ]; then
+ echo "Device, $dev, contains a volume group and cannot be formated!"
+ echo "You can remove the volume group using vgremove."
+ exitclean
+ fi
+ return 0
+}
+
createGPTLayout() {
dev=$1
getdisk $dev
@@ -407,6 +419,7 @@ fi
# do some basic sanity checks.
checkMounted $USBDEV
if [ -n "$format" ];then
+ checkLVM $USBDEV
# checks for a valid filesystem
if [ -n "$efi" ];then
createGPTLayout $USBDEV
13 years, 11 months
SELinux Enabled Images on SELinux Disabled Hosts
by Jay Greguske
Hi,
I finally got an opportunity to look at this issue again. Today livecd-tools refuses to build an SELinux enabled LiveCD on an SELinux disabled host, so I've reworked some of the logic and SELinux commands used by livecd-tools to allow this. This patch still lets the %post scripts complete last; it happens after the SELinux configuration step.
I gave this a try with F13 (beta) repos on an F12 host. In my testing I tried all permutations of host and LiveCD SELinux enablement. The results are summarized below:
Host/LiveCD: Description
- On/On: SELinux enforcing and functioning as expected
- Off/On: SELinux enforcing and functioning as expected
- On/Off: File system is partially labelled due to Yum/RPM labelling the files during installation. I figured this was OK because SELinux is disabled so they shouldn't cause a problem (disk space usage is trivial)
- Off/Off: SELinux disabled and the FS is unlabelled as expected.
Please let me know what you think!
Thanks,
- Jay
13 years, 11 months