Restore of my Soekris 4801
It's not easy to write new and exciting things for a blog when all the
readers are NetBSD insiders, however, here might be something that you
don't know. Do you remember when I wrote about the backup of my Soekris
4801 box with dump(8) over ssh(1)? I used a remote pipe and dumped right
on stdout. The stream was piped into cat(1) and was written to a disk on
a remote computer. Hubert F. sent me a message on IRC and asked about
the restore - just to keep it handy at one place. Today I had some
sparetime and decided to play around with qemu in order to test the
restore. I was quite amazing about the results (ok, it just worked).
I booted the qemu with a spare 1GB disk space (same size as my Soekris
CF card) and the NetBSD installation ISO image file. Booting from the
image was quite standard, however, a lot of the tools for the restore
are lacking. No ssh, no rsh - you name it. I remembered that the NetBSD
ftp client implementation is able to fetch file by http. I looked inside
the ftp manpage and found a possibility to use a pipe for stdout with
ftp. I set up a small webserver on my laptop and provided the dump file
in one of it's directories. I was able to recover the qemu image by
restore over ftp. That's cool, eh?
# newfs /dev/wd0a [...] # mount /dev/wd0a /mnt # ftp -o '| (cd /mnt; restore xf -)' http://10.0.2.2/mybackupfile.dmpAs you could see inside the screenshot I am ready to restore the small Soekris device. It's not a problem to use a user account with password, of course. I really like this way to recover a crashed system. It's really simple - NetBSD alike. Please note that this kind of restore just recovers your filesystem. In order to get a booting device you have to installboot(8) the bootblocks.
# installboot -m i386 -oconsole=com0,ioaddr=0x3f8,speed=9600 \
/dev/wd0d /usr/mdec/bootxx_ffsv1
What's left? We need a small bootimage for netbooting a Soekris. I am
working on it.
