(no subject)
by 44toudy44
hello I would like to ask you if you can sotp sending me emails...the
reason is that I don't understand programming so they are useless to me.
thank you
13 years, 5 months
Changes to 'refs/tags/livecd-tools-0.3.6'
by Brian C. Lane
Tag 'livecd-tools-0.3.6' created by Brian C. Lane <bcl(a)redhat.com> at 2010-11-15 21:03 +0000
Tag as livecd-tools-0.3.6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Remember Lexington Green!
iQEVAwUATOGgHxF+jBaO/jp/AQJeBwf7BIvafjbxYDBtFP8sxbxrI6vKiNt8tyIy
A8LWOb3HARBmNaX+auQZ6OlYqkimi4I3PhydxQ2SuHGngDrtunzu8kRID455P0RK
ykvS9zQDhFEhczvKW/SBBk3oqiywGP6NvHqYKrSSE124Hx6BtH+Ud8YpopuBUkMe
0vmvO3cpaL6RbBb1ktVfMi5B8pZn2wqAnttnv+/npJajvsu1OM4VjUy6xUCoICrN
7pqivmS8cMqwljVuLIV0bf7nHyofLGy7KuRt7Z13HQD/iMc99ETwC4gaNymAEHlA
xK9gbHMAdKMtondEVdTyXU9UCkXxCxF65qlefCBYs90sTUjFseu0yg==
=4IUV
-----END PGP SIGNATURE-----
Changes since livecd-tools-034:
Alan Pevec (1):
edit-livecd: add new attribute compress_type
Brian C. Lane (7):
Changing version to NVR
Add proxy support to livecd-creator (#649546)
Add support for timeout and totaltimeout to livecd-iso-to-disk (#531566)
Update dracut args (#652484)
Pass dracut args during check (#589778)
Add a release target
Bump version to 0.3.6
Bruno Wolff III (12):
Revise basic video change to fix issue with default menu item
Missing parts of regex fix patch
Fix label for basic video boot menu item
Still needed to fix one /dev/loop* .
Fix bad path brought in using old patch. Thanks Spot!
Note that lzo can be used as a compressor.
setfiles parameter list fix for relabelling.
Starting with syslinux 4 ldlinux.sys is used on all file systems.
Allow image to be put on a btrfs file system on a live usb.
Provide for support for $releasever in repo commands.
Add documentation for repo command extensions.
Typo. Need space before ].
Frederick Grose (4):
Cleanup EOL spaces (#652522)
Cleanup tabs (#652522)
Set indentation to 4 spaces (#652522)
Misc. fixups (#652522)
---
Makefile | 6
docs/livecd-creator.pod | 11
docs/livecd-iso-to-disk.pod | 8
imgcreate/creator.py | 6
imgcreate/kickstart.py | 7
imgcreate/live.py | 45 +-
imgcreate/yuminst.py | 1
tools/edit-livecd | 3
tools/livecd-creator | 2
tools/livecd-iso-to-disk.sh | 752 ++++++++++++++++++++++----------------------
10 files changed, 448 insertions(+), 393 deletions(-)
---
13 years, 5 months
Release management
by Bruno Wolff III
Currently our practice (not very reliably followed) is to maintain one
branch and tag at release. A release tar ball should also be published.
This policy was developed back when backporting livecd-tools to older
releases pretty much wasn't done.
We seem to be moving toward pushing back new releases into older Fedoras.
If we have some significant user impact changes (of the need to change
workflow kind), we may end wanting to track separate branches. Also even
adding feature changes mixed with bug fixes may cause us to run afoul of
the updates policy. So we should at least be thinking about what we would
want to do for branching, even if we don't need this right now.
Given the lack of manpower we have, and that our new features don't tend
to break users' workflows, I would be inclined to just have one branch for
now and tag when making a release tar ball. If we get push back on doing
updates in Fedora, then I think we will want to start using branches
for bug fixes. (The alternative is to use patch files in the packages, but
that gets messy and is more work.)
13 years, 5 months
Changes to 'refs/tags/livecd-tools-13.0'
by Brian C. Lane
Tag 'livecd-tools-13.0' created by Brian C. Lane <bcl(a)redhat.com> at 2010-11-16 01:08 +0000
Tag as livecd-tools-13.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Remember Lexington Green!
iQEVAwUATOHZkRF+jBaO/jp/AQJ+5Qf+PlS7IelP3kstqm8fyPm6EsBKMNG70FMp
E4LBG7FJJIPcY4LPWsxPfWIXG4TysMU++pGukJMKK3rGiEsw5HxVspjUZ/BRT4dI
6WjrI7KKFnLEUf4oiweO0OvPEJa5O43N4KJiffPtCHV2TjCb3WieLjyQd1VTBiDp
e/SQh29O/XGZGfwUvkJlEXfg5RjvPRtGFZgoxkX4gFtdgv65o5SZeqqu2LbYuN8K
iHot//GJtxp74VBkjiqqj5DXX8L8C1+tuiZ5YDZdQnq/ZCHLbzsOJuJZw7B1EBJZ
V0vNvmV5pYbbPXRJYyKmrCJr81fftFHnNmvmqJVDL53rSMtNG8MROQ==
=6OKb
-----END PGP SIGNATURE-----
Changes since livecd-tools-034:
Alan Pevec (1):
edit-livecd: add new attribute compress_type
Brian C. Lane (5):
Changing version to NVR
Add support for timeout and totaltimeout to livecd-iso-to-disk (#531566)
Pass dracut args during check (#589778)
Add a release target
Change version for f13-branch
Bruno Wolff III (12):
Revise basic video change to fix issue with default menu item
Missing parts of regex fix patch
Fix label for basic video boot menu item
Still needed to fix one /dev/loop* .
Fix bad path brought in using old patch. Thanks Spot!
Note that lzo can be used as a compressor.
setfiles parameter list fix for relabelling.
Starting with syslinux 4 ldlinux.sys is used on all file systems.
Allow image to be put on a btrfs file system on a live usb.
Provide for support for $releasever in repo commands.
Add documentation for repo command extensions.
Typo. Need space before ].
Frederick Grose (3):
Cleanup EOL spaces (#652522)
Set indentation to 4 spaces (#652522)
Misc. fixups (#652522)
---
Makefile | 6
docs/livecd-creator.pod | 11 -
docs/livecd-iso-to-disk.pod | 8
imgcreate/kickstart.py | 2
imgcreate/live.py | 33 +--
imgcreate/yuminst.py | 1
tools/edit-livecd | 3
tools/livecd-creator | 2
tools/livecd-iso-to-disk.sh | 444 +++++++++++++++++++++++---------------------
9 files changed, 281 insertions(+), 229 deletions(-)
---
13 years, 5 months
Changes to 'refs/tags/livecd-tools-14.0'
by Brian C. Lane
Tag 'livecd-tools-14.0' created by Brian C. Lane <bcl(a)redhat.com> at 2010-11-16 00:04 +0000
Tag as livecd-tools-14.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Remember Lexington Green!
iQEVAwUATOHKiRF+jBaO/jp/AQI+Jwf/fMTrZv3jlNbwdhdiqmJr4/8rAGjHGfC0
zLk4xWqEppYyTclSlKxv0c0vai3ux2UWO3Pgrx+lR3s3aAH7Rtgusw9NOFfW+k9c
3DU8g+aRoe4lRW9nVJnvb+4grEvEAj46+H0rUM4USxHx7WgfkhSNAG4aMnNl+8U+
k/YptHb5bK/GlAeZ/V8us80pJxzx65Fa+BTnkOf9MZj61aS+u0nOQlcjV2cAVV+d
jiZjQwY7qe7VBqJojEbn98NGeFvqaGTBwJA9rkILO9cijiTIFT3Cu/Hy3XcRvn0f
L9oxW2WFImBTvT6neyowTsgYBe2DcN2e9P3GBi411/MBIPcloT3YDw==
=ZZq4
-----END PGP SIGNATURE-----
Changes since livecd-tools-034:
Alan Pevec (1):
edit-livecd: add new attribute compress_type
Brian C. Lane (5):
Changing version to NVR
Add support for timeout and totaltimeout to livecd-iso-to-disk (#531566)
Pass dracut args during check (#589778)
Add a release target
Change version for f14-branch
Bruno Wolff III (12):
Revise basic video change to fix issue with default menu item
Missing parts of regex fix patch
Fix label for basic video boot menu item
Still needed to fix one /dev/loop* .
Fix bad path brought in using old patch. Thanks Spot!
Note that lzo can be used as a compressor.
setfiles parameter list fix for relabelling.
Starting with syslinux 4 ldlinux.sys is used on all file systems.
Allow image to be put on a btrfs file system on a live usb.
Provide for support for $releasever in repo commands.
Add documentation for repo command extensions.
Typo. Need space before ].
Frederick Grose (3):
Cleanup EOL spaces (#652522)
Set indentation to 4 spaces (#652522)
Misc. fixups (#652522)
---
Makefile | 6
docs/livecd-creator.pod | 11 -
docs/livecd-iso-to-disk.pod | 8
imgcreate/kickstart.py | 2
imgcreate/live.py | 33 +--
imgcreate/yuminst.py | 1
tools/edit-livecd | 3
tools/livecd-creator | 2
tools/livecd-iso-to-disk.sh | 444 +++++++++++++++++++++++---------------------
9 files changed, 281 insertions(+), 229 deletions(-)
---
13 years, 5 months
Branch 'f13-branch' - 8 commits - docs/livecd-iso-to-disk.pod imgcreate/live.py Makefile tools/livecd-iso-to-disk.sh
by Brian C. Lane
Makefile | 6
docs/livecd-iso-to-disk.pod | 8
imgcreate/live.py | 2
tools/livecd-iso-to-disk.sh | 435 ++++++++++++++++++++++----------------------
4 files changed, 240 insertions(+), 211 deletions(-)
New commits:
commit e005d5f2c431cca8f6ea00747a9bdce3c51bfc79
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Mon Nov 15 15:47:16 2010 -0800
Change version for f13-branch
Branches need their own version numbers.
diff --git a/Makefile b/Makefile
index 6870e94..935b025 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-VERSION = 0.3.5
+VERSION = 13.0
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
commit 51a826fa8a0fb39d26be4ab49f0ecd3c81a33f69
Author: Frederick Grose <fgrose(a)gmail.com>
Date: Mon Nov 15 10:00:56 2010 -0800
Misc. fixups (#652522)
Move brace position.
Use $() for command substitution
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index ab398eb..4cfca27 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -39,8 +39,7 @@ exitclean() {
exit 1
}
-isdevloop()
-{
+isdevloop() {
[ x"${1#/dev/loop}" != x"$1" ]
}
@@ -65,7 +64,7 @@ getdisk() {
device="/dev/$device"
# FIXME: weird dev names could mess this up I guess
- p=/dev/`basename $p`
+ p=/dev/$(basename $p)
partnum=${p##$device}
}
commit 1fb798e8e00dbc7062ed1d2e0a41dabf67ce8c76
Author: Frederick Grose <fgrose(a)gmail.com>
Date: Mon Nov 15 09:58:46 2010 -0800
Set indentation to 4 spaces (#652522)
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 204ed9a..ab398eb 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -48,8 +48,8 @@ getdisk() {
DEV=$1
if isdevloop "$DEV"; then
- device="$DEV"
- return
+ device="$DEV"
+ return
fi
p=$(udevadm info -q path -n $DEV)
@@ -71,36 +71,36 @@ getdisk() {
resetMBR() {
if isdevloop "$DEV"; then
- return
+ return
fi
getdisk $1
# if efi, we need to use the hybrid MBR
if [ -n "$efi" ];then
- if [ -f /usr/lib/syslinux/gptmbr.bin ]; then
- gptmbr='/usr/lib/syslinux/gptmbr.bin'
- elif [ -f /usr/share/syslinux/gptmbr.bin ]; then
- gptmbr='/usr/share/syslinux/gptmbr.bin'
- else
- echo "Could not find gptmbr.bin (syslinux)"
- exitclean
- fi
- # our magic number is LBA-2, offset 16 - (512+512+16)/$bs
- dd if=$device bs=16 skip=65 count=1 | cat $gptmbr - > $device
+ if [ -f /usr/lib/syslinux/gptmbr.bin ]; then
+ gptmbr='/usr/lib/syslinux/gptmbr.bin'
+ elif [ -f /usr/share/syslinux/gptmbr.bin ]; then
+ gptmbr='/usr/share/syslinux/gptmbr.bin'
+ else
+ echo "Could not find gptmbr.bin (syslinux)"
+ exitclean
+ fi
+ # our magic number is LBA-2, offset 16 - (512+512+16)/$bs
+ dd if=$device bs=16 skip=65 count=1 | cat $gptmbr - > $device
else
- if [ -f /usr/lib/syslinux/mbr.bin ]; then
- cat /usr/lib/syslinux/mbr.bin > $device
- elif [ -f /usr/share/syslinux/mbr.bin ]; then
- cat /usr/share/syslinux/mbr.bin > $device
- else
- echo "Could not find mbr.bin (syslinux)"
- exitclean
- fi
+ if [ -f /usr/lib/syslinux/mbr.bin ]; then
+ cat /usr/lib/syslinux/mbr.bin > $device
+ elif [ -f /usr/share/syslinux/mbr.bin ]; then
+ cat /usr/share/syslinux/mbr.bin > $device
+ else
+ echo "Could not find mbr.bin (syslinux)"
+ exitclean
+ fi
fi
}
checkMBR() {
if isdevloop "$DEV"; then
- return 0
+ return 0
fi
getdisk $1
@@ -230,9 +230,9 @@ checkGPT() {
getdisk $dev
if [ "$(/sbin/fdisk -l $device 2>/dev/null |grep -c GPT)" -eq "0" ]; then
- echo "EFI boot requires a GPT partition table."
- echo "This can be done manually or you can run with --format"
- exitclean
+ echo "EFI boot requires a GPT partition table."
+ echo "This can be done manually or you can run with --format"
+ exitclean
fi
partinfo=$(LC_ALL=C /sbin/parted --script -m $device "print" |grep ^$partnum:)
@@ -307,12 +307,12 @@ checkSyslinuxVersion() {
checkMounted() {
dev=$1
if grep -q "^$dev " /proc/mounts ; then
- echo "$dev is mounted, please unmount for safety"
- exitclean
+ echo "$dev is mounted, please unmount for safety"
+ exitclean
fi
if grep -q "^$dev " /proc/swaps; then
- echo "$dev is in use as a swap device, please disable swap"
- exitclean
+ echo "$dev is in use as a swap device, please disable swap"
+ exitclean
fi
}
@@ -501,20 +501,20 @@ fi
# do some basic sanity checks.
checkMounted $USBDEV
if [ -n "$format" -a -z "$skipcopy" ];then
- checkLVM $USBDEV
- # checks for a valid filesystem
- if [ -n "$efi" ];then
- createGPTLayout $USBDEV
- elif [ "$USBFS" == "vfat" -o "$USBFS" == "msdos" ]; then
- createMSDOSLayout $USBDEV
- else
- createEXTFSLayout $USBDEV
- fi
+ checkLVM $USBDEV
+ # checks for a valid filesystem
+ if [ -n "$efi" ];then
+ createGPTLayout $USBDEV
+ elif [ "$USBFS" == "vfat" -o "$USBFS" == "msdos" ]; then
+ createMSDOSLayout $USBDEV
+ else
+ createEXTFSLayout $USBDEV
+ fi
fi
checkFilesystem $USBDEV
if [ -n "$efi" ]; then
- checkGPT $USBDEV
+ checkGPT $USBDEV
fi
checkSyslinuxVersion
@@ -525,24 +525,24 @@ checkMBR $USBDEV
if [ "$overlaysizemb" -gt 0 -a "$USBFS" = "vfat" ]; then
- if [ "$overlaysizemb" -gt 2047 ]; then
- echo "Can't have an overlay of 2048MB or greater on VFAT"
- exitclean
- fi
+ if [ "$overlaysizemb" -gt 2047 ]; then
+ echo "Can't have an overlay of 2048MB or greater on VFAT"
+ exitclean
+ fi
fi
if [ "$homesizemb" -gt 0 -a "$USBFS" = "vfat" ]; then
- if [ "$homesizemb" -gt 2047 ]; then
- echo "Can't have a home overlay greater than 2048MB on VFAT"
- exitclean
- fi
+ if [ "$homesizemb" -gt 2047 ]; then
+ echo "Can't have a home overlay greater than 2048MB on VFAT"
+ exitclean
+ fi
fi
if [ "$swapsizemb" -gt 0 -a "$USBFS" = "vfat" ]; then
- if [ "$swapsizemb" -gt 2047 ]; then
- echo "Can't have a swap file greater than 2048MB on VFAT"
- exitclean
- fi
+ if [ "$swapsizemb" -gt 2047 ]; then
+ echo "Can't have a swap file greater than 2048MB on VFAT"
+ exitclean
+ fi
fi
# FIXME: would be better if we had better mountpoints
@@ -556,28 +556,28 @@ trap exitclean SIGINT SIGTERM
detectisotype
if [ -f "$USBMNT/$LIVEOS/$HOMEFILE" -a -n "$keephome" -a "$homesizemb" -gt 0 ]; then
- echo "ERROR: Requested keeping existing /home and specified a size for /home"
- echo "Please either don't specify a size or specify --delete-home"
- exitclean
+ echo "ERROR: Requested keeping existing /home and specified a size for /home"
+ echo "Please either don't specify a size or specify --delete-home"
+ exitclean
fi
if [ -n "$efi" -a ! -d $CDMNT/EFI/boot ]; then
- echo "ERROR: This live image does not support EFI booting"
- exitclean
+ echo "ERROR: This live image does not support EFI booting"
+ exitclean
fi
# let's try to make sure there's enough room on the stick
if [ -d $CDMNT/LiveOS ]; then
- check=$CDMNT/LiveOS
+ check=$CDMNT/LiveOS
else
- check=$CDMNT
+ check=$CDMNT
fi
if [ -d $USBMNT/$LIVEOS ]; then
- tbd=$(du -s -B 1M $USBMNT/$LIVEOS | awk {'print $1;'})
- [ -f $USBMNT/$LIVEOS/$HOMEFILE ] && homesz=$(du -s -B 1M $USBMNT/$LIVEOS/$HOMEFILE | awk {'print $1;'})
- [ -n "$homesz" -a -n "$keephome" ] && tbd=$(($tbd - $homesz))
+ tbd=$(du -s -B 1M $USBMNT/$LIVEOS | awk {'print $1;'})
+ [ -f $USBMNT/$LIVEOS/$HOMEFILE ] && homesz=$(du -s -B 1M $USBMNT/$LIVEOS/$HOMEFILE | awk {'print $1;'})
+ [ -n "$homesz" -a -n "$keephome" ] && tbd=$(($tbd - $homesz))
else
- tbd=0
+ tbd=0
fi
livesize=$(du -s -B 1M $check | awk {'print $1;'})
if [ -n "$skipcompress" ]; then
@@ -596,58 +596,58 @@ fi
free=$(df -B1M $USBDEV |tail -n 1 |awk {'print $4;'})
if [ "$isotype" = "live" ]; then
-tba=$(($overlaysizemb + $homesizemb + $livesize + $swapsizemb))
-if [ $tba -gt $(($free + $tbd)) ]; then
- echo "Unable to fit live image + overlay on available space on USB stick"
- echo "+ Size of live image: $livesize"
- [ "$overlaysizemb" -gt 0 ] && echo "+ Overlay size: $overlaysizemb"
- [ "$homesizemb" -gt 0 ] && echo "+ Home overlay size: $homesizemb"
- [ "$swapsizemb" -gt 0 ] && echo "+ Swap overlay size: $swapsizemb"
- echo "---------------------------"
- echo "= Requested: $tba"
- echo "- Available: $(($free + $tbd))"
- echo "---------------------------"
- echo "= To fit, free or decrease requested size total by: $(($tba - $free - $tbd))"
- exitclean
-fi
+ tba=$(($overlaysizemb + $homesizemb + $livesize + $swapsizemb))
+ if [ $tba -gt $(($free + $tbd)) ]; then
+ echo "Unable to fit live image + overlay on available space on USB stick"
+ echo "+ Size of live image: $livesize"
+ [ "$overlaysizemb" -gt 0 ] && echo "+ Overlay size: $overlaysizemb"
+ [ "$homesizemb" -gt 0 ] && echo "+ Home overlay size: $homesizemb"
+ [ "$swapsizemb" -gt 0 ] && echo "+ Swap overlay size: $swapsizemb"
+ echo "---------------------------"
+ echo "= Requested: $tba"
+ echo "- Available: $(($free + $tbd))"
+ echo "---------------------------"
+ echo "= To fit, free or decrease requested size total by: $(($tba - $free - $tbd))"
+ exitclean
+ fi
fi
# Verify available space for DVD installer
if [ "$isotype" = "installer" ]; then
- isosize=$(du -s -B 1M $ISO | awk {'print $1;'})
- installimgsize=$(du -s -B 1M $CDMNT/images/install.img | awk {'print $1;'})
- tbd=0
- if [ -e $USBMNT/images/install.img ]; then
- tbd=$(du -s -B 1M $USBMNT/images/install.img | awk {'print $1;'})
- fi
- if [ -e $USBMNT/$(basename $ISO) ]; then
- tbd=$(($tbd + $(du -s -B 1M $USBMNT/$(basename $ISO) | awk {'print $1;'})))
- fi
- echo "Size of DVD image: $isosize"
- echo "Size of install.img: $installimgsize"
- echo "Available space: $(($free + $tbd))"
- if [ $(($isosize + $installimgsize)) -gt $(($free + $tbd)) ]; then
- echo "ERROR: Unable to fit DVD image + install.img on available space on USB stick"
- exitclean
- fi
+ isosize=$(du -s -B 1M $ISO | awk {'print $1;'})
+ installimgsize=$(du -s -B 1M $CDMNT/images/install.img | awk {'print $1;'})
+ tbd=0
+ if [ -e $USBMNT/images/install.img ]; then
+ tbd=$(du -s -B 1M $USBMNT/images/install.img | awk {'print $1;'})
+ fi
+ if [ -e $USBMNT/$(basename $ISO) ]; then
+ tbd=$(($tbd + $(du -s -B 1M $USBMNT/$(basename $ISO) | awk {'print $1;'})))
+ fi
+ echo "Size of DVD image: $isosize"
+ echo "Size of install.img: $installimgsize"
+ echo "Available space: $(($free + $tbd))"
+ if [ $(($isosize + $installimgsize)) -gt $(($free + $tbd)) ]; then
+ echo "ERROR: Unable to fit DVD image + install.img on available space on USB stick"
+ exitclean
+ fi
fi
if [ -z "$skipcopy" ] && [ "$isotype" = "live" ]; then
- if [ -d $USBMNT/$LIVEOS -a -z "$force" ]; then
- echo "Already set up as live image."
- if [ -z "$keephome" -a -e $USBMNT/$LIVEOS/$HOMEFILE ]; then
- echo "WARNING: Persistent /home will be deleted!!!"
- echo "Press Enter to continue or ctrl-c to abort"
- read
- else
- echo "Deleting old OS in fifteen seconds..."
- sleep 15
-
- [ -e "$USBMNT/$LIVEOS/$HOMEFILE" -a -n "$keephome" ] && mv $USBMNT/$LIVEOS/$HOMEFILE $USBMNT/$HOMEFILE
- fi
+ if [ -d $USBMNT/$LIVEOS -a -z "$force" ]; then
+ echo "Already set up as live image."
+ if [ -z "$keephome" -a -e $USBMNT/$LIVEOS/$HOMEFILE ]; then
+ echo "WARNING: Persistent /home will be deleted!!!"
+ echo "Press Enter to continue or ctrl-c to abort"
+ read
+ else
+ echo "Deleting old OS in fifteen seconds..."
+ sleep 15
+
+ [ -e "$USBMNT/$LIVEOS/$HOMEFILE" -a -n "$keephome" ] && mv $USBMNT/$LIVEOS/$HOMEFILE $USBMNT/$HOMEFILE
+ fi
- rm -rf $USBMNT/$LIVEOS
- fi
+ rm -rf $USBMNT/$LIVEOS
+ fi
fi
# Bootloader is always reconfigured, so keep these out of the if skipcopy stuff.
@@ -656,33 +656,33 @@ fi
# Live image copy
if [ "$isotype" = "live" -a -z "$skipcopy" ]; then
- 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
- if [ -n "$skipcompress" -a -f $CDMNT/LiveOS/squashfs.img ]; then
- mount -o loop $CDMNT/LiveOS/squashfs.img $CDMNT || exitclean
- copyFile $CDMNT/LiveOS/ext3fs.img $USBMNT/$LIVEOS/ext3fs.img || (umount $CDMNT ; exitclean)
- umount $CDMNT
- elif [ -f $CDMNT/LiveOS/squashfs.img ]; then
- copyFile $CDMNT/LiveOS/squashfs.img $USBMNT/$LIVEOS/squashfs.img || exitclean
- elif [ -f $CDMNT/LiveOS/ext3fs.img ]; then
- copyFile $CDMNT/LiveOS/ext3fs.img $USBMNT/$LIVEOS/ext3fs.img || exitclean
- fi
- if [ -f $CDMNT/LiveOS/osmin.img ]; then
- copyFile $CDMNT/LiveOS/osmin.img $USBMNT/$LIVEOS/osmin.img || exitclean
- fi
- sync
+ 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
+ if [ -n "$skipcompress" -a -f $CDMNT/LiveOS/squashfs.img ]; then
+ mount -o loop $CDMNT/LiveOS/squashfs.img $CDMNT || exitclean
+ copyFile $CDMNT/LiveOS/ext3fs.img $USBMNT/$LIVEOS/ext3fs.img || (umount $CDMNT ; exitclean)
+ umount $CDMNT
+ elif [ -f $CDMNT/LiveOS/squashfs.img ]; then
+ copyFile $CDMNT/LiveOS/squashfs.img $USBMNT/$LIVEOS/squashfs.img || exitclean
+ elif [ -f $CDMNT/LiveOS/ext3fs.img ]; then
+ copyFile $CDMNT/LiveOS/ext3fs.img $USBMNT/$LIVEOS/ext3fs.img || exitclean
+ fi
+ if [ -f $CDMNT/LiveOS/osmin.img ]; then
+ copyFile $CDMNT/LiveOS/osmin.img $USBMNT/$LIVEOS/osmin.img || exitclean
+ fi
+ sync
fi
# DVD installer copy
if [ \( "$isotype" = "installer" -o "$isotype" = "netinst" \) -a -z "$skipcopy" ]; then
- echo "Copying DVD image to USB stick"
- mkdir -p $USBMNT/images/
- copyFile $CDMNT/images/install.img $USBMNT/images/install.img || exitclean
- if [ "$isotype" = "installer" ]; then
- cp $ISO $USBMNT/
- fi
- sync
+ echo "Copying DVD image to USB stick"
+ mkdir -p $USBMNT/images/
+ copyFile $CDMNT/images/install.img $USBMNT/images/install.img || exitclean
+ if [ "$isotype" = "installer" ]; then
+ cp $ISO $USBMNT/
+ fi
+ sync
fi
cp $CDMNT/isolinux/* $USBMNT/$SYSLINUXPATH
@@ -690,11 +690,11 @@ BOOTCONFIG=$USBMNT/$SYSLINUXPATH/isolinux.cfg
# Set this to nothing so sed doesn't care
BOOTCONFIG_EFI=
if [ -n "$efi" ];then
- cp $CDMNT/EFI/boot/* $USBMNT/EFI/boot
+ cp $CDMNT/EFI/boot/* $USBMNT/EFI/boot
- # this is a little ugly, but it gets the "interesting" named config file
- BOOTCONFIG_EFI=$USBMNT/EFI/boot/boot?*.conf
- rm -f $USBMNT/EFI/boot/grub.conf
+ # this is a little ugly, but it gets the "interesting" named config file
+ BOOTCONFIG_EFI=$USBMNT/EFI/boot/boot?*.conf
+ rm -f $USBMNT/EFI/boot/grub.conf
fi
echo "Updating boot config file"
@@ -708,13 +708,13 @@ if [ "$LIVEOS" != "LiveOS" ]; then sed -i -e "s;liveimg;liveimg live_dir=$LIVEOS
# DVD Installer
if [ "$isotype" = "installer" ]; then
- 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
+ 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
# DVD Installer for netinst
if [ "$isotype" = "netinst" ]; then
- sed -i -e "s;stage2=\S*;stage2=hd:$USBLABEL:/images/install.img;g" $BOOTCONFIG $BOOTCONFIG_EFI
+ sed -i -e "s;stage2=\S*;stage2=hd:$USBLABEL:/images/install.img;g" $BOOTCONFIG $BOOTCONFIG_EFI
fi
# Adjust the boot timeouts
@@ -728,21 +728,21 @@ fi
# Use repo if the .iso has the repository on it, otherwise use stage2 which
# will default to using the network mirror
if [ -e "$CDMNT/.discinfo" ]; then
- METHODSTR=repo
+ METHODSTR=repo
else
- METHODSTR=stage2
+ METHODSTR=stage2
fi
if [ "$overlaysizemb" -gt 0 ]; then
echo "Initializing persistent overlay file"
OVERFILE="overlay-$( /sbin/blkid -s LABEL -o value $USBDEV )-$( /sbin/blkid -s UUID -o value $USBDEV )"
if [ -z "$skipcopy" ]; then
- if [ "$USBFS" = "vfat" ]; then
- # vfat can't handle sparse files
- dd if=/dev/zero of=$USBMNT/$LIVEOS/$OVERFILE count=$overlaysizemb bs=1M
- else
- dd if=/dev/null of=$USBMNT/$LIVEOS/$OVERFILE count=1 bs=1M seek=$overlaysizemb
- fi
+ if [ "$USBFS" = "vfat" ]; then
+ # vfat can't handle sparse files
+ dd if=/dev/zero of=$USBMNT/$LIVEOS/$OVERFILE count=$overlaysizemb bs=1M
+ else
+ dd if=/dev/null of=$USBMNT/$LIVEOS/$OVERFILE count=1 bs=1M seek=$overlaysizemb
+ fi
fi
sed -i -e "s/liveimg/liveimg overlay=${USBLABEL}/" $BOOTCONFIG $BOOTCONFIG_EFI
sed -i -e "s/\ ro\ /\ rw\ /" $BOOTCONFIG $BOOTCONFIG_EFI
@@ -844,54 +844,54 @@ EOF
fi
if [ -z "$multi" ]; then
- echo "Installing boot loader"
- if [ -n "$efi" ]; then
- # replace the ia32 hack
- if [ -f "$USBMNT/EFI/boot/boot.conf" ]; then cp -f $USBMNT/EFI/boot/bootia32.conf $USBMNT/EFI/boot/boot.conf ; fi
- fi
-
- # this is a bit of a kludge, but syslinux doesn't guarantee the API for its com32 modules :/
- if [ -f $USBMNT/$SYSLINUXPATH/vesamenu.c32 -a -f /usr/share/syslinux/vesamenu.c32 ]; then
- cp /usr/share/syslinux/vesamenu.c32 $USBMNT/$SYSLINUXPATH/vesamenu.c32
- elif [ -f $USBMNT/$SYSLINUXPATH/vesamenu.c32 -a -f /usr/lib/syslinux/vesamenu.c32 ]; then
- cp /usr/lib/syslinux/vesamenu.c32 $USBMNT/$SYSLINUXPATH/vesamenu.c32
- elif [ -f $USBMNT/$SYSLINUXPATH/menu.c32 -a -f /usr/share/syslinux/menu.c32 ]; then
- cp /usr/share/syslinux/menu.c32 $USBMNT/$SYSLINUXPATH/menu.c32
- elif [ -f $USBMNT/$SYSLINUXPATH/menu.c32 -a -f /usr/lib/syslinux/menu.c32 ]; then
- cp /usr/lib/syslinux/menu.c32 $USBMNT/$SYSLINUXPATH/menu.c32
- fi
-
- if [ "$USBFS" == "vfat" -o "$USBFS" == "msdos" ]; then
- # syslinux expects the config to be named syslinux.cfg
- # and has to run with the file system unmounted
- mv $USBMNT/$SYSLINUXPATH/isolinux.cfg $USBMNT/$SYSLINUXPATH/syslinux.cfg
- # deal with mtools complaining about ldlinux.sys
- if [ -f $USBMNT/$SYSLINUXPATH/ldlinux.sys ] ; then rm -f $USBMNT/$SYSLINUXPATH/ldlinux.sys ; fi
- cleanup
- if [ -n "$SYSLINUXPATH" ]; then
- syslinux -d $SYSLINUXPATH $USBDEV
- else
- syslinux $USBDEV
- fi
- elif [ "$USBFS" == "ext2" -o "$USBFS" == "ext3" -o "$USBFS" == "ext4" -o "$USBFS" == "btrfs" ]; then
- # extlinux expects the config to be named extlinux.conf
- # and has to be run with the file system mounted
- mv $USBMNT/$SYSLINUXPATH/isolinux.cfg $USBMNT/$SYSLINUXPATH/extlinux.conf
- extlinux -i $USBMNT/$SYSLINUXPATH
- # Starting with syslinux 4 ldlinux.sys is used on all file systems.
- if [ -f "$USBMNT/$SYSLINUXPATH/extlinux.sys" ]; then
- chattr -i $USBMNT/$SYSLINUXPATH/extlinux.sys
- elif [ -f "$USBMNT/$SYSLINUXPATH/ldlinux.sys" ]; then
- chattr -i $USBMNT/$SYSLINUXPATH/ldlinux.sys
+ echo "Installing boot loader"
+ if [ -n "$efi" ]; then
+ # replace the ia32 hack
+ if [ -f "$USBMNT/EFI/boot/boot.conf" ]; then cp -f $USBMNT/EFI/boot/bootia32.conf $USBMNT/EFI/boot/boot.conf ; fi
+ fi
+
+ # this is a bit of a kludge, but syslinux doesn't guarantee the API for its com32 modules :/
+ if [ -f $USBMNT/$SYSLINUXPATH/vesamenu.c32 -a -f /usr/share/syslinux/vesamenu.c32 ]; then
+ cp /usr/share/syslinux/vesamenu.c32 $USBMNT/$SYSLINUXPATH/vesamenu.c32
+ elif [ -f $USBMNT/$SYSLINUXPATH/vesamenu.c32 -a -f /usr/lib/syslinux/vesamenu.c32 ]; then
+ cp /usr/lib/syslinux/vesamenu.c32 $USBMNT/$SYSLINUXPATH/vesamenu.c32
+ elif [ -f $USBMNT/$SYSLINUXPATH/menu.c32 -a -f /usr/share/syslinux/menu.c32 ]; then
+ cp /usr/share/syslinux/menu.c32 $USBMNT/$SYSLINUXPATH/menu.c32
+ elif [ -f $USBMNT/$SYSLINUXPATH/menu.c32 -a -f /usr/lib/syslinux/menu.c32 ]; then
+ cp /usr/lib/syslinux/menu.c32 $USBMNT/$SYSLINUXPATH/menu.c32
+ fi
+
+ if [ "$USBFS" == "vfat" -o "$USBFS" == "msdos" ]; then
+ # syslinux expects the config to be named syslinux.cfg
+ # and has to run with the file system unmounted
+ mv $USBMNT/$SYSLINUXPATH/isolinux.cfg $USBMNT/$SYSLINUXPATH/syslinux.cfg
+ # deal with mtools complaining about ldlinux.sys
+ if [ -f $USBMNT/$SYSLINUXPATH/ldlinux.sys ] ; then rm -f $USBMNT/$SYSLINUXPATH/ldlinux.sys ; fi
+ cleanup
+ if [ -n "$SYSLINUXPATH" ]; then
+ syslinux -d $SYSLINUXPATH $USBDEV
+ else
+ syslinux $USBDEV
+ fi
+ elif [ "$USBFS" == "ext2" -o "$USBFS" == "ext3" -o "$USBFS" == "ext4" -o "$USBFS" == "btrfs" ]; then
+ # extlinux expects the config to be named extlinux.conf
+ # and has to be run with the file system mounted
+ mv $USBMNT/$SYSLINUXPATH/isolinux.cfg $USBMNT/$SYSLINUXPATH/extlinux.conf
+ extlinux -i $USBMNT/$SYSLINUXPATH
+ # Starting with syslinux 4 ldlinux.sys is used on all file systems.
+ if [ -f "$USBMNT/$SYSLINUXPATH/extlinux.sys" ]; then
+ chattr -i $USBMNT/$SYSLINUXPATH/extlinux.sys
+ elif [ -f "$USBMNT/$SYSLINUXPATH/ldlinux.sys" ]; then
+ chattr -i $USBMNT/$SYSLINUXPATH/ldlinux.sys
+ fi
+ cleanup
fi
- cleanup
- fi
else
- # we need to do some more config file tweaks for multi-image mode
- sed -i -e "s;kernel vm;kernel /$LIVEOS/syslinux/vm;" $USBMNT/$SYSLINUXPATH/isolinux.cfg
- sed -i -e "s;initrd=i;initrd=/$LIVEOS/syslinux/i;" $USBMNT/$SYSLINUXPATH/isolinux.cfg
- mv $USBMNT/$SYSLINUXPATH/isolinux.cfg $USBMNT/$SYSLINUXPATH/syslinux.cfg
- cleanup
+ # we need to do some more config file tweaks for multi-image mode
+ sed -i -e "s;kernel vm;kernel /$LIVEOS/syslinux/vm;" $USBMNT/$SYSLINUXPATH/isolinux.cfg
+ sed -i -e "s;initrd=i;initrd=/$LIVEOS/syslinux/i;" $USBMNT/$SYSLINUXPATH/isolinux.cfg
+ mv $USBMNT/$SYSLINUXPATH/isolinux.cfg $USBMNT/$SYSLINUXPATH/syslinux.cfg
+ cleanup
fi
echo "USB stick set up as live image!"
commit 39695f4a97cb669d68c73321594b33b6a934d391
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Mon Nov 15 09:44:45 2010 -0800
Add a release target
Tag the release and scp it over to fedorahosted.org
diff --git a/Makefile b/Makefile
index 814e239..6870e94 100644
--- a/Makefile
+++ b/Makefile
@@ -47,5 +47,9 @@ uninstall:
dist : all
git archive --format=tar --prefix=livecd-tools-$(VERSION)/ HEAD | bzip2 -9v > livecd-tools-$(VERSION).tar.bz2
+release: dist
+ git tag -s -a -m "Tag as livecd-tools-$(VERSION)" livecd-tools-$(VERSION)
+ scp livecd-tools-$(VERSION).tar.bz2 fedorahosted.org:livecd
+
clean:
rm -f *~ creator/*~ installer/*~ config/*~ docs/*.8
commit e631132e785e4ac87c807adf792574700e8e46c9
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Fri Nov 12 13:53:08 2010 -0800
Pass dracut args during check (#589778)
diff --git a/imgcreate/live.py b/imgcreate/live.py
index fcb7198..105a937 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -530,7 +530,7 @@ menu hiddenrow 5
cfg += self.__get_image_stanza(is_xen, isDracut,
fslabel = self.fslabel,
isofstype = "auto",
- liveargs = kernel_options,
+ liveargs = kern_opts,
long = "Verify and " + long,
short = "check" + index,
basicvideo = "",
commit 801d0a8bcee9ba7d3ec7eea0b3b968c35630087e
Author: Frederick Grose <fgrose(a)gmail.com>
Date: Fri Nov 12 09:50:59 2010 -0800
Cleanup EOL spaces (#652522)
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 8d40f69..204ed9a 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -106,7 +106,7 @@ checkMBR() {
bs=$(mktemp /tmp/bs.XXXXXX)
dd if=$device of=$bs bs=512 count=1 2>/dev/null || exit 2
-
+
mbrword=$(hexdump -n 2 $bs |head -n 1|awk {'print $2;'})
rm -f $bs
if [ "$mbrword" = "0000" ]; then
@@ -123,8 +123,8 @@ checkMBR() {
checkPartActive() {
dev=$1
getdisk $dev
-
- # if we're installing to whole-disk and not a partition, then we
+
+ # if we're installing to whole-disk and not a partition, then we
# don't need to worry about being active
if [ "$dev" = "$device" ]; then
return
@@ -263,15 +263,15 @@ checkFilesystem() {
exitclean
fi
fi
-
+
USBLABEL=$(/sbin/blkid -s UUID -o value $dev)
- if [ -n "$USBLABEL" ]; then
- USBLABEL="UUID=$USBLABEL" ;
+ if [ -n "$USBLABEL" ]; then
+ USBLABEL="UUID=$USBLABEL" ;
else
USBLABEL=$(/sbin/blkid -s LABEL -o value $dev)
- if [ -n "$USBLABEL" ]; then
- USBLABEL="LABEL=$USBLABEL"
+ if [ -n "$USBLABEL" ]; then
+ USBLABEL="LABEL=$USBLABEL"
else
echo "Need to have a filesystem label or UUID for your USB device"
if [ "$USBFS" = "vfat" -o "$USBFS" = "msdos" ]; then
@@ -279,7 +279,7 @@ checkFilesystem() {
elif [ "$USBFS" = "ext2" -o "$USBFS" = "ext3" -o "$USBFS" = "ext4" ]; then
echo "Label can be set with /sbin/e2label"
elif [ "$USBFS" = "btrfs" ]; then
- echo "Eventually you'll be able to use /sbin/btrfs filesystem label to add a label."
+ echo "Eventually you'll be able to use /sbin/btrfs filesystem label to add a label."
fi
exitclean
fi
@@ -498,7 +498,7 @@ if [ -z "$noverify" ]; then
fi
#checkFilesystem $USBDEV
-# do some basic sanity checks.
+# do some basic sanity checks.
checkMounted $USBDEV
if [ -n "$format" -a -z "$skipcopy" ];then
checkLVM $USBDEV
@@ -612,7 +612,7 @@ if [ $tba -gt $(($free + $tbd)) ]; then
fi
fi
-# Verify available space for DVD installer
+# Verify available space for DVD installer
if [ "$isotype" = "installer" ]; then
isosize=$(du -s -B 1M $ISO | awk {'print $1;'})
installimgsize=$(du -s -B 1M $CDMNT/images/install.img | awk {'print $1;'})
@@ -634,7 +634,7 @@ fi
if [ -z "$skipcopy" ] && [ "$isotype" = "live" ]; then
if [ -d $USBMNT/$LIVEOS -a -z "$force" ]; then
- echo "Already set up as live image."
+ echo "Already set up as live image."
if [ -z "$keephome" -a -e $USBMNT/$LIVEOS/$HOMEFILE ]; then
echo "WARNING: Persistent /home will be deleted!!!"
echo "Press Enter to continue or ctrl-c to abort"
commit 3ebbf3cbcc2edc01c7a583b88d68e1c70990e79c
Author: Bruno Wolff III <bruno(a)wolff.to>
Date: Fri Nov 12 12:05:19 2010 -0600
Typo. Need space before ].
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 2303209..8d40f69 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -258,7 +258,7 @@ checkFilesystem() {
USBFS=$(/sbin/blkid -s TYPE -o value $dev)
if [ "$USBFS" != "vfat" ] && [ "$USBFS" != "msdos" ]; then
- if [ "$USBFS" != "ext2" ] && [ "$USBFS" != "ext3" ] && [ "$USBFS" != "ext4" ] && [ "$USBFS" != "btrfs"]; then
+ if [ "$USBFS" != "ext2" ] && [ "$USBFS" != "ext3" ] && [ "$USBFS" != "ext4" ] && [ "$USBFS" != "btrfs" ]; then
echo "USB filesystem must be vfat, ext[234] or btrfs"
exitclean
fi
commit 7355d074d9aac63a754ce85dff8d89fd7c1c6d64
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Nov 9 16:39:57 2010 -0800
Add support for timeout and totaltimeout to livecd-iso-to-disk (#531566)
Allow editing of the bootloader config file's timeout and totaltimeout
settings.
diff --git a/docs/livecd-iso-to-disk.pod b/docs/livecd-iso-to-disk.pod
index bbb54f2..1ccab66 100644
--- a/docs/livecd-iso-to-disk.pod
+++ b/docs/livecd-iso-to-disk.pod
@@ -52,6 +52,14 @@ The intended use of this option is to speed up testing of the boot configuration
Create a GPT partition table when --format is passed, and install an hybrid EFI/MBR bootloader on the disk. This is necessary for most Intel Macs.
+=item --timeout
+
+Modify the bootloader's timeout value. This overrides the value set during iso creation. Units are 1/10s
+
+=item --totaltimeout
+
+Add a totaltimeout to the bootloader config. This is used to force and automatic boot. This cannot be canceled by the user. Units are 1/10s
+
=back
=head1 CONTRIBUTORS
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 72211d2..2303209 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -23,7 +23,7 @@
export PATH=/sbin:/usr/sbin:$PATH
usage() {
- echo "$0 [--format] [--reset-mbr] [--noverify] [--overlay-size-mb <size>] [--home-size-mb <size>] [--unencrypted-home] [--skipcopy] [--efi] <isopath> <usbstick device>"
+ echo "$0 [--timeout <time>] [--totaltimeout <time>] [--format] [--reset-mbr] [--noverify] [--overlay-size-mb <size>] [--home-size-mb <size>] [--unencrypted-home] [--skipcopy] [--efi] <isopath> <usbstick device>"
exit 1
}
@@ -452,6 +452,16 @@ while [ $# -gt 2 ]; do
--multi)
multi=1
;;
+ --timeout)
+ checkint $2
+ timeout=$2
+ shift
+ ;;
+ --totaltimeout)
+ checkint $2
+ totaltimeout=$2
+ shift
+ ;;
*)
echo "invalid arg -- $1"
usage
@@ -487,7 +497,7 @@ if [ -z "$noverify" ]; then
fi
fi
-checkFilesystem $USBDEV
+#checkFilesystem $USBDEV
# do some basic sanity checks.
checkMounted $USBDEV
if [ -n "$format" -a -z "$skipcopy" ];then
@@ -707,6 +717,14 @@ if [ "$isotype" = "netinst" ]; then
sed -i -e "s;stage2=\S*;stage2=hd:$USBLABEL:/images/install.img;g" $BOOTCONFIG $BOOTCONFIG_EFI
fi
+# Adjust the boot timeouts
+if [ -n "$timeout" ]; then
+ sed -i -e "s/^timeout.*$/timeout\ $timeout/" $BOOTCONFIG
+fi
+if [ -n "$totaltimeout" ]; then
+ sed -i -e "/^timeout.*$/a\totaltimeout\ $totaltimeout" $BOOTCONFIG
+fi
+
# Use repo if the .iso has the repository on it, otherwise use stage2 which
# will default to using the network mirror
if [ -e "$CDMNT/.discinfo" ]; then
13 years, 5 months
Makefile
by Brian C. Lane
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit bc167ceded6c4b4a93cd18ab719e6e259d4e2a49
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Mon Nov 15 15:48:58 2010 -0800
Change version number
Each branch needs a different version number.
diff --git a/Makefile b/Makefile
index ac29b40..83880ef 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-VERSION = 0.3.6
+VERSION = 15.0
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
13 years, 5 months
Branch 'f14-branch' - 8 commits - docs/livecd-iso-to-disk.pod imgcreate/live.py Makefile tools/livecd-iso-to-disk.sh
by Brian C. Lane
Makefile | 6
docs/livecd-iso-to-disk.pod | 8
imgcreate/live.py | 2
tools/livecd-iso-to-disk.sh | 435 ++++++++++++++++++++++----------------------
4 files changed, 240 insertions(+), 211 deletions(-)
New commits:
commit f9c785a2603ed9a8cf68ef26b265e1d6a180a664
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Mon Nov 15 15:47:16 2010 -0800
Change version for f14-branch
Branches need their own version numbers.
diff --git a/Makefile b/Makefile
index 6870e94..917027f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-VERSION = 0.3.5
+VERSION = 14.0
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
commit 51a826fa8a0fb39d26be4ab49f0ecd3c81a33f69
Author: Frederick Grose <fgrose(a)gmail.com>
Date: Mon Nov 15 10:00:56 2010 -0800
Misc. fixups (#652522)
Move brace position.
Use $() for command substitution
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index ab398eb..4cfca27 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -39,8 +39,7 @@ exitclean() {
exit 1
}
-isdevloop()
-{
+isdevloop() {
[ x"${1#/dev/loop}" != x"$1" ]
}
@@ -65,7 +64,7 @@ getdisk() {
device="/dev/$device"
# FIXME: weird dev names could mess this up I guess
- p=/dev/`basename $p`
+ p=/dev/$(basename $p)
partnum=${p##$device}
}
commit 1fb798e8e00dbc7062ed1d2e0a41dabf67ce8c76
Author: Frederick Grose <fgrose(a)gmail.com>
Date: Mon Nov 15 09:58:46 2010 -0800
Set indentation to 4 spaces (#652522)
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 204ed9a..ab398eb 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -48,8 +48,8 @@ getdisk() {
DEV=$1
if isdevloop "$DEV"; then
- device="$DEV"
- return
+ device="$DEV"
+ return
fi
p=$(udevadm info -q path -n $DEV)
@@ -71,36 +71,36 @@ getdisk() {
resetMBR() {
if isdevloop "$DEV"; then
- return
+ return
fi
getdisk $1
# if efi, we need to use the hybrid MBR
if [ -n "$efi" ];then
- if [ -f /usr/lib/syslinux/gptmbr.bin ]; then
- gptmbr='/usr/lib/syslinux/gptmbr.bin'
- elif [ -f /usr/share/syslinux/gptmbr.bin ]; then
- gptmbr='/usr/share/syslinux/gptmbr.bin'
- else
- echo "Could not find gptmbr.bin (syslinux)"
- exitclean
- fi
- # our magic number is LBA-2, offset 16 - (512+512+16)/$bs
- dd if=$device bs=16 skip=65 count=1 | cat $gptmbr - > $device
+ if [ -f /usr/lib/syslinux/gptmbr.bin ]; then
+ gptmbr='/usr/lib/syslinux/gptmbr.bin'
+ elif [ -f /usr/share/syslinux/gptmbr.bin ]; then
+ gptmbr='/usr/share/syslinux/gptmbr.bin'
+ else
+ echo "Could not find gptmbr.bin (syslinux)"
+ exitclean
+ fi
+ # our magic number is LBA-2, offset 16 - (512+512+16)/$bs
+ dd if=$device bs=16 skip=65 count=1 | cat $gptmbr - > $device
else
- if [ -f /usr/lib/syslinux/mbr.bin ]; then
- cat /usr/lib/syslinux/mbr.bin > $device
- elif [ -f /usr/share/syslinux/mbr.bin ]; then
- cat /usr/share/syslinux/mbr.bin > $device
- else
- echo "Could not find mbr.bin (syslinux)"
- exitclean
- fi
+ if [ -f /usr/lib/syslinux/mbr.bin ]; then
+ cat /usr/lib/syslinux/mbr.bin > $device
+ elif [ -f /usr/share/syslinux/mbr.bin ]; then
+ cat /usr/share/syslinux/mbr.bin > $device
+ else
+ echo "Could not find mbr.bin (syslinux)"
+ exitclean
+ fi
fi
}
checkMBR() {
if isdevloop "$DEV"; then
- return 0
+ return 0
fi
getdisk $1
@@ -230,9 +230,9 @@ checkGPT() {
getdisk $dev
if [ "$(/sbin/fdisk -l $device 2>/dev/null |grep -c GPT)" -eq "0" ]; then
- echo "EFI boot requires a GPT partition table."
- echo "This can be done manually or you can run with --format"
- exitclean
+ echo "EFI boot requires a GPT partition table."
+ echo "This can be done manually or you can run with --format"
+ exitclean
fi
partinfo=$(LC_ALL=C /sbin/parted --script -m $device "print" |grep ^$partnum:)
@@ -307,12 +307,12 @@ checkSyslinuxVersion() {
checkMounted() {
dev=$1
if grep -q "^$dev " /proc/mounts ; then
- echo "$dev is mounted, please unmount for safety"
- exitclean
+ echo "$dev is mounted, please unmount for safety"
+ exitclean
fi
if grep -q "^$dev " /proc/swaps; then
- echo "$dev is in use as a swap device, please disable swap"
- exitclean
+ echo "$dev is in use as a swap device, please disable swap"
+ exitclean
fi
}
@@ -501,20 +501,20 @@ fi
# do some basic sanity checks.
checkMounted $USBDEV
if [ -n "$format" -a -z "$skipcopy" ];then
- checkLVM $USBDEV
- # checks for a valid filesystem
- if [ -n "$efi" ];then
- createGPTLayout $USBDEV
- elif [ "$USBFS" == "vfat" -o "$USBFS" == "msdos" ]; then
- createMSDOSLayout $USBDEV
- else
- createEXTFSLayout $USBDEV
- fi
+ checkLVM $USBDEV
+ # checks for a valid filesystem
+ if [ -n "$efi" ];then
+ createGPTLayout $USBDEV
+ elif [ "$USBFS" == "vfat" -o "$USBFS" == "msdos" ]; then
+ createMSDOSLayout $USBDEV
+ else
+ createEXTFSLayout $USBDEV
+ fi
fi
checkFilesystem $USBDEV
if [ -n "$efi" ]; then
- checkGPT $USBDEV
+ checkGPT $USBDEV
fi
checkSyslinuxVersion
@@ -525,24 +525,24 @@ checkMBR $USBDEV
if [ "$overlaysizemb" -gt 0 -a "$USBFS" = "vfat" ]; then
- if [ "$overlaysizemb" -gt 2047 ]; then
- echo "Can't have an overlay of 2048MB or greater on VFAT"
- exitclean
- fi
+ if [ "$overlaysizemb" -gt 2047 ]; then
+ echo "Can't have an overlay of 2048MB or greater on VFAT"
+ exitclean
+ fi
fi
if [ "$homesizemb" -gt 0 -a "$USBFS" = "vfat" ]; then
- if [ "$homesizemb" -gt 2047 ]; then
- echo "Can't have a home overlay greater than 2048MB on VFAT"
- exitclean
- fi
+ if [ "$homesizemb" -gt 2047 ]; then
+ echo "Can't have a home overlay greater than 2048MB on VFAT"
+ exitclean
+ fi
fi
if [ "$swapsizemb" -gt 0 -a "$USBFS" = "vfat" ]; then
- if [ "$swapsizemb" -gt 2047 ]; then
- echo "Can't have a swap file greater than 2048MB on VFAT"
- exitclean
- fi
+ if [ "$swapsizemb" -gt 2047 ]; then
+ echo "Can't have a swap file greater than 2048MB on VFAT"
+ exitclean
+ fi
fi
# FIXME: would be better if we had better mountpoints
@@ -556,28 +556,28 @@ trap exitclean SIGINT SIGTERM
detectisotype
if [ -f "$USBMNT/$LIVEOS/$HOMEFILE" -a -n "$keephome" -a "$homesizemb" -gt 0 ]; then
- echo "ERROR: Requested keeping existing /home and specified a size for /home"
- echo "Please either don't specify a size or specify --delete-home"
- exitclean
+ echo "ERROR: Requested keeping existing /home and specified a size for /home"
+ echo "Please either don't specify a size or specify --delete-home"
+ exitclean
fi
if [ -n "$efi" -a ! -d $CDMNT/EFI/boot ]; then
- echo "ERROR: This live image does not support EFI booting"
- exitclean
+ echo "ERROR: This live image does not support EFI booting"
+ exitclean
fi
# let's try to make sure there's enough room on the stick
if [ -d $CDMNT/LiveOS ]; then
- check=$CDMNT/LiveOS
+ check=$CDMNT/LiveOS
else
- check=$CDMNT
+ check=$CDMNT
fi
if [ -d $USBMNT/$LIVEOS ]; then
- tbd=$(du -s -B 1M $USBMNT/$LIVEOS | awk {'print $1;'})
- [ -f $USBMNT/$LIVEOS/$HOMEFILE ] && homesz=$(du -s -B 1M $USBMNT/$LIVEOS/$HOMEFILE | awk {'print $1;'})
- [ -n "$homesz" -a -n "$keephome" ] && tbd=$(($tbd - $homesz))
+ tbd=$(du -s -B 1M $USBMNT/$LIVEOS | awk {'print $1;'})
+ [ -f $USBMNT/$LIVEOS/$HOMEFILE ] && homesz=$(du -s -B 1M $USBMNT/$LIVEOS/$HOMEFILE | awk {'print $1;'})
+ [ -n "$homesz" -a -n "$keephome" ] && tbd=$(($tbd - $homesz))
else
- tbd=0
+ tbd=0
fi
livesize=$(du -s -B 1M $check | awk {'print $1;'})
if [ -n "$skipcompress" ]; then
@@ -596,58 +596,58 @@ fi
free=$(df -B1M $USBDEV |tail -n 1 |awk {'print $4;'})
if [ "$isotype" = "live" ]; then
-tba=$(($overlaysizemb + $homesizemb + $livesize + $swapsizemb))
-if [ $tba -gt $(($free + $tbd)) ]; then
- echo "Unable to fit live image + overlay on available space on USB stick"
- echo "+ Size of live image: $livesize"
- [ "$overlaysizemb" -gt 0 ] && echo "+ Overlay size: $overlaysizemb"
- [ "$homesizemb" -gt 0 ] && echo "+ Home overlay size: $homesizemb"
- [ "$swapsizemb" -gt 0 ] && echo "+ Swap overlay size: $swapsizemb"
- echo "---------------------------"
- echo "= Requested: $tba"
- echo "- Available: $(($free + $tbd))"
- echo "---------------------------"
- echo "= To fit, free or decrease requested size total by: $(($tba - $free - $tbd))"
- exitclean
-fi
+ tba=$(($overlaysizemb + $homesizemb + $livesize + $swapsizemb))
+ if [ $tba -gt $(($free + $tbd)) ]; then
+ echo "Unable to fit live image + overlay on available space on USB stick"
+ echo "+ Size of live image: $livesize"
+ [ "$overlaysizemb" -gt 0 ] && echo "+ Overlay size: $overlaysizemb"
+ [ "$homesizemb" -gt 0 ] && echo "+ Home overlay size: $homesizemb"
+ [ "$swapsizemb" -gt 0 ] && echo "+ Swap overlay size: $swapsizemb"
+ echo "---------------------------"
+ echo "= Requested: $tba"
+ echo "- Available: $(($free + $tbd))"
+ echo "---------------------------"
+ echo "= To fit, free or decrease requested size total by: $(($tba - $free - $tbd))"
+ exitclean
+ fi
fi
# Verify available space for DVD installer
if [ "$isotype" = "installer" ]; then
- isosize=$(du -s -B 1M $ISO | awk {'print $1;'})
- installimgsize=$(du -s -B 1M $CDMNT/images/install.img | awk {'print $1;'})
- tbd=0
- if [ -e $USBMNT/images/install.img ]; then
- tbd=$(du -s -B 1M $USBMNT/images/install.img | awk {'print $1;'})
- fi
- if [ -e $USBMNT/$(basename $ISO) ]; then
- tbd=$(($tbd + $(du -s -B 1M $USBMNT/$(basename $ISO) | awk {'print $1;'})))
- fi
- echo "Size of DVD image: $isosize"
- echo "Size of install.img: $installimgsize"
- echo "Available space: $(($free + $tbd))"
- if [ $(($isosize + $installimgsize)) -gt $(($free + $tbd)) ]; then
- echo "ERROR: Unable to fit DVD image + install.img on available space on USB stick"
- exitclean
- fi
+ isosize=$(du -s -B 1M $ISO | awk {'print $1;'})
+ installimgsize=$(du -s -B 1M $CDMNT/images/install.img | awk {'print $1;'})
+ tbd=0
+ if [ -e $USBMNT/images/install.img ]; then
+ tbd=$(du -s -B 1M $USBMNT/images/install.img | awk {'print $1;'})
+ fi
+ if [ -e $USBMNT/$(basename $ISO) ]; then
+ tbd=$(($tbd + $(du -s -B 1M $USBMNT/$(basename $ISO) | awk {'print $1;'})))
+ fi
+ echo "Size of DVD image: $isosize"
+ echo "Size of install.img: $installimgsize"
+ echo "Available space: $(($free + $tbd))"
+ if [ $(($isosize + $installimgsize)) -gt $(($free + $tbd)) ]; then
+ echo "ERROR: Unable to fit DVD image + install.img on available space on USB stick"
+ exitclean
+ fi
fi
if [ -z "$skipcopy" ] && [ "$isotype" = "live" ]; then
- if [ -d $USBMNT/$LIVEOS -a -z "$force" ]; then
- echo "Already set up as live image."
- if [ -z "$keephome" -a -e $USBMNT/$LIVEOS/$HOMEFILE ]; then
- echo "WARNING: Persistent /home will be deleted!!!"
- echo "Press Enter to continue or ctrl-c to abort"
- read
- else
- echo "Deleting old OS in fifteen seconds..."
- sleep 15
-
- [ -e "$USBMNT/$LIVEOS/$HOMEFILE" -a -n "$keephome" ] && mv $USBMNT/$LIVEOS/$HOMEFILE $USBMNT/$HOMEFILE
- fi
+ if [ -d $USBMNT/$LIVEOS -a -z "$force" ]; then
+ echo "Already set up as live image."
+ if [ -z "$keephome" -a -e $USBMNT/$LIVEOS/$HOMEFILE ]; then
+ echo "WARNING: Persistent /home will be deleted!!!"
+ echo "Press Enter to continue or ctrl-c to abort"
+ read
+ else
+ echo "Deleting old OS in fifteen seconds..."
+ sleep 15
+
+ [ -e "$USBMNT/$LIVEOS/$HOMEFILE" -a -n "$keephome" ] && mv $USBMNT/$LIVEOS/$HOMEFILE $USBMNT/$HOMEFILE
+ fi
- rm -rf $USBMNT/$LIVEOS
- fi
+ rm -rf $USBMNT/$LIVEOS
+ fi
fi
# Bootloader is always reconfigured, so keep these out of the if skipcopy stuff.
@@ -656,33 +656,33 @@ fi
# Live image copy
if [ "$isotype" = "live" -a -z "$skipcopy" ]; then
- 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
- if [ -n "$skipcompress" -a -f $CDMNT/LiveOS/squashfs.img ]; then
- mount -o loop $CDMNT/LiveOS/squashfs.img $CDMNT || exitclean
- copyFile $CDMNT/LiveOS/ext3fs.img $USBMNT/$LIVEOS/ext3fs.img || (umount $CDMNT ; exitclean)
- umount $CDMNT
- elif [ -f $CDMNT/LiveOS/squashfs.img ]; then
- copyFile $CDMNT/LiveOS/squashfs.img $USBMNT/$LIVEOS/squashfs.img || exitclean
- elif [ -f $CDMNT/LiveOS/ext3fs.img ]; then
- copyFile $CDMNT/LiveOS/ext3fs.img $USBMNT/$LIVEOS/ext3fs.img || exitclean
- fi
- if [ -f $CDMNT/LiveOS/osmin.img ]; then
- copyFile $CDMNT/LiveOS/osmin.img $USBMNT/$LIVEOS/osmin.img || exitclean
- fi
- sync
+ 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
+ if [ -n "$skipcompress" -a -f $CDMNT/LiveOS/squashfs.img ]; then
+ mount -o loop $CDMNT/LiveOS/squashfs.img $CDMNT || exitclean
+ copyFile $CDMNT/LiveOS/ext3fs.img $USBMNT/$LIVEOS/ext3fs.img || (umount $CDMNT ; exitclean)
+ umount $CDMNT
+ elif [ -f $CDMNT/LiveOS/squashfs.img ]; then
+ copyFile $CDMNT/LiveOS/squashfs.img $USBMNT/$LIVEOS/squashfs.img || exitclean
+ elif [ -f $CDMNT/LiveOS/ext3fs.img ]; then
+ copyFile $CDMNT/LiveOS/ext3fs.img $USBMNT/$LIVEOS/ext3fs.img || exitclean
+ fi
+ if [ -f $CDMNT/LiveOS/osmin.img ]; then
+ copyFile $CDMNT/LiveOS/osmin.img $USBMNT/$LIVEOS/osmin.img || exitclean
+ fi
+ sync
fi
# DVD installer copy
if [ \( "$isotype" = "installer" -o "$isotype" = "netinst" \) -a -z "$skipcopy" ]; then
- echo "Copying DVD image to USB stick"
- mkdir -p $USBMNT/images/
- copyFile $CDMNT/images/install.img $USBMNT/images/install.img || exitclean
- if [ "$isotype" = "installer" ]; then
- cp $ISO $USBMNT/
- fi
- sync
+ echo "Copying DVD image to USB stick"
+ mkdir -p $USBMNT/images/
+ copyFile $CDMNT/images/install.img $USBMNT/images/install.img || exitclean
+ if [ "$isotype" = "installer" ]; then
+ cp $ISO $USBMNT/
+ fi
+ sync
fi
cp $CDMNT/isolinux/* $USBMNT/$SYSLINUXPATH
@@ -690,11 +690,11 @@ BOOTCONFIG=$USBMNT/$SYSLINUXPATH/isolinux.cfg
# Set this to nothing so sed doesn't care
BOOTCONFIG_EFI=
if [ -n "$efi" ];then
- cp $CDMNT/EFI/boot/* $USBMNT/EFI/boot
+ cp $CDMNT/EFI/boot/* $USBMNT/EFI/boot
- # this is a little ugly, but it gets the "interesting" named config file
- BOOTCONFIG_EFI=$USBMNT/EFI/boot/boot?*.conf
- rm -f $USBMNT/EFI/boot/grub.conf
+ # this is a little ugly, but it gets the "interesting" named config file
+ BOOTCONFIG_EFI=$USBMNT/EFI/boot/boot?*.conf
+ rm -f $USBMNT/EFI/boot/grub.conf
fi
echo "Updating boot config file"
@@ -708,13 +708,13 @@ if [ "$LIVEOS" != "LiveOS" ]; then sed -i -e "s;liveimg;liveimg live_dir=$LIVEOS
# DVD Installer
if [ "$isotype" = "installer" ]; then
- 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
+ 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
# DVD Installer for netinst
if [ "$isotype" = "netinst" ]; then
- sed -i -e "s;stage2=\S*;stage2=hd:$USBLABEL:/images/install.img;g" $BOOTCONFIG $BOOTCONFIG_EFI
+ sed -i -e "s;stage2=\S*;stage2=hd:$USBLABEL:/images/install.img;g" $BOOTCONFIG $BOOTCONFIG_EFI
fi
# Adjust the boot timeouts
@@ -728,21 +728,21 @@ fi
# Use repo if the .iso has the repository on it, otherwise use stage2 which
# will default to using the network mirror
if [ -e "$CDMNT/.discinfo" ]; then
- METHODSTR=repo
+ METHODSTR=repo
else
- METHODSTR=stage2
+ METHODSTR=stage2
fi
if [ "$overlaysizemb" -gt 0 ]; then
echo "Initializing persistent overlay file"
OVERFILE="overlay-$( /sbin/blkid -s LABEL -o value $USBDEV )-$( /sbin/blkid -s UUID -o value $USBDEV )"
if [ -z "$skipcopy" ]; then
- if [ "$USBFS" = "vfat" ]; then
- # vfat can't handle sparse files
- dd if=/dev/zero of=$USBMNT/$LIVEOS/$OVERFILE count=$overlaysizemb bs=1M
- else
- dd if=/dev/null of=$USBMNT/$LIVEOS/$OVERFILE count=1 bs=1M seek=$overlaysizemb
- fi
+ if [ "$USBFS" = "vfat" ]; then
+ # vfat can't handle sparse files
+ dd if=/dev/zero of=$USBMNT/$LIVEOS/$OVERFILE count=$overlaysizemb bs=1M
+ else
+ dd if=/dev/null of=$USBMNT/$LIVEOS/$OVERFILE count=1 bs=1M seek=$overlaysizemb
+ fi
fi
sed -i -e "s/liveimg/liveimg overlay=${USBLABEL}/" $BOOTCONFIG $BOOTCONFIG_EFI
sed -i -e "s/\ ro\ /\ rw\ /" $BOOTCONFIG $BOOTCONFIG_EFI
@@ -844,54 +844,54 @@ EOF
fi
if [ -z "$multi" ]; then
- echo "Installing boot loader"
- if [ -n "$efi" ]; then
- # replace the ia32 hack
- if [ -f "$USBMNT/EFI/boot/boot.conf" ]; then cp -f $USBMNT/EFI/boot/bootia32.conf $USBMNT/EFI/boot/boot.conf ; fi
- fi
-
- # this is a bit of a kludge, but syslinux doesn't guarantee the API for its com32 modules :/
- if [ -f $USBMNT/$SYSLINUXPATH/vesamenu.c32 -a -f /usr/share/syslinux/vesamenu.c32 ]; then
- cp /usr/share/syslinux/vesamenu.c32 $USBMNT/$SYSLINUXPATH/vesamenu.c32
- elif [ -f $USBMNT/$SYSLINUXPATH/vesamenu.c32 -a -f /usr/lib/syslinux/vesamenu.c32 ]; then
- cp /usr/lib/syslinux/vesamenu.c32 $USBMNT/$SYSLINUXPATH/vesamenu.c32
- elif [ -f $USBMNT/$SYSLINUXPATH/menu.c32 -a -f /usr/share/syslinux/menu.c32 ]; then
- cp /usr/share/syslinux/menu.c32 $USBMNT/$SYSLINUXPATH/menu.c32
- elif [ -f $USBMNT/$SYSLINUXPATH/menu.c32 -a -f /usr/lib/syslinux/menu.c32 ]; then
- cp /usr/lib/syslinux/menu.c32 $USBMNT/$SYSLINUXPATH/menu.c32
- fi
-
- if [ "$USBFS" == "vfat" -o "$USBFS" == "msdos" ]; then
- # syslinux expects the config to be named syslinux.cfg
- # and has to run with the file system unmounted
- mv $USBMNT/$SYSLINUXPATH/isolinux.cfg $USBMNT/$SYSLINUXPATH/syslinux.cfg
- # deal with mtools complaining about ldlinux.sys
- if [ -f $USBMNT/$SYSLINUXPATH/ldlinux.sys ] ; then rm -f $USBMNT/$SYSLINUXPATH/ldlinux.sys ; fi
- cleanup
- if [ -n "$SYSLINUXPATH" ]; then
- syslinux -d $SYSLINUXPATH $USBDEV
- else
- syslinux $USBDEV
- fi
- elif [ "$USBFS" == "ext2" -o "$USBFS" == "ext3" -o "$USBFS" == "ext4" -o "$USBFS" == "btrfs" ]; then
- # extlinux expects the config to be named extlinux.conf
- # and has to be run with the file system mounted
- mv $USBMNT/$SYSLINUXPATH/isolinux.cfg $USBMNT/$SYSLINUXPATH/extlinux.conf
- extlinux -i $USBMNT/$SYSLINUXPATH
- # Starting with syslinux 4 ldlinux.sys is used on all file systems.
- if [ -f "$USBMNT/$SYSLINUXPATH/extlinux.sys" ]; then
- chattr -i $USBMNT/$SYSLINUXPATH/extlinux.sys
- elif [ -f "$USBMNT/$SYSLINUXPATH/ldlinux.sys" ]; then
- chattr -i $USBMNT/$SYSLINUXPATH/ldlinux.sys
+ echo "Installing boot loader"
+ if [ -n "$efi" ]; then
+ # replace the ia32 hack
+ if [ -f "$USBMNT/EFI/boot/boot.conf" ]; then cp -f $USBMNT/EFI/boot/bootia32.conf $USBMNT/EFI/boot/boot.conf ; fi
+ fi
+
+ # this is a bit of a kludge, but syslinux doesn't guarantee the API for its com32 modules :/
+ if [ -f $USBMNT/$SYSLINUXPATH/vesamenu.c32 -a -f /usr/share/syslinux/vesamenu.c32 ]; then
+ cp /usr/share/syslinux/vesamenu.c32 $USBMNT/$SYSLINUXPATH/vesamenu.c32
+ elif [ -f $USBMNT/$SYSLINUXPATH/vesamenu.c32 -a -f /usr/lib/syslinux/vesamenu.c32 ]; then
+ cp /usr/lib/syslinux/vesamenu.c32 $USBMNT/$SYSLINUXPATH/vesamenu.c32
+ elif [ -f $USBMNT/$SYSLINUXPATH/menu.c32 -a -f /usr/share/syslinux/menu.c32 ]; then
+ cp /usr/share/syslinux/menu.c32 $USBMNT/$SYSLINUXPATH/menu.c32
+ elif [ -f $USBMNT/$SYSLINUXPATH/menu.c32 -a -f /usr/lib/syslinux/menu.c32 ]; then
+ cp /usr/lib/syslinux/menu.c32 $USBMNT/$SYSLINUXPATH/menu.c32
+ fi
+
+ if [ "$USBFS" == "vfat" -o "$USBFS" == "msdos" ]; then
+ # syslinux expects the config to be named syslinux.cfg
+ # and has to run with the file system unmounted
+ mv $USBMNT/$SYSLINUXPATH/isolinux.cfg $USBMNT/$SYSLINUXPATH/syslinux.cfg
+ # deal with mtools complaining about ldlinux.sys
+ if [ -f $USBMNT/$SYSLINUXPATH/ldlinux.sys ] ; then rm -f $USBMNT/$SYSLINUXPATH/ldlinux.sys ; fi
+ cleanup
+ if [ -n "$SYSLINUXPATH" ]; then
+ syslinux -d $SYSLINUXPATH $USBDEV
+ else
+ syslinux $USBDEV
+ fi
+ elif [ "$USBFS" == "ext2" -o "$USBFS" == "ext3" -o "$USBFS" == "ext4" -o "$USBFS" == "btrfs" ]; then
+ # extlinux expects the config to be named extlinux.conf
+ # and has to be run with the file system mounted
+ mv $USBMNT/$SYSLINUXPATH/isolinux.cfg $USBMNT/$SYSLINUXPATH/extlinux.conf
+ extlinux -i $USBMNT/$SYSLINUXPATH
+ # Starting with syslinux 4 ldlinux.sys is used on all file systems.
+ if [ -f "$USBMNT/$SYSLINUXPATH/extlinux.sys" ]; then
+ chattr -i $USBMNT/$SYSLINUXPATH/extlinux.sys
+ elif [ -f "$USBMNT/$SYSLINUXPATH/ldlinux.sys" ]; then
+ chattr -i $USBMNT/$SYSLINUXPATH/ldlinux.sys
+ fi
+ cleanup
fi
- cleanup
- fi
else
- # we need to do some more config file tweaks for multi-image mode
- sed -i -e "s;kernel vm;kernel /$LIVEOS/syslinux/vm;" $USBMNT/$SYSLINUXPATH/isolinux.cfg
- sed -i -e "s;initrd=i;initrd=/$LIVEOS/syslinux/i;" $USBMNT/$SYSLINUXPATH/isolinux.cfg
- mv $USBMNT/$SYSLINUXPATH/isolinux.cfg $USBMNT/$SYSLINUXPATH/syslinux.cfg
- cleanup
+ # we need to do some more config file tweaks for multi-image mode
+ sed -i -e "s;kernel vm;kernel /$LIVEOS/syslinux/vm;" $USBMNT/$SYSLINUXPATH/isolinux.cfg
+ sed -i -e "s;initrd=i;initrd=/$LIVEOS/syslinux/i;" $USBMNT/$SYSLINUXPATH/isolinux.cfg
+ mv $USBMNT/$SYSLINUXPATH/isolinux.cfg $USBMNT/$SYSLINUXPATH/syslinux.cfg
+ cleanup
fi
echo "USB stick set up as live image!"
commit 39695f4a97cb669d68c73321594b33b6a934d391
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Mon Nov 15 09:44:45 2010 -0800
Add a release target
Tag the release and scp it over to fedorahosted.org
diff --git a/Makefile b/Makefile
index 814e239..6870e94 100644
--- a/Makefile
+++ b/Makefile
@@ -47,5 +47,9 @@ uninstall:
dist : all
git archive --format=tar --prefix=livecd-tools-$(VERSION)/ HEAD | bzip2 -9v > livecd-tools-$(VERSION).tar.bz2
+release: dist
+ git tag -s -a -m "Tag as livecd-tools-$(VERSION)" livecd-tools-$(VERSION)
+ scp livecd-tools-$(VERSION).tar.bz2 fedorahosted.org:livecd
+
clean:
rm -f *~ creator/*~ installer/*~ config/*~ docs/*.8
commit e631132e785e4ac87c807adf792574700e8e46c9
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Fri Nov 12 13:53:08 2010 -0800
Pass dracut args during check (#589778)
diff --git a/imgcreate/live.py b/imgcreate/live.py
index fcb7198..105a937 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -530,7 +530,7 @@ menu hiddenrow 5
cfg += self.__get_image_stanza(is_xen, isDracut,
fslabel = self.fslabel,
isofstype = "auto",
- liveargs = kernel_options,
+ liveargs = kern_opts,
long = "Verify and " + long,
short = "check" + index,
basicvideo = "",
commit 801d0a8bcee9ba7d3ec7eea0b3b968c35630087e
Author: Frederick Grose <fgrose(a)gmail.com>
Date: Fri Nov 12 09:50:59 2010 -0800
Cleanup EOL spaces (#652522)
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 8d40f69..204ed9a 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -106,7 +106,7 @@ checkMBR() {
bs=$(mktemp /tmp/bs.XXXXXX)
dd if=$device of=$bs bs=512 count=1 2>/dev/null || exit 2
-
+
mbrword=$(hexdump -n 2 $bs |head -n 1|awk {'print $2;'})
rm -f $bs
if [ "$mbrword" = "0000" ]; then
@@ -123,8 +123,8 @@ checkMBR() {
checkPartActive() {
dev=$1
getdisk $dev
-
- # if we're installing to whole-disk and not a partition, then we
+
+ # if we're installing to whole-disk and not a partition, then we
# don't need to worry about being active
if [ "$dev" = "$device" ]; then
return
@@ -263,15 +263,15 @@ checkFilesystem() {
exitclean
fi
fi
-
+
USBLABEL=$(/sbin/blkid -s UUID -o value $dev)
- if [ -n "$USBLABEL" ]; then
- USBLABEL="UUID=$USBLABEL" ;
+ if [ -n "$USBLABEL" ]; then
+ USBLABEL="UUID=$USBLABEL" ;
else
USBLABEL=$(/sbin/blkid -s LABEL -o value $dev)
- if [ -n "$USBLABEL" ]; then
- USBLABEL="LABEL=$USBLABEL"
+ if [ -n "$USBLABEL" ]; then
+ USBLABEL="LABEL=$USBLABEL"
else
echo "Need to have a filesystem label or UUID for your USB device"
if [ "$USBFS" = "vfat" -o "$USBFS" = "msdos" ]; then
@@ -279,7 +279,7 @@ checkFilesystem() {
elif [ "$USBFS" = "ext2" -o "$USBFS" = "ext3" -o "$USBFS" = "ext4" ]; then
echo "Label can be set with /sbin/e2label"
elif [ "$USBFS" = "btrfs" ]; then
- echo "Eventually you'll be able to use /sbin/btrfs filesystem label to add a label."
+ echo "Eventually you'll be able to use /sbin/btrfs filesystem label to add a label."
fi
exitclean
fi
@@ -498,7 +498,7 @@ if [ -z "$noverify" ]; then
fi
#checkFilesystem $USBDEV
-# do some basic sanity checks.
+# do some basic sanity checks.
checkMounted $USBDEV
if [ -n "$format" -a -z "$skipcopy" ];then
checkLVM $USBDEV
@@ -612,7 +612,7 @@ if [ $tba -gt $(($free + $tbd)) ]; then
fi
fi
-# Verify available space for DVD installer
+# Verify available space for DVD installer
if [ "$isotype" = "installer" ]; then
isosize=$(du -s -B 1M $ISO | awk {'print $1;'})
installimgsize=$(du -s -B 1M $CDMNT/images/install.img | awk {'print $1;'})
@@ -634,7 +634,7 @@ fi
if [ -z "$skipcopy" ] && [ "$isotype" = "live" ]; then
if [ -d $USBMNT/$LIVEOS -a -z "$force" ]; then
- echo "Already set up as live image."
+ echo "Already set up as live image."
if [ -z "$keephome" -a -e $USBMNT/$LIVEOS/$HOMEFILE ]; then
echo "WARNING: Persistent /home will be deleted!!!"
echo "Press Enter to continue or ctrl-c to abort"
commit 3ebbf3cbcc2edc01c7a583b88d68e1c70990e79c
Author: Bruno Wolff III <bruno(a)wolff.to>
Date: Fri Nov 12 12:05:19 2010 -0600
Typo. Need space before ].
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 2303209..8d40f69 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -258,7 +258,7 @@ checkFilesystem() {
USBFS=$(/sbin/blkid -s TYPE -o value $dev)
if [ "$USBFS" != "vfat" ] && [ "$USBFS" != "msdos" ]; then
- if [ "$USBFS" != "ext2" ] && [ "$USBFS" != "ext3" ] && [ "$USBFS" != "ext4" ] && [ "$USBFS" != "btrfs"]; then
+ if [ "$USBFS" != "ext2" ] && [ "$USBFS" != "ext3" ] && [ "$USBFS" != "ext4" ] && [ "$USBFS" != "btrfs" ]; then
echo "USB filesystem must be vfat, ext[234] or btrfs"
exitclean
fi
commit 7355d074d9aac63a754ce85dff8d89fd7c1c6d64
Author: Brian C. Lane <bcl(a)redhat.com>
Date: Tue Nov 9 16:39:57 2010 -0800
Add support for timeout and totaltimeout to livecd-iso-to-disk (#531566)
Allow editing of the bootloader config file's timeout and totaltimeout
settings.
diff --git a/docs/livecd-iso-to-disk.pod b/docs/livecd-iso-to-disk.pod
index bbb54f2..1ccab66 100644
--- a/docs/livecd-iso-to-disk.pod
+++ b/docs/livecd-iso-to-disk.pod
@@ -52,6 +52,14 @@ The intended use of this option is to speed up testing of the boot configuration
Create a GPT partition table when --format is passed, and install an hybrid EFI/MBR bootloader on the disk. This is necessary for most Intel Macs.
+=item --timeout
+
+Modify the bootloader's timeout value. This overrides the value set during iso creation. Units are 1/10s
+
+=item --totaltimeout
+
+Add a totaltimeout to the bootloader config. This is used to force and automatic boot. This cannot be canceled by the user. Units are 1/10s
+
=back
=head1 CONTRIBUTORS
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index 72211d2..2303209 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -23,7 +23,7 @@
export PATH=/sbin:/usr/sbin:$PATH
usage() {
- echo "$0 [--format] [--reset-mbr] [--noverify] [--overlay-size-mb <size>] [--home-size-mb <size>] [--unencrypted-home] [--skipcopy] [--efi] <isopath> <usbstick device>"
+ echo "$0 [--timeout <time>] [--totaltimeout <time>] [--format] [--reset-mbr] [--noverify] [--overlay-size-mb <size>] [--home-size-mb <size>] [--unencrypted-home] [--skipcopy] [--efi] <isopath> <usbstick device>"
exit 1
}
@@ -452,6 +452,16 @@ while [ $# -gt 2 ]; do
--multi)
multi=1
;;
+ --timeout)
+ checkint $2
+ timeout=$2
+ shift
+ ;;
+ --totaltimeout)
+ checkint $2
+ totaltimeout=$2
+ shift
+ ;;
*)
echo "invalid arg -- $1"
usage
@@ -487,7 +497,7 @@ if [ -z "$noverify" ]; then
fi
fi
-checkFilesystem $USBDEV
+#checkFilesystem $USBDEV
# do some basic sanity checks.
checkMounted $USBDEV
if [ -n "$format" -a -z "$skipcopy" ];then
@@ -707,6 +717,14 @@ if [ "$isotype" = "netinst" ]; then
sed -i -e "s;stage2=\S*;stage2=hd:$USBLABEL:/images/install.img;g" $BOOTCONFIG $BOOTCONFIG_EFI
fi
+# Adjust the boot timeouts
+if [ -n "$timeout" ]; then
+ sed -i -e "s/^timeout.*$/timeout\ $timeout/" $BOOTCONFIG
+fi
+if [ -n "$totaltimeout" ]; then
+ sed -i -e "/^timeout.*$/a\totaltimeout\ $totaltimeout" $BOOTCONFIG
+fi
+
# Use repo if the .iso has the repository on it, otherwise use stage2 which
# will default to using the network mirror
if [ -e "$CDMNT/.discinfo" ]; then
13 years, 5 months