Include paravirt drivers on CD.
[virt-p2v.git] / p2v.ks.in
1 # LiveCD kickstart file for virt-p2v
2 # @configure_input@
3 #
4 # Copyright (C) 2007-2008 Red Hat Inc.
5 # Written by Richard W.M. Jones <rjones@redhat.com>
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
21 lang @CD_LANG@
22 keyboard @CD_KEYBOARD@
23 timezone @CD_TIMEZONE@
24 auth --useshadow --enablemd5
25 selinux --enforcing
26 firewall --disabled
27
28 repo --name=released --baseurl=@CD_BASE_URL@
29 #repo --name=released --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-@CD_BASE@&arch=@CD_ARCH@
30
31 %packages
32 bash
33 kernel
34 syslinux
35 passwd
36 policycoreutils
37 chkconfig
38 authconfig
39 rootfiles
40
41 # dd, sleep, sync, etc.
42 coreutils
43
44 # For device mapping
45 device-mapper
46 util-linux-ng
47 module-init-tools
48 gzip
49 kpartx
50
51 # For remote communications
52 openssh-clients
53 nc
54
55 # For the shell script
56 dialog
57 grep
58 sed
59 gawk
60 findutils
61
62 # For OCaml
63 ocaml
64 ocaml-runtime
65 ocaml-pcre
66 ocaml-extlib
67 ocaml-xml-light
68 ocaml-libvirt
69
70 # For network configuration
71 dhclient
72
73 # Some other generally useful packages
74 which
75 perl
76 rpm
77 lsof
78 strace
79 vim-minimal
80 vim-enhanced
81 bind-utils
82 file
83
84
85 %post --nochroot
86
87 # These files have to be copied from the build directory into the
88 # squashfs.  See also:
89 # http://www.mail-archive.com/fedora-livecd-list@redhat.com/msg01470.html
90
91 # Just check everything exists, because kickstart will not give
92 # an error if files or paths are missing.
93 if test "x$INSTALL_ROOT" = "x"; then ERROR=1; fi
94 if ! test -d "$INSTALL_ROOT/usr/bin"; then ERROR=1; fi
95 if ! test -d "@abs_top_srcdir@"; then ERROR=1; fi
96 if ! test -d "@abs_top_srcdir@/extras"; then ERROR=1; fi
97 if ! test -f "@abs_top_srcdir@/virt-p2v"; then ERROR=1; fi
98
99 if test "x$ERROR" = "x1"; then
100     echo "**************************************************"
101     echo "**************************************************"
102     echo "**************************************************"
103     echo "Missing files or directories found.  This ISO will be bad."
104     echo "**************************************************"
105     echo "**************************************************"
106     echo "**************************************************"
107     # Exit 1 won't stop anything, but it makes me feel better.
108     exit 1
109 fi
110
111 install -m 0755 -o root -g root \
112         @abs_top_srcdir@/virt-p2v \
113         @abs_top_srcdir@/virt-p2v-update-wrapper \
114         @abs_top_srcdir@/iso-attach \
115         $INSTALL_ROOT/usr/bin
116
117 install -m 0644 -o root -g root @abs_top_srcdir@/inittab \
118         $INSTALL_ROOT/etc
119
120 cp -a $INSTALL_ROOT/etc/lvm $INSTALL_ROOT/etc/lvm.new
121 install -m 0644 -o root -g root @abs_top_srcdir@/lvm.conf \
122         $INSTALL_ROOT/etc/lvm.new
123
124 # Copy everything under extras to the squashfs /extras.
125 cp -a @abs_top_srcdir@/extras $INSTALL_ROOT/extras
126
127 %end
128
129 %post
130
131 # Restore SELinux permissions on installed binaries.
132 /sbin/restorecon /usr/bin/virt-p2v
133 /sbin/restorecon /usr/bin/virt-p2v-update-wrapper
134 /sbin/restorecon /usr/bin/iso-attach
135
136 # Turn off firstboot for livecd boots.
137 echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
138
139 # Don't start yum-updatesd for livecd boots.
140 /sbin/chkconfig --level 345 yum-updatesd off
141
142 # Don't start cron/at as they tend to spawn things which are
143 # disk intensive that are painful on a live image.
144 /sbin/chkconfig --level 345 crond off
145 /sbin/chkconfig --level 345 atd off
146 /sbin/chkconfig --level 345 anacron off
147 /sbin/chkconfig --level 345 readahead_early off
148 /sbin/chkconfig --level 345 readahead_later off
149
150 # Stopgap fix for RH #217966; should be fixed in HAL instead
151 touch /media/.hal-mtab
152
153 # Make some mountpoints.
154 mkdir /mnt/root
155
156 %end