tools/livecd-creator
by Brian C. Lane
tools/livecd-creator | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit b65f1ebc193a9dd4ad375f1545b167c8b61b90d8
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Wed Jan 29 16:59:32 2014 -0800
Check kickstart for repo line (#1005580)
diff --git a/tools/livecd-creator b/tools/livecd-creator
index 67e3cec..a2919e6 100755
--- a/tools/livecd-creator
+++ b/tools/livecd-creator
@@ -174,6 +174,9 @@ def main():
logging.info("Using title '%s' and product '%s'" % (title, product))
ks = imgcreate.read_kickstart(options.kscfg)
+ if not ks.handler.repo.seen:
+ print >> sys.stderr, "Kickstart (%s) must have at least one repository." % (options.kscfg)
+ return 1
try:
if options.image_type == 'livecd':
10 years, 2 months
Livecd trouble with PXE booting
by David Lutterkort
Hi all,
I use the livecd tools to build PXE boot images; the details of how
things are built can be found at
https://github.com/puppetlabs/razor-el-mk if you're curious.
I use the tools on Fedora 19; when I last built around 11/20/2013, the
resulting kernel and initrd can be successfully booted on my laptop in
a KVM VM.
I rebuilt the PXE boot images today, and they fail to boot
successfully in the same setup. The input to the build process is
virtually unchanged (I added a couple lines to a %post in the
kickstart to blacklist the mei kernel module)
When I boot the ISO file that I built, everything works as expected;
when I boot the kernel/initrd that livecd-iso-to-pxeboot created from
that ISO, either via PXE or via direct kernel boot, dracut times out
waiting for /dev/mapper/live-rw to show up. There is only one entry
'vda' in /sys/block, corresponding to the virtual disk attached to the
VM.
The command line I use to boot is
rootflags=loop initrd=initrd0.img root=live:/microkernel.iso
rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0
rd.info=1
Running 'isoinfo -d' against the ISO confirms that the ISO has the
label 'microkernel' - I've also tried 'root=CDLABEL=microkernel' on
hte kernel command line, to no avail.
It looks like the kernel does not recognize the ISO appended to the
normal initrd. Does anybody have any ideas how I can debug this
further ? Has anybody successfully built pxe boot images with
livecd-tools-19.8-1.fc19.x86_64 ?
David
10 years, 2 months
Are these error messages serious?
by Ranjan Maitra
Hello,
I created a livecd disk using a kickstart file which I modified from
the LXDE spin and got these error messages (at different points of the
ISO creation):
I wonder if any of these messages are serious. In any case, is there an
easy way to get rid of them?
Many thanks,
Ranjan
....
No '/dev/log' or 'logger' included for syslog logging (3 times)
....
....
Opening default zone 'public'
No changes to default zone needed.
Note: Forwarding request to 'systemctl enable NetworkManager.service'.
Note: Forwarding request to 'systemctl disable sshd.service'.
rm '/etc/systemd/system/multi-user.target.wants/sshd.service'
mkfs.fat 3.0.24 (2013-11-23)
Loop device does not match a floppy size, using default hd params
Initialized /dev/loop1 as a 20 MB HFS Plus volume
ERROR:program:umount: /tmp/lorax.imgutils.OtNm0z: target is busy
umount: /tmp/lorax.imgutils.OtNm0z: target is busy
ERROR:program: (In some cases useful info about processes that
(In some cases useful info about processes that
ERROR:program: use the device is found by lsof(8) or fuser(1).)
use the device is found by lsof(8) or fuser(1).)
WARNING:pylorax.imgutils:failed to unmount /tmp/lorax.imgutils.OtNm0z.
retrying (1/3)... ERROR:program:umount: /tmp/lorax.imgutils.LTGEmM:
target is busy umount: /tmp/lorax.imgutils.LTGEmM: target is busy
ERROR:program: (In some cases useful info about processes that
(In some cases useful info about processes that
ERROR:program: use the device is found by lsof(8) or fuser(1).)
use the device is found by lsof(8) or fuser(1).)
WARNING:pylorax.imgutils:failed to unmount /tmp/lorax.imgutils.LTGEmM.
retrying (1/3)... The unit files have no [Install] section. They are
not meant to be enabled using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another
unit's .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which
has a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path,
timer, D-Bus, udev, scripted systemctl call, ...).
error: /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora: import read failed(2).
Packages within this LiveCD
....
....
....
Updating index cache for path `/usr/share/man/nl/man1'.
Wait.../usr/bin/mandb: warning: /usr/share/man/nl/man1/dos2unix.1.gz:
whatis parse for dos2unix(1) failed /usr/bin/mandb:
warning: /usr/share/man/nl/man1/dos2unix.1.gz: whatis parse for unix2dos
(1) failed /usr/bin/mandb:
warning: /usr/share/man/nl/man1/dos2unix.1.gz: whatis parse for unix2mac
(1) failed /usr/bin/mandb:
warning: /usr/share/man/nl/man1/dos2unix.1.gz: whatis parse for mac2unix
(1) failed
....
....
cp: cannot stat
'/home/maitra/remix/tmp/imgcreate-mHq7up/install_root/usr/share/doc/*-release-*/GPL':
No such file or directory
____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!
Check it out at http://www.inbox.com/marineaquarium
10 years, 2 months
Cannot find a valid baseurl for repo: fedora
by James Heather
Anyone else seeing this? Note that I am trying to build a vanilla F20
live DVD, from the standard kickstart file. I haven't changed it.
The network is up and running fine.
James
[root@barry ~]# livecd-creator --config=/usr/share/spin-kickstarts/fedora-live-desktop.ks --cache=/var/cache/live-f20-x86_64/
/usr/lib/python2.7/site-packages/pykickstart/commands/partition.py:309: UserWarning: A partition with the mountpoint / has already been defined.
warnings.warn(_("A partition with the mountpoint %s has already been defined.") % pd.mountpoint)
['/sbin/mkfs.ext4', '-F', '-L', '_fedora-live--x86_64-201401220922', '-m', '1', '-b', '4096', '/dev/loop0']
Traceback (most recent call last):
File "/usr/bin/livecd-creator", line 237, in <module>
sys.exit(main())
File "/usr/bin/livecd-creator", line 218, in main
creator.install()
File "/usr/lib/python2.7/site-packages/imgcreate/creator.py", line 642, in install
ayum.setup(yum_conf, self._instroot)
File "/usr/lib/python2.7/site-packages/imgcreate/yuminst.py", line 105, in setup
self.doTsSetup()
File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 129, in doTsSetup
return self._getTs()
File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 137, in _getTs
if not remove_only and self._tsInfo.pkgSack is None:
File "/usr/lib/python2.7/site-packages/yum/transactioninfo.py", line 140, in <lambda>
pkgSack = property(fget=lambda self: self._getPkgSack(),
File "/usr/lib/python2.7/site-packages/yum/transactioninfo.py", line 137, in _getPkgSack
self._pkgSack = self._pkgSackCtor()
File "/usr/lib/python2.7/site-packages/yum/depsolve.py", line 76, in __call__
return self.ayum.pkgSack
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1071, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 776, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.7/site-packages/yum/repos.py", line 383, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 224, in populate
if self._check_db_version(repo, mydbtype):
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 316, in _check_db_version
return repo._check_db_version(mdtype)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1484, in _check_db_version
repoXML = self.repoXML
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1670, in <lambda>
repoXML = property(fget=lambda self: self._getRepoXML(),
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1666, in _getRepoXML
self._loadRepoXML(text=self.ui_id)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1657, in _loadRepoXML
return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1631, in _groupLoadRepoXML
if self._commonLoadRepoXML(text):
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1456, in _commonLoadRepoXML
result = self._getFileRepoXML(local, text)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1234, in _getFileRepoXML
size=102400) # setting max size as 100K
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1014, in _getFile
result = self.grab.urlgrab(misc.to_utf8(relative), local,
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 694, in <lambda>
grab = property(lambda self: self._getgrab())
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 689, in _getgrab
self._setupGrab()
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 627, in _setupGrab
urls = self.urls
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 871, in <lambda>
urls = property(fget=lambda self: self._geturls(),
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 868, in _geturls
self._baseurlSetup()
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 834, in _baseurlSetup
self.check()
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 554, in check
'Cannot find a valid baseurl for repo: %s' % self.ui_id
yum.Errors.RepoError: Cannot find a valid baseurl for repo: fedora
[root@barry ~]#
10 years, 2 months
tools/livecd-creator
by Brian C. Lane
tools/livecd-creator | 43 +++++++++++++++++++++----------------------
1 file changed, 21 insertions(+), 22 deletions(-)
New commits:
commit 95d3bc567a0b63c2d54b3f9328ca81188892791f
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Jan 14 14:00:01 2014 -0800
Catch CreatorError during class init (#1005580)
diff --git a/tools/livecd-creator b/tools/livecd-creator
index 44d07a1..67e3cec 100755
--- a/tools/livecd-creator
+++ b/tools/livecd-creator
@@ -25,7 +25,6 @@ import optparse
import logging
import imgcreate
-from imgcreate.fs import makedirs
class Usage(Exception):
def __init__(self, msg = None, no_error = False):
@@ -105,7 +104,7 @@ def parse_options(args):
else:
options.image_type = 'livecd'
if options.image_type not in ('livecd', 'image'):
- raise Usage("'%s' is a recognized image type" % options.image_type)
+ raise Usage("'%s' is not a recognized image type" % options.image_type)
# image-create compatibility: Last argument is kickstart file
if len(args) == 1:
@@ -176,26 +175,26 @@ def main():
ks = imgcreate.read_kickstart(options.kscfg)
- if options.image_type == 'livecd':
- creator = imgcreate.LiveImageCreator(ks, name,
- fslabel=fslabel,
- releasever=options.releasever,
- tmpdir=os.path.abspath(options.tmpdir),
- useplugins=options.plugins,
- title=title, product=product,
- cacheonly=options.cacheonly,
- docleanup=not options.nocleanup)
- elif options.image_type == 'image':
- creator = imgcreate.LoopImageCreator(ks, name,
- fslabel=fslabel,
- releasever=options.releasever,
- useplugins=options.plugins,
- tmpdir=os.path.abspath(options.tmpdir),
- cacheonly=options.cacheonly,
- docleanup=not options.nocleanup)
- else:
- # Cannot happen, we validate this when parsing options.
- logging.error(u"'%s' is not a valid image type" % options.image_type)
+ try:
+ if options.image_type == 'livecd':
+ creator = imgcreate.LiveImageCreator(ks, name,
+ fslabel=fslabel,
+ releasever=options.releasever,
+ tmpdir=os.path.abspath(options.tmpdir),
+ useplugins=options.plugins,
+ title=title, product=product,
+ cacheonly=options.cacheonly,
+ docleanup=not options.nocleanup)
+ elif options.image_type == 'image':
+ creator = imgcreate.LoopImageCreator(ks, name,
+ fslabel=fslabel,
+ releasever=options.releasever,
+ useplugins=options.plugins,
+ tmpdir=os.path.abspath(options.tmpdir),
+ cacheonly=options.cacheonly,
+ docleanup=not options.nocleanup)
+ except imgcreate.CreatorError as e:
+ logging.error(u"%s creation failed: %s", options.image_type, e)
return 1
creator.compress_type = options.compress_type
10 years, 2 months
tools/edit-livecd
by Brian C. Lane
tools/edit-livecd | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 8dfdd7d5bbc33135d8cf8e0d8247394b82e729b4
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Jan 14 12:20:51 2014 -0800
Add docleanup to edit-livecd (#1000744)
diff --git a/tools/edit-livecd b/tools/edit-livecd
index 1670228..f1287bf 100755
--- a/tools/edit-livecd
+++ b/tools/edit-livecd
@@ -58,7 +58,7 @@ class LiveImageEditor(LiveImageCreator):
"""
- def __init__(self, name):
+ def __init__(self, name, docleanup=True):
"""Initialize a LiveImageEditor instance.
creates a dummy instance of LiveImageCreator
@@ -125,6 +125,8 @@ class LiveImageEditor(LiveImageCreator):
self.__ImageCreator__selinux_mountpoint = fields[4]
break
+ self.docleanup = docleanup
+
# properties
def __get_image(self):
if self._LoopImageCreator__imagedir is None:
@@ -611,6 +613,9 @@ def parse_options(args):
parser.add_option("", "--skip-minimize", action="store_true",
dest="skip_minimize", default=False,
help="Specify no osmin.img minimal snapshot.")
+ parser.add_option("", "--nocleanup", action="store_true",
+ dest="nocleanup", default=False,
+ help="Skip cleanup of temporary files")
setup_logging(parser)
@@ -673,7 +678,7 @@ def main():
if output == '/dev':
output = options.tmpdir
- editor = LiveImageEditor(name)
+ editor = LiveImageEditor(name, docleanup=not options.nocleanup)
editor._exclude = options.exclude
editor._exclude_file = options.exclude_file
editor._include = options.include
10 years, 2 months
imgcreate/errors.py
by Brian C. Lane
imgcreate/errors.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 60823a4724362b5668200d7b1658fa418e7ccfc3
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Jan 14 12:01:42 2014 -0800
utf8 decode unicode error strings (#1035248)
diff --git a/imgcreate/errors.py b/imgcreate/errors.py
index 800dc3b..092770d 100644
--- a/imgcreate/errors.py
+++ b/imgcreate/errors.py
@@ -42,7 +42,9 @@ class CreatorError(Exception):
return repr(self.message)
def __unicode__(self):
- return unicode(self.message)
+ if not self.message:
+ return unicode("")
+ return unicode(self.message.decode("utf8"))
class KickstartError(CreatorError):
pass
10 years, 2 months
tools/livecd-creator
by Brian C. Lane
tools/livecd-creator | 11 -----------
1 file changed, 11 deletions(-)
New commits:
commit bfef1f8fa5a6f18b78882755271d0fe174b8c48b
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Jan 14 11:09:59 2014 -0800
Remove switch to Permissive (#1051523)
SELinux has improved to the point where livecd-creator can be run with
it in Enforcing mode so it is no longer necessary to switch to
Permissive. If problems come up in the future they should be corrected
with SELinux policy.
diff --git a/tools/livecd-creator b/tools/livecd-creator
index a39e43f..44d07a1 100755
--- a/tools/livecd-creator
+++ b/tools/livecd-creator
@@ -23,7 +23,6 @@ import sys
import time
import optparse
import logging
-import selinux
import imgcreate
from imgcreate.fs import makedirs
@@ -144,12 +143,6 @@ def main():
print >> sys.stderr, "You must run %s as root" % sys.argv[0]
return 1
- # Set selinux to Permissive if it is enforcing
- selinux_enforcing = False
- if selinux.is_selinux_enabled() and selinux.security_getenforce():
- selinux_enforcing = True
- selinux.security_setenforce(0)
-
if options.fslabel:
fslabel = options.fslabel
name = fslabel
@@ -203,8 +196,6 @@ def main():
else:
# Cannot happen, we validate this when parsing options.
logging.error(u"'%s' is not a valid image type" % options.image_type)
- if selinux_enforcing:
- selinux.security_setenforce(1)
return 1
creator.compress_type = options.compress_type
@@ -228,8 +219,6 @@ def main():
return 1
finally:
creator.cleanup()
- if selinux_enforcing:
- selinux.security_setenforce(1)
return 0
10 years, 2 months
Branch 'f19-branch' - 2 commits - imgcreate/yuminst.py Makefile
by Brian C. Lane
Makefile | 2 +-
imgcreate/yuminst.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit f2e50cc89065119dec3e6fd8cdcc6c799ad91b70
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Jan 7 14:53:34 2014 -0800
Version 19.8
diff --git a/Makefile b/Makefile
index fe582dc..e5cc336 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-VERSION = 19.7
+VERSION = 19.8
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
commit b3254bfada4fbd847360811165a972dc5707d967
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Jan 7 14:35:09 2014 -0800
Add missing quote (#1044675)
diff --git a/imgcreate/yuminst.py b/imgcreate/yuminst.py
index 0865b31..22e840c 100644
--- a/imgcreate/yuminst.py
+++ b/imgcreate/yuminst.py
@@ -158,7 +158,7 @@ class LiveCDYum(yum.YumBase):
option = option.replace("$releasever", self.releasever)
else:
try:
- option = option.replace("$releasever", yum.config._getsysver("/", ("system-release(release), "redhat-release")))
+ option = option.replace("$releasever", yum.config._getsysver("/", ("system-release(release)", "redhat-release")))
except yum.Errors.YumBaseError:
raise CreatorError("$releasever in repo url, but no releasever set")
return option
10 years, 2 months
Changes to 'refs/tags/livecd-tools-20.3'
by Brian C. Lane
Tag 'livecd-tools-20.3' created by Brian C. Lane <bcl(a)redhat.com> at 2014-01-07 22:36 +0000
Tag as livecd-tools-20.3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEVAwUAUsyBUBF+jBaO/jp/AQK3Dgf/Ytz+lelYJIyZh/T63JQ/235pC3xIFI4U
du+MtZfUxnwXda6P5gq8rg9O65uYvhIBSep/rMwIK+Il9HMNd5Cjv9hdw2RtrvIT
gq1xCFD+Rt0f8wk5htcIFHoUi24+lqjDhaHc1yXx9VXa1VerklJvPgO/cqx0fI3U
ke1Up/TMeszbxc/CI+SjLQySRyHIUxq7EfInyguZEKv2M7xLL5YbFqXPtwO/YS76
8mahXkvTyyRTmEBU7crtn6OzNvfGk+sDANdUO5D7nG6EcsKtPX1oz2Xz36usmxCv
Rcfamj8WgCsY+mjM+Ryjcu7X2l66MfR/tsxlfvUOwTGVI+S6YCSaEg==
=vf3Z
-----END PGP SIGNATURE-----
Changes since livecd-tools-20.2:
Brian C. Lane (2):
Add missing quote (#1044675)
Version 20.3
---
Makefile | 2 +-
imgcreate/yuminst.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
10 years, 2 months