Re: tinybsd qemu small howto

From: OutbackDingo <outbackdingo_at_gmail.com>
Date: Tue, 13 Nov 2007 19:54:54 +0800
HAHAH sorry for the top post but I actually had a copy saved, so here it
is

installation ¶

install FreeBSD 7.0 ISO

Just the chapter installation from the FreeBSD handbook
fresh Build ¶

Since 7.0 in stable jet I suggest to build the lasted version. You can
skip this and can go to make tinybsd image.

update src

pkg_add -r cvsup-without-gui
cat /usr/share/examples/cvsup/standard-supfile | sed
s/CHANGE_THIS/<localmirror>/ > /root/sup

my localmirror is cvsup.nl5.freebsd.org since I live in the Netherlands.
Please find a local site.

cvsup /root/sup
cd /usr/src
sudo make buildworld

optional strip your kernel

cd /sys/i386/conf
sudo cp GENERIC MY_KERNEL
sudo vi MY_KERNEL 

build from src

cd /usr/src
sudo make buildkernel KERNCONF=MY_KERNEL
sudo make install KERNCONF=MY_KERNEL

reboot in single user mode

reboot
     1. choose single user mode in the bootmenu
mergemaster
cd /usr/src
make installworld
mergemaster -p
reboot 

update ports

sudo portsnap fetch
sudo portsnap extract

make tinybsd image ¶

cd /usr/src/tools/tools/tools/tinybsd
sudo ./tinybsd

maintaince on the image ¶

mount the file

sudo mdconfig -a -t vnode -t tinybsd.bin
     1. creating md0
sudo mount /dev/md0a /mnt

fix current bugs in tinybsd for example

sudo cp /etc/mtree/* /mnt/etc/mtree/

or the make ssh keys

sudo chroot /mnt
/etc/rc.d/sshd
exit

virutalization ¶

I use qemu to test my images.

installing qemu

cd /usr/ports/emulators/qemu
sudo make install 
option kqemu = yes

prepare network for qemu

I have fxp0 as a nic

ifconfig tun create
     1. creating tun0
ifconfig bridge create
     1. creating bridge 0
ifconfig bridge0 addm tun0 addm fxp0 up

load modules

kldload aio kqemu

booting the image in qemu

sudo qemu -hda tinybsd.bin -net nic -net tun
     1. bug!
ufs:ad0a

Distribution ¶

This make a smaller file for download and more important Window users
can write the file on flash or usb drive. See Manual Kaspers site for
monowall and specially physdiskwrite.

tar -cvjf tinybsd.bin.bz tinybsd.bin

writing to disk

     1. see dmesg for the correct disk
zcat tinybsd.bin.bz | dd of=/dev/<disk> bs=16k
Received on Tue Nov 13 2007 - 10:55:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:22 UTC