Add 'glob' command for guestfish.
[libguestfs.git] / contrib / febootstrap / install.sh
1 #!/bin/sh -
2
3 #vm=/tmp/vm.img
4 vm=/mnt/share/tmp/vm.img
5
6 modules="--group-install Core -i kernel -i grub"
7
8 # Choose one:
9 #febootstrap $modules fedora-10 local
10 febootstrap $modules fedora-11 local
11 #febootstrap $modules centos-5 local http://mirror.centos.org/centos-5/5.3/os/i386/
12
13 tar zcf local.tar.gz local
14 #rm -rf local
15
16 guestfish <<EOF
17 #alloc $vm 8GB
18 add $vm
19 run
20 sfdisk /dev/sda 0 0 0 ',100 ,'
21 echo Size of /dev/sda1:
22 blockdev-getsize64 /dev/sda1
23 echo Size of /dev/sda2:
24 blockdev-getsize64 /dev/sda2
25 lvm-remove-all
26 pvcreate /dev/sda2
27 vgcreate VG /dev/sda2
28 lvcreate Root VG 6000
29 lvcreate Swap VG 500
30 mkfs ext3 /dev/sda1
31 mkfs ext3 /dev/VG/Root
32 mount /dev/VG/Root /
33 mkdir /boot
34 mount /dev/sda1 /boot
35 tgz-in local.tar.gz /
36 grub-install / /dev/sda
37 EOF
38
39 #rm local.tar.gz