com/ubuntu
Chapter 3
[ 35 ]
11. We will be using the domU kernel that we created earlier for booting this
domain. So this domain will need the kernel modules compiled for that
kernel. Copy them from the /lib/modules directory.
~ mkdir -p xen-mounts/ubuntu_feisty_domU/lib/modules
~ cp -dpR /lib/modules/2.6.16.38-xenU /home/pchaganti/xen-mounts/
ubuntu_feisty_domU/lib/modules
12. Now chroot into this new system and configure it.
~ chroot xen-mounts/ubuntu_feisty_domU
13. Set the hostname for this system.
~ echo "ubuntu_fesity_domU" > /etc/hostname
14. Set up the filesystems that will be loaded on boot.
cat > /etc/fstab << "EOF"
# file system mount point type options dump pass
/dev/sda1 / ext3 defaults 0 1
/dev/sda2 /boot ext3 ro,nosuid,nodev 0 2
/dev/sda3 none swap sw 0 0
proc /proc proc defaults 0 0
sys /sys sysfs defaults 0 0
EOF
15. Set up the network. We will be using the loopback interface and eth0 for the
Ethernet connection. The eth0 interface will be using DHCP to set itself up
automatically.
cat > /etc/network/interfaces << "EOF"
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
EOF
Creating Virtual Machines
[ 36 ]
16. Add a user, create an admin group, and put the added user in this group.
Also set the root password.
# adduser pchaganti
# addgroup --system admin
# adduser pchaganti admin
# passwd root
17. Ubuntu uses sudo to let users perform administrative functions.
Pages:
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47