Hello, I have recently ported bproc [1] which part of clustermatic [2] suite to xen-2.0 [3] to run on domain0. It was pretty straightforward, that it required few trival hacks to the kernel, few sym-links and remembering to use "ARCH=xen" whenever appropriate.
However, clustermatic does use linuxbios on its nodes for booting and does not use traditional bios at all. This means that the grub (with its multiboot support) with its heavy dependencies on PC-BIOS Is out of window.
Thus I'm trying to figure out how I could boot xen/linux-2.6.8.1-xen0 duo on nodes. Are there any other options to boot it besides using grub[4][5]? and preferably does not rquire multiboot [6].
I figure out I that maybe could load xen.gz [7] using FILO, Kexec, or maybe etherboot but it still would not load linux kernel in turn (because of the dependency on multiboot).
Anyone knows what are my options here? Ideas?
[1] http://bproc.sourceforge.net/ [2] http://www.clustermatic.org/ [3] http://www.cl.cam.ac.uk/Research/SRG/netos/xen/ [4] grub configuration file entry for xen
title Xen 2.0 / XenLinux 2.6.8.1 kernel (hd0,0)/boot/xen.gz dom0_mem=65536 module (hd0,0)/boot/vmlinuz-2.6.8.1-xen0 root=/dev/hda1
[5] grub-multiboot, from info page
- Command: module file ... Load a boot module FILE for a Multiboot format boot image (no interpretation of the file contents are made, so the user of this command must know what the kernel in question expects). The rest of the line is passed as the "module command-line", like the `kernel' command. You must load a Multiboot kernel image before loading any module. See also *Note modulenounzip::.
[6] http://www.gnu.org/software/grub/manual/multiboot/multiboot.html does anyone knows better references to multiboot specs?
[7] /boot/xen.gz
redbull:/etc/clustermatic # file /boot/xen.gz /boot/xen.gz: gzip compressed data, from Unix, max compression
redbull:/etc/clustermatic # file /tmp/xen /tmp/xen: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
redbull:/etc/clustermatic # readelf -a /tmp/xen ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: Intel 80386 Version: 0x1 Entry point address: 0x100000 Start of program headers: 52 (bytes into file) Start of section headers: 266608 (bytes into file) Flags: 0x0 Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 1 Size of section headers: 40 (bytes) Number of section headers: 3 Section header string table index: 2
Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .text PROGBITS 00100000 000080 0410f0 00 WAX 0 0 64 [ 2] .shstrtab STRTAB 00000000 0411e8 000011 00 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific)
Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x000080 0x00100000 0x00100000 0x410f0 0x764c0 RWE 0x40
Section to Segment mapping: Segment Sections... 00 .text
There is no dynamic segment in this file.
There are no relocations in this file.
There are no unwind sections in this file.
No version information found in this file. redbull:/etc/clustermatic #
Thus I'm trying to figure out how I could boot xen/linux-2.6.8.1-xen0 duo on nodes. Are there any other options to boot it besides using grub[4][5]? and preferably does not rquire multiboot [6].
I figure out I that maybe could load xen.gz [7] using FILO, Kexec, or maybe etherboot but it still would not load linux kernel in turn (because of the dependency on multiboot).
ok, so I I grabbed kexec-tools-1.98, then I patched it with this patch
http://www.tjd.phlegethon.org/software/kexec-multiboot.patch
and I got an kexec kernel that supports multiboot. Now the fun thing is that on laptop it just works fine, as it should, but on an another machine the same setup results in reboot instead of starting a new kernel. weird stuff.
ideas ?
monte: entry point (protected mode): 0x100000 Linux version 2.6.8.1-kexec-ituner (root@redbull) (gcc version 3.3.3 (SuSE Linux)) #6 Sat Nov 6 14:58:34 MST 2004 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 0000000000000b40 (reserved) BIOS-e820: 0000000000000b40 - 00000000000a0000 (usable) BIOS-e820: 0000000000100000 - 0000000010000000 (usable) 256MB LOWMEM available. DMI not present. ACPI: Unable to locate RSDP Built 1 zonelists Kernel command line: console=ttyS0,19200 root=/dev/nfs nfsroot=10.0.10.5:/ ip=10.0.10.103:10.0.10.5:10.0.10.5:255.255.255.0:node2:eth0:off init=/bin/sh Initializing CPU#0 PID hash table entries: 2048 (order 11: 16384 bytes) Detected 533.502 MHz processor. Using tsc for high-res timesource Console: colour dummy device 80x25 Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) Memory: 255300k/262144k available (1108k kernel code, 6100k reserved, 371k data, 100k init, 0k highmem) Checking if this processor honours the WP bit even in supervisor mode... Ok. Calibrating delay loop... 1048.57 BogoMIPS Mount-cache hash table entries: 512 (order: 0, 4096 bytes) CPU: L1 I Cache: 64K (32 bytes/line), D cache 64K (32 bytes/line) CPU: L2 Cache: 64K (32 bytes/line) CPU: Centaur VIA Samuel 2 stepping 03 Checking 'hlt' instruction... OK. Checking for popad bug... OK. checking if image is initramfs... it is Freeing initrd memory: 1588k freed NET: Registered protocol family 16 PCI: Using configuration type 1 Linux Plug and Play Support v0.97 (c) Adam Belay PCI: Probing PCI hardware PCI: Probing PCI hardware (bus 00) PCI: Using IRQ router VIA [1106/8231] at 0000:00:11.0 isapnp: Scanning for PnP cards... isapnp: No Plug & Play device found Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize via-rhine.c:v1.10-LK1.1.20-2.6 May-23-2004 Written by Donald Becker PCI: Found IRQ 11 for device 0000:00:12.0 IRQ routing conflict for 0000:00:11.2, have irq 12, want irq 11 IRQ routing conflict for 0000:00:11.3, have irq 12, want irq 11 eth0: VIA Rhine II at 0x1800, 00:40:63:cc:0e:d9, IRQ 11. eth0: MII PHY found at address 1, status 0x786d advertising 05e1 Link 45e1. mice: PS/2 mouse device common for all mice i8042.c: Can't read CTR while initializing i8042. NET: Registered protocol family 2 IP: routing cache hash table of 2048 buckets, 16Kbytes TCP: Hash tables configured (established 16384 bind 32768) NET: Registered protocol family 17 eth0: Setting full-duplex based on MII #1 link partner capability of 45e1. IP-Config: Complete: device=eth0, addr=10.0.10.103, mask=255.255.255.0, gw=10.0.10.5, host=node2, domain=, nis-domain=(none), bootserver=10.0.10.5, rootserver=10.0.10.5, rootpath= Looking up port of RPC 100003/2 on 10.0.10.5 Looking up port of RPC 100005/1 on 10.0.10.5 VFS: Mounted root (nfs filesystem) readonly. Freeing unused kernel memory: 100k freed
sh-2.05b#
sh-2.05b# /sbin/kexec
No kernel specified kexec 1.98 released 15 September 2004 Usage: kexec [OPTION]... [kernel] Directly reboot into a new kernel
-h, --help Print this help. -v, --version Print the version of kexec. -f, --force Force an immediate kexec, don't call shutdown. -x, --no-ifdown Don't bring down network interfaces. (if used, must be last option specified) -l, --load Load the new kernel into the current kernel. -u, --unload Unload the current kexec target kernel. -e, --exec Execute a currently loaded kernel. -t, --type=TYPE Specify the new kernel is of this type.
Supported kernel file types and options: multiboot-x86 --command-line=STRING Set the kernel command line to STRING. --module="MOD arg1 arg2..." Load module MOD with command-line "arg1..." (can be used multiple times). --reset-vga Include code to set VGA text mode 3. (use this flag at load time). elf32-x86 --command-line=STRING Set the kernel command line to STRING --append=STRING Set the kernel command line to STRING --initrd=FILE Use FILE as the kernel's initial ramdisk. --ramdisk=FILE Use FILE as the kernel's initial ramdisk. --args-linux Pass linux kernel style options --args-elf Pass elf boot notes bzImage -d, --debug Enable debugging to help spot a failure. --real-mode Use the kernels real mode entry point. --command-line=STRING Set the kernel command line to STRING. --append=STRING Set the kernel command line to STRING. --initrd=FILE Use FILE as the kernel's initial ramdisk. --ramdisk=FILE Use FILE as the kernel's initial ramdisk.
sh-2.05b# sh-2.05b# /sbin/kexec --load /boot/xen-full --type=multiboot-x86 \
--command-line="dom0_mem=65536" \ --module="/boot/vmlinuz-2.6.8.1-xen0-full
root=/dev/hda1" Cannot open /proc/iomem: No such file or directory Could not get memory layout
sh-2.05b#
sh-2.05b# mount /proc
sh-2.05b#
sh-2.05b# cat /proc/iomem
00000000-00000b3f : reserved 00000b40-0009ffff : System RAM 000a0000-000bffff : Video RAM area 000f0000-000fffff : System ROM 00100000-0fffffff : System RAM 00100000-00215068 : Kernel code 00215069-00271e9f : Kernel data feb00000-feb000ff : 0000:00:12.0 feb00000-feb000ff : via-rhine
sh-2.05b#
sh-2.05b# cat /proc/mounts
rootfs / rootfs rw 0 0 /dev/root / nfs ro,v2,rsize=4096,wsize=4096,hard,udp,nolock,addr=10.0.10.5 0 0 proc /proc proc rw,nodiratime 0 0
sh-2.05b# touch /x
touch: cannot touch `/x': Read-only file system
sh-2.05b# /sbin/kexec --load /boot/xen-full --type=multiboot-x86 \
--command-line="dom0_mem=65536" \ --module="/boot/vmlinuz-2.6.8.1-xen0-full root=/dev/hda1"
kexec_load succeeded (multiboot-x86)
sh-2.05b# /sbin/kexec -e
Starting new kernel
LinuxBIOS-1.1.6.0Fallback Wed Mar 24 14:39:17 MST 2004 starting... vt8601 init starting Slot 00 is SDRAM 10000000 bytes Slot 01smbus_error: 04 Device Error is empty Slot 02smbus_error: 04 Device Error is empty Slot 03smbus_error: 04 Device Error is empty vt8601 done LinuxBIOS-1.1.6.0Fallback Wed Mar 24 14:39:17 MST 2004 booting...