Debootstrap Intrepid Server PV DomU at Xen 3.3.1 CentOS 5.2 Dom0 (all 64-bit)

January 7, 2009

As appears debootstrap RPM developed for Fedora 9 works fine at Xen 3.3.1 CentOS 5.2 Dom0 and provide an option to create Intrepid Server PV Guest via debootstrapped Ubuntu’s image in RH’s Xen Dom0 environment. Install F9’s rpm then debootstrap would understand non Ubuntu Environment:-

# rpm -ivh debootstrap-1.0.8-1.fc9.noarch.rpm

Prepare LVMs for install:-

# lvcreate -n ubuntu -L12G /dev/vgxen
# lvcreate -n ubuntu-swap -L4G /dev/vgxen
# mke2fs -j /dev/vgxen/ubuntu
# mkswap /dev/vgxen/ubuntu-swap
# mkdir -p /mnt/xen
# mount /dev/vgxen/ubuntu /mnt/xen

Create missing symlink:-

# ln -s /usr/share/debootstrap/scripts/gutsy \
/usr/share/debootstrap/scripts/intrepid

**************************
Update on 01/09/2008
**************************
Fedora 10’s debootstrap-1.0.10-1.fc10.noarch.rpm has this symlink already created. Moreover debootstrap-1.0.10-1.fc10.noarch.rpm been installed on Xen 3.3.1 openSUSE 11.1 Dom0 provide comletely functional debootstrap utility to create Intrepid Server, Hardy Heron PV DomUs at openSUSE 11.1 Dom0 in the same way as described bellow.

Deboostrap new Intrepid Guest:-

# debootstrap --arch=amd64 \
--include=linux-image-server,grub \
--components=main,universe,multiverse intrepid \
/mnt/xen http://us.archive.ubuntu.com/ubuntu/





Once that has finished chroot into the new debootstrapped tree :-

# chroot /mnt/xen
# export LANG=C

Create /etc/fstab:

# cat /etc/fstab
/dev/xvda1 / ext3 defaults 0 1
/dev/xvdb1 none swap defaults 0 0
proc /proc proc defaults 0 0

Create a folder for GRUB menu and update the config

# mkdir -p /boot/grub
# update-grub

Edit /boot/grub/menu.lst
- add “console=hvc0″ to both kernel lines (normal and recovery mode)
Setup a getty on the Xen console (hvc0):

# cd /etc/event.d
# cp tty1 hvc0
# sed -i -e "s/tty1/xvc0/g" hvc0

Remove references to the hardware clock; these will cause the DomU to hang:

# update-rc.d -f hwclockfirst remove
# update-rc.d -f hwclock remove
# rm /etc/udev/rules.d/85-hwclock.rules

Configure network interfaces (/etc/network/interfaces):-

# cat /etc/network/interfaces
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp

Create /etc/hosts file

# cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 IntrepidPVH

Create /etc/hostname file

# cat /etc/hostname
IntrepidPVH

Exit chroot and unmount the filesystem.

# exit
# umount /mnt/xen

Start DomU via profile:-

bootloader = '/usr/bin/pygrub'
memory = 2048
name = "ubuntuPV"
vif = [ 'bridge=eth0' ]
disk = [ 'phy:/dev/vgxen/ubuntu,xvda1,w', 'phy:/dev/vgxen/ubuntu-swap,xvdb1,w' ]

At this point i had to bring /etc/apt/sources.list from remote Intrepid Server installed on bare metal.

# apt-get update

Run tasksel at DomU to install Basic Ubuntu Server and OpenSSHserver. Rebooted DomU:-

# apt-get upgrade






  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值