On Wed, Dec 16, 2009 at 10:47 AM, Nick Holland
<n...@holland-consulting.net> wrote:
> Aaron Mason wrote:
>> On Wed, Dec 16, 2009 at 6:51 AM, stan <st...@panix.com> wrote:
>>> OK with one resevation you have convinced me. Let's eliminate teh
>>> reservation. One of the features of the system I chose was that it mounts
>>> the flas RO, and uses memory filesystems for volatile stuff. Is this no
>>> longer important? I have 2 existing soekris systems that have been in
>>> service for years, and have not given any trouble. I want the new ones to
>>> be equally troubel free. Can i acomplish this with a stnadard install?
>>>
>>> second, I have no idea how to boot a Soekris box from install media.
There
>>> is no floppy, no CD... how do I acomplish this?
>>>
>>
>> Here's a solution I was told from #openbsd on Freenode, on your local
>> machine (assuming you run OpenBSD on a machine somewhere):
>
> Being that I don't suggest that people use mysterious commands they
> get off the Internet without fully understanding how they work,
> here's an alternative way that I think will help
>
> Try this:
>> 10) # insert CF card into a card reader
> ...on a standard PC.
> 11) Boot standard PC off install media (of whatever kind you want)
> 12) Install to the flash drive (probably sd0, but maybe not...), set
> up serial console.
> 13) move install media to production machine
> 14) boot either:
>  14a) single user mode
>  15a) fix fstab to point to /dev/wd0 instead of /dev/sd0
>  16a) fix hostname.* to point to your target machine's NICs
>  or
>  14b) bsd.rd and do your install natively
>  15b) grumble about how long it takes to install on a slow machine
>      and a slow flash drive
>  16b) realize that fixing hostname* and fstab is really quite simple
>
> (the "b" path is fewer steps listed, but takes longer, and is a
> completely wasted second install)
>
> 17) enjoy.
>
> You will note that my process is superior, because I have 17 steps
> instead of the proposed 14 steps, and thus much geekier.  Pay no
> attention to the fact that I started counting at 10...
>
> (yes, this process is probably a bit slower than that proposed, but
> it is very easy to understand what is going on for new users, I
> think).
>
> faq14.html has a lot of info about flash drives, both as data and
> boot media.
>
> Nick.
>
>

I suppose a few comments wouldn't have gone astray... my method works,
although its description is terse.  I did leave out a critical step
that would stop it in its tracks - I didn't tell it to boot the
ramdisk.

Let's try this again:

1) Create a file 20mb in size (20,480 blocks of 1024 bytes each) -
this will be our disk image.
# dd if=/dev/zero of=bsdrd-boot.img bs=1024 count=20480
2) Set the file up as disk device svnd0 so that we can create a
disklabel and mount it.
# vnconfig svnd0 bsdrd-boot.img
3) Create a disk label with a single partition that encompasses the entire
file:
# print 'z\na\n\n\n\n\nw\n' | disklabel -E svnd0
4) Create a filesystem on the image's single partition
# newfs svnd0a
5) Mount the image's partition to /mnt
# mount /dev/svnd0a /mnt
6) Copy the ramdisk kernel and boot binary to /mnt
# cp /bsd.rd /boot /mnt
7) Install the bootloader to the image
# /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot svnd0
8) Create a boot.conf file with defaults that tell it to use the
console and boot the ramdisk kernel
# mkdir /mnt/etc
# print 'stty com0 9600\nset tty com0\nboot hd0a:bsd.rd' > /mnt/etc/boot.conf
9) Unmount the volume
# umount /mnt
10) Insert CF card into a card reader
11) Copy the image to the CF card
# dd if=bsdrd-boot.img of=/dev/sdXc
12) Remove CF card and insert into your Soekris box
13) Connect a null modem cable into the Soekris box and your PC and
fire up your favourite terminal program
14) Turn the soekris box on
15) Do a net install via your terminal program
16) ...
17) Profit!

Mine is now as geeky as yours - and I started from 1. ^_^

I think a fresh install is better at first, since once the system is
up and running you could take an image from the CF card and change the
config files for another box.

--
Aaron Mason - Programmer, open source addict
I've taken my software vows - for beta or for worse

Reply via email to