bootable image problem

From: Sergey Lyubka <devnull_at_uptsoft.com>
Date: Thu, 5 Aug 2004 16:39:46 +0300
I am trying to create an bootable image, this is a script
that does the job:

==== cut here 

MD=/dev/md0
dd if=/dev/zero of=img count=8 bs=1m 2>/dev/null
mdconfig -a -t vnode -u 0 -f img
bsdlabel -Bw $MD
bsdlabel $MD | sed -e '/  c:/{p;s/c:/a:/;}' | bsdlabel -R $MD /dev/stdin
newfs -m 0 -o space -f 512 -b 4096 ${MD}a > /dev/null
mkdir dsk
mount ${MD}a `pwd`/dsk
trap "umount ${MD}a ; mdconfig -d -u 0; rm -rf dsk; " EXIT

cp /boot/kernel/kernel dsk/kernel
mkdir dsk/boot
cp /boot/loader* dsk/boot/

===== cut here

Booting this image with qemu, I see this:
FreeBSD/i386 boot
Default: 0:ad(0,a)/boot/loader
boot: No /boot/loader

Trying to boot /kernel, I see this:
boot: error 12 lba 1008
Invalid format

Any hints ?
Received on Thu Aug 05 2004 - 11:39:48 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:04 UTC