Embedded MD_ROOT don't work under FreeBSD 5.3 RELEASE

plan9 ritchie plan9 at bsdmail.com
Wed Nov 10 17:24:28 PST 2004


Hi,All

   Yestoday, I'd upgraded my box to FreeBSD 5.3 RELEASE, but I found
it seems the Embedded MD_ROOT doesn't work fine. 

My kernel config: 
=============================================================== 
machine i386 
cpu I486_CPU 
cpu I586_CPU 
cpu I686_CPU 
ident MINI 

device pf 
device pflog 
options ALTQ 
options ALTQ_RED 

# To statically compile in device wiring instead of
/boot/device.hints 
#hints "GENERIC.hints" # Default places to look for
devices. 

options SCHED_4BSD # 4BSD scheduler 
options INET # InterNETworking 
options FFS # Berkeley Fast Filesystem 
options PSEUDOFS 
options MD_ROOT # MD is a potential root device 
options MD_ROOT_SIZE=4096 # 4M 
options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] 
options COMPAT_FREEBSD4 # Compatible with FreeBSD4 
options NO_SWAPPING 

device apic # I/O APIC 

# Bus support. Do not remove isa, even if you have no isa slots 
device isa 
device pci 

device vga # VGA video card driver 

device splash # Splash screen and screen saver support 

# syscons is the default console driver, resembling an SCO console 
device sc 

device atkbdc 
device atkbd 

# Floating point support - do not disable. 
device npx 

# Serial (COM) ports 
device sio # 8250, 16[45]50 based serial ports 

device miibus # MII bus support 
device fxp # Intel EtherExpress PRO/100B (82557, 82558) 
device pcn # AMD Am79C97x PCI 10/100 (precedence over 'lnc') 
device lnc # NE2000 
device re # RealTek 8139C+/8169/8169S/8110S 
device rl # RealTek 8129/8139 
device sis # Silicon Integrated Systems SiS 900/SiS 7016 
device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') 

# Pseudo devices. 
device loop # Network loopback 
device mem # Memory and kernel memory devices 
device io # I/O device 
device random # Entropy device 
device ether # Ethernet support 
device sl # Kernel SLIP 
device ppp # Kernel PPP 
device tun # Packet tunnel. 
device pty # Pseudo-ttys (telnet etc) 
device md # Memory "disks" 

device bpf # Berkeley packet filter 
=============================================================== 

I made a mfs_image in follow steps: 

# dd if=/dev/zero of=mfs_image bs=1k count=4096 
# mdconfig -a -t vnode -f mfs_image -u 0 
# fdisk -B /dev/md0 
# disklabel -Brw /dev/md0 
# newfs -O1 -o space -m 0 /dev/md0a 
# mount /dev/md0a /mnt 

After that, copy file that needed into /mnt 

# umount /dev/md0a 
# mdconfig -d -u 0 
# strings -at d kernel | grep "MFS Filesystem goes here" 
1858112 MFS Filesystem goes here 
# expr 1858112 + 8192 
1866304 
# dd if=mfs_image ibs=8192 iseek=1 of=kernel obs=1866304 oseek=1
conv=notrunc 

But when I load my 'kernel' with /boot/loader and boot my box, the
kernel prompt me: 
-------------------------------- 
Mounting root from ufs:/dev/md0a 
setrootbyname failed 
ffs_mountroot: can't find rootvp 
Root mount failed: 6 
Mounting root from ufs:/dev/md0 
Root mount failed: 22 
-------------------------------- 

The commands I typed in load prompt are: 

OK unload 
OK load /kernel 
OK set vfs.root.mountfrom=ufs:/dev/md0a 
OK boot 

Could you help me? I'll be very appreciate! 

--
   __o
 _ \<_  Plan9
(_)/(_)

-- 
_______________________________________________
Get your free email from http://mymail.bsdmail.com

Powered by Outblaze


More information about the freebsd-hackers mailing list