livecd-tools: cache for yum ?
by Vnpenguin
Hi,
Does livecd-tools uses a cache for yum ? I can't found command line
option for the cache yet ?
I have no local repo and I don't want download all packages for each build.
Thanks,
--
http://vnoss.org
15 years, 3 months
imgcreate/live.py
by Jeremy Katz
imgcreate/live.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 76d4cc51abf030b246b5d4c86264f1a66d5e68b7
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jan 12 15:27:32 2009 -0500
Fix stpuid typo
diff --git a/imgcreate/live.py b/imgcreate/live.py
index a7032b0..d99659a 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -404,13 +404,13 @@ menu hiddenrow 5
template = """label %(short)s
menu label %(long)s
kernel vmlinuz%(index)s
- append initrd=initrd%(index)s.img root=CDLABEL=%(fslabel)s rootfstype=%(isofstype) %(liveargs)s %(extra)s
+ append initrd=initrd%(index)s.img root=CDLABEL=%(fslabel)s rootfstype=%(isofstype)s %(liveargs)s %(extra)s
"""
else:
template = """label %(short)s
menu label %(long)s
kernel mboot.c32
- append xen%(index)s.gz --- vmlinuz%(index)s root=CDLABEL=%(fslabel)s rootfstype=%(isofstype) %(liveargs)s %(extra)s --- initrd%(index)s.img
+ append xen%(index)s.gz --- vmlinuz%(index)s root=CDLABEL=%(fslabel)s rootfstype=%(isofstype)s %(liveargs)s %(extra)s --- initrd%(index)s.img
"""
return template % args
@@ -532,7 +532,7 @@ hiddenmenu
def __get_efi_image_stanza(self, **args):
return """title %(long)s
- kernel /EFI/boot/vmlinuz%(index)s root=CDLABEL=%(fslabel)s rootfstype=%(isofstype) %(liveargs)s %(extra)s
+ kernel /EFI/boot/vmlinuz%(index)s root=CDLABEL=%(fslabel)s rootfstype=%(isofstype)s %(liveargs)s %(extra)s
initrd /EFI/boot/initrd%(index)s.img
""" %args
15 years, 3 months
3 commits - imgcreate/yuminst.py tools/livecd-creator
by Jeremy Katz
imgcreate/yuminst.py | 1 +
tools/livecd-creator | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 9a6e8436eeb167981afef28a69afa2f49ca61d26
Author: Jan Kratochvil <jan.kratochvil(a)redhat.com>
Date: Mon Jan 12 15:18:50 2009 -0500
Keep cache with --cache (#479716)
Specifying --cache works if the image creation fails. It gets reused
afterwards. But if we successfully create an image YUM itself deletes all the
rpm files and next run of livecd-creator starts to download it all again.
diff --git a/imgcreate/yuminst.py b/imgcreate/yuminst.py
index 04c9b40..080034b 100644
--- a/imgcreate/yuminst.py
+++ b/imgcreate/yuminst.py
@@ -62,6 +62,7 @@ class LiveCDYum(yum.YumBase):
conf += "plugins=0\n"
conf += "reposdir=\n"
conf += "failovermethod=priority\n"
+ conf += "keepcache=1\n"
f = file(confpath, "w+")
f.write(conf)
commit d1e4c3eaf2500a72de33f0cc7d651ff43ba69ed4
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jan 12 15:16:35 2009 -0500
Use absolute path for tmpdir (#479719)
diff --git a/tools/livecd-creator b/tools/livecd-creator
index 0390cc4..211f6ee 100755
--- a/tools/livecd-creator
+++ b/tools/livecd-creator
@@ -112,7 +112,7 @@ def main():
ks = imgcreate.read_kickstart(options.kscfg)
creator = imgcreate.LiveImageCreator(ks, name, fs_label)
- creator.tmpdir = options.tmpdir
+ creator.tmpdir = os.path.abspath(options.tmpdir)
creator.skip_compression = options.skip_compression
creator.skip_minimize = options.skip_minimize
commit 1f0a0af690725290661086e5aebe73618f3117d6
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jan 12 15:15:43 2009 -0500
Use absolute path to cachedir (#479716)
diff --git a/tools/livecd-creator b/tools/livecd-creator
index 719c874..0390cc4 100755
--- a/tools/livecd-creator
+++ b/tools/livecd-creator
@@ -117,7 +117,7 @@ def main():
creator.skip_minimize = options.skip_minimize
try:
- creator.mount(options.base_on, options.cachedir)
+ creator.mount(options.base_on, os.path.abspath(options.cachedir))
creator.install()
creator.configure()
if options.give_shell:
15 years, 3 months
imgcreate/live.py
by Jeremy Katz
imgcreate/live.py | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
New commits:
commit df0d66f685bb06e9038e8ab76f549913b5b1143c
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jan 12 11:41:27 2009 -0500
And determine that we need to go to UDF earlier (#479550)
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 031b136..a7032b0 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -240,18 +240,8 @@ class LiveImageCreatorBase(LoopImageCreator):
"-o", iso]
args.extend(self._get_mkisofs_options(isodir))
-
- # Switch to udf if any file on the image will be 4 GiB or more
- for path, dirs, files in os.walk(isodir):
- for name in files:
- if os.stat(os.path.join(path, name)).st_size >= 4*1024*1024*1024:
- args.append("-allow-limited-size")
- logging.warn('%(file)s has a size of %(size)d, which is greater than or equal to %(fourgib)d, requiring a switch from iso9660 to udf.' %
- {'file': os.path.join(path, name),
- 'size': os.stat(os.path.join(path, name)).st_size,
- 'fourgib': 4*1024*1024*1024})
- self._isofstype = "udf"
- break
+ if self._isofstype == "udf":
+ args.append("-allow-limited-size")
args.append(isodir)
@@ -283,6 +273,9 @@ class LiveImageCreatorBase(LoopImageCreator):
if self.skip_compression:
shutil.move(self._image, self.__isodir + "/LiveOS/ext3fs.img")
+ if os.stat(self.__isodir + "/LiveOS/ext3fs.img").st_size >= 4*1024*1024*1024:
+ self._isofstype = "udf"
+ logging.warn("Switching to UDF due to size of LiveOS/ext3fs.img")
else:
makedirs(os.path.join(os.path.dirname(self._image), "LiveOS"))
shutil.move(self._image,
@@ -290,6 +283,10 @@ class LiveImageCreatorBase(LoopImageCreator):
"LiveOS", "ext3fs.img"))
mksquashfs(os.path.dirname(self._image),
self.__isodir + "/LiveOS/squashfs.img")
+ if os.stat(self.__isodir + "/LiveOS/squashfs.img").st_size >= 4*1024*1024*1024:
+ self._isofstype = "udf"
+ logging.warn("Switching to UDF due to size of LiveOS/squashfs.img")
+
self.__create_iso(self.__isodir)
finally:
15 years, 3 months
imgcreate/live.py
by Jeremy Katz
imgcreate/live.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit 4a670c764a1a949c866539b8a6a60e2729747acb
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Jan 12 11:38:29 2009 -0500
Fix namespacing (#479550)
diff --git a/imgcreate/live.py b/imgcreate/live.py
index f7e35db..031b136 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -70,7 +70,7 @@ class LiveImageCreatorBase(LoopImageCreator):
self.__modules = ["=ata", "sym53c8xx", "aic7xxx", "=usb", "=firewire", "=mmc", "=pcmcia", "mptsas", "udf"]
self.__modules.extend(kickstart.get_modules(self.ks))
- self.__isofstype = "iso9660"
+ self._isofstype = "iso9660"
#
# Hooks for subclasses
@@ -250,7 +250,7 @@ class LiveImageCreatorBase(LoopImageCreator):
{'file': os.path.join(path, name),
'size': os.stat(os.path.join(path, name)).st_size,
'fourgib': 4*1024*1024*1024})
- self.__isofstype = "udf"
+ self._isofstype = "udf"
break
args.append(isodir)
@@ -445,7 +445,7 @@ menu hiddenrow 5
cfg += self.__get_image_stanza(is_xen,
fslabel = self.fslabel,
- isofstype = self.__isofstype,
+ isofstype = self._isofstype,
liveargs = kernel_options,
long = long,
short = "linux" + index,
@@ -458,7 +458,7 @@ menu hiddenrow 5
if checkisomd5:
cfg += self.__get_image_stanza(is_xen,
fslabel = self.fslabel,
- isofstype = self.__isofstype,
+ isofstype = self._isofstype,
liveargs = kernel_options,
long = "Verify and " + long,
short = "check" + index,
@@ -552,13 +552,13 @@ hiddenmenu
if os.path.exists("%s/EFI/boot/xen%d.gz" %(isodir, index)):
continue
cfg += self.__get_efi_image_stanza(fslabel = self.fslabel,
- isofstype = self.__isofstype,
+ isofstype = self._isofstype,
liveargs = kernel_options,
long = name,
extra = "", index = index)
if checkisomd5:
cfg += self.__get_efi_image_stanza(fslabel = self.fslabel,
- isofstype = self.__isofstype,
+ isofstype = self._isofstype,
liveargs = kernel_options,
long = "Verify and Boot " + name,
extra = "check",
@@ -677,7 +677,7 @@ image=/ppc/ppc%(bit)s/vmlinuz
kernel_options = self._get_kernel_options()
cfg += self.__get_image_stanza(fslabel = self.fslabel,
- isofstype = self.__isofstype,
+ isofstype = self._isofstype,
short = "linux",
long = "Run from image",
extra = "",
@@ -686,7 +686,7 @@ image=/ppc/ppc%(bit)s/vmlinuz
if self._has_checkisomd5():
cfg += self.__get_image_stanza(fslabel = self.fslabel,
- isofstype = self.__isofstype,
+ isofstype = self._isofstype,
short = "check",
long = "Verify and run from image",
extra = "check",
15 years, 3 months
Determin Overlay Free Space
by Kam Salisbury
I want to determin how much free space (or used space) the Fedora 10 Live
USB install I built has. I actually run Fedora from my 16GB USB, exclusively
- it never gets installed.
Dropping to a shell, "df -h" give me...
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/live-rw 3.0G 2.3G 650M 79% /
tmpfs 1013M 76K 1013M 1% /dev/shm
/dev/sdb1 7.5G 6.9G 584M 93% /mnt/live
varcacheyum 1013M 0 1013M 0% /var/cache/yum
/tmp 1013M 104K 1013M 1% /tmp
vartmp 1013M 0 1013M 0% /var/tmp
Since I created a 2GB overlay and the install is brand new, the output does
not make sense. Well, maybe if the Fedora image is taking up some of the 2GB
it makes sense.
Is there a tool to see % overlay used? Health of the overlay itself? My web
searches have only found ways to create the overlay via the livecd tools
interface or shell command line.
--
Kam Salisbury
http://kamsalisbury.com
GPG key: FAF1751E
15 years, 3 months
Conference Talk on livecd-tools
by Keith Wright
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Over the last year, I have built a couple of distributions for our
company using livecd-tools with both Fedora 9 and 10. Now, the company I
work for will be hosting the first annual Open Source Conference, and
has asked me to give a presentation about "Building a Custom
Distribution." The focus of my presentation will be livecd-tools.
While I feel confident about what I want to discuss, it would be great
to have experts on livecd-tools present.
One Course Source's Open Source Conference is scheduled for January
28-29, 2009 in San Diego, California. Our conference will take place in
the San Diego Ramada Inn and Conference Center. Registration begins on
September 20, 2008.
I want to mention a 75% off coupon code that expires on
Friday, January 16th. This means that to attend the conference will
cost less than $100 who use this code. This include food and
drink! The coupon code is _*code99a*_. You can register at
http://www.onecoursesource.com/ocs-osc.php.
Even if you don't attend, you can still win prizes with our pass-it-on
contest: http://www.onecoursesource.com/pass-it-on.php.
Keith Wright, RHCE
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAkln6X4ACgkQFJ8UAQeffyuIrACfU4v+KQao1b1jQj2st1e9ZnpK
jX8AnRpmZq/8XGkyEQBL89oj8X5QDmcC
=dAUK
-----END PGP SIGNATURE-----
15 years, 3 months
Building CentOS5 Live CD on F10
by Forrest Taylor
I am trying to build a CentOS 5.1 Live image on Fedora 10. It builds
the image, but when I try to run it, it fails to boot with:
mount: could not find filesystem '/dev/root'
I was able to successfully build CentOS5.1 on another CentOS 5 machine
using the repo provided by nanotechnologies.qc.ca. However, it uses the
older livecd-tools-013. I rebuilt livecd-tools-020 on CentOS5, but I
get the same error that I had on F10.
Does anyone know what changed in the newer livecd-tools that no longer
supports CentOS5?
Thanks,
--
Forrest Taylor
Global Learning Services Project Manager III
Cell: 303-913-5169
AIM: forresttaylorred
Red Hat IRC: forrest
15 years, 3 months
2 commits - imgcreate/live.py
by Jeremy Katz
imgcreate/live.py | 30 +++++++++++++++++++++++++-----
1 file changed, 25 insertions(+), 5 deletions(-)
New commits:
commit 73ff0151b331e60d011e7038c0485694e1d79dbb
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Thu Jan 8 16:50:43 2009 -0500
Be explicit with isofstype being iso9660 vs udf
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 584bf72..f7e35db 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -70,6 +70,8 @@ class LiveImageCreatorBase(LoopImageCreator):
self.__modules = ["=ata", "sym53c8xx", "aic7xxx", "=usb", "=firewire", "=mmc", "=pcmcia", "mptsas", "udf"]
self.__modules.extend(kickstart.get_modules(self.ks))
+ self.__isofstype = "iso9660"
+
#
# Hooks for subclasses
#
@@ -248,6 +250,7 @@ class LiveImageCreatorBase(LoopImageCreator):
{'file': os.path.join(path, name),
'size': os.stat(os.path.join(path, name)).st_size,
'fourgib': 4*1024*1024*1024})
+ self.__isofstype = "udf"
break
args.append(isodir)
@@ -404,13 +407,13 @@ menu hiddenrow 5
template = """label %(short)s
menu label %(long)s
kernel vmlinuz%(index)s
- append initrd=initrd%(index)s.img root=CDLABEL=%(fslabel)s rootfstype=udf,iso9660 %(liveargs)s %(extra)s
+ append initrd=initrd%(index)s.img root=CDLABEL=%(fslabel)s rootfstype=%(isofstype) %(liveargs)s %(extra)s
"""
else:
template = """label %(short)s
menu label %(long)s
kernel mboot.c32
- append xen%(index)s.gz --- vmlinuz%(index)s root=CDLABEL=%(fslabel)s rootfstype=udf,iso9660 %(liveargs)s %(extra)s --- initrd%(index)s.img
+ append xen%(index)s.gz --- vmlinuz%(index)s root=CDLABEL=%(fslabel)s rootfstype=%(isofstype) %(liveargs)s %(extra)s --- initrd%(index)s.img
"""
return template % args
@@ -442,6 +445,7 @@ menu hiddenrow 5
cfg += self.__get_image_stanza(is_xen,
fslabel = self.fslabel,
+ isofstype = self.__isofstype,
liveargs = kernel_options,
long = long,
short = "linux" + index,
@@ -454,6 +458,7 @@ menu hiddenrow 5
if checkisomd5:
cfg += self.__get_image_stanza(is_xen,
fslabel = self.fslabel,
+ isofstype = self.__isofstype,
liveargs = kernel_options,
long = "Verify and " + long,
short = "check" + index,
@@ -530,7 +535,7 @@ hiddenmenu
def __get_efi_image_stanza(self, **args):
return """title %(long)s
- kernel /EFI/boot/vmlinuz%(index)s root=CDLABEL=%(fslabel)s rootfstype=udf,iso9660 %(liveargs)s %(extra)s
+ kernel /EFI/boot/vmlinuz%(index)s root=CDLABEL=%(fslabel)s rootfstype=%(isofstype) %(liveargs)s %(extra)s
initrd /EFI/boot/initrd%(index)s.img
""" %args
@@ -547,11 +552,13 @@ hiddenmenu
if os.path.exists("%s/EFI/boot/xen%d.gz" %(isodir, index)):
continue
cfg += self.__get_efi_image_stanza(fslabel = self.fslabel,
+ isofstype = self.__isofstype,
liveargs = kernel_options,
long = name,
extra = "", index = index)
if checkisomd5:
cfg += self.__get_efi_image_stanza(fslabel = self.fslabel,
+ isofstype = self.__isofstype,
liveargs = kernel_options,
long = "Verify and Boot " + name,
extra = "check",
@@ -670,6 +677,7 @@ image=/ppc/ppc%(bit)s/vmlinuz
kernel_options = self._get_kernel_options()
cfg += self.__get_image_stanza(fslabel = self.fslabel,
+ isofstype = self.__isofstype,
short = "linux",
long = "Run from image",
extra = "",
@@ -678,6 +686,7 @@ image=/ppc/ppc%(bit)s/vmlinuz
if self._has_checkisomd5():
cfg += self.__get_image_stanza(fslabel = self.fslabel,
+ isofstype = self.__isofstype,
short = "check",
long = "Verify and run from image",
extra = "check",
commit e4c497601f021d877e6ef0e68da99f331aed4899
Author: Bruno Wolff III <bruno(a)wolff.to>
Date: Thu Jan 8 16:47:10 2009 -0500
Support using UDF for large ISO spins (#476696)
For ISO spins of larger than four gigabytes, we should use UDF instead of
ISO9660
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 347d22c..584bf72 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -67,7 +67,7 @@ class LiveImageCreatorBase(LoopImageCreator):
self.__isodir = None
- self.__modules = ["=ata", "sym53c8xx", "aic7xxx", "=usb", "=firewire", "=mmc", "=pcmcia", "mptsas"]
+ self.__modules = ["=ata", "sym53c8xx", "aic7xxx", "=usb", "=firewire", "=mmc", "=pcmcia", "mptsas", "udf"]
self.__modules.extend(kickstart.get_modules(self.ks))
#
@@ -239,6 +239,17 @@ class LiveImageCreatorBase(LoopImageCreator):
args.extend(self._get_mkisofs_options(isodir))
+ # Switch to udf if any file on the image will be 4 GiB or more
+ for path, dirs, files in os.walk(isodir):
+ for name in files:
+ if os.stat(os.path.join(path, name)).st_size >= 4*1024*1024*1024:
+ args.append("-allow-limited-size")
+ logging.warn('%(file)s has a size of %(size)d, which is greater than or equal to %(fourgib)d, requiring a switch from iso9660 to udf.' %
+ {'file': os.path.join(path, name),
+ 'size': os.stat(os.path.join(path, name)).st_size,
+ 'fourgib': 4*1024*1024*1024})
+ break
+
args.append(isodir)
if subprocess.call(args) != 0:
@@ -393,13 +404,13 @@ menu hiddenrow 5
template = """label %(short)s
menu label %(long)s
kernel vmlinuz%(index)s
- append initrd=initrd%(index)s.img root=CDLABEL=%(fslabel)s rootfstype=iso9660 %(liveargs)s %(extra)s
+ append initrd=initrd%(index)s.img root=CDLABEL=%(fslabel)s rootfstype=udf,iso9660 %(liveargs)s %(extra)s
"""
else:
template = """label %(short)s
menu label %(long)s
kernel mboot.c32
- append xen%(index)s.gz --- vmlinuz%(index)s root=CDLABEL=%(fslabel)s rootfstype=iso9660 %(liveargs)s %(extra)s --- initrd%(index)s.img
+ append xen%(index)s.gz --- vmlinuz%(index)s root=CDLABEL=%(fslabel)s rootfstype=udf,iso9660 %(liveargs)s %(extra)s --- initrd%(index)s.img
"""
return template % args
@@ -519,7 +530,7 @@ hiddenmenu
def __get_efi_image_stanza(self, **args):
return """title %(long)s
- kernel /EFI/boot/vmlinuz%(index)s root=CDLABEL=%(fslabel)s rootfstype=iso9660 %(liveargs)s %(extra)s
+ kernel /EFI/boot/vmlinuz%(index)s root=CDLABEL=%(fslabel)s rootfstype=udf,iso9660 %(liveargs)s %(extra)s
initrd /EFI/boot/initrd%(index)s.img
""" %args
@@ -648,7 +659,7 @@ image=/ppc/ppc%(bit)s/vmlinuz
label=%(short)s
initrd=/ppc/ppc%(bit)s/initrd.img
read-only
- append="root=CDLABEL=%(fslabel)s rootfstype=iso9660 %(liveargs)s %(extra)s"
+ append="root=CDLABEL=%(fslabel)s rootfstype=udf,iso9660 %(liveargs)s %(extra)s"
""" % args
15 years, 3 months