Pygrub&Loading Ubuntu Intrepid Server PV DomU via serial console at Xen 3.3 CentOS 5.2 Dom0

To load Ubuntu Intrepid Server PV DomU via serial console files vmlinuz-2.6.27-7-server,initrd.img-2.6.27-7-server usually get copied to Xen 3.3 Dom0 and parameters root=”/dev/xvda1 ro”, extra=”2 hvc0″ are included into startup profile. In general , created profile should look like:-

[root@ServerCentOS52 vm]# cat intrepid.conf
memory = 4096
name = “IntrepidPV”
kernel=”/etc/xen/vm/vmlinuz-2.6.27-7-server”
ramdisk=”/etc/xen/vm/initrd.img-2.6.27-7-server”
root=”/dev/xvda1 ro”
extra = ‘2 console=hvc0’
vif = [ ‘mac=00:16:3e:00:00:00’ ]
disk = [ ‘phy:/dev/sdb14,xvda,w’]

At the same time “root” & “extra” may be specified via new entry into /boot/grub/menu.lst located at DomU. File /etc/event.d/tty1 should be also modified to work for xen console instead of vfb.
It’s exec line has to reference hvc0 instead of tty1. All changes above been done at DomU allow to load DomU via pygrub and serial console avoiding using virtual frame buffer. First virt-install Ubuntu Intrepid Server HVM DomU and create a new entry into /boot/grub/menu.lst :-

title Ubuntu 8.10 (hvc0) , kernel 2.6.27-7-server
kernel /boot/vmlinuz-2.6.27-7-server root=/dev/xvda1 ro 2 console=hvc0
initrd /boot/initrd.img-2.6.27-7-server
quiet

Next modify /etc/event.d/tty1 as follows

# cat /etc/event.d/tty1
# tty1 – getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.

start on stopped rc2
start on stopped rc3
start on stopped rc4
start on stopped rc5

stop on runlevel 0
stop on runlevel 1
stop on runlevel 6

respawn
exec /sbin/getty 38400 hvc0

Create following pygrub profile at Xen 3.3 CentOS 5.2 Dom0

[root@ServerCentOS52 vm]# cat intrepid.py
memory = 4096
name = “IntrepidPV”
bootloader=”/usr/bin/pygrub”
vif = [ ‘mac=00:16:3e:00:00:00’ ]
disk = [ ‘phy:/dev/sdb14,xvda,w!’]

Start Ubuntu Intrepid Server PV DomU via command line :-

# xm create -c intrepid.py



Started domain IntrepidPVC
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.27-7-server (buildd@yellow) (gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu10) ) #1 SMP Fri Oct 24 07:20:47 UTC 2008 (Ubuntu 2.6.27-7.14-server)
[ 0.000000] Command line: root=/dev/xvda1 ro 2 console=hvc0
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] ACPI in unprivileged domain disabled
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] Xen: 0000000000000000 – 00000000000a0000 (usable)
[ 0.000000] Xen: 00000000000a0000 – 0000000000100000 (reserved)
[ 0.000000] Xen: 0000000000100000 – 000000000241e000 (usable)
[ 0.000000] Xen: 000000000241e000 – 0000000002c21000 (reserved)
[ 0.000000] Xen: 0000000002c21000 – 0000000100000000 (usable)
[ 0.000000] last_pfn = 0x100000 max_arch_pfn = 0x3ffffffff
[ 0.000000] init_memory_mapping
[ 0.000000] last_map_addr: 100000000 end: 100000000
[ 0.000000] RAMDISK: 008b7000 – 0241e000
[ 0.000000] DMI not present or invalid.
[ 0.000000] No NUMA configuration found
[ 0.000000] Faking a node at 0000000000000000-0000000100000000
[ 0.000000] Bootmem setup node 0 0000000000000000-0000000100000000
[ 0.000000] NODE_DATA [0000000000001000 – 0000000000005fff]
[ 0.000000] bootmap [0000000000008000 – 0000000000027fff] pages 20
[ 0.000000] (6 early reservations) ==> bootmem [0000000000 – 0100000000]
[ 0.000000] #0 [0000000000 – 0000001000] BIOS data page ==> [0000000000 – 0000001000]
[ 0.000000] #1 [0000006000 – 0000008000] TRAMPOLINE ==> [0000006000 – 0000008000]
[ 0.000000] #2 [0002c21000 – 0002c3c000] XEN PAGETABLES ==> [0002c21000 – 0002c3c000]
[ 0.000000] #3 [0000200000 – 00008b6f9c] TEXT DATA BSS ==> [0000200000 – 00008b6f9c]
[ 0.000000] #4 [00008b7000 – 000241e000] RAMDISK ==> [00008b7000 – 000241e000]
[ 0.000000] #5 [0002c3c000 – 0003423000] PGTABLE ==> [0002c3c000 – 0003423000]
[ 0.000000] Zone PFN ranges:
[ 0.000000] DMA 0x00000000 -> 0x00001000
[ 0.000000] DMA32 0x00001000 -> 0x00100000
[ 0.000000] Normal 0x00100000 -> 0x00100000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] early_node_map[3] active PFN ranges
[ 0.000000] 0: 0x00000000 -> 0x000000a0
[ 0.000000] 0: 0x00000100 -> 0x0000241e
[ 0.000000] 0: 0x00002c21 -> 0x00100000
[ 0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs
[ 0.000000] No local APIC present
[ 0.000000] PM: Registered nosave memory: 00000000000a0000 – 0000000000100000
[ 0.000000] PM: Registered nosave memory: 000000000241e000 – 0000000002c21000
[ 0.000000] PCI: Warning: Cannot find a gap in the 32bit address range
[ 0.000000] PCI: Unassigned devices with 32bit resource registers may break!
[ 0.000000] Allocating PCI resources starting at 100200000 (gap: 100100000:400000)
[ 0.000000] PERCPU: Allocating 64928 bytes of per cpu data
[ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 1028324
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: root=/dev/xvda1 ro 2 console=hvc0
[ 0.000000] Initializing CPU#0
[ 0.000000] PID hash table entries: 4096 (order: 12, 32768 bytes)
[ 0.000000] Detected 3005.554 MHz processor.
[ 0.010000] Console: colour dummy device 80×25
[ 0.010000] console [tty0] enabled
[ 0.010000] console [hvc0] enabled
[ 0.010000] Checking aperture…
[ 0.010000] No AGP bridge found
[ 0.010000] Memory: 4076624k/4194304k available (3110k kernel code, 109092k reserved, 1573k data, 536k init)
[ 0.010000] SLUB: Genslabs=13, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.010000] installing Xen timer for CPU 0
[ 0.010000] Calibrating delay loop (skipped), value calculated using timer frequency.. 6011.10 BogoMIPS (lpj=30055540)
[ 0.010000] Security Framework initialized
[ 0.010000] SELinux: Disabled at boot.
[ 0.010000] AppArmor: AppArmor initialized
[ 0.010000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[ 0.010000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.010000] Mount-cache hash table entries: 256
[ 0.010000] Initializing cgroup subsys ns
[ 0.010000] Initializing cgroup subsys cpuacct
[ 0.010000] Initializing cgroup subsys memory
[ 0.010000] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 0.010000] CPU: L2 cache: 6144K
[ 0.010000] CPU 0/0 -> Node 0
[ 0.010000] CPU: Physical Processor ID: 0
[ 0.010000] CPU: Processor Core ID: 0
[ 0.010000] SMP alternatives: switching to UP code
[ 0.016819] Freeing SMP alternatives: 24k freed
[ 0.016873] cpu 0 spinlock event irq 1
[ 0.016934] Brought up 1 CPUs
[ 0.017188] net_namespace: 1552 bytes
[ 0.017194] Booting paravirtualized kernel on Xen
[ 0.017198] Xen version: 3.3.0 (preserve-AD)
[ 0.017297] Grant table initialized
[ 0.037323] Time: 165:165:165 Date: 165/165/65
[ 0.037347] NET: Registered protocol family 16
[ 0.037569] PCI: Fatal: No config space access function found
[ 0.037569] ACPI: Interpreter disabled.
[ 0.037569] Linux Plug and Play Support v0.97 (c) Adam Belay
[ 0.037569] pnp: PnP ACPI: disabled
[ 0.037569] xen_balloon: Initialising balloon driver.
[ 0.037569] PCI: System does not support PCI
[ 0.037569] PCI: System does not support PCI
[ 0.070047] NET: Registered protocol family 8
[ 0.070052] NET: Registered protocol family 20
[ 0.070085] NetLabel: Initializing
[ 0.070089] NetLabel: domain hash size = 128
[ 0.070092] NetLabel: protocols = UNLABELED CIPSOv4
[ 0.070105] NetLabel: unlabeled traffic allowed by default
[ 0.070110] PCI-GART: No AMD northbridge found.
[ 0.070433] tracer: 1286 pages allocated for 65536 entries of 80 bytes
[ 0.070437] actual entries 65586
[ 0.070503] AppArmor: AppArmor Filesystem Enabled
[ 0.070895] NET: Registered protocol family 2
[ 0.160184] IP route cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.161365] TCP established hash table entries: 524288 (order: 11, 8388608 bytes)
[ 0.164014] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[ 0.164527] TCP: Hash tables configured (established 524288 bind 65536)
[ 0.164532] TCP reno registered
[ 0.190084] NET: Registered protocol family 1
[ 0.190167] checking if image is initramfs… it is
[ 0.208809] Freeing initrd memory: 28060k freed
[ 0.217885] platform rtc_cmos: registered platform RTC device (no PNP device found)
[ 0.218191] audit: initializing netlink socket (disabled)
[ 0.218206] type=2000 audit(1225392379.174:1): initialized
[ 0.222493] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 0.224779] VFS: Disk quotas dquot_6.5.1
[ 0.224856] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.224950] msgmni has been set to 8246
[ 0.225049] io scheduler noop registered
[ 0.225053] io scheduler anticipatory registered
[ 0.225057] io scheduler deadline registered (default)
[ 0.225174] io scheduler cfq registered
[ 0.252707] Linux agpgart interface v0.103
[ 0.252717] Serial: 8250/16550 driver4 ports, IRQ sharing enabled
[ 0.254426] brd: module loaded
[ 0.254485] input: Macintosh mouse button emulation as /devices/virtual/input/input0
[ 0.254632] PNP: No PS/2 controller found. Probing ports directly.
[ 0.255454] i8042.c: No controller found.
[ 0.270626] mice: PS/2 mouse device common for all mice
[ 0.270673] rtc_cmos: probe of rtc_cmos failed with error -16
[ 0.270747] cpuidle: using governor ladder
[ 0.270751] cpuidle: using governor menu
[ 0.270993] TCP cubic registered
[ 0.271009] IO APIC resources could be not be allocated.
[ 0.271167] registered taskstats version 1
[ 0.271177] XENBUS: Device with no driver: device/vbd/51712
[ 0.271180] XENBUS: Device with no driver: device/vif/0
[ 0.271184] XENBUS: Device with no driver: device/console/0
[ 0.271194] Magic number: 1:252:3141
[ 0.271259] /build/buildd/linux-2.6.27/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 0.271265] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[ 0.271269] EDD information not available.
[ 0.271289] Freeing unused kernel memory: 536k freed
[ 0.271435] Write protecting the kernel read-only data: 4344k
Loading, please wait…
Couldnt get a file descriptor referring to the console
Begin: Loading essential drivers… …
[ 0.334434] fuse init (API version 7.9)
[ 0.390929] thermal: Unknown symbol acpi_processor_set_thermal_limit
Done.
Begin: Running /scripts/init-premount …
Done.
Begin: Mounting root file system… …
Begin: Running /scripts/local-top …
Done.
Begin: Waiting for root file system… …
[ 0.641252] xvda: xvda1 xvda2
Done.
Begin: Running /scripts/local-premount …
Begin: Waiting for resume device… …
Done.
Done.
[ 6.359270] kjournald starting. Commit interval 5 seconds
[ 6.359284] EXT3-fs: mounted filesystem with ordered data mode.
Begin: Running /scripts/local-bottom …
Done.
Done.
Begin: Running /scripts/init-bottom …
Done.
* Reading files needed to boot… [ OK ]
* Setting preliminary keymap… [ OK ]
* Setting the system clock
Cannot access the Hardware Clock via any known method.
Use the –debug option to see the details of our search for an access method.
* Unable to set System Clock to: Thu Oct 30 18:46:28 UTC 2008
* Starting basic networking… [ OK ]
* Starting kernel event manager… [ 10.102508] udevd version 124 started
[ OK ]
* Loading hardware drivers… [ 10.410203] input: PC Speaker as /devices/platform/pcspkr/input/input1
[ 10.473991] Initialising Xen virtual ethernet driver.
[ OK ]
* Setting the system clock
Cannot access the Hardware Clock via any known method.
Use the –debug option to see the details of our search for an access method.
* Unable to set System Clock to: Thu Oct 30 18:46:30 UTC 2008
* Loading kernel modules… * Loading manual drivers… [ 11.443347] loop: module loaded
[ 11.506793] lp: driver loaded but no devices found
[ OK ]
* Setting kernel variables (/etc/sysctl.conf)… [ OK ]
* Setting kernel variables (/etc/sysctl.d/10-console-messages.conf)… [ OK ]
* Setting kernel variables (/etc/sysctl.d/10-network-security.conf)… [ OK ]
* Setting kernel variables (/etc/sysctl.d/10-process-security.conf)… [ OK ]
* Setting kernel variables (/etc/sysctl.d/10-tcp-timestamps-workaround.c[ OK ]
* Setting kernel variables (/etc/sysctl.d/30-tracker.conf)… [ OK ]
* Activating swap… [ OK ]
* Checking root file system… fsck 1.41.3 (12-Oct-2008)
/dev/xvda1: clean, 108958/960992 files, 748148/3837519 blocks
[ OK ]
* Checking file systems… fsck 1.41.3 (12-Oct-2008)
[ OK ]
* Mounting local filesystems… [ OK ]
* Activating swapfile swap… [ OK ]
$Mounting securityfs on /sys/kernel/security: done.
Loading AppArmor profiles : done.
* Skipping firewall: ufw (not enabled)… [ OK ]
* Configuring network interfaces… [ OK ]
* Setting up console font and keymap… [ OK ]
* Starting system log daemon… [ OK ]
* Doing Wacom setup… cat: */id: No such file or directory
[ OK ]
* Starting kernel log daemon… [ OK ]
* Starting system message bus dbus [ OK ]
* Starting Avahi mDNS/DNS-SD Daemon avahi-daemon [ OK ]
* Starting OpenBSD Secure Shell server sshd [ OK ]
* Starting Common Unix Printing System: cupsd [ OK ]
* Starting powernowd… * CPU frequency scaling not supported… [ OK ]
* Starting internet superserver xinetd [ OK ]
* Starting Hardware abstraction layer hald [ OK ]
* Starting bluetooth [ OK ]
* Starting NetworkManager… [ 23.332212]
pan0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
[ OK ]
* Starting GNOME Display Manager… [ OK ]
* Starting System Tools Backends system-tools-backends [ OK ]
* Starting anac(h)ronistic cron anacron [ OK ]
* Starting deferred execution scheduler atd [ OK ]
* Starting periodic command scheduler crond [ OK ]
* Enabling additional executable binary formats binfmt-support [ OK ]
* Checking battery state… [ OK ]

Ubuntu 8.10 INTR hvc0

INTR login: root
Password:
Last login: Thu Oct 30 14:26:52 EDT 2008 on hvc0
Linux INTR 2.6.27-7-server #1 SMP Fri Oct 24 07:20:47 UTC 2008 x86_64

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
root@INTR:~# uname -a
Linux INTR 2.6.27-7-server #1 SMP Fri Oct 24 07:20:47 UTC 2008 x86_64 GNU/Linux

Now install Ubuntu Desktop via tasksel and setup VNC at PV DomU


One Response to Pygrub&Loading Ubuntu Intrepid Server PV DomU via serial console at Xen 3.3 CentOS 5.2 Dom0

  1. PC Hardware says:

    I looked around your blog and found your blog is superb. There are a lot of info for me to study, thanks for your great share.

Leave a comment