md-disk as root file system,size limit!?
Xinyu Dong
iamdxy at gmail.com
Tue Feb 19 02:18:27 UTC 2008
I want use md-disk as root file system.
OS: FreeBSD 6.2-RELEASE
Environment = VMWare (Version 5) and Computer (CPU=Intel P4 2.4G,
Memory=Kingston 1G DDR400, Storage=2G CF)
create a less-than 100MB of image (image for ramdisk, mfs root)
The loader.rc {
load kernel // The kernel used 6.2 GENERIC
load -t mfs_root /image // dd if=/dev/zero of=/image bs=1k
count=95k
}
above config can boot normal.
create a greater than 100MB of image (image for ramdisk, mfs root)
The loader.rc {
load kernel // The kernel used 6.2 GENERIC
load -t mfs_root /image // dd if=/dev/zero of=/image bs=1k
count=128k
}
above config can't boot normal, reboot immediately.
create a equal 100MB or equal 99MB of image (image for ramdisk, mfs root)
The loader.rc {
load kernel // The kernel used 6.2 GENERIC
load -t mfs_root /image // dd if=/dev/zero of=/image bs=1k
count=100k (or count=99k)
}
above config can't boot normal, kernel panic.
[TEST] system up normally [GENERIC KERNEL]:
My Step:
1. dd if=/dev/zero of=/image bs=1k count=128k
2. mdconfig -a -t vnode -f /image -u 0
3. bsdlabel -Bw /dev/md0 auto
4. newfs /dev/md0a
5. mount /dev/md0a /mnt
df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1a 23G 1.5G 20G 7% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/md0a 124M 4.0K 114M 0% /mnt
system not panic.
but config loader.rc, add "load -t mfs_root /image" or "load -t md_image
/image" will panic.
I tried configuring the kernel, change MD_ROOT_SIZE and
MAXDSIZ=(1024UL*1024*1024); MAXSSIZ=(512UL*1024*1024);
DFLDSIZ=(1024UL*1024*1024), panic still.
Can I use 128MB mddisk?
Who can help me~~
Thanks
More information about the freebsd-questions
mailing list