# LiveCD kickstart file for virt-p2v # @configure_input@ # # Copyright (C) 2007-2008 Red Hat Inc. # Written by Richard W.M. Jones # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA lang @CD_LANG@ keyboard @CD_KEYBOARD@ timezone @CD_TIMEZONE@ auth --useshadow --enablemd5 selinux --enforcing firewall --disabled # This should enable the serial console. However it requires # livecd-tools 018 or above (is ignored on earlier versions). bootloader --append="console=tty0 console=ttyS0,9600n8" # Basic Fedora repository and updates. repo --name=released --baseurl=@CD_BASE_URL@ repo --name=updates --baseurl=@CD_UPDATES_URL@ #repo --name=released --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-@CD_BASE@&arch=@CD_ARCH@ # A local repository if selected by ./configure --enable-localrepo=... @LOCALREPO@ # The p2vrepo subdirectory, containing virt-p2v RPM. repo --name=p2v --baseurl=file://@abs_top_builddir@/p2vrepo %packages --excludedocs bash kernel syslinux passwd policycoreutils chkconfig authconfig rootfiles # For unicode console support. kbd # dd, sleep, sync, etc. coreutils # For device mapping device-mapper util-linux-ng module-init-tools gzip kpartx # For remote communications openssh-clients nc # For the shell script grep sed gawk findutils # For IP configuration iproute net-tools # For network configuration dhclient # Some other generally useful packages which perl rpm lsof strace vim-minimal vim-enhanced bind-utils file # virt-p2v package and its deps ocaml ocaml-findlib ocaml-pcre ocaml-extlib ocaml-xml-light ocaml-libvirt ocaml-newt ocaml-gettext virt-p2v %post --nochroot # These files have to be copied from the build directory into the # squashfs. See also: # http://www.mail-archive.com/fedora-livecd-list@redhat.com/msg01470.html # Just check everything exists, because kickstart will not give # an error if files or paths are missing. if test "x$INSTALL_ROOT" = "x"; then ERROR=1; fi if ! test -d "$INSTALL_ROOT/usr/bin"; then ERROR=1; fi if ! test -d "@abs_top_srcdir@"; then ERROR=1; fi if ! test -d "@abs_top_srcdir@/extras"; then ERROR=1; fi if test "x$ERROR" = "x1"; then echo "**************************************************" echo "**************************************************" echo "**************************************************" echo "Missing files or directories found. This ISO will be bad." echo "**************************************************" echo "**************************************************" echo "**************************************************" # Exit 1 won't stop anything, but it makes me feel better. exit 1 fi cp -a $INSTALL_ROOT/etc/lvm $INSTALL_ROOT/etc/lvm.new install -m 0644 -o root -g root @abs_top_srcdir@/lvm.conf \ $INSTALL_ROOT/etc/lvm.new # Overwrite /etc/event.d/tty1 (normally from initscripts). install -m 0644 -o root -g root @abs_top_srcdir@/tty1 $INSTALL_ROOT/etc/event.d/ # Also /etc/inittab (from initscripts). install -m 0644 -o root -g root @abs_top_srcdir@/inittab $INSTALL_ROOT/etc/ # Copy everything under extras to the squashfs /extras. cp -a @abs_top_srcdir@/extras $INSTALL_ROOT/extras %end %post # Restore SELinux permissions on installed binaries. /sbin/restorecon /usr/bin/virt-p2v /sbin/restorecon /usr/bin/virt-p2v-update-wrapper /sbin/restorecon /usr/bin/iso-attach # Turn off firstboot for livecd boots. echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot # Don't start yum-updatesd for livecd boots. /sbin/chkconfig --level 345 yum-updatesd off # Don't start cron/at as they tend to spawn things which are # disk intensive that are painful on a live image. /sbin/chkconfig --level 345 crond off /sbin/chkconfig --level 345 atd off /sbin/chkconfig --level 345 anacron off /sbin/chkconfig --level 345 readahead_early off /sbin/chkconfig --level 345 readahead_later off # Stopgap fix for RH #217966; should be fixed in HAL instead touch /media/.hal-mtab # Make some mountpoints. mkdir /mnt/root # Remove some unused files. rm -rf /usr/share/man ;# 20 MB #rm -rf /usr/share/doc ;# 44 MB #rm -rf /usr/share/locale ;# 60 MB %end