You have to install livecd-tools to build an iso image first and then write it on a usb flash stick.
I think you must have fedora 17 installed.
Anyway you must create a kickstart file (f17.cfg) and put there all the packages you want.
As an example my kickstart file looks like this:
Code:
lang en_US.UTF-8
keyboard us
timezone Europe/Bucharest
auth --useshadow --enablemd5
selinux --enforcing
firewall --enabled
xconfig --startxonboot
services --enabled=restorecond --disabled=avahi-daemon,dnsmasq,fcoe,ip6tables,lldpad,lvm2-monitor,mdmonitor,mdmonitor-takeover,multipathd,ntpdate,pppoe-server,rdisc,snmpd,snmptrapd,wpa_supplicant,zvbid
part / --fstype=ext4
repo --name=fedora --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-17&arch=i386
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f17&arch=i386
repo --name=rpmfusion-free --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-17&arch=i386
repo --name=rpmfusion-free-updates --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-17&arch=i386
repo --name=rpmfusion-nonfree --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-17&arch=i386
repo --name=rpmfusion-nonfree-updates --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-updates-released-17&arch=i386
repo --name=livna --baseurl=http://rpm.livna.org/repo/17/i386
repo --name=adobe --baseurl=http://linuxdownload.adobe.com/linux/i386/
######## minimal installation ########
%packages
@core
@romanian-support
anaconda
kernel-PAE
isomd5sum
memtest86+
grub2
grub2-efi
efibootmgr
firstboot
ntp
yum-plugin-fastestmirror
yum-presto
gdm
gnome-panel
plymouth-theme-charge
xorg-x11-drivers
-audit
gnome-shell
nautilus
-sendmail
gnome-packagekit
NetworkManager-gnome
xdg-user-dirs-gtk
######## minimal installation ########
b43-openfwwf
brasero-nautilus
bzip2
cabextract
cheese
dd_rescue
dmidecode
dvgrab
eject
ekiga
empathy
eog
evince-nautilus
file-roller-nautilus
firefox
foomatic
gcalctool
gedit
gnome-backgrounds
gnome-disk-utility
gnome-media
gnome-password-generator
gnome-power-manager
gnome-shell-extension-cpu-temperature
gnome-system-log
gnome-system-monitor
gnome-terminal
gnome-tweak-tool
gparted
gutenprint-cups
gutenprint-foomatic
gwget
hfsplus-tools
hplip
iwl5000-firmware
libreoffice-calc
libreoffice-impress
libreoffice-langpack-ro
libreoffice-writer
libsane-hpaio
#lightspark-mozilla-plugin
livecd-tools
lm_sensors
man-db
man-pages
mc
microcode_ctl
mozilla-adblockplus
mozilla-googlesharing
mozilla-https-everywhere
mozilla-noscript
nautilus-open-terminal
nautilus-search-tool
nautilus-sendto
nautilus-sound-converter
oggconvert
p7zip-plugins
PackageKit-gstreamer-plugin
PackageKit-gtk3-module
pciutils
policycoreutils-gui
policycoreutils-restorecond
preload
rp-pppoe
shotwell
simple-scan
sound-juicer
soundconverter
system-config-firewall
system-config-language
system-config-network
system-config-network-tui
system-config-printer
system-config-printer-udev
systemd-gtk
tar
totem-nautilus
transmission-gtk
usb_modeswitch
usbutils
v4l-utils
wine
xsane-gimp
yum-utils
zip
audacity-freeworld
avidemux-gtk
devede
ffmpeg
ffmpeg2theora
gstreamer-ffmpeg
gstreamer-plugins-bad
gstreamer-plugins-ugly
lame
unrar
vlc
libdvdcss
adobe-release
#AdobeReader_enu
flash-plugin
%end
%post
# FIXME: it'd be better to get this installed from a package
cat > /etc/rc.d/init.d/livesys << EOF
#!/bin/bash
#
# live: Init script for live image
#
# chkconfig: 345 00 99
# description: Init script for live image.
. /etc/init.d/functions
if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ]; then
exit 0
fi
if [ -e /.liveimg-configured ] ; then
configdone=1
fi
exists() {
which \$1 >/dev/null 2>&1 || return
\$*
}
touch /.liveimg-configured
# Make sure we don't mangle the hardware clock on shutdown
ln -sf /dev/null /etc/systemd/system/hwclock-save.service
livedir="LiveOS"
for arg in \`cat /proc/cmdline\` ; do
if [ "\${arg##live_dir=}" != "\${arg}" ]; then
livedir=\${arg##live_dir=}
return
fi
done
# enable swaps unless requested otherwise
swaps=\`blkid -t TYPE=swap -o device\`
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n "\$swaps" ] ; then
for s in \$swaps ; do
action "Enabling swap partition \$s" swapon \$s
done
fi
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f /run/initramfs/live/\${livedir}/swap.img ] ; then
action "Enabling swap file" swapon /run/initramfs/live/\${livedir}/swap.img
fi
mountPersistentHome() {
# support label/uuid
if [ "\${homedev##LABEL=}" != "\${homedev}" -o "\${homedev##UUID=}" != "\${homedev}" ]; then
homedev=\`/sbin/blkid -o device -t "\$homedev"\`
fi
# if we're given a file rather than a blockdev, loopback it
if [ "\${homedev##mtd}" != "\${homedev}" ]; then
# mtd devs don't have a block device but get magic-mounted with -t jffs2
mountopts="-t jffs2"
elif [ ! -b "\$homedev" ]; then
loopdev=\`losetup -f\`
if [ "\${homedev##/run/initramfs/live}" != "\${homedev}" ]; then
action "Remounting live store r/w" mount -o remount,rw /run/initramfs/live
fi
losetup \$loopdev \$homedev
homedev=\$loopdev
fi
# if it's encrypted, we need to unlock it
if [ "\$(/sbin/blkid -s TYPE -o value \$homedev 2>/dev/null)" = "crypto_LUKS" ]; then
echo
echo "Setting up encrypted /home device"
plymouth ask-for-password --command="cryptsetup luksOpen \$homedev EncHome"
homedev=/dev/mapper/EncHome
fi
# and finally do the mount
mount \$mountopts \$homedev /home
# if we have /home under what's passed for persistent home, then
# we should make that the real /home. useful for mtd device on olpc
if [ -d /home/home ]; then mount --bind /home/home /home ; fi
[ -x /sbin/restorecon ] && /sbin/restorecon /home
if [ -d /home/liveuser ]; then USERADDARGS="-M" ; fi
}
findPersistentHome() {
for arg in \`cat /proc/cmdline\` ; do
if [ "\${arg##persistenthome=}" != "\${arg}" ]; then
homedev=\${arg##persistenthome=}
return
fi
done
}
if strstr "\`cat /proc/cmdline\`" persistenthome= ; then
findPersistentHome
elif [ -e /run/initramfs/live/\${livedir}/home.img ]; then
homedev=/run/initramfs/live/\${livedir}/home.img
fi
# if we have a persistent /home, then we want to go ahead and mount it
if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ] ; then
action "Mounting persistent /home" mountPersistentHome
fi
# make it so that we don't do writing to the overlay for things which
# are just tmpdirs/caches
mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
mount -t tmpfs tmp /tmp
mount -t tmpfs vartmp /var/tmp
[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp >/dev/null 2>&1
EOF
# bah, hal starts way too late
cat > /etc/rc.d/init.d/livesys-late << EOF
#!/bin/bash
#
# live: Late init script for live image
#
# chkconfig: 345 99 01
# description: Late init script for live image.
. /etc/init.d/functions
if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then
exit 0
fi
exists() {
which \$1 >/dev/null 2>&1 || return
\$*
}
# read some variables out of /proc/cmdline
for o in \`cat /proc/cmdline\` ; do
case \$o in
ks=*)
ks="\${o#ks=}"
;;
xdriver=*)
xdriver="\${o#xdriver=}"
;;
esac
done
# if liveinst or textinst is given, start anaconda
if strstr "\`cat /proc/cmdline\`" liveinst ; then
plymouth --quit
/usr/sbin/liveinst \$ks
fi
if strstr "\`cat /proc/cmdline\`" textinst ; then
plymouth --quit
/usr/sbin/liveinst --text \$ks
fi
# configure X, allowing user to override xdriver
if [ -n "\$xdriver" ]; then
cat > /etc/X11/xorg.conf.d/00-xdriver.conf <<FOE
Section "Device"
Identifier "Videocard0"
Driver "\$xdriver"
EndSection
FOE
fi
touch /.liveimg-late-configured
EOF
chmod 755 /etc/rc.d/init.d/livesys
/sbin/restorecon /etc/rc.d/init.d/livesys
/sbin/chkconfig --add livesys
chmod 755 /etc/rc.d/init.d/livesys-late
/sbin/restorecon /etc/rc.d/init.d/livesys-late
/sbin/chkconfig --add livesys-late
%end
%post
cat > /root/chkconfig.sh << EOF
#!/bin/bash
#/sbin/chkconfig --del livesys #used in usb stick installation
#/sbin/chkconfig --del livesys-late #used in usb stick installation
/sbin/chkconfig --del netconsole
/sbin/chkconfig --del network
EOF
/bin/chmod u+x /root/chkconfig.sh
/bin/bash /root/chkconfig.sh
%end
%post --nochroot
cp $INSTALL_ROOT/usr/share/doc/*-release-*/GPL $LIVE_ROOT/GPL
# only works on x86, x86_64
if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then
if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi
cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS
fi
%end
And the command as root is:
# livecd-creator --config /home/your_name/f17.cfg --cache=/home/your_name/17/i686/ --fslabel=f17
will download the packages and build the image.
# livecd-iso-to-disk --format --reset-mbr --noverify --unencrypted-home --home-size-mb 2118 f17.iso /dev/sdb
will format and write the image on the stick.
You must check if the stick is indeed /dev/sdb or how much space you have for home. The image will be about 900 MB. If you give to much the script will tell you to adjust --home-size-mb. Your home and all the changes and settings will be preserved.
After booting from the stick you will find in your (usb stick) home in the Desktop folder the script to install on hdd. Double click and you are on your own.