imgcreate/live.py
by Warren Togami 砥上勇
imgcreate/live.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit f6389a616ba162496f373e3ac21bbfec516b42cd
Author: Warren Togami <wtogami(a)redhat.com>
Date: Wed Sep 16 12:16:41 2009 -0400
This fixes dracut boot for LiveCD and LiveUSB without the requirement to have a filesystem label.
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 85de975..ed3d563 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -416,7 +416,7 @@ menu hiddenrow 5
def __get_image_stanza(self, is_xen, isDracut, **args):
if isDracut:
- args["rootlabel"] = "live:LABEL=%(fslabel)s" % args
+ args["rootlabel"] = "live:CDLABEL=%(fslabel)s" % args
else:
args["rootlabel"] = "CDLABEL=%(fslabel)s" % args
14 years, 7 months
Unnecessary SELinux Failure Condition?
by Jay Greguske
Hello,
While using livecd-creator and poking around the code, I found a check
that I don't understand the reason for. livecd-creator will bail out if
the host has SELinux disabled and the kickstart file requests it be
enabled. Why is that? I would think that if SELinux was disabled but you
still had the policy available, that would be all you need to build a
properly labeled image.
Out of curiosity I made changes to the code just to see what would
happen. I attached them to this mail for reference, NOT as proposed
changes to be applied to the livecd-tools code. On an F10 system with
SELinux disabled I was able to build a working livecd image that I could
boot and play around in. SELinux was being enforced in the image too. I
was able to do this with a RHEL 5 kernel as well, just to see if maybe
something had changed with an earlier version of SELinux.
Perhaps the failure condition is no longer necessary?
Thanks in advance,
- Jay
14 years, 7 months
livecd-iso-to-disk.sh: fix free space calc
by Jason Farrell
Hi,
I noticed a stupid bug with my previous patch to show better free
space requirements.
WRONG:
echo "= To fit, free or decrease requested size total by: $(($tba -
$free + $tbd))"
SHOULD BE:
echo "= To fit, free or decrease requested size total by: $(($tba -
$(($free + $tbd))))"
--
Jason 'zcat' Farrell
14 years, 7 months
Changes to 'refs/tags/livecd-tools-027'
by Warren Togami 砥上勇
Changes since livecd-tools-023:
Jason Farrell (2):
Make overlay space requirements clearer
small fix for --multi mode
Jeremy Katz (29):
Revert "creator: "-d" opt and matching setdebug() method that gets rpm in debug mode"
Fsck after resize to catch/fix problems (#497377)
Return return code from fsck in case we want to do something with it
Fix up ppc live image creation (#497193)
Raise an error if the fsck finds problems
More ppc syntax fixing (#497193)
Bump version
Bind mount /dev/shm also (#502921)
Update for current options (#505742)
Don't error out with SELinux disabled on the host (#508402)
Use resize2fs -M instead of binary search
Consolidate calls to fsck
Store a copy of the filesystem image before resize
Don't continue if the fs unmount fails
Add a new exception type for resize errors
Also, don't lose resize2fs output (per request of sandeen)
Include new error definition which I apparently didn't commit
Make live image a hybrid
Use system-config-keyboard's bits in preference to rhpl.keyboard
Bumpv ersion
If resize2fs fails, raise an error also (related to #517222)
Add a sleep to try to avoid tracebacks with snapshot removal (#506644)
Apparently the python traceback isn't clear enough (#517841)
Fix my stupid typo. *sigh*
Support dracut based initrds
Use resize2fs -M (minimal) more
Bump version
Sleep to avoid races (#517477)
Fix traceback when implantisomd5 isn't available (Ron Yorston)
Josh Boyer (1):
Fix ppc creation
Marc Herbert (1):
cpio "-L" to dereference any symbolic link to the actual ISO
Martin Dengler (1):
don't need to checkMBR() for loop devices
Martin Langhoff (1):
creator: "-d" opt and matching setdebug() method that gets rpm in debug mode
Matthias Clasen (1):
Switch to using blkid instead of vol_id (#506360)
Warren Togami (5):
chattr -i extlinux.sys
dracut output image filename s/initrd-generic/initramfs/
ppc live was trying to copy the wrong initrd filename
Properly clean up fake /selinux directory during teardown
version 027
---
Makefile | 2
config/livecd-fedora-minimal.ks | 1
docs/livecd-iso-to-disk.pod | 18 +++++++
imgcreate/creator.py | 23 ++++++----
imgcreate/errors.py | 2
imgcreate/fs.py | 77 ++++++++++++++++++++-------------
imgcreate/kickstart.py | 12 ++---
imgcreate/live.py | 91 ++++++++++++++++++++++++++++------------
tools/livecd-iso-to-disk.sh | 39 ++++++++++-------
tools/livecd-iso-to-pxeboot.sh | 2
10 files changed, 177 insertions(+), 90 deletions(-)
---
14 years, 7 months
Makefile
by Warren Togami 砥上勇
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 0efc40ac0433cc1cd2a6702f4a3acf0621488940
Author: Warren Togami <wtogami(a)redhat.com>
Date: Thu Sep 10 16:02:45 2009 -0400
version 027
diff --git a/Makefile b/Makefile
index f208c41..76f1580 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-VERSION = 026
+VERSION = 027
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
14 years, 7 months
imgcreate/creator.py
by Warren Togami 砥上勇
imgcreate/creator.py | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
New commits:
commit 0b80dc71f82f0a2ed24d01209fd2eb892a2c8135
Author: Warren Togami <wtogami(a)redhat.com>
Date: Thu Sep 10 16:01:57 2009 -0400
Properly clean up fake /selinux directory during teardown
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
index 910c778..909f616 100644
--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -476,13 +476,18 @@ class ImageCreator(object):
# if the system was running selinux clean up our lies
if os.path.exists("/selinux/enforce"):
for root, dirs, files in os.walk(self._instroot + "/selinux"):
- if root == self._instroot + "/selinux":
- continue
- try:
- os.unlink(root)
- except OSError:
- pass
-
+ for name in files:
+ try:
+ os.remove(os.path.join(root, name))
+ except OSError:
+ pass
+ for name in dirs:
+ if os.path.join(root, name) == self._instroot + "/selinux":
+ continue
+ try:
+ os.rmdir(os.path.join(root, name))
+ except OSError:
+ pass
def mount(self, base_on = None, cachedir = None):
"""Setup the target filesystem in preparation for an install.
14 years, 7 months
imgcreate/live.py
by Warren Togami 砥上勇
imgcreate/live.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit ab84919a2f2c14e9354f217f1410ca841f54b6d9
Author: Warren Togami <wtogami(a)redhat.com>
Date: Thu Sep 10 14:55:02 2009 -0400
ppc live was trying to copy the wrong initrd filename
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 478aab0..85de975 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -675,7 +675,7 @@ class ppcLiveImageCreator(LiveImageCreatorBase):
destdir + "/vmlinuz")
if os.path.exists(bootdir + "/initramfs-" + version + ".img"):
- shutil.copyfile(bootdir + "/initrd-" + version + ".img",
+ shutil.copyfile(bootdir + "/initramfs-" + version + ".img",
destdir + "/initrd.img")
isDracut = True
else:
14 years, 7 months
imgcreate/live.py
by Warren Togami 砥上勇
imgcreate/live.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 28a1b27b3053e09c5aa99336bf52f5714f3f5610
Author: Warren Togami <wtogami(a)redhat.com>
Date: Thu Sep 10 14:19:03 2009 -0400
dracut output image filename s/initrd-generic/initramfs/
diff --git a/imgcreate/live.py b/imgcreate/live.py
index c49b358..478aab0 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -365,8 +365,8 @@ class x86LiveImageCreator(LiveImageCreatorBase):
isodir + "/isolinux/vmlinuz" + index)
isDracut = False
- if os.path.exists(bootdir + "/initrd-generic-" + version + ".img"):
- shutil.copyfile(bootdir + "/initrd-generic-" + version + ".img",
+ if os.path.exists(bootdir + "/initramfs-" + version + ".img"):
+ shutil.copyfile(bootdir + "/initramfs-" + version + ".img",
isodir + "/isolinux/initrd" + index + ".img")
isDracut = True
else:
@@ -674,7 +674,7 @@ class ppcLiveImageCreator(LiveImageCreatorBase):
shutil.copyfile(bootdir + "/vmlinuz-" + version,
destdir + "/vmlinuz")
- if os.path.exists(bootdir + "/initrd-generic-" + version + ".img"):
+ if os.path.exists(bootdir + "/initramfs-" + version + ".img"):
shutil.copyfile(bootdir + "/initrd-" + version + ".img",
destdir + "/initrd.img")
isDracut = True
14 years, 7 months
"-generic" in initrd name confusing live.py?
by Martin Dengler
Hi,
I'm getting a puzzling problem when building a .ks file that worked
two days ago:
Traceback (most recent call last):
File "/usr/bin/livecd-creator", line 140, in <module>
sys.exit(main())
File "/usr/bin/livecd-creator", line 124, in main
creator.configure()
File "/usr/lib/python2.6/site-packages/imgcreate/creator.py", line 732, in configure
self._create_bootconfig()
File "/usr/lib/python2.6/site-packages/imgcreate/live.py", line 197, in _create_bootconfig
self._configure_bootloader(self.__ensure_isodir())
File "/usr/lib/python2.6/site-packages/imgcreate/live.py", line 609, in _configure_bootloader
self._configure_syslinux_bootloader(isodir)
File "/usr/lib/python2.6/site-packages/imgcreate/live.py", line 513, in _configure_syslinux_bootloader
cfg += self.__get_image_stanzas(isodir)
File "/usr/lib/python2.6/site-packages/imgcreate/live.py", line 440, in __get_image_stanzas
is_xen = self.__copy_kernel_and_initramfs(isodir, version, index)
File "/usr/lib/python2.6/site-packages/imgcreate/live.py", line 367, in __copy_kernel_and_initramfs
isodir + "/isolinux/initrd" + index + ".img")
File "/usr/lib64/python2.6/shutil.py", line 52, in copyfile
fsrc = open(src, 'rb')
IOError: [Errno 2] No such file or directory:
'/var/tmp/imgcreate-X4oN18/install_root/boot/initrd-2.6.31-0.204.rc9.fc12.i686.img'
I added some code to live.py to show what was actually in the source
and dest directories, and it seems that the initrd has grown a string
"-generic" in its name that live.py doesn't expect:
---
src, dest = (bootdir + "/initrd-" + version + ".img",
isodir + "/isolinux/initrd" + index + ".img")
logging.warn("__copy_kernel_and_initramfs: copying %s to %s" %
(src, dest))
logging.warn("src contents: %s" %
os.listdir(os.path.dirname(src)))
logging.warn("dest contents: %s" %
os.listdir(os.path.dirname(dest)))
shutil.copyfile(bootdir + "/initrd-" + version + ".img",
isodir + "/isolinux/initrd" + index + ".img")
---
yielding:
---
__copy_kernel_and_initramfs: trying to copy
/var/tmp/imgcreate-X4oN18/install_root/boot/initrd-2.6.31-0.204.rc9.fc12.i686.img
to /var/tmp/imgcreate-X4oN18/iso-oM8RAY/isolinux/initrd0.img
src contents: ['System.map-2.6.31-0.204.rc9.fc12.i686',
'config-2.6.31-0.204.rc9.fc12.i686',
'vmlinuz-2.6.31-0.204.rc9.fc12.i686', 'grub',
'initrd-generic-2.6.31-0.204.rc9.fc12.i686.img', 'efi']
dest contents: ['vmlinuz0', 'isolinux.bin', 'vesamenu.c32',
'splash.jpg']
---
Anybody have any ideas what I'm doing wrong?
Thanks,
Martin
PS:
Linux xxx 2.6.29.6-217.2.8.fc11.x86_64 #1 SMP Sat Aug 15 01:06:26 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
livecd-tools-024-1.fc11.x86_64
rpm-4.7.1-1.fc11.x86_64
14 years, 7 months
livecd-creator creates ISO without /home
by Martin Dengler
Hi,
I'm getting a .ISO without a /home despite the filesystem rpm being
installed, and I'd really appreciate any tips on debugging this or
hints as to how this might happen.
This is with the example .ks and I can get livecd-creator to work on a
number of other machines. If I chroot and install the same filesystem
rpm again (--force of course, since it's already installed), I do get
a /home.
I'm running:
$ setarch i586 sudo livecd-creator --skip-compression --cache=../cache
-t /home/mtd/xo-soas/images -c
/usr/share/doc/livecd-tools-024/livecd-fedora-minimal.ks
on a machine like:
# uname -r
Linux benderxxx 2.6.29.4-167.fc11.x86_64 #1 SMP Wed May 27 17:27:08
EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
and I'm getting a filesystem like:
http://people.sugarlabs.org/~mtd/soas-xo1/livecd.ext3_listing
The output of the livecd-creator command is:
http://people.sugarlabs.org/~mtd/soas-xo1/livecd.buildlog
Any help much appreciated.
Martin
14 years, 7 months