1 | # Recipe of Booting up Xen/dom0/domU on IA64 system |
---|
2 | # 06/02/2006 Written by Xen-ia64-devel community. |
---|
3 | |
---|
4 | My enviroment is; |
---|
5 | Machine : Tiger4 |
---|
6 | Domain0 OS : RHEL4 U2 |
---|
7 | DomainU OS : RHEL4 U2 |
---|
8 | |
---|
9 | ---------------------------- |
---|
10 | Build xen |
---|
11 | 1. Download source |
---|
12 | # hg clone http://xenbits.xensource.com/ext/xen-ia64-unstable.hg |
---|
13 | |
---|
14 | 2. # make world |
---|
15 | |
---|
16 | 3. # make install-tools |
---|
17 | |
---|
18 | 4. copy kernels and xen |
---|
19 | # cp xen/xen.gz /boot/efi/efi/redhat/ |
---|
20 | # cp linux-2.6.16.13-xen/vmlinux.gz /boot/efi/efi/redhat/vmlinuz-2.6.16.13-xen |
---|
21 | |
---|
22 | 5. make initrd for Dom0/DomU |
---|
23 | # cd linux-2.6.16.13-xen/ |
---|
24 | # make modules_install |
---|
25 | # mkinitrd -f /boot/efi/efi/redhat/initrd-2.6.16.13-xen.img 2.6.16.13-xen --builtin mptbase --builtin mptscsih |
---|
26 | # cd .. |
---|
27 | |
---|
28 | --------------------------------- |
---|
29 | Make OSimg for DomU |
---|
30 | 1. make file |
---|
31 | # dd if=/dev/zero of=/root/rhel4.img bs=1M seek=4096 count=0 |
---|
32 | # mke2fs -F -j /root/rhel4.img |
---|
33 | # mount -o loop /root/rhel4.img /mnt |
---|
34 | # cp -ax /{dev,var,etc,usr,bin,sbin,lib} /mnt |
---|
35 | # mkdir /mnt/{root,proc,sys,home,tmp} |
---|
36 | |
---|
37 | 2. modify DomU's fstab |
---|
38 | # vi /mnt/etc/fstab |
---|
39 | /dev/hda1 / ext3 defaults 1 1 |
---|
40 | none /dev/pts devpts gid=5,mode=620 0 0 |
---|
41 | none /dev/shm tmpfs defaults 0 0 |
---|
42 | none /proc proc defaults 0 0 |
---|
43 | none /sys sysfs defaults 0 0 |
---|
44 | |
---|
45 | 3. modify inittab (runlevel) |
---|
46 | # vi /mnt/etc/inittab |
---|
47 | id:3:initdefault: |
---|
48 | |
---|
49 | 4. add tty0 into /etc/securetty |
---|
50 | # vi /mnt/etc/securetty (add tty0) |
---|
51 | |
---|
52 | 5. umount |
---|
53 | # umount /mnt |
---|
54 | |
---|
55 | ------------------------------------- |
---|
56 | Boot Xen & Domain0 |
---|
57 | 1. replace elilo |
---|
58 | download from the below |
---|
59 | http://elilo.sourceforge.net/cgi-bin/blosxom |
---|
60 | and copy into /boot/efi/efi/redhat/ |
---|
61 | # cp elilo-3.6-ia64.efi /boot/efi/efi/redhat/elilo.efi |
---|
62 | |
---|
63 | |
---|
64 | 2. modify elilo.conf (like the below) |
---|
65 | # vi /boot/efi/efi/redhat/elilo.conf |
---|
66 | prompt |
---|
67 | timeout=20 |
---|
68 | default=xen |
---|
69 | relocatable |
---|
70 | |
---|
71 | image=vmlinuz-2.6.16.13-xen |
---|
72 | label=xen |
---|
73 | vmm=xen.gz |
---|
74 | initrd=initrd-2.6.16.13-xen.img |
---|
75 | read-only |
---|
76 | append="com2=115200,8n1 console=com2 dom0_mem=1G -- nomca nosmp console=tty0 console=ttyS1,115200,8n1 rhgb root=/dev/sda2" |
---|
77 | |
---|
78 | ------------------------------------- |
---|
79 | Boot DomainU |
---|
80 | 1. make config of DomU |
---|
81 | # vi /etc/xen/rhel4 |
---|
82 | kernel = "/boot/efi/efi/redhat/vmlinuz-2.6.16.13-xen" |
---|
83 | ramdisk = "/boot/efi/efi/redhat/initrd-2.6.16.13-xen.img" |
---|
84 | memory = 384 |
---|
85 | name = "rhel4" |
---|
86 | disk = [ 'file:/root/rhel4.img,hda1,w' ] |
---|
87 | root = "/dev/hda1 ro" |
---|
88 | extra = "nomca console=tty0 3" |
---|
89 | |
---|
90 | 2. After boot xen and dom0, start xend |
---|
91 | # /etc/init.d/xend start |
---|
92 | ( In the debugging case, # XEND_DEBUG=1 xend trace_start ) |
---|
93 | |
---|
94 | 3. start domU |
---|
95 | # xm create -c rhel4 |
---|