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, 4 months
Using both EFI and MBR at once on Live USB images
by Stewart Adam
Hi,
I've been trying to get the Fedora 10 Snapshot ISO to work boot via a USB key
on my MacBook Pro using the --mactel option, and while I think GRUB's EFI
image has a bug in it since no kernels boot [1], it gave me another idea.
I thought it would be pretty cool if we could synchronize the GPT and
MSDOS partition tables (complete with MBR), similar to how it's used in
BootCamp/rEFIt so that any given live media could be used with EFI or with
BIOS. I've packaged rEFIt [2] (which includes gptsync) but since there's
only one partition on the Live USB media, gptsync immediately says "nothing
to do" and exits. One way around this would be to use two-partitions on the
live media, but that would troublesome since Windows will only recognize the
first readable partition. The other way would be to patch gptsync and have
it translate the EFI partition to "FAT32" for the MSDOS partition table.
I'd like to hear your comments/feedback on this - Do you think it's a
feature worth spending time on? Any other ideas for workarounds?
Stewart
[1] https://bugzilla.redhat.com/show_bug.cgi?id=466954
[2] http://downloads.diffingo.com/refit-0.11-1.fc9.src.rpm
14 years, 8 months
Trouble mounting persistent home...
by Orion Poplawski
I'm having trouble with my rawhide live usb devices and mounting the
persistent home image.
when the fedora-live init script runs I get:
mount: /dev/sdb1 already mounted or /mnt/live busy
mount doesn't show /dev/sdb1, but fuser -m /mnt/live lists basically
every process starting with 1.
/mnt/live: 1rce 2rc 3rc ....
I wouldn't put it past issues with my setup, but I've tried to copy the
%post from the fedora-release files pretty closely. Using latest git
livecd tools.
--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA Division FAX: 303-415-9702
3380 Mitchell Lane orion(a)cora.nwra.com
Boulder, CO 80301 http://www.cora.nwra.com
14 years, 11 months
[PATCH] add --global-config
by apevec@redhat.com
to use default YUM config i.e. /etc/yum.conf
With this option you don't have to supply repo kickstart commands.
Also add --cacheonly option to run entirely from YUM cache.
Signed-off-by: Alan Pevec <apevec(a)redhat.com>
---
imgcreate/creator.py | 27 ++++++++++++++++++++-------
imgcreate/yuminst.py | 11 +++++++----
tools/livecd-creator | 8 +++++++-
3 files changed, 34 insertions(+), 12 deletions(-)
diff --git a/imgcreate/creator.py b/imgcreate/creator.py
index 519735e..48d5d70 100644
--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -50,7 +50,7 @@ class ImageCreator(object):
"""
- def __init__(self, ks, name):
+ def __init__(self, ks, name, globalYUM = False, cacheonly = False):
"""Initialize an ImageCreator instance.
ks -- a pykickstart.KickstartParser instance; this instance will be
@@ -73,6 +73,9 @@ class ImageCreator(object):
self.__builddir = None
self.__bindmounts = []
+ self.__globalYUM = globalYUM
+ self.__cacheonly = cacheonly
+
self.__sanity_check()
def __del__(self):
@@ -396,7 +399,8 @@ class ImageCreator(object):
kickstart.convert_method_to_repo(self.ks)
- if not kickstart.get_repos(self.ks):
+ # with -g global YUM config repositories are not taken from ks
+ if not self.__globalYUM and not kickstart.get_repos(self.ks):
raise CreatorError("No repositories specified")
if (kickstart.selinux_enabled(self.ks) and
@@ -623,10 +627,17 @@ class ImageCreator(object):
the kickstart to be overridden.
"""
- yum_conf = self._mktemp(prefix = "yum.conf-")
ayum = LiveCDYum()
- ayum.setup(yum_conf, self._instroot)
+ if self.__globalYUM:
+ yum_conf = None
+ else:
+ yum_conf = self._mktemp(prefix = "yum.conf-")
+
+ if self.__cacheonly:
+ ayum.setup(yum_conf, self._instroot, cache=1)
+ else:
+ ayum.setup(yum_conf, self._instroot)
for repo in kickstart.get_repos(self.ks, repo_urls):
(name, baseurl, mirrorlist, inc, exc) = repo
@@ -659,7 +670,8 @@ class ImageCreator(object):
finally:
ayum.closeRpmDB()
ayum.close()
- os.unlink(yum_conf)
+ if yum_conf:
+ os.unlink(yum_conf)
# do some clean up to avoid lvm info leakage. this sucks.
for subdir in ("cache", "backup", "archive"):
@@ -776,7 +788,8 @@ class LoopImageCreator(ImageCreator):
"""
- def __init__(self, ks, name, fslabel = None):
+ def __init__(self, ks, name, fslabel = None,
+ globalYUM = False, cacheonly = False):
"""Initialize a LoopImageCreator instance.
This method takes the same arguments as ImageCreator.__init__() with
@@ -785,7 +798,7 @@ class LoopImageCreator(ImageCreator):
fslabel -- A string used as a label for any filesystems created.
"""
- ImageCreator.__init__(self, ks, name)
+ ImageCreator.__init__(self, ks, name, globalYUM, cacheonly)
self.__fslabel = None
self.fslabel = fslabel
diff --git a/imgcreate/yuminst.py b/imgcreate/yuminst.py
index 04c9b40..c13b162 100644
--- a/imgcreate/yuminst.py
+++ b/imgcreate/yuminst.py
@@ -75,11 +75,14 @@ class LiveCDYum(yum.YumBase):
for f in glob.glob(installroot + "/var/lib/rpm/__db*"):
os.unlink(f)
- def setup(self, confpath, installroot):
- self._writeConf(confpath, installroot)
+ def setup(self, confpath, installroot, cache=0):
self._cleanupRpmdbLocks(installroot)
- self.doConfigSetup(fn = confpath, root = installroot)
- self.conf.cache = 0
+ if confpath:
+ self._writeConf(confpath, installroot)
+ self.doConfigSetup(fn = confpath, root = installroot)
+ else:
+ self.doConfigSetup(root = installroot)
+ self.conf.cache = cache
self.doTsSetup()
self.doRpmDBSetup()
self.doRepoSetup()
diff --git a/tools/livecd-creator b/tools/livecd-creator
index b401190..594686a 100755
--- a/tools/livecd-creator
+++ b/tools/livecd-creator
@@ -52,6 +52,11 @@ def parse_options(args):
sysopt.add_option("", "--cache", type="string",
dest="cachedir", default=None,
help="Cache directory to use (default: private cache")
+ sysopt.add_option("--global-config", dest="global_config",
+ action="store_true",
+ help="Use global YUM configuration, /etc/yum.conf")
+ sysopt.add_option("--cacheonly", action="store_true", dest="cacheonly",
+ help="run entirely from YUM cache, don't update YUM cache")
parser.add_option_group(sysopt)
imgcreate.setup_logging(parser)
@@ -109,7 +114,8 @@ def main():
ks = imgcreate.read_kickstart(options.kscfg)
- creator = imgcreate.LiveImageCreator(ks, name, fs_label)
+ creator = imgcreate.LiveImageCreator(ks, name, fs_label,
+ options.global_config, options.cacheonly)
creator.tmpdir = options.tmpdir
creator.skip_compression = options.skip_compression
creator.skip_minimize = options.skip_minimize
--
1.5.6.5
14 years, 11 months
tools/livecd-iso-to-disk.sh
by Luke Macken
tools/livecd-iso-to-disk.sh | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit a0b104ebc118109a4768e3e2daf6d0c68c1def81
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Oct 28 21:30:17 2008 -0400
Add a --compress flag to allow compressed images along with --xo.
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 497062f..239846e 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -280,6 +280,9 @@ while [ $# -gt 2 ]; do
--xo-no-home)
xonohome=1
;;
+ --compress)
+ skipcompress=""
+ ;;
--skipcompress)
skipcompress=1
;;
14 years, 11 months
Copy files to livecd
by Junior Tomazelli
People, that directories are created on livecd, but I cant get copy some
files of my disk to him. That is the command I used at the end of my
kickstart:
%post --nochroot Erro
cp $INSTALL_ROOT/media/JuniorHD/Multimídia/Imagens/Papeis de
Parede/SolarVO.png $LIVE_ROOT/usr/share/wallpapers
cp $INSTAL_ROOT/media/JuniorHD/Modificando/Kuai/Tema/Kuai.colors
$LIVE_ROOT/usr/share/kde4/apps/color-schemes
cp $INSTAL_ROOT/media/JuniorHD/Modificando/Kuai/Tema/GreenApparatus/*
$LIVE_ROOT/home/Kuai/.icons/GreenApparatus
%end
--
Wolnei Cândido Tomazelli Junior (Charged)
Brazil Fedora Ambassador
Designer and TI
E-mail : linux.charged(a)gmail.com
Linux User #477062
14 years, 11 months
4 commits - tools/livecd-iso-to-disk.sh
by Jeremy Katz
tools/livecd-iso-to-disk.sh | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
New commits:
commit 7cc4bfb25339ebc6d8cc233995f6e14a6fc6bc35
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Mon Oct 27 17:15:16 2008 -0400
Minor fixes for mactel mode
Make sure we use the new UUID of the created filesystme and remove the
grub.conf to reduce confusion potential
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index ccbe694..497062f 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -133,6 +133,7 @@ createGPTLayout() {
USBDEV=${device}1
/sbin/udevsettle
/sbin/mkdosfs -n LIVE $USBDEV
+ USBLABEL="UUID=$(/lib/udev/vol_id -u $dev)"
}
checkGPT() {
@@ -477,6 +478,7 @@ EOF
# this is a little ugly, but it gets the "interesting" named config file
BOOTCONFIG=$USBMNT/EFI/boot/boot?*.conf
+ rm -f $USBMNT/EFI/boot/grub.conf
fi
echo "Updating boot config file"
commit c13700335b3296d8672c53ae599164ff0eb27934
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Tue Oct 21 11:18:58 2008 -0400
Support copying the raw ext3fs to the usb stick
For some cases, squashfs is pretty expensive and we have disk space (eg,
on SD card for the XO). In those cases, we want to be able to ask for just
the raw ext3fs.img to be copied. Make --xo default to doing so
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index b598fa4..ccbe694 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -274,10 +274,14 @@ while [ $# -gt 2 ]; do
;;
--xo)
xo=1
+ skipcompress=1
;;
--xo-no-home)
xonohome=1
;;
+ --skipcompress)
+ skipcompress=1
+ ;;
--extra-kernel-args)
kernelargs=$2
shift
@@ -381,6 +385,11 @@ else
tbd=0
fi
livesize=$(du -s -B 1M $check | awk {'print $1;'})
+if [ -n "$skipcompress" ]; then
+ mount -o loop $CDMNT/LiveOS/squashfs.img $CDMNT
+ livesize=$(du -s -B 1M $CDMNT/LiveOS/ext3fs.img | awk {'print $1;'})
+ umount $CDMNT
+fi
free=$(df -B1M $USBDEV |tail -n 1 |awk {'print $4;'})
if [ $(($overlaysizemb + $homesizemb + $livesize + $swapsizemb)) -gt $(($free + $tbd)) ]; then
@@ -415,7 +424,11 @@ echo "Copying live image to USB stick"
[ ! -d $USBMNT/LiveOS ] && mkdir $USBMNT/LiveOS
[ -n "$keephome" -a -f "$USBMNT/$HOMEFILE" ] && mv $USBMNT/$HOMEFILE $USBMNT/LiveOS/$HOMEFILE
# cases without /LiveOS are legacy detection, remove for F10
-if [ -f $CDMNT/LiveOS/squashfs.img ]; then
+if [ -n "$skipcompress" -a -f $CDMNT/LiveOS/squashfs.img ]; then
+ mount -o loop $CDMNT/LiveOS/squashfs.img $CDMNT
+ cp $CDMNT/LiveOS/ext3fs.img $USBMNT/LiveOS/ext3fs.img || (umount $CDMNT ; exitclean)
+ umount $CDMNT
+elif [ -f $CDMNT/LiveOS/squashfs.img ]; then
cp $CDMNT/LiveOS/squashfs.img $USBMNT/LiveOS/squashfs.img || exitclean
elif [ -f $CDMNT/squashfs.img ]; then
cp $CDMNT/squashfs.img $USBMNT/LiveOS/squashfs.img || exitclean
commit 0896e5bc135b1c7f14254dbaf0a97c9a0a6f89b8
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Tue Oct 21 11:14:17 2008 -0400
Default to resetting the overlay on XO
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index c224230..b598fa4 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -525,6 +525,7 @@ if [ -n "$xo" ]; then
if [ -z "$xonohome" -a ! -f $USBMNT/LiveOS/$HOMEFILE ]; then
args="$args persistenthome=mtd0"
fi
+ args="$args reset_overlay"
if [ ! -d $USBMNT/boot ]; then mkdir -p $USBMNT/boot ; fi
cat > $USBMNT/boot/olpc.fth <<EOF
\ Boot script for USB boot
commit 43e8184851df1d293b52b15a8384802aadc3659e
Author: Jeremy Katz <katzj(a)redhat.com>
Date: Tue Oct 21 11:12:57 2008 -0400
Verify integer arguments to livecd-iso-to-disk (#467257)
Verify that arguments passed to livecd-iso-to-disk are actually integers
as opposed to specifying, eg, 256MB
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 0a1144d..c224230 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -219,6 +219,12 @@ checkMounted() {
fi
}
+checkint() {
+ if ! test $1 -gt 0 2>/dev/null ; then
+ usage
+ fi
+}
+
if [ $(id -u) != 0 ]; then
echo "You need to be root to run this script"
exit 1
@@ -234,14 +240,17 @@ HOMEFILE="home.img"
while [ $# -gt 2 ]; do
case $1 in
--overlay-size-mb)
+ checkint $2
overlaysizemb=$2
shift
;;
--home-size-mb)
+ checkint $2
homesizemb=$2
shift
;;
--swap-size-mb)
+ checkint $2
swapsizemb=$2
shift
;;
14 years, 11 months
Why is /sbin not in %post path for livecd-creator?
by Orion Poplawski
Why is /sbin not in %post path for livecd-creator?
+ chkconfig netfs off
/tmp/ks-script-mzTh-j: line 32: chkconfig: command not found
--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA Division FAX: 303-415-9702
3380 Mitchell Lane orion(a)cora.nwra.com
Boulder, CO 80301 http://www.cora.nwra.com
14 years, 11 months
Re: [fedora-india] Kobold Project
by Rahul Sundaram
Khushbu Mohta wrote:
> "Sankarshan (সঙ্কর্ষণ)" wrote:
>
> Hmm... so can this be used during FOSS.IN <http://FOSS.IN> for the
> LiveUSB station ?
>
>
> Yes surely it can be used. We have removed all the possibles flaws and
> tested it. Soon we will add the persistence overlay also. I believe it
> will be a smooth ride in FOSS.IN <http://FOSS.IN>
One thing I would like to note is that, it is important we get this
merged as part of some existing tool like livecd-creator or
liveusb-creator. Independent scripts are great to prototype and get
started but will rot if let as a isolated development.
Jeremy Katz, Luke Macken or others? could offer some feedback on this.
Rahul
14 years, 11 months