[Fedora-livecd-list] docs/livecd-iso-to-disk.pod tools/livecd-iso-to-disk.sh

Brian C. Lane bcl at fedoraproject.org
Mon Jul 15 18:19:28 UTC 2013


 docs/livecd-iso-to-disk.pod |    6 +++++-
 tools/livecd-iso-to-disk.sh |   17 ++++++++++++++++-
 2 files changed, 21 insertions(+), 2 deletions(-)

New commits:
commit e478654e51f91224e19ab0ccae3d849cc95380e4
Author: Brian C. Lane <bcl at redhat.com>
Date:   Mon Jul 15 11:15:11 2013 -0700

    litd: Add kickstart option
    
    Add --ks kickstart option to copy a kickstart to the USB and setup
    inst.ks to point to it. This can be used with a netboot or dvd iso to
    make a USB stick that will start an install on boot.
    
    Note that with the F19 release the install USB is not filtered out of
    the drive list so clearpart --drives=sda needs to be used in the ks.

diff --git a/docs/livecd-iso-to-disk.pod b/docs/livecd-iso-to-disk.pod
index 8f9ed61..bf52822 100644
--- a/docs/livecd-iso-to-disk.pod
+++ b/docs/livecd-iso-to-disk.pod
@@ -6,7 +6,7 @@ livecd-iso-to-disk - installs bootable Live images onto USB/SD storage devices.
 
 =head1 SYNOPSIS
 
-B<livecd-iso-to-disk>  [--help] [--noverify] [--format] [--reset-mbr] [--efi] [--skipcopy] [--force] [--xo] [--xo-no-home] [--timeout <time>] [--totaltimeout <time>] [--extra-kernel-args <args>] [--multi] [--livedir <dir>] [--compress] [--skipcompress] [--swap-size-mb <size>] [--overlay-size-mb <size>] [--home-size-mb <size>] [--delete-home] [--crypted-home] [--unencrypted-home] [--updates updates.img] <source> <target device>
+B<livecd-iso-to-disk>  [--help] [--noverify] [--format] [--reset-mbr] [--efi] [--skipcopy] [--force] [--xo] [--xo-no-home] [--timeout <time>] [--totaltimeout <time>] [--extra-kernel-args <args>] [--multi] [--livedir <dir>] [--compress] [--skipcompress] [--swap-size-mb <size>] [--overlay-size-mb <size>] [--home-size-mb <size>] [--delete-home] [--crypted-home] [--unencrypted-home] [--updates updates.img] [--ks kickstart] <source> <target device>
 
 Simplest
 
@@ -139,6 +139,10 @@ Prevents the default option to encrypt a new persistent home directory.
 
 Setup inst.updates to point to an updates image on the device. Anaconda uses this for testing updates to an iso without needing to make a new iso.
 
+=item --ks kickstart
+
+Setup inst.ks to point to an kickstart file on the device. Use this for automating installs on boot.
+
 =back
 
 =head1 CONTRIBUTORS
diff --git a/tools/livecd-iso-to-disk.sh b/tools/livecd-iso-to-disk.sh
index c4fb4db..b0b5153 100755
--- a/tools/livecd-iso-to-disk.sh
+++ b/tools/livecd-iso-to-disk.sh
@@ -35,7 +35,7 @@ shortusage() {
                        [--compress] [--skipcompress] [--swap-size-mb <size>]
                        [--overlay-size-mb <size>] [--home-size-mb <size>]
                        [--delete-home] [--crypted-home] [--unencrypted-home]
-                       [--updates updates.img]
+                       [--updates updates.img] [--ks kickstart]
                        <source> <target device>
 
     (Enter livecd-iso-to-disk --help on the command line for more information.)"
@@ -249,6 +249,10 @@ usage() {
         Setup inst.updates to point to an updates image on the device. Anaconda
         uses this for testing updates to an iso without needing to make a new iso.
 
+    --ks kickstart
+        Setup inst.ks to point to an kickstart file on the device. Use this for
+        automating installs on boot.
+
     CONTRIBUTORS
 
     livecd-iso-to-disk: David Zeuthen, Jeremy Katz, Douglas McClendon,
@@ -708,6 +712,7 @@ packages=
 LIVEOS=LiveOS
 HOMEFILE="home.img"
 updates=
+ks=
 
 if [[ "$*" =~ "--help" ]]; then
     usage
@@ -800,6 +805,10 @@ while [ $# -gt 2 ]; do
             updates=$2
             shift
             ;;
+        --ks)
+            ks=$2
+            shift
+            ;;
         *)
             echo "invalid arg -- $1"
             shortusage
@@ -1202,6 +1211,12 @@ if [ -n "$updates" ]; then
     kernelargs+=" inst.updates=hd:$TGTLABEL:/updates.img"
 fi
 
+# Setup the kickstart
+if [ -n "$ks" ]; then
+    copyFile "$ks" "$TGTMNT/ks.cfg"
+    kernelargs+=" inst.ks=hd:$TGTLABEL:/ks.cfg"
+fi
+
 echo "Updating boot config file"
 # adjust label and fstype
 sed -i -e "s/CDLABEL=[^ ]*/$TGTLABEL/" -e "s/rootfstype=[^ ]*/rootfstype=$TGTFS/" -e "s/LABEL=[^ ]*/$TGTLABEL/" $BOOTCONFIG  $BOOTCONFIG_EFI




More information about the livecd mailing list