F7 general question about livecd-creator and timezones
by Skunk Worx
My ks scripts have the timezone set to PDT (America/Los_Angeles).
Installation to a hard drive works as expected. PDT in startup and in
shells, etc.
Creating a livecd-creator iso with the same tz setting, then booting,
shows A/L_A in the /etc/sysconfig/clock file, as expected.
However the date is always EDT in the boot messages, shells, etc.
During startup I see :
(lvm)
Press I to enter interactive startup
Setting clock (utc) Mon Jun 4 00:12:59 EDT 2007
(udev)
I'm not clear on what is happening between lvm and udev in the Linux
startup sequence.
If someone could give me a hint about what to look for and where to look
for it I would appreciate the help.
---
John
14 years, 5 months
[PATCH] Refactor disk/mount classes to allow multi-partition/fs layouts
by David Huff
From: Daniel P. Berrange <berrange(a)redhat.com>
---
imgcreate/creator.py | 17 ++--
imgcreate/fs.py | 247 ++++++++++++++++++++++++++++++++-----------------
imgcreate/live.py | 6 +-
3 files changed, 174 insertions(+), 96 deletions(-)
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
index 0d22b56..979e1b9 100644
--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -208,7 +208,11 @@ class ImageCreator(object):
"""
s = "/dev/root / %s defaults,noatime 0 0\n" %(self._fstype)
- s += "devpts /dev/pts devpts gid=5,mode=620 0 0\n"
+ s += self._get_fstab_special()
+ return s
+
+ def _get_fstab_special(self):
+ s = "devpts /dev/pts devpts gid=5,mode=620 0 0\n"
s += "tmpfs /dev/shm tmpfs defaults 0 0\n"
s += "proc /proc proc defaults 0 0\n"
s += "sysfs /sys sysfs defaults 0 0\n"
@@ -817,12 +821,11 @@ class LoopImageCreator(ImageCreator):
if not base_on is None:
shutil.copyfile(base_on, self._image)
- self.__instloop = SparseExtLoopbackMount(self._image,
- self._instroot,
- self.__image_size,
- self.__fstype,
- self.__blocksize,
- self.fslabel)
+ self.__instloop = ExtDiskMount(SparseLoopbackDisk(self._image, self.__image_size),
+ self._instroot,
+ self.__fstype,
+ self.__blocksize,
+ self.fslabel)
try:
self.__instloop.mount()
diff --git a/imgcreate/fs.py b/imgcreate/fs.py
index 9ca3a3e..e53cfa9 100644
--- a/imgcreate/fs.py
+++ b/imgcreate/fs.py
@@ -24,6 +24,7 @@ import stat
import subprocess
import random
import string
+import logging
from imgcreate.errors import *
@@ -86,42 +87,51 @@ class BindChrootMount:
subprocess.call(["/bin/umount", self.dest])
self.mounted = False
-class LoopbackMount:
- def __init__(self, lofile, mountdir, fstype = None):
- self.lofile = lofile
- self.mountdir = mountdir
- self.fstype = fstype
+class Disk:
+ def __init__(self, size, device = None):
+ self._device = device
+ self._size = size
- self.mounted = False
- self.losetup = False
- self.rmdir = False
- self.loopdev = None
+ def create(self):
+ pass
def cleanup(self):
- self.unmount()
- self.lounsetup()
+ pass
- def unmount(self):
- if self.mounted:
- rc = subprocess.call(["/bin/umount", self.mountdir])
- if rc == 0:
- self.mounted = False
+ def get_device(self):
+ return self._device
+ def set_device(self, path):
+ self._device = path
+ device = property(get_device, set_device)
- if self.rmdir and not self.mounted:
- try:
- os.rmdir(self.mountdir)
- except OSError, e:
- pass
- self.rmdir = False
+ def get_size(self):
+ return self._size
+ size = property(get_size)
+
+
+class RawDisk(Disk):
+ def __init__(self, size, device):
+ Disk.__init__(self, size, device)
+
+ def fixed(self):
+ return True
+
+ def exists(self):
+ return True
+
+class LoopbackDisk(Disk):
+ def __init__(self, lofile, size):
+ Disk.__init__(self, size)
+ self.lofile = lofile
+
+ def fixed(self):
+ return False
- def lounsetup(self):
- if self.losetup:
- rc = subprocess.call(["/sbin/losetup", "-d", self.loopdev])
- self.losetup = False
- self.loopdev = None
+ def exists(self):
+ return os.path.exists(self.lofile)
- def loopsetup(self):
- if self.losetup:
+ def create(self):
+ if self.device is not None:
return
losetupProc = subprocess.Popen(["/sbin/losetup", "-f"],
@@ -132,40 +142,27 @@ class LoopbackMount:
raise MountError("Failed to allocate loop device for '%s'" %
self.lofile)
- self.loopdev = losetupOutput.split()[0]
+ device = losetupOutput.split()[0]
- rc = subprocess.call(["/sbin/losetup", self.loopdev, self.lofile])
+ logging.debug("Losetup add %s mapping to %s" % (device, self.lofile))
+ rc = subprocess.call(["/sbin/losetup", device, self.lofile])
if rc != 0:
raise MountError("Failed to allocate loop device for '%s'" %
self.lofile)
+ self.device = device
- self.losetup = True
-
- def mount(self):
- if self.mounted:
+ def cleanup(self):
+ if self.device is None:
return
+ logging.debug("Losetup remove %s" % self.device)
+ rc = subprocess.call(["/sbin/losetup", "-d", self.device])
+ self.device = None
- self.loopsetup()
- if not os.path.isdir(self.mountdir):
- os.makedirs(self.mountdir)
- self.rmdir = True
- args = [ "/bin/mount", self.loopdev, self.mountdir ]
- if self.fstype:
- args.extend(["-t", self.fstype])
-
- rc = subprocess.call(args)
- if rc != 0:
- raise MountError("Failed to mount '%s' to '%s'" %
- (self.loopdev, self.mountdir))
-
- self.mounted = True
-
-class SparseLoopbackMount(LoopbackMount):
- def __init__(self, lofile, mountdir, size, fstype = None):
- LoopbackMount.__init__(self, lofile, mountdir, fstype)
- self.size = size
+class SparseLoopbackDisk(LoopbackDisk):
+ def __init__(self, lofile, size):
+ LoopbackDisk.__init__(self, lofile, size)
def expand(self, create = False, size = None):
flags = os.O_WRONLY
@@ -176,6 +173,7 @@ class SparseLoopbackMount(LoopbackMount):
if size is None:
size = self.size
+ logging.debug("Extending sparse file %s to %d" % (self.lofile, size))
fd = os.open(self.lofile, flags)
os.lseek(fd, size, 0)
@@ -185,36 +183,107 @@ class SparseLoopbackMount(LoopbackMount):
def truncate(self, size = None):
if size is None:
size = self.size
+
+ logging.debug("Truncating sparse file %s to %d" % (self.lofile, size))
fd = os.open(self.lofile, os.O_WRONLY)
os.ftruncate(fd, size)
os.close(fd)
def create(self):
self.expand(create = True)
+ LoopbackDisk.create(self)
+
+class Mount:
+ def __init__(self, mountdir):
+ self.mountdir = mountdir
+
+ def cleanup(self):
+ self.unmount()
+
+ def mount(self):
+ pass
+
+ def unmount(self):
+ pass
+
+class DiskMount(Mount):
+ def __init__(self, disk, mountdir, fstype = None, rmmountdir = True):
+ Mount.__init__(self, mountdir)
+
+ self.disk = disk
+ self.fstype = fstype
+ self.rmmountdir = rmmountdir
+
+ self.mounted = False
+ self.rmdir = False
+
+ def cleanup(self):
+ Mount.cleanup(self)
+ self.disk.cleanup()
+
+ def unmount(self):
+ if self.mounted:
+ logging.debug("Unmounting directory %s" % self.mountdir)
+ rc = subprocess.call(["/bin/umount", self.mountdir])
+ if rc == 0:
+ self.mounted = False
+
+ if self.rmdir and not self.mounted:
+ try:
+ os.rmdir(self.mountdir)
+ except OSError, e:
+ pass
+ self.rmdir = False
+
+
+ def __create(self):
+ self.disk.create()
+
-class SparseExtLoopbackMount(SparseLoopbackMount):
- def __init__(self, lofile, mountdir, size, fstype, blocksize, fslabel):
- SparseLoopbackMount.__init__(self, lofile, mountdir, size, fstype)
+ def mount(self):
+ if self.mounted:
+ return
+
+ if not os.path.isdir(self.mountdir):
+ logging.debug("Creating mount point %s" % self.mountdir)
+ os.makedirs(self.mountdir)
+ self.rmdir = self.rmmountdir
+
+ self.__create()
+
+ logging.debug("Mounting %s at %s" % (self.disk.device, self.mountdir))
+ args = [ "/bin/mount", self.disk.device, self.mountdir ]
+ if self.fstype:
+ args.extend(["-t", self.fstype])
+
+ rc = subprocess.call(args)
+ if rc != 0:
+ raise MountError("Failed to mount '%s' to '%s'" %
+ (self.disk.device, self.mountdir))
+
+ self.mounted = True
+
+class ExtDiskMount(DiskMount):
+ def __init__(self, disk, mountdir, fstype, blocksize, fslabel, rmmountdir=True):
+ DiskMount.__init__(self, disk, mountdir, fstype, rmmountdir)
self.blocksize = blocksize
self.fslabel = fslabel
def __format_filesystem(self):
+ logging.debug("Formating %s filesystem on %s" % (self.fstype, self.disk.device))
rc = subprocess.call(["/sbin/mkfs." + self.fstype,
"-F", "-L", self.fslabel,
"-m", "1", "-b", str(self.blocksize),
- self.lofile,
- str(self.size / self.blocksize)])
+ self.disk.device])
+ # str(self.disk.size / self.blocksize)])
if rc != 0:
raise MountError("Error creating %s filesystem" % (self.fstype,))
+ logging.debug("Tuning filesystem on %s" % self.disk.device)
subprocess.call(["/sbin/tune2fs", "-c0", "-i0", "-Odir_index",
- "-ouser_xattr,acl", self.lofile])
-
- def create(self):
- SparseLoopbackMount.create(self)
- self.__format_filesystem()
+ "-ouser_xattr,acl", self.disk.device])
- def resize(self, size = None):
- current_size = os.stat(self.lofile)[stat.ST_SIZE]
+ def __resize_filesystem(self, size = None):
+ current_size = os.stat(self.disk.lofile)[stat.ST_SIZE]
if size is None:
size = self.size
@@ -227,21 +296,28 @@ class SparseExtLoopbackMount(SparseLoopbackMount):
self.__fsck()
- resize2fs(self.lofile, size)
-
- if size < current_size:
- self.truncate(size)
+ resize2fs(self.disk.lofile, size)
return size
- def mount(self):
- if not os.path.isfile(self.lofile):
- self.create()
+ def __create(self):
+ resize = False
+ if not self.disk.fixed() and self.disk.exists():
+ resize = True
+
+ self.disk.create()
+
+ if resize:
+ self.__resize_filesystem()
else:
- self.resize()
- return SparseLoopbackMount.mount(self)
+ self.__format_filesystem()
+
+ def mount(self):
+ self.__create()
+ DiskMount.mount(self)
def __fsck(self):
- subprocess.call(["/sbin/e2fsck", "-f", "-y", self.lofile])
+ logging.debug("Checking filesystem %s" % self.disk.lofile)
+ subprocess.call(["/sbin/e2fsck", "-f", "-y", self.disk.lofile])
def __get_size_from_filesystem(self):
def parse_field(output, field):
@@ -253,7 +329,7 @@ class SparseExtLoopbackMount(SparseLoopbackMount):
dev_null = os.open("/dev/null", os.O_WRONLY)
try:
- out = subprocess.Popen(['/sbin/dumpe2fs', '-h', self.lofile],
+ out = subprocess.Popen(['/sbin/dumpe2fs', '-h', self.disk.lofile],
stdout = subprocess.PIPE,
stderr = dev_null).communicate()[0]
finally:
@@ -273,7 +349,7 @@ class SparseExtLoopbackMount(SparseLoopbackMount):
while top != (bot + 1):
t = bot + ((top - bot) / 2)
- if not resize2fs(self.lofile, t):
+ if not resize2fs(self.disk.lofile, t):
top = t
else:
bot = t
@@ -306,8 +382,8 @@ class DeviceMapperSnapshot(object):
if self.__created:
return
- self.imgloop.loopsetup()
- self.cowloop.loopsetup()
+ self.imgloop.create()
+ self.cowloop.create()
self.__name = "imgcreate-%d-%d" % (os.getpid(),
random.randint(0, 2**16))
@@ -315,8 +391,8 @@ class DeviceMapperSnapshot(object):
size = os.stat(self.imgloop.lofile)[stat.ST_SIZE]
table = "0 %d snapshot %s %s p 8" % (size / 512,
- self.imgloop.loopdev,
- self.cowloop.loopdev)
+ self.imgloop.device,
+ self.cowloop.device)
args = ["/sbin/dmsetup", "create", self.__name, "--table", table]
if subprocess.call(args) != 0:
@@ -382,15 +458,14 @@ class DeviceMapperSnapshot(object):
# 8) Create a squashfs of the COW
#
def create_image_minimizer(path, image, minimal_size):
- imgloop = LoopbackMount(image, "None")
+ imgloop = LoopbackDisk(image, None) # Passing bogus size - doesn't matter
- cowloop = SparseLoopbackMount(os.path.join(os.path.dirname(path), "osmin"),
- None, 64L * 1024L * 1024L)
+ cowloop = SparseLoopbackDisk(os.path.join(os.path.dirname(path), "osmin"),
+ 64L * 1024L * 1024L)
snapshot = DeviceMapperSnapshot(imgloop, cowloop)
try:
- cowloop.create()
snapshot.create()
resize2fs(snapshot.path, minimal_size)
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 03a5466..e25e8cd 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -131,7 +131,7 @@ class LiveImageCreatorBase(LoopImageCreator):
#
def __base_on_iso(self, base_on):
"""helper function to extract ext3 file system from a live CD ISO"""
- isoloop = LoopbackMount(base_on, self._mkdtemp())
+ isoloop = Mount(LoopbackDisk(base_on), self._mkdtemp())
try:
isoloop.mount()
@@ -145,10 +145,10 @@ class LiveImageCreatorBase(LoopImageCreator):
else:
squashimg = isoloop.mountdir + "/LiveOS/squashfs.img"
- squashloop = LoopbackMount(squashimg, self._mkdtemp(), "squashfs")
+ squashloop = Mount(LoopbackDisk(squashimg), self._mkdtemp(), "squashfs")
try:
- if not os.path.exists(squashloop.lofile):
+ if not squashloop.disk.exists():
raise CreatorError("'%s' is not a valid live CD ISO : "
"squashfs.img doesn't exist" % base_on)
--
1.5.4.3
15 years, 2 months
[PATCH] Make use of python logging API for debug messages
by David Huff
From: Daniel P. Berrange <berrange(a)redhat.com>
---
imgcreate/creator.py | 5 ++-
imgcreate/debug.py | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++
imgcreate/live.py | 4 +-
imgcreate/yuminst.py | 3 +-
tools/image-creator | 13 ++++++++-
tools/livecd-creator | 14 +++++++++-
6 files changed, 94 insertions(+), 9 deletions(-)
create mode 100644 imgcreate/debug.py
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
index c7b1046..0d22b56 100644
--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -22,6 +22,7 @@ import stat
import sys
import tempfile
import shutil
+import logging
import yum
import rpm
@@ -501,7 +502,7 @@ class ImageCreator(object):
(pkg, e))
for pkg in skipped_pkgs:
- print >> sys.stderr, "Skipping missing package '%s'" % (pkg,)
+ logging.info("Skipping missing package '%s'" % (pkg,))
def __select_groups(self, ayum):
skipped_groups = []
@@ -516,7 +517,7 @@ class ImageCreator(object):
skipped_groups.append(group)
for group in skipped_groups:
- print >> sys.stderr, "Skipping missing group '%s'" % (group.name,)
+ logging.info("Skipping missing group '%s'" % (group.name,))
def __deselect_packages(self, ayum):
for pkg in kickstart.get_excluded(self.ks,
diff --git a/imgcreate/debug.py b/imgcreate/debug.py
new file mode 100644
index 0000000..6d725e9
--- /dev/null
+++ b/imgcreate/debug.py
@@ -0,0 +1,64 @@
+#
+# debug.py: Helper routines for debugging
+#
+# Copyright 2008, Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+import logging
+import logging.handlers
+import optparse
+import sys
+
+def add_logging_options(parser):
+ logopt = optparse.OptionGroup(parser, "Debugging options",
+ "These options control the output of logging information during image creation")
+
+ # Logging related options
+ logopt.add_option("-d", "--debug", action="store_true", dest="debug",
+ help="Output debugging information")
+ logopt.add_option("-v", "--verbose", action="store_true", dest="verbose",
+ help="Output verbose progress information")
+ logopt.add_option("", "--logfile", type="string", default=None, dest="logfile",
+ help="Save debug information to FILENAME")
+
+ parser.add_option_group(logopt)
+
+
+def setup_logging(verbose=False, debug=False, logfile=None):
+
+ rootLogger = logging.getLogger()
+ if debug:
+ rootLogger.setLevel(logging.DEBUG)
+ elif verbose:
+ rootLogger.setLevel(logging.INFO)
+ else:
+ rootLogger.setLevel(logging.WARN)
+
+ dateFormat = "%a, %d %b %Y %H:%M:%S"
+ if logfile is not None:
+ fileHandler = logging.handlers.RotatingFileHandler(logfile, "a",
+ 1024*1024, 5)
+
+ fileFormat = "[%(asctime)s %(process)d] %(levelname)s (%(module)s:%(lineno)d) %(message)s"
+ fileHandler.setFormatter(logging.Formatter(fileFormat,
+ dateFormat))
+ rootLogger.addHandler(fileHandler)
+ else:
+ streamHandler = logging.StreamHandler(sys.stderr)
+ streamFormat = "%(levelname)-6s %(message)s"
+ streamHandler.setFormatter(logging.Formatter(streamFormat,
+ dateFormat))
+ rootLogger.addHandler(streamHandler)
diff --git a/imgcreate/live.py b/imgcreate/live.py
index bbb17ef..03a5466 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -21,6 +21,7 @@ import os.path
import glob
import shutil
import subprocess
+import logging
from imgcreate.errors import *
from imgcreate.fs import *
@@ -279,8 +280,7 @@ class LiveImageCreatorBase(LoopImageCreator):
elif os.path.exists("/usr/lib/anaconda-runtime/implantisomd5"):
implantisomd5 = "/usr/lib/anaconda-runtime/implantisomd5"
else:
- print >> sys.stderr, \
- "isomd5sum not installed; not setting up mediacheck"
+ logging.warn("isomd5sum not installed; not setting up mediacheck")
subprocess.call([implantisomd5, iso])
diff --git a/imgcreate/yuminst.py b/imgcreate/yuminst.py
index 4c9ae40..4725146 100644
--- a/imgcreate/yuminst.py
+++ b/imgcreate/yuminst.py
@@ -18,6 +18,7 @@
import os
import sys
+import logging
import yum
import rpmUtils
@@ -110,7 +111,7 @@ class LiveCDYum(yum.YumBase):
pkgs.remove(x)
self.tsInfo.conditionals[req] = pkgs
else:
- print >> sys.stderr, "No such package %s to remove" %(pkg,)
+ logging.warn("No such package %s to remove" %(pkg,))
def selectGroup(self, grp, include = pykickstart.parser.GROUP_DEFAULT):
yum.YumBase.selectGroup(self, grp)
diff --git a/tools/image-creator b/tools/image-creator
index aca9228..34ce253 100755
--- a/tools/image-creator
+++ b/tools/image-creator
@@ -21,8 +21,10 @@ import os
import sys
import shutil
import optparse
+import logging
import imgcreate
+import imgcreate.debug
def parse_options(args):
parser = optparse.OptionParser(usage = "%prog [--name=<name>] <kickstart>")
@@ -30,6 +32,9 @@ def parse_options(args):
parser.add_option("-n", "--name", type="string", dest="name",
help="Image name and filesystem label")
+ # options relating to logging
+ imgcreate.debug.add_logging_options(parser)
+
(options, args) = parser.parse_args()
if len(args) != 1:
@@ -45,10 +50,14 @@ def main():
print >> sys.stderr, "You must run image-creator as root"
return 1
+ imgcreate.debug.setup_logging(options.verbose,
+ options.debug,
+ options.logfile)
+
try:
ks = imgcreate.read_kickstart(kscfg)
except imgcreate.CreatorError, e:
- print >> sys.stderr, "Error loading kickstart file '%s' : %s" % (kscfg, e)
+ logging.error("Unable to load kickstart file '%s' : %s" % (kscfg, e))
return 1
if options.name:
@@ -61,7 +70,7 @@ def main():
try:
creator.create()
except imgcreate.CreatorError, e:
- print >> sys.stderr, "Error creating image : %s" % e
+ logging.error("Unable to create image : %s" % e)
return 1
finally:
creator.cleanup()
diff --git a/tools/livecd-creator b/tools/livecd-creator
index 7c08323..cacaff2 100755
--- a/tools/livecd-creator
+++ b/tools/livecd-creator
@@ -22,8 +22,10 @@ import os.path
import sys
import time
import optparse
+import logging
import imgcreate
+import imgcreate.debug
class Usage(Exception):
def __init__(self, msg = None, no_error = False):
@@ -53,6 +55,9 @@ def parse_options(args):
help="Cache directory to use (default: private cache")
parser.add_option_group(sysopt)
+ # options relating to logging
+ imgcreate.debug.add_logging_options(parser)
+
# debug options not recommended for "production" images
# Start a shell in the chroot for post-configuration.
parser.add_option("-l", "--shell", action="store_true", dest="give_shell",
@@ -63,6 +68,7 @@ def parse_options(args):
parser.add_option("", "--skip-minimize", action="store_true", dest="skip_minimize",
help=optparse.SUPPRESS_HELP)
+
(options, args) = parser.parse_args()
if not options.kscfg or not os.path.isfile(options.kscfg):
raise Usage("Kickstart config '%s' does not exist" %(options.kscfg,))
@@ -87,6 +93,10 @@ def main():
print >> out, msg
return ret
+ imgcreate.debug.setup_logging(options.verbose,
+ options.debug,
+ options.logfile)
+
if os.geteuid () != 0:
print >> sys.stderr, "You must run livecd-creator as root"
return 1
@@ -101,7 +111,7 @@ def main():
"livecd-",
maxlen = imgcreate.FSLABEL_MAXLEN)
- print "Using label '%s' and name '%s'" % (fs_label, name)
+ logging.info("Using label '%s' and name '%s'" % (fs_label, name))
ks = imgcreate.read_kickstart(options.kscfg)
@@ -121,7 +131,7 @@ def main():
creator.unmount()
creator.package()
except imgcreate.CreatorError, e:
- print >> sys.stderr, "Error creating Live CD : %s" % e
+ logging.error("Error creating Live CD : %s" % e)
return 1
finally:
creator.cleanup()
--
1.5.4.3
15 years, 4 months
Custom spin of Fedora - non-package customizations
by Todd N
Hello,
I am trying to determine the best way to create a custom spin of Fedora which, in addition to having a customized set of standard Fedora packages that we need for our environment, also includes changes like:
* Browser configuration changes
* Possible browser cookie(s) added
* Display settings
* Installation of non-standard packages (i.e. packages you would not find in a standard yum repository
* Other custom changes to individual files
I know that the Kickstart file allows for post install customizations. I am wondering whether anyone could point me towards a good tutorial that would help me in setting up these detailed config changes. I am also researching on my own, but any additional ideas are appreciated.
Thanks much,
Todd
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
15 years, 5 months
tips for embedding qemu on livecd to boot directly from windows?
by Adam Stokes
my end goal is to put a livecd into a running windows box and allow a
user to run that.
from my research distro's like helix, dsl have this capability but
seem to use some sort of knoppix trick with possibly cloop? and a
particular qemu image to allow this to take place.
has anyone run into this or could possibly point me to some
documentation for livecd remastering to this extent?
thx
--
( adam stokes ) || ( adam.stokes(a)gmail.com )
15 years, 5 months
[PATCH] Partition Size overriding
by Jeroen van Meeuwen
Hello there,
while spinning a Games DVD -just for kicks-, I found that the "part /
8000" in it's kickstart isn't really applied.
Using ksflatten shows me the "part" statements are appended to one
another, depending on the other they have been specified; if "part /
8000" is specified before including the 'base' kickstart, the filesystem
will end up size 8000*1024L*1024L. Either way:
Attached are two patches:
partition_size_last-specified.patch makes livecd-tools loop through
/all/ the partition statements, and takes the size of last "part /"
specified so that the "part /" statement becomes something that can be
overridden. I'm not sure how valid this is, as sorting "part" statements
in pykickstart may result in unsuspected behavior on livecd-tool's part.
partition_size_largest.patch however takes all "part /" statements into
consideration, and picks the largest.
Another valid solution would be to have 'base' kickstarts specify the
filesystem size and, by (Spin SIG?) policy, not allowing any overrides
of this part of 'base'.
Kind regards,
Jeroen van Meeuwen
-kanarip
15 years, 5 months
config/livecd-fedora-kde.ks
by Sebastian Vahl
config/livecd-fedora-kde.ks | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 317007a9f2fbf1e793b4a8a653d3aee8223240a9
Author: Sebastian Vahl <fedora(a)deadbabylon.de>
Date: Sun Apr 27 22:13:35 2008 +0200
add pavucontrol
diff --git a/config/livecd-fedora-kde.ks b/config/livecd-fedora-kde.ks
index 8acdb46..8cefa08 100644
--- a/config/livecd-fedora-kde.ks
+++ b/config/livecd-fedora-kde.ks
@@ -30,6 +30,7 @@ filelight
# some extras
fuse
+pavucontrol
# additional fonts
@fonts
15 years, 5 months
imgcreate/kickstart.py
by Jeremy Katz
imgcreate/kickstart.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 3b4ce49118c7c788a1814de7d986254804826b8b
Author: Jeroen van Meeuwen <kanarip(a)kanarip.com>
Date: Fri Apr 25 11:12:32 2008 -0400
Partition Size overriding
While spinning a Games DVD -just for kicks-, I found that the "part /
8000" in it's kickstart isn't really applied.
Using ksflatten shows me the "part" statements are appended to one
another, depending on the other they have been specified; if "part /
8000" is specified before including the 'base' kickstart, the filesystem
will end up size 8000*1024L*1024L.
partition_size_last-specified.patch makes livecd-tools loop through
/all/ the partition statements, and takes the size of last "part /"
specified so that the "part /" statement becomes something that can be
overridden. I'm not sure how valid this is, as sorting "part" statements
in pykickstart may result in unsuspected behavior on livecd-tool's part.
diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py
index 30156d8..ef7b9e4 100644
--- a/imgcreate/kickstart.py
+++ b/imgcreate/kickstart.py
@@ -393,10 +393,14 @@ class SelinuxConfig(KickstartConfig):
self.relabel(ksselinux)
def get_image_size(ks, default = None):
+ __size = 0
for p in ks.handler.partition.partitions:
if p.mountpoint == "/" and p.size:
- return int(p.size) * 1024L * 1024L
- return default
+ __size = p.size
+ if __size > 0:
+ return int(__size) * 1024L * 1024L
+ else:
+ return default
def get_image_fstype(ks, default = None):
for p in ks.handler.partition.partitions:
15 years, 5 months
4 commits - config/livecd-fedora-desktop.ks imgcreate/yuminst.py tools/livecd-iso-to-disk.sh
by Jeremy Katz
config/livecd-fedora-desktop.ks | 19 ++++++++++++++-----
imgcreate/yuminst.py | 1 +
tools/livecd-iso-to-disk.sh | 2 +-
3 files changed, 16 insertions(+), 6 deletions(-)
New commits:
commit 56aabf76aa2e490b210b91862b5c08bfa8d21054
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Tue Apr 22 17:10:08 2008 -0400
Updates to language support groups based on translation status (notting)
diff --git a/config/livecd-fedora-desktop.ks b/config/livecd-fedora-desktop.ks
index 80e265b..3bec80b 100644
--- a/config/livecd-fedora-desktop.ks
+++ b/config/livecd-fedora-desktop.ks
@@ -17,7 +17,9 @@ gnumeric
@albanian-support
@arabic-support
+@assamese-support
@basque-support
+@belarusian-support
@bengali-support
@brazilian-support
@british-support
@@ -41,12 +43,14 @@ gnumeric
@indonesian-support
@italian-support
@japanese-support
-@khmer-support
+@kannada-support
@korean-support
@latvian-support
@lithuanian-support
+@macedonian-support
@malayalam-support
@marathi-support
+@nepali-support
@norwegian-support
@oriya-support
@persian-support
@@ -73,12 +77,11 @@ gnumeric
#@afrikaans-support
#@armenian-support
-#@assamese-support
-#@belarusian-support
#@bhutanese-support
#@bosnian-support
#@breton-support
#@croatian-support
+#@esperanto-support
#@ethiopic-support
#@faeroese-support
#@filipino-support
@@ -86,10 +89,13 @@ gnumeric
#@icelandic-support
#@inuktitut-support
#@irish-support
-#@kannada-support
+#@khmer-support
#@lao-support
+#@low-saxon-support
#@malay-support
#@maori-support
+#@mongolian-support
+#@northern-sami-support
#@northern-sotho-support
#@samoan-support
#@sinhala-support
@@ -104,12 +110,12 @@ gnumeric
#@tswana-support
#@urdu-support
#@venda-support
+#@walloon-support
#@xhosa-support
#@zulu-support
# These fonts are only used in the commented-out locales above
-lklug-fonts
--lohit-fonts-kannada
-abyssinica-fonts
-jomolhari-fonts
commit efb2ac2923d7892849ba0cd90d4cd454a83ed897
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Tue Apr 22 11:40:13 2008 -0400
Ensure livecd iso is mounted ro
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 030753a..4ec7f06 100644
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -206,7 +206,7 @@ fi
# FIXME: would be better if we had better mountpoints
CDMNT=$(mktemp -d /media/cdtmp.XXXXXX)
-mount -o loop $ISO $CDMNT || exitclean
+mount -o loop,ro $ISO $CDMNT || exitclean
USBMNT=$(mktemp -d /media/usbdev.XXXXXX)
mount $USBDEV $USBMNT || exitclean
commit 87413f0cb6c467e05d0da2d0107634d5f4ba5e47
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Tue Apr 15 17:56:39 2008 -0400
Default to priority failover for now instead of roundrobin
diff --git a/imgcreate/yuminst.py b/imgcreate/yuminst.py
index 9d585ec..80fc514 100644
--- a/imgcreate/yuminst.py
+++ b/imgcreate/yuminst.py
@@ -59,6 +59,7 @@ class LiveCDYum(yum.YumBase):
conf += "cachedir=/var/cache/yum\n"
conf += "plugins=0\n"
conf += "reposdir=\n"
+ conf += "failovermethod=priority\n"
f = file(confpath, "w+")
f.write(conf)
commit ffeda31b6035559ad6974ae407307b9a12efed86
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Tue Apr 15 17:55:03 2008 -0400
Make sure only one festival voice is pulled in
Work around #442626 by explicitly saying the festival voice we want
diff --git a/config/livecd-fedora-desktop.ks b/config/livecd-fedora-desktop.ks
index 4a4370e..80e265b 100644
--- a/config/livecd-fedora-desktop.ks
+++ b/config/livecd-fedora-desktop.ks
@@ -113,6 +113,9 @@ gnumeric
-abyssinica-fonts
-jomolhari-fonts
+# avoid weird case where we pull in more festival stuff than we need
+festival
+festvox-slt-arctic-hts
# dictionaries are big
-aspell-*
15 years, 5 months
Revisor creates a very large iso image
by Lars Bjørndal
Hello, list!
WHile trying to generate a livecd with the git version of revisor from
thursday 17.th (or wed 16.th, not sure), I get an iso file of about
3GB, although I expect it to be about 500MB. I'm not sure what debug
info you need to tell me why it is so large, so I just want to ask if
there is some known issues regarding theis problem. If not, I will
come back with more info, e.g. output from the building process etc.
Thanks
Lars
15 years, 5 months