|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
dkwok_at_iware.com.au
Date: Tue Aug 06 2002 - 16:13:08 CDT
Hi Folks,
I am experimenting to do mini BSD. I have read a few articles embsd,
mybsd, picoBSD, etc. However, I like the idea which was used to produce
OBSD installation disk, floppy31.fs.
Of course, I have problems in booting up the resulting image. When I boot
the system with the compiled kernel. I have these messages:
entry point at 0x100020
fatal page fault in supervisor mode
trap type 6 code e0fa0000 eip e01a5ab5 cs fe0008 efalgs 1020 cr2 dff84128
cp1 0panic= trap type 6 code= e0fe0000, pc-e01a5ab5
This is what I did. I downloaded the source tree src.tar.gz and use the
miniroot from /usr/src/distrib/ as the base and added some more files like
pfauth etc. I follow what is in the Makefile to produce an image of the
miniroot.
The question I have is that when using vnconfig to creat a vnode device. I
do not what is the disk geometry or does it have to be the same as the
geometry of the medium the miniroot would eventually be installed. The
disklabel entry will also be depended on geometry of the device.
My miniroot is 12.5M large so I created a virtual disk of 14M, 28000 sectors.
vnconfig -c -v svnd0 miniroot
fdisk -e svnd0 # is it necessary to do this step
disklabel -E svnd0 # not too sure what this, will depend on fdisk's result
newfs -m 0 -o space /dev/svnd0a
mount /dev/svnd0a /mnt
then I copy the miniroot to /mnt
umount /mnt
vnconfig -u svnd0
Now I have a miniroot image, miniroot
In my kernel config, I set MINIROOTSIZE=28000
and compile the kernel
The compiled kernel is stuffed with the miniroot
rdsetroot bsd < miniroot
then strip the stuffed kernel by strip bsd
then compress gzip -9 bsd > bsd.gz
I then copy this bsd.gz to my compact flash card as follow
the compact flash card is 32M
fdisk -e wd1
I set the geometry same as what bios detected cyl 500 head 8 sector 16
and flag partition as active and type a6, openbsd.
disklabel is as follows:
a: 64000 0 4.2BSD 1024 8192 16 # this may be incorrect???
c: 64000 0 unused 0 0
newfs -m 0 -o space /dev/wd1a
mount /dev/wd1a /mnt
cp bsd /mnt/bsd
cp /usr/mdec/boot /mnt/boot
/usr/mdec/installboot /mnt/boot /usr/mdec/biosboot /dev/rwd1c
then umount /mnt
reboot
So folks, that was my journey so far. If anyone can give me some pointers
I will be much appreciated.
David Kwok
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]