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