Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[PATCH] Make NetBSD/Xen Dom0 boot with root on nfs



Hi!

I have attached a patch, which lets me NetBSD/Xen Dom0 boot with root on nfs.
Just pass bootdev=<dev> ip=... and nfsroot=...  to the dom0 kernel in GRUB
in the same format as in a config file for a DomU.

I don't know, where this "boot device: <unknown>" comes from, even with bootdev 
specified, but at least it works.
If this bootdev is fixed, then booting from nfs is almost identical with Linux. 
Linux additionally supports ip=dhcp.

I also had to increase the max length of parseable commandline in order
to not truncate the string. The ip=... field is already a long string
and when you have a long nfsroot=... field, then you don't mount what you want.


Below is a snippet from my boot messages.

Please review and apply the patch.

Tnx,

Christoph



[...]
Kernelized RAIDframe activated
xenbus0: using event channel 16
atapibus0 at atabus4: 2 targets
cd0 at atapibus0 drive 1: <LITE-ON DVD SHD-16P1S, , GS05> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
wd0 at atabus4 drive 0: <WDC WD400BB-22JHC0>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 38166 MB, 77545 cyl, 16 head, 63 sec, 512 bytes/sect x 78165360 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(viaide1:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)
cd0(viaide1:0:1): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
Searching for RAID components...
boot device: <unknown>
root device: help
use one of: ex0 cd0[a-p] wd0[a-p] ddb halt reboot
root device: ex0
dump device: none
file system (default generic): nfs
root on ex0
nfs_boot: trying static
nfs_boot: client_addr=192.168.85.12
nfs_boot: gateway=192.168.85.254
nfs_boot: netmask=192.168.85.0
nfs_boot: server=192.168.85.14
nfs_boot: root=192.168.85.14:/vol/osrc_data/nfsroot/netbsd-i386-fricka-cegger
root on 192.168.85.14:/vol/osrc_data/nfsroot/netbsd-i386-fricka-cegger
root time: 0x467bbb98
warning: no /dev/console
init path (default /sbin/init): 
init: copying out path `/sbin/init' 11
Created mfs /dev (433 blocks, 1266 inodes)
ex0: transmit underrun (9000) @20
Thu Jun 21 12:11:43 UTC 2007
Checking for botched superblock upgrades: done.
Starting file system checks:
mount: /: unknown special file or file system.
Setting tty flags.
Setting sysctl variables:
Starting network.
Hostname: fricka
IPv6 mode: host
Configuring network interfaces:.
add net default: gateway 192.168.85.254
Adding interface aliases:
Building databases: dev, utmp, utmpx done
Starting syslogd.
Checking for core dump...
savecore: can't find device 1039/26852
Jun 21 12:11:46 fricka savecore: can't find device 1039/26852
Mounting all filesystems...
mount: realpath /kern: No such file or directory
Clearing temporary files.
Creating a.out runtime link editor directory cache.
Checking quotas: done.
[...]
Starting inetd.
Starting cron.
ex0: transmit underrun (9000) @20
Thu Jun 21 12:11:48 UTC 2007

NetBSD/i386 (fricka) (console)

login:

Attachment: dom0_root_on_nfs.diff
Description: Binary data



Home | Main Index | Thread Index | Old Index