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

89231441 2010-04-11

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-ivhdebootstrap-1.0.8-1.fc9.noarch.rpm

PrepareLVMsforinstall:-

#lvcreate-nubuntu-L12G/dev/vgxen

#lvcreate-nubuntu-swap-L4G/dev/vgxen

#mke2fs-j/dev/vgxen/ubuntu

#mkswap/dev/vgxen/ubuntu-swap

#mkdir-p/mnt/xen

#mount/dev/vgxen/ubuntu/mnt/xen

Createmissingsymlink:-

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

/usr/share/debootstrap/scripts/intrepid

**************************

Updateon01/09/2008

**************************

Fedora10’sdebootstrap-1.0.10-1.fc10.noarch.rpmhasthissymlinkalreadycreated.Moreoverdebootstrap-1.0.10-1.fc10.noarch.rpmbeeninstalledonXen3.3.1openSUSE11.1Dom0providecomletelyfunctionaldebootstraputilitytocreateIntrepidServer,HardyHeronPVDomUsatopenSUSE11.1Dom0inthesamewayasdescribedbellow.

DeboostrapnewIntrepidGuest:-

#debootstrap--arch=amd64\

--include=linux-image-server,grub\

--components=main,universe,multiverseintrepid\

/mnt/xenhttp://us.archive.ubuntu.com/ubuntu/

Oncethathasfinishedchrootintothenewdebootstrappedtree:-

#chroot/mnt/xen

#exportLANG=C

Create/etc/fstab:

#cat/etc/fstab

/dev/xvda1/ext3defaults01

/dev/xvdb1noneswapdefaults00

proc/procprocdefaults00

CreateafolderforGRUBmenuandupdatetheconfig

#mkdir-p/boot/grub

#update-grub

Edit/boot/grub/menu.lst

-add“console=hvc0″tobothkernellines(normalandrecoverymode)

SetupagettyontheXenconsole(hvc0):

#cd/etc/event.d

#cptty1hvc0

#sed-i-e"s/tty1/xvc0/g"hvc0

Removereferencestothehardwareclock;thesewillcausetheDomUtohang:

#update-rc.d-fhwclockfirstremove

#update-rc.d-fhwclockremove

#rm/etc/udev/rules.d/85-hwclock.rules

Configurenetworkinterfaces(/etc/network/interfaces):-

#cat/etc/network/interfaces

#Usedbyifup(8)andifdown(8).Seetheinterfaces(5)manpageor

#/usr/share/doc/ifupdown/examplesformoreinformation.

autolo

ifaceloinetloopback

autoeth0

ifaceeth0inetdhcp

Create/etc/hostsfile

#cat/etc/hosts

127.0.0.1localhost

127.0.1.1IntrepidPVH

Create/etc/hostnamefile

#cat/etc/hostname

IntrepidPVH

Exitchrootandunmountthefilesystem.

#exit

#umount/mnt/xen

StartDomUviaprofile:-

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']

Atthispointihadtobring/etc/apt/sources.listfromremoteIntrepidServerinstalledonbaremetal.

#apt-getupdate

RuntaskselatDomUtoinstallBasicUbuntuServerandOpenSSHserver.RebootedDomU:-

#apt-getupgrade

相关推荐

88580090 / 0评论 2012-02-20