tools/livecd-iso-to-disk.sh
by Bruno Wolff III
tools/livecd-iso-to-disk.sh | 42 ++++++++++++++++++++++++++++++++++++------
1 file changed, 36 insertions(+), 6 deletions(-)
New commits:
commit 54c53cc8d24eb89e4a75df3d67f00a0152fa0cb6
Author: Jasper O'neal Hartline <Jasper.Hartline(a)Gmail.com>
Date: Sat Sep 11 13:17:30 2010 -0500
Display progress information when copying image to usb.
Signed-off-by: Bruno Wolff III <bruno(a)wolff.to>
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index e12feb5..007348a 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -304,6 +304,36 @@ detectisotype() {
exitclean
}
+cp_p() {
+ strace -q -ewrite cp -- "${1}" "${2}" 2>&1 \
+ | awk '{
+ count += $NF
+ if (count % 10 == 0) {
+ percent = count / total_size * 100
+ printf "%3d%% [", percent
+ for (i=0;i<=percent;i++)
+ printf "="
+ printf ">"
+ for (i=percent;i<100;i++)
+ printf " "
+ printf "]\r"
+ }
+ }
+ END { print "" }' total_size=$(stat -c '%s' "${1}") count=0
+}
+
+copyFile() {
+ if [ -x /usr/bin/gvfs-copy ]; then
+ gvfs-copy -p "$1" "$2"
+ return
+ fi
+ if [ -x /usr/bin/strace -a -x /bin/awk ]; then
+ cp_p "$1" "$2"
+ return
+ fi
+ cp "$1" "$2"
+}
+
cryptedhome=1
keephome=1
homesizemb=0
@@ -575,15 +605,15 @@ if [ -z "$skipcopy" ] && [ "$isotype" = "live" ]; then
[ -n "$keephome" -a -f "$USBMNT/$HOMEFILE" ] && mv $USBMNT/$HOMEFILE $USBMNT/$LIVEOS/$HOMEFILE
if [ -n "$skipcompress" -a -f $CDMNT/LiveOS/squashfs.img ]; then
mount -o loop $CDMNT/LiveOS/squashfs.img $CDMNT || exitclean
- cp $CDMNT/LiveOS/ext3fs.img $USBMNT/$LIVEOS/ext3fs.img || (umount $CDMNT ; exitclean)
+ copyFile $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
+ copyFile $CDMNT/LiveOS/squashfs.img $USBMNT/$LIVEOS/squashfs.img || exitclean
elif [ -f $CDMNT/LiveOS/ext3fs.img ]; then
- cp $CDMNT/LiveOS/ext3fs.img $USBMNT/$LIVEOS/ext3fs.img || exitclean
+ copyFile $CDMNT/LiveOS/ext3fs.img $USBMNT/$LIVEOS/ext3fs.img || exitclean
fi
if [ -f $CDMNT/LiveOS/osmin.img ]; then
- cp $CDMNT/LiveOS/osmin.img $USBMNT/$LIVEOS/osmin.img || exitclean
+ copyFile $CDMNT/LiveOS/osmin.img $USBMNT/$LIVEOS/osmin.img || exitclean
fi
fi
@@ -591,8 +621,8 @@ fi
if [ "$isotype" = "installer" ] && [ -z "$skipcopy" ]; then
echo "Copying DVD image to USB stick"
mkdir -p $USBMNT/images/
- cp $CDMNT/images/install.img $USBMNT/images/install.img || exitclean
- cp $ISO $USBMNT/
+ copyFile $CDMNT/images/install.img $USBMNT/images/install.img || exitclean
+ copyFile $ISO $USBMNT/
fi
cp $CDMNT/isolinux/* $USBMNT/$SYSLINUXPATH
13 years, 6 months
tools/livecd-iso-to-disk.sh
by Bruno Wolff III
tools/livecd-iso-to-disk.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 827cd5bb05fb45a6df1ae907e63b7213af5b8501
Author: Bill Nottingham <notting(a)redhat.com>
Date: Sat Sep 11 13:09:50 2010 -0500
Set default boot language for USB images to the current locale.
Signed-off-by: Bruno Wolff III <bruno(a)wolff.to>
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index f3df6f9..e12feb5 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -609,13 +609,16 @@ fi
echo "Updating boot config file"
# adjust label and fstype
+if [ -n "$LANG" ]; then
+ kernelargs="$kernelargs LANG=$LANG"
+fi
sed -i -e "s/CDLABEL=[^ ]*/$USBLABEL/" -e "s/rootfstype=[^ ]*/rootfstype=$USBFS/" -e "s/LABEL=[^ ]*/$USBLABEL/" $BOOTCONFIG $BOOTCONFIG_EFI
if [ -n "$kernelargs" ]; then sed -i -e "s/liveimg/liveimg ${kernelargs}/" $BOOTCONFIG $BOOTCONFIG_EFI ; fi
if [ "$LIVEOS" != "LiveOS" ]; then sed -i -e "s;liveimg;liveimg live_dir=$LIVEOS;" $BOOTCONFIG $BOOTCONFIG_EFI ; fi
# DVD Installer
if [ "$isotype" = "installer" ]; then
- sed -i -e "s;initrd=initrd.img;initrd=initrd.img repo=hd:$USBLABEL:/;g" $BOOTCONFIG $BOOTCONFIG_EFI
+ sed -i -e "s;initrd=initrd.img;initrd=initrd.img ${LANG:+LANG=$LANG} repo=hd:$USBLABEL:/;g" $BOOTCONFIG $BOOTCONFIG_EFI
sed -i -e "s;stage2=\S*;;g" $BOOTCONFIG $BOOTCONFIG_EFI
fi
13 years, 6 months
tools/livecd-iso-to-disk.sh
by Bruno Wolff III
tools/livecd-iso-to-disk.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 094e885779928f3aabd14273ba718cf499765578
Author: Ville Skyttä <ville.skytta(a)iki.fi>
Date: Sat Sep 11 13:03:04 2010 -0500
Use grep instead of depreceated egrep.
Signed-off-by: Bruno Wolff III <bruno(a)wolff.to>
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index f4d0855..f3df6f9 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -680,7 +680,7 @@ fi
# boot on the XO anyway.
if [ -n "$xo" ]; then
echo "Setting up /boot/olpc.fth file"
- args=$(egrep "^[ ]*append" $USBMNT/$SYSLINUXPATH/isolinux.cfg |head -n1 |sed -e 's/.*initrd=[^ ]*//')
+ args=$(grep "^ *append" $USBMNT/$SYSLINUXPATH/isolinux.cfg |head -n1 |sed -e 's/.*initrd=[^ ]*//')
if [ -z "$xonohome" -a ! -f $USBMNT/$LIVEOS/$HOMEFILE ]; then
args="$args persistenthome=mtd0"
fi
13 years, 6 months
imgcreate/yuminst.py
by Bruno Wolff III
imgcreate/yuminst.py | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 2223cd162d5ee2c10c99dffbedcb01725460258e
Author: Daiki Ueno <ueno(a)unixuser.org>
Date: Sat Sep 11 11:54:07 2010 -0500
Set up locale or there can be problems handling non-ascii characters.
Signed-off-by: Bruno Wolff III <bruno(a)wolff.to>
diff --git a/imgcreate/yuminst.py b/imgcreate/yuminst.py
index d3f36ac..7614ebb 100644
--- a/imgcreate/yuminst.py
+++ b/imgcreate/yuminst.py
@@ -188,6 +188,8 @@ class LiveCDYum(yum.YumBase):
# FIXME: callback should be refactored a little in yum
sys.path.append('/usr/share/yum-cli')
+ import yum.misc
+ yum.misc.setup_locale()
import callback
cb = callback.RPMInstallCallback()
cb.tsInfo = self.tsInfo
13 years, 6 months
imgcreate/fs.py
by Bruno Wolff III
imgcreate/fs.py | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
New commits:
commit 118092c8a2878eb2dfc5ea3eed7298bc18541a03
Author: Bruno Wolff III <bruno(a)wolff.to>
Date: Sat Sep 11 11:44:11 2010 -0500
Try normal umount before falling back to lazy umount.
We want to log when lazy umounts are needed, so that we can try to change
whatever is requiring them in the first place, to not do that.
diff --git a/imgcreate/fs.py b/imgcreate/fs.py
index 554d1b9..c8df085 100644
--- a/imgcreate/fs.py
+++ b/imgcreate/fs.py
@@ -112,9 +112,16 @@ class BindChrootMount:
if not self.mounted:
return
- rc = subprocess.call(["/bin/umount", "-l", self.dest])
+ rc = subprocess.call(["/bin/umount", self.dest])
if rc != 0:
- raise MountError("Unable to unmount filesystem at %s" % self.dest)
+ logging.debug("Unable to unmount %s normally, using lazy unmount" % self.dest)
+ rc = subprocess.call(["/bin/umount", "-l", self.dest])
+ if rc != 0:
+ raise MountError("Unable to unmount fs at %s" % self.dest)
+ else:
+ logging.debug("lazy umount succeeded on %s" % self.dest)
+ print >> sys.stdout, "lazy umount succeeded on %s" % self.dest
+
self.mounted = False
class LoopbackMount:
@@ -353,11 +360,19 @@ class DiskMount(Mount):
def unmount(self):
if self.mounted:
logging.debug("Unmounting directory %s" % self.mountdir)
- rc = subprocess.call(["/bin/umount", "-l", self.mountdir])
+ rc = subprocess.call(["/bin/umount", self.mountdir])
if rc == 0:
self.mounted = False
else:
- raise MountError("Unable to unmount filesystem at %s" % self.mountdir)
+ logging.debug("Unmounting directory %s failed, using lazy umount" % self.mountdir)
+ print >> sys.stdout, "Unmounting directory %s failed, using lazy umount" %self.mountdir
+ rc = subprocess.call(["/bin/umount", "-l", self.mountdir])
+ if rc != 0:
+ raise MountError("Unable to unmount filesystem at %s" % self.mountdir)
+ else:
+ logging.debug("lazy umount succeeded on %s" % self.mountdir)
+ print >> sys.stdout, "lazy umount succeeded on %s" % self.mountdir
+ self.mounted = False
if self.rmdir and not self.mounted:
try:
13 years, 6 months
device-mapper updates want latest udev and break build
by Scott Dowdle
Greetings,
I just noticed that some updates last night break my build process. I had previously gotten my build process to work again by using non-current versions of the following packages:
NetworkManager
NetworkManager-glib
NetworkManager-gnome
dbus-glib
udev
The new problem packages so far are device-mapper* and lvm2-libs. I'm still not to where I can build yet so there may be others. These updated want the newer udev and break because of dependencies. I'll have to roll them back... and any additional packages they depend on. Will know more when I get it to completely build.
If anyone else gets it working, please let me know how.
Oh, when I say roll back... I mean that I've created a custom updates repo and have replaced the problematic packages with previous releases.
TYL,
--
Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]
13 years, 6 months
diagrams of spin-kickstarts %includes
by Marc Herbert
These diagrams shows how the main spin-kickstarts files %include each
other. Lower files include higher files. Up to date as of Fedora 13.
Finding something like this in git would have saved me time (hint).
+----------> (DVD) base <-------+
| |
| |
| |
desktop |
(GNOME DVD) |
^ |
| - minimization |
| ^ ^ |
| | | |
- cd-desktop -------+ +----- cd-kde, cd-xfce,...
(GNOME CD)
^
|
|
dvd-games, dvd-electronic-lab,...
mini
/|\
/ | \
/ | \
/ | \
/ | \
/ | \
soas meego design-suite
(all CDs)
(Drawn with Emacs' artist-mode)
13 years, 6 months
Problem with build after udev update
by Scott Dowdle
Greetings,
I've noticed that my most recent remix builds will not boot. I get the following error:
- - - -
No root device found
Boot has failed, sleeping forever.
- - - -
I think it is because of a change made to udev causing the need for a change in dracut. Can anyone duplicate this problem? See bug:
https://bugzilla.redhat.com/show_bug.cgi?id=627364
TYL,
--
Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]
13 years, 7 months