Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 940428 Details for
Bug 1145664
livecd-iso-to-disk fails to write iso to disk: basename: missing operand
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
output of livecd-iso-to-disk
livecd-tools.log (text/plain), 32.34 KB, created by
Petr Schindler
on 2014-09-23 13:13:03 UTC
(
hide
)
Description:
output of livecd-iso-to-disk
Filename:
MIME Type:
Creator:
Petr Schindler
Created:
2014-09-23 13:13:03 UTC
Size:
32.34 KB
patch
obsolete
>livecd-iso-to-disk >================== >Created Ãterý 23 záÅà 2014 > >set -x > >export PATH=/sbin:/usr/sbin:$PATH >+ export PATH=/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin >+ PATH=/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin > >shortusage() { > echo " > SYNTAX > > livecd-iso-to-disk [--help] [--noverify] [--format] [--msdos] [--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] [--label label] > <source> <target device> > > (Enter livecd-iso-to-disk --help on the command line for more information.)" >} > >usage() { > echo " > " > shortusage > echo " > livecd-iso-to-disk - Transfer a LiveOS image so that it's bootable off of > a USB/SD device. > > The script may be run in simplest form with just the two arguments: > > <source> > This may be the filesystem path to a LiveOS .iso image file, > such as from a CD-ROM, DVD, or download. It could also be the > device node reference for the mount point of another LiveOS > filesystem, including the currently-running one (such as a > booted Live CD/DVD/USB, where /dev/live references the running > image device). > > <target device> > This should be the device partition name for the attached, > target device, such as /dev/sdb1 or /dev/sdc1. (Issue the > df -Th command to get a listing of the mounted partitions, > where you can confirm the filesystem types, available space, > and device names.) Be careful to specify the correct device, > or you may overwrite important data on another disk! > > To execute the script to completion, you will need to run it with root user > permissions. > SYSLINUX must be installed on the computer running the installation script. > > DESCRIPTION > > livecd-iso-to-disk installs a Live CD/DVD/USB image (LiveOS) onto a USB/SD > storage device (or any storage partition that will boot with a SYSLINUX > bootloader). The target storage device can then boot the installed > operating system on systems that support booting via the USB or the SD > interface. The script requires a LiveOS source image and a target storage > device. The source image may be either a LiveOS .iso file, the currently- > running LiveOS image, the device node reference for an attached device with > an installed LiveOS image, or a file backed by a block device with an > installed LiveOS image. If the operating system supports persistent > overlays for saving system changes, a pre-sized overlay may be included with > the installation. > > Unless you request the --format option, the installation does not destroy > data outside of the LiveOS, syslinux, & EFI folders on your target device. > This allows one to maintain other files on the target disk outside of the > LiveOS filesystem. > > LiveOS images provide embedded filesystems through the Device-mapper > component of the Linux kernel. The embedded filesystems exist within files > such as /LiveOS/squashfs.img (the default compressed storage) or > /LiveOS/ext3fs.img (an uncompressed version) on the primary volume partition > of the storage device. In use, these are read-only filesystems. Optionally, > one may specify a persistent LiveOS overlay to hold image-change snapshots > (that use write-once, difference-tracking storage) in the > /LiveOS/overlay-<device_id> file, which, *one should note*, always grows in > size due to the storage mechanism. (The fraction of allocated space that > has been consumed by system activity and changes may be displayed by issuing > the 'dmsetup status' command in a terminal session of a running LiveOS > image.) One way to conserve the unrecoverable, overlay file space, is to > specify a persistent home folder for user files, which will be saved in a > /LiveOS/home.img filesystem image file. This file space is encrypted by > default, but is not compressed. (One may bypass encryption with the > --unencrypted-home installation option.) Files in this home folder may be > erased to recover and reuse their storage space. The home.img file is also > convenient for backing up or swapping user account files. > > OPTIONS > > --help > Displays usage information and exits. > > --noverify > Disables the image validation process that occurs before the image is > installed from the original Live CD .iso image. When this option is > specified, the image is not verified before loading onto the target > storage device. > > --format > Formats the target device and creates an MS-DOS partition table (or GPT > partition table, if the --efi option is passed). > > --msdos > Forces format to use msdos instead of ext4. > > --reset-mbr > Sets the Master Boot Record (MBR) of the target storage device to the > mbr.bin file from the installation system's syslinux directory. This > may be helpful in recovering a damaged or corrupted device. > > --efi > Creates a GUID partition table when --format is passed, and installs a > hybrid Extensible Firmware Interface (EFI)/MBR bootloader on the disk. > This is necessary for most Intel Macs. > > --skipcopy > Skips the copying of the live image to the target device, bypassing the > actions of the --format, --overlay-size-mb, --home-size-mb, & > --swap-size-mb options, if present on the command line. (The --skipcopy > option may be used while testing the script, in order to avoid repeated > and lengthy copy commands, or to repair boot configuration files on a > previously installed device.) > > --force > This option allows the installation script to bypass a delete > confirmation dialog in the event that a pre-existing LiveOS directory > is found on the target device. > > --xo > Used to prepare an image for the OLPC XO-1 laptop with its compressed, > JFFS2 filesystem. Do not use the following options with --xo: > --overlay-size-mb <size>, home-size-mb <size>, --delete-home, > --compress > > --xo-no-home > Used together with the --xo option to prepare an image for an OLPC XO > laptop with the home folder on an SD card instead of the internal flash > storage. > > --timeout > Modifies the bootloader's timeout value, which indicates how long to > pause at the boot: prompt before booting automatically. This overrides > the value set during iso creation. Units are 1/10 s. The timeout is > canceled when any key is pressed, the assumption being that the user > will complete the command line. A timeout of zero will disable the > timeout completely. > > --totaltimeout > Adds a bootloader totaltimeout, which indicates how long to wait before > booting automatically. This is used to force an automatic boot. This > timeout cannot be canceled by the user. Units are 1/10 s. > > --extra-kernel-args <args> > Specifies additional kernel arguments, <args>, that will be inserted > into the syslinux and EFI boot configurations. Multiple arguments > should be specified in one string, i.e., > --extra-kernel-args \"arg1 arg2 ...\" > > --multi > Used when installing multiple image copies to signal configuration of > the boot files for the image in the --livedir <dir> parameter. > > > --livedir <dir> > Used with multiple image installations to designate the directory <dir> > for the particular image. > > --compress (default state for the operating system files) > The default, compressed SquashFS filesystem image is copied on > installation. This option has no effect when the source filesystem is > already expanded. > > --skipcompress (default option when --xo is specified) > Expands the source SquashFS image on installation into the read-only > /LiveOS/ext3fs.img filesystem image file. > > --swap-size-mb <size> > Sets up a swap file of <size> mebibytes (integer values only) on the > target device. > > --overlay-size-mb <size> > This option sets the overlay size in mebibytes (integer values only). > The overlay makes persistent storage available to the live operating > system, if the operating system supports it. The persistent LiveOS > overlay holds image-change snapshots (using write-once, difference- > tracking storage) in the /LiveOS/overlay-<device_id> file, which, *one > should note*, always grows in size due to the storage mechanism. (The > fraction of allocated space that has been consumed may be displayed by > issuing the 'dmsetup status' command in a terminal session of a running > LiveOS installation.) One way to conserve the unrecoverable, overlay > file space, is to specify a persistent home folder for user files, see > --home-size-mb below. The target storage device must have enough free > space for the image and the overlay. A maximum <size> of 4095 MiB is > permitted for vfat-formatted devices. If there is insufficient room on > your device, you will be given information to help in adjusting your > settings. > > --home-size-mb <size> > Sets the home directory size in mebibytes (integer values only). A > persistent home directory will be made in the /LiveOS/home.img > filesystem image file. This file space is encrypted by default, but not > compressed (one may bypass encryption with the --unencrypted-home > installation option). Files in this home folder may be erased to > recover and reuse their storage space. The target storage device must > have enough free space for the image, any overlay, and the home > directory. Note that the --delete-home option must also be selected to > replace an existing persistent home with a new, empty one. A maximum > <size> of 4095 MiB is permitted for vfat-formatted devices. If there is > insufficient room on your device, you will be given information to help > in adjusting your settings. > > --delete-home > To prevent unwitting deletion of user files, this option must be > explicitly selected when the option --home-size-mb <size> is selected > and there is an existing persistent home directory on the target device. > > --crypted-home (default that only applies to new home-size-mb requests) > Specifies the default option to encrypt a new persistent home directory > if --home-size-mb <size> is specified. > > --unencrypted-home > Prevents the default option to encrypt a new persistent home directory. > > --updates updates.img > 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. > > --label label > Specifies a specific label instead of default LIVE. Useful when you do > unattended installs which pas a label to inst.ks > > CONTRIBUTORS > > livecd-iso-to-disk: David Zeuthen, Jeremy Katz, Douglas McClendon, > Chris Curran and other contributors. > (See the AUTHORS file in the source distribution for > the complete list of credits.) > > BUGS > > Report bugs to the mailing list > http://admin.fedoraproject.org/mailman/listinfo/livecd or directly to > Bugzilla http://bugzilla.redhat.com/bugzilla/ against the Fedora product, > and the livecd-tools component. > > COPYRIGHT > > Copyright (C) Fedora Project 2008, 2009, 2010 and various contributors. > This is free software. You may redistribute copies of it under the terms of > the GNU General Public License http://www.gnu.org/licenses/gpl.html. > There is NO WARRANTY, to the extent permitted by law. > > SEE ALSO > > livecd-creator, project website http://fedoraproject.org/wiki/FedoraLiveCD > " > exit 1 >} > >cleanup() { > sleep 2 > [ -d "$SRCMNT" ] && umount $SRCMNT && rmdir $SRCMNT > [ -d "$TGTMNT" ] && umount $TGTMNT && rmdir $TGTMNT >} > >exitclean() { > RETVAL=$? > if [ -d "$SRCMNT" ] || [ -d "$TGTMNT" ]; > then > [ "$RETVAL" = 0 ] || echo "Cleaning up to exit..." > cleanup > fi > exit $RETVAL >} > >isdevloop() { > [ x"${1#/dev/loop}" != x"$1" ] >} > >getdisk() { > DEV=$1 > > if isdevloop "$DEV"; then > device="$DEV" > return > fi > > p=$(udevadm info -q path -n $DEV) > if [ $? -gt 0 ]; then > echo "Error getting udev path to $DEV" > exitclean > fi > if [ -e /sys/$p/device ]; then > device=$(basename /sys/$p) > else > device=$(basename $(readlink -f /sys/$p/../)) > fi > if [ ! -e /sys/block/$device -o ! -e /dev/$device ]; then > echo "Error finding block device of $DEV. Aborting!" > exitclean > fi > > device="/dev/$device" > # FIXME: weird dev names could mess this up I guess > p=/dev/$(basename $p) > partnum=${p##$device} >} > >resetMBR() { > if isdevloop "$DEV"; then > 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 > cat /usr/lib/syslinux/gptmbr.bin > $device > elif [ -f /usr/share/syslinux/gptmbr.bin ]; then > cat /usr/share/syslinux/gptmbr.bin > $device > else > echo "Could not find gptmbr.bin (syslinux)" > exitclean > fi > # Make it bootable on EFI and BIOS > parted -s $device set $partnum legacy_boot on > 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 > fi >} > >checkMBR() { > if isdevloop "$DEV"; then > return 0 > fi > getdisk $1 > > 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 > if [ -z "$format" ]; then > echo "MBR appears to be blank." > echo "Press Enter to replace the MBR and continue or ctrl-c to abort" > read > fi > resetMBR $1 > fi > > return 0 >} > >checkPartActive() { > dev=$1 > getdisk $dev > > # 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 > fi > if isdevloop "$DEV"; then > return > fi > > if [ "$(/sbin/fdisk -l $device 2>/dev/null |grep -m1 $dev |awk {'print $2;'})" != "*" ]; then > echo "Partition isn't marked bootable!" > echo "You can mark the partition as bootable with " > echo " # /sbin/parted $device" > echo " (parted) toggle N boot" > echo " (parted) quit" > exitclean > fi >} > >checkLVM() { > dev=$1 > > if [ -x /sbin/pvs -a \ > "$(/sbin/pvs -o vg_name --noheadings $dev* 2>/dev/null || :)" ]; then > echo "Device, $dev, contains a volume group and cannot be formated!" > echo "You can remove the volume group using vgremove." > exitclean > fi > return 0 >} > >createGPTLayout() { > dev=$1 > getdisk $dev > > echo "WARNING: THIS WILL DESTROY ANY DATA ON $device!!!" > echo "Press Enter to continue or ctrl-c to abort" > read > umount ${device}* &> /dev/null || : > wipefs -a ${device} > /sbin/parted --script $device mklabel gpt > partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit MB print" |grep ^$device:) > dev_size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/MB$//') > p1_size=$(($dev_size - 3)) > > if [ $p1_size -le 0 ]; then > echo "Your device isn't big enough to hold $SRC" > echo "It is $(($p1_size * -1)) MB too small" > exitclean > fi > p1_start=1 > p1_end=$(($p1_size + 1)) > /sbin/parted -s $device u MB mkpart '"EFI System Partition"' fat32 $p1_start $p1_end set 1 boot on > # Sometimes automount can be _really_ annoying. > echo "Waiting for devices to settle..." > /sbin/udevadm settle > sleep 5 > TGTDEV=${device}1 > umount $TGTDEV &> /dev/null || : > /sbin/mkdosfs -n $label $TGTDEV > TGTLABEL="UUID=$(/sbin/blkid -s UUID -o value $TGTDEV)" >} > >createMSDOSLayout() { > dev=$1 > getdisk $dev > > echo "WARNING: THIS WILL DESTROY ANY DATA ON $device!!!" > echo "Press Enter to continue or ctrl-c to abort" > read > umount ${device}* &> /dev/null || : > wipefs -a ${device} > /sbin/parted --script $device mklabel msdos > partinfo=$(LC_ALL=C /sbin/parted --script -m $device "unit MB print" |grep ^$device:) > dev_size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/MB$//') > p1_size=$(($dev_size - 3)) > > if [ $p1_size -le 0 ]; then > echo "Your device isn't big enough to hold $SRC" > echo "It is $(($p1_size * -1)) MB too small" > exitclean > fi > p1_start=1 > p1_end=$(($p1_size + 1)) > /sbin/parted -s $device u MB mkpart primary fat32 $p1_start $p1_end set 1 boot on > # Sometimes automount can be _really_ annoying. > echo "Waiting for devices to settle..." > /sbin/udevadm settle > sleep 5 > if ! isdevloop "$DEV"; then > TGTDEV=${device}1 > else > TGTDEV=${device} > fi > umount $TGTDEV &> /dev/null || : > /sbin/mkdosfs -n LIVE $TGTDEV > TGTLABEL="UUID=$(/sbin/blkid -s UUID -o value $TGTDEV)" >} > >createEXTFSLayout() { > dev=$1 > getdisk $dev > > echo "WARNING: THIS WILL DESTROY ANY DATA ON $device!!!" > echo "Press Enter to continue or ctrl-c to abort" > read > umount ${device}* &> /dev/null || : > wipefs -a ${device} > /sbin/parted -s $device mklabel msdos > partinfo=$(LC_ALL=C /sbin/parted -s -m $device "u MB print" |grep ^$device:) > dev_size=$(echo $partinfo |cut -d : -f 2 |sed -e 's/MB$//') > p1_size=$(($dev_size - 3)) > > if [ $p1_size -le 0 ]; then > echo "Your device isn't big enough to hold $SRC" > echo "It is $(($p1_size * -1)) MB too small" > exitclean > fi > p1_start=1 > p1_end=$(($p1_size + 1)) > /sbin/parted -s $device u MB mkpart primary ext2 $p1_start $p1_end set 1 boot on > # Sometimes automount can be _really_ annoying. > echo "Waiting for devices to settle..." > /sbin/udevadm settle > sleep 5 > TGTDEV=${device}1 > umount $TGTDEV &> /dev/null || : > > # Check extlinux version > if extlinux -v 2>&1 | grep -q 'extlinux 3'; then > mkfs=/sbin/mkfs.ext3 > else > mkfs=/sbin/mkfs.ext4 > fi > $mkfs -L $label $TGTDEV > TGTLABEL="UUID=$(/sbin/blkid -s UUID -o value $TGTDEV)" >} > >checkGPT() { > dev=$1 > getdisk $dev > > if [ "$(LC_ALL=C /sbin/parted -m $device p 2>/dev/null |grep -ic :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 > fi > > partinfo=$(LC_ALL=C /sbin/parted --script -m $device "print" |grep ^$partnum:) > volname=$(echo $partinfo |cut -d : -f 6) > flags=$(echo $partinfo |cut -d : -f 7) > if [ "$volname" != "EFI System Partition" ]; then > echo "Partition name must be 'EFI System Partition'" > echo "This can be set in parted or you can run with --reset-mbr" > exitclean > fi > if [ "$(echo $flags |grep -c boot)" = "0" ]; then > echo "Partition isn't marked bootable!" > echo "You can mark the partition as bootable with " > echo " # /sbin/parted $device" > echo " (parted) toggle N boot" > echo " (parted) quit" > exitclean > fi >} > >checkFilesystem() { > dev=$1 > > TGTFS=$(/sbin/blkid -s TYPE -o value $dev || :) > if [ "$TGTFS" != "vfat" ] && [ "$TGTFS" != "msdos" ]; then > if [ "$TGTFS" != "ext2" ] && [ "$TGTFS" != "ext3" ] && [ "$TGTFS" != "ext4" ] && [ "$TGTFS" != "btrfs" ]; then > echo "Target filesystem ($dev:$TGTFS) must be vfat, ext[234] or btrfs" > exitclean > fi > fi > > if [ "$TGTFS" = "ext2" -o "$TGTFS" = "ext3" -o "$TGTFS" = "ext4" ] && [ ! -x /usr/sbin/extlinux ]; then > echo "Target filesystem ($TGTFS) requires syslinux-extlinux to be installed." > exitclean > fi > > > TGTLABEL=$(/sbin/blkid -s LABEL -o value $dev) > if [ "$TGTLABEL" != "$label" ]; then > if [ "$TGTFS" = "vfat" -o "$TGTFS" = "msdos" ]; then > /sbin/dosfslabel $dev $label > if [ $? -gt 0 ]; then > echo "dosfslabel failed on $dev, device not setup" > exitclean > fi > elif [ "$TGTFS" = "ext2" -o "$TGTFS" = "ext3" -o "$TGTFS" = "ext4" ]; then > /sbin/e2label $dev $label > if [ $? -gt 0 ]; then > echo "e2label failed on $dev, device not setup" > exitclean > fi > else > echo "Unknown filesystem type. Try setting its label to $label and re-running" > exitclean > fi > fi > > # Use UUID if available > TGTUUID=$(/sbin/blkid -s UUID -o value $dev) > if [ -n "$TGTUUID" ]; then > TGTLABEL="UUID=$TGTUUID" > else > TGTLABEL="LABEL=$label" > fi > > if [ "$TGTFS" = "vfat" -o "$TGTFS" = "msdos" ]; then > mountopts="-o shortname=winnt,umask=0077" > fi >} > >checkSyslinuxVersion() { > if [ ! -x /usr/bin/syslinux ]; then > echo "You need to have syslinux installed to run this script" > exit 1 > fi > check=($(syslinux --version 2>&1)) || : > if 'syslinux' != $check ; then > SYSLINUXPATH="" > elif [ -n "$multi" ]; then > SYSLINUXPATH="$LIVEOS/syslinux" > else > SYSLINUXPATH="syslinux" > fi >} > >checkMounted() { > dev=$1 > if grep -q "^$dev " /proc/mounts ; then > 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 > fi >} > >checkint() { > if ! test $1 -gt 0 2>/dev/null ; then > shortusage > exit 1 > fi >} > >if [ $(id -u) != 0 ]; then > echo "You need to be root to run this script" > exit 1 >fi >++ id -u >+ '[' 0 '!=' 0 ']' > >detectsrctype() { > if -e "$SRCMNT/Packages" ; then > echo "/Packages found, will copy source packages to target" > packages=1 > fi > if -e "$SRCMNT/LiveOS/squashfs.img" ; then > # LiveOS style boot image > srctype=live > return > fi > if [ -e $SRCMNT/images/install.img -o -e $SRCMNT/isolinux/initrd.img ]; then > if [ -n "$packages" ]; then > srctype=installer > else > srctype=netinst > fi > imgtype=install > if [ ! -e $SRCMNT/images/install.img ]; then > echo "$SRC uses initrd.img w/o install.img" > imgtype=initrd > fi > return > fi > echo "ERROR: $SRC does not appear to be a Live image or DVD installer." > 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/rsync ]; then > rsync --inplace -P "$1" "$2" > return > fi > 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" >} > >set -e >+ set -e >set -o pipefail >+ set -o pipefail >trap exitclean EXIT >+ trap exitclean EXIT >shopt -s extglob >+ shopt -s extglob > >cryptedhome=1 >+ cryptedhome=1 >keephome=1 >+ keephome=1 >homesizemb=0 >+ homesizemb=0 >swapsizemb=0 >+ swapsizemb=0 >overlaysizemb=0 >+ overlaysizemb=0 >srctype= >+ srctype= >imgtype= >+ imgtype= >packages= >+ packages= >LIVEOS=LiveOS >+ LIVEOS=LiveOS >HOMEFILE="home.img" >+ HOMEFILE=home.img >updates= >+ updates= >ks= >+ ks= >label="LIVE" >+ label=LIVE > >while true ; do > case $1 in > --help | -h | -?) > usage > ;; > --noverify) > noverify=1 > ;; > --format) > format=1 > ;; > --msdos) > usemsdos=1 > ;; > --reset-mbr|--resetmbr) > resetmbr=1 > ;; > --efi|--mactel) > efi=1 > ;; > --skipcopy) > skipcopy=1 > ;; > --force) > force=1 > ;; > --xo) > xo=1 > skipcompress=1 > ;; > --xo-no-home) > xonohome=1 > ;; > --timeout) > checkint $2 > timeout=$2 > shift > ;; > --totaltimeout) > checkint $2 > totaltimeout=$2 > shift > ;; > --extra-kernel-args) > kernelargs=$2 > shift > ;; > --multi) > multi=1 > ;; > --livedir) > LIVEOS=$2 > shift > ;; > --compress) > skipcompress="" > ;; > --skipcompress) > skipcompress=1 > ;; > --swap-size-mb) > checkint $2 > swapsizemb=$2 > shift > ;; > --overlay-size-mb) > checkint $2 > overlaysizemb=$2 > shift > ;; > --home-size-mb) > checkint $2 > homesizemb=$2 > shift > ;; > --crypted-home) > cryptedhome=1 > ;; > --unencrypted-home) > cryptedhome="" > ;; > --delete-home) > keephome="" > ;; > --updates) > updates=$2 > shift > ;; > --ks) > ks=$2 > shift > ;; > --label) > label=$2 > shift > ;; > --*) > echo "invalid arg -- $1" > shortusage > exit 1 > ;; > *) > break > ;; > esac > shift >done >+ true >+ case $1 in >+ format=1 >+ shift >+ true >+ case $1 in >+ resetmbr=1 >+ shift >+ true >+ case $1 in >+ break > >if [ $# -ne 2 ]; then > echo "Missing arguments" > shortusage > exit 1 >fi >+ '[' 2 -ne 2 ']' > >SRC=$(readlink -f "$1") || : >++ readlink -f /home/pschindl/Fedora/Fedora-Server-netinst-i386-21_Alpha.iso >+ SRC=/home/pschindl/Fedora/Fedora-Server-netinst-i386-21_Alpha.iso >TGTDEV=$(readlink -f "$2") || : >++ readlink -f /dev/sdb >+ TGTDEV=/dev/sdb > >if [ -z "$SRC" ]; then > echo "Missing source" > shortusage > exit 1 >fi >+ '[' -z /home/pschindl/Fedora/Fedora-Server-netinst-i386-21_Alpha.iso ']' > >if [ ! -b "$SRC" -a ! -f "$SRC" ]; then > echo "$SRC is not a file or block device" > shortusage > exit 1 >fi >+ '[' '!' -b /home/pschindl/Fedora/Fedora-Server-netinst-i386-21_Alpha.iso -a '!' -f /home/pschindl/Fedora/Fedora-Server-netinst-i386-21_Alpha.iso ']' > >if [ -z "$TGTDEV" ]; then > echo "Missing target device" > shortusage > exit 1 >fi >+ '[' -z /dev/sdb ']' > >if [ ! -b "$TGTDEV" ]; then > echo "$TGTDEV is not a block device" > shortusage > exit 1 >fi >+ '[' '!' -b /dev/sdb ']' > >if [ -z "$noverify" ]; then > # verify the image > echo "Verifying image..." > if ! checkisomd5 --verbose "$SRC"; then > echo "Are you SURE you want to continue?" > echo "Press Enter to continue or ctrl-c to abort" > read > fi >fi >+ '[' -z '' ']' >+ echo 'Verifying image...' >Verifying image... >+ checkisomd5 --verbose /home/pschindl/Fedora/Fedora-Server-netinst-i386-21_Alpha.iso >/home/pschindl/Fedora/Fedora-Server-netinst-i386-21_Alpha.iso: 78519ef6718294c7adf67d1093fa999f >Fragment sums: 69b7c2173bf11d273731568c14f642c8a7231e97e8878ed55ef88a91e76d >Fragment count: 20 >Supported ISO: no >Press [Esc] to abort check. >Checking: 100.0% > >The media check is complete, the result is: PASS. > >It is OK to use this media. > ># do some basic sanity checks. >checkMounted $TGTDEV >+ checkMounted /dev/sdb >+ dev=/dev/sdb >+ grep -q '^/dev/sdb ' /proc/mounts >+ grep -q '^/dev/sdb ' /proc/swaps > ># FIXME: would be better if we had better mountpoints >SRCMNT=$(mktemp -d /media/srctmp.XXXXXX) >++ mktemp -d /media/srctmp.XXXXXX >+ SRCMNT=/media/srctmp.2yxMa5 >if [ -b "$SRC" ]; then > mount -o ro "$SRC" $SRCMNT || exitclean >elif [ -f "$SRC" ]; then > mount -o loop,ro "$SRC" $SRCMNT || exitclean >else > echo "$SRC is not a file or block device." > exitclean >fi >+ '[' -b /home/pschindl/Fedora/Fedora-Server-netinst-i386-21_Alpha.iso ']' >+ '[' -f /home/pschindl/Fedora/Fedora-Server-netinst-i386-21_Alpha.iso ']' >+ mount -o loop,ro /home/pschindl/Fedora/Fedora-Server-netinst-i386-21_Alpha.iso /media/srctmp.2yxMa5 ># Figure out what needs to be done based on the source image >detectsrctype >+ detectsrctype >+ -e /media/srctmp.2yxMa5/Packages >+ -e /media/srctmp.2yxMa5/LiveOS/squashfs.img >+ srctype=live >+ return > ># Format the device >if [ -n "$format" -a -z "$skipcopy" ]; then > checkLVM $TGTDEV > > if [ -n "$efi" ]; then > createGPTLayout $TGTDEV > elif [ -n "$usemsdos" -o ! -x /sbin/extlinux ]; then > createMSDOSLayout $TGTDEV > else > createEXTFSLayout $TGTDEV > fi >fi >+ '[' -n 1 -a -z '' ']' >+ checkLVM /dev/sdb >+ dev=/dev/sdb >++ /sbin/pvs -o vg_name --noheadings /dev/sdb >++ : >+ '[' -x /sbin/pvs -a '' ']' >+ return 0 >+ '[' -n '' ']' >+ '[' -n '' -o '!' -x /sbin/extlinux ']' >+ createEXTFSLayout /dev/sdb >+ dev=/dev/sdb >+ getdisk /dev/sdb >+ DEV=/dev/sdb >+ isdevloop /dev/sdb >+ '[' x/dev/sdb '!=' x/dev/sdb ']' >++ udevadm info -q path -n /dev/sdb >+ p=/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb >+ '[' 0 -gt 0 ']' >+ '[' -e /sys//devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb/device ']' >++ basename /sys//devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb >+ device=sdb >+ '[' '!' -e /sys/block/sdb -o '!' -e /dev/sdb ']' >+ device=/dev/sdb >++ basename /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb >+ p=/dev/sdb >+ partnum= >+ echo 'WARNING: THIS WILL DESTROY ANY DATA ON /dev/sdb!!!' >WARNING: THIS WILL DESTROY ANY DATA ON /dev/sdb!!! >+ echo 'Press Enter to continue or ctrl-c to abort' >Press Enter to continue or ctrl-c to abort >+ read > >+ umount /dev/sdb >+ : >+ wipefs -a /dev/sdb >+ /sbin/parted -s /dev/sdb mklabel msdos >++ LC_ALL=C >++ /sbin/parted -s -m /dev/sdb 'u MB print' >++ grep '^/dev/sdb:' >+ partinfo='/dev/sdb:3995MB:scsi:512:512:msdos:SMI USB DISK:;' >++ echo /dev/sdb:3995MB:scsi:512:512:msdos:SMI USB 'DISK:;' >++ cut -d : -f 2 >++ sed -e 's/MB$//' >+ dev_size=3995 >+ p1_size=3992 >+ '[' 3992 -le 0 ']' >+ p1_start=1 >+ p1_end=3993 >+ /sbin/parted -s /dev/sdb u MB mkpart primary ext2 1 3993 set 1 boot on >+ echo 'Waiting for devices to settle...' >Waiting for devices to settle... >+ /sbin/udevadm settle >+ sleep 5 >+ TGTDEV=/dev/sdb1 >+ umount /dev/sdb1 >+ : >+ extlinux -v >+ grep -q 'extlinux 3' >+ mkfs=/sbin/mkfs.ext4 >+ /sbin/mkfs.ext4 -L LIVE /dev/sdb1 >mke2fs 1.42.11 (09-Jul-2014) >Creating filesystem with 974592 4k blocks and 243840 inodes >Filesystem UUID: db131d7b-e310-40f0-b807-3c1d2ea3981f >Superblock backups stored on blocks: > 32768, 98304, 163840, 229376, 294912, 819200, 884736 > >Allocating group tables: done >Writing inode tables: done >Creating journal (16384 blocks): done >Writing superblocks and filesystem accounting information: done > >++ /sbin/blkid -s UUID -o value /dev/sdb1 >+ TGTLABEL=UUID=db131d7b-e310-40f0-b807-3c1d2ea3981f > >checkFilesystem $TGTDEV >+ checkFilesystem /dev/sdb1 >+ dev=/dev/sdb1 >++ /sbin/blkid -s TYPE -o value /dev/sdb1 >+ TGTFS=ext4 >+ '[' ext4 '!=' vfat ']' >+ '[' ext4 '!=' msdos ']' >+ '[' ext4 '!=' ext2 ']' >+ '[' ext4 '!=' ext3 ']' >+ '[' ext4 '!=' ext4 ']' >+ '[' ext4 = ext2 -o ext4 = ext3 -o ext4 = ext4 ']' >+ '[' '!' -x /usr/sbin/extlinux ']' >++ /sbin/blkid -s LABEL -o value /dev/sdb1 >+ TGTLABEL=LIVE >+ '[' LIVE '!=' LIVE ']' >++ /sbin/blkid -s UUID -o value /dev/sdb1 >+ TGTUUID=db131d7b-e310-40f0-b807-3c1d2ea3981f >+ '[' -n db131d7b-e310-40f0-b807-3c1d2ea3981f ']' >+ TGTLABEL=UUID=db131d7b-e310-40f0-b807-3c1d2ea3981f >+ '[' ext4 = vfat -o ext4 = msdos ']' >if [ -n "$efi" ]; then > checkGPT $TGTDEV >fi >+ '[' -n '' ']' > >checkSyslinuxVersion >+ checkSyslinuxVersion >+ '[' '!' -x /usr/bin/syslinux ']' >+ check=($(syslinux --version 2>&1)) >++ syslinux --version >+ syslinux != syslinux >+ '[' -n '' ']' >+ SYSLINUXPATH=syslinux ># Because we can't set boot flag for EFI Protective on msdos partition tables >[ -z "$efi" ] && checkPartActive $TGTDEV >+ '[' -z '' ']' >+ checkPartActive /dev/sdb1 >+ dev=/dev/sdb1 >+ getdisk /dev/sdb1 >+ DEV=/dev/sdb1 >+ isdevloop /dev/sdb1 >+ '[' x/dev/sdb1 '!=' x/dev/sdb1 ']' >++ udevadm info -q path -n /dev/sdb1 >+ p=/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1 >+ '[' 0 -gt 0 ']' >+ '[' -e /sys//devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1/device ']' >+++ readlink -f /sys//devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1/../ >++ basename /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb >+ device=sdb >+ '[' '!' -e /sys/block/sdb -o '!' -e /dev/sdb ']' >+ device=/dev/sdb >++ basename /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1 >+ p=/dev/sdb1 >+ partnum=1 >+ '[' /dev/sdb1 = /dev/sdb ']' >+ isdevloop /dev/sdb1 >+ '[' x/dev/sdb1 '!=' x/dev/sdb1 ']' >++ /sbin/fdisk -l /dev/sdb >++ grep -m1 /dev/sdb1 >++ awk '{print $2;}' >+ '[' '*' '!=' '*' ']' >[ -n "$resetmbr" ] && resetMBR $TGTDEV >+ '[' -n 1 ']' >+ resetMBR /dev/sdb1 >+ isdevloop /dev/sdb1 >+ '[' x/dev/sdb1 '!=' x/dev/sdb1 ']' >+ getdisk /dev/sdb1 >+ DEV=/dev/sdb1 >+ isdevloop /dev/sdb1 >+ '[' x/dev/sdb1 '!=' x/dev/sdb1 ']' >++ udevadm info -q path -n /dev/sdb1 >+ p=/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1 >+ '[' 0 -gt 0 ']' >+ '[' -e /sys//devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1/device ']' >+++ readlink -f /sys//devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1/../ >++ basename /sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb >+ device=sdb >+ '[' '!' -e /sys/block/sdb -o '!' -e /dev/sdb ']' >+ device=/dev/sdb >++ basename /devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1 >+ p=/dev/sdb1 >+ partnum=1 >+ '[' -n '' ']' >+ '[' -f /usr/lib/syslinux/mbr.bin ']' >+ '[' -f /usr/share/syslinux/mbr.bin ']' >+ cat /usr/share/syslinux/mbr.bin >checkMBR $TGTDEV >+ checkMBR /dev/sdb1 >+ isdevloop /dev/sdb1 >+ '[' x/dev/sdb1 '!=' x/dev/sdb1 ']' >+ getdisk /dev/sdb1 >+ DEV=/dev/sdb1 >+ isdevloop /dev/sdb1 >+ '[' x/dev/sdb1 '!=' x/dev/sdb1 ']' >++ udevadm info -q path -n /dev/sdb1 >+ p=/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1 >+ '[' 0 -gt 0 ']' >+ '[' -e /sys//devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1/device ']' >+++ readlink -f /sys//devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1/../ >++ basename >basename: missing operand >Try 'basename --help' for more information. >+ device= >exitclean >+ exitclean >+ RETVAL=1 >+ '[' -d /media/srctmp.2yxMa5 ']' >+ '[' 1 = 0 ']' >+ echo 'Cleaning up to exit...' >Cleaning up to exit... >+ cleanup >+ sleep 2 >+ '[' -d /media/srctmp.2yxMa5 ']' >+ umount /media/srctmp.2yxMa5 >+ rmdir /media/srctmp.2yxMa5 >+ '[' -d '' ']' >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1145664
: 940428