Discussion:
using installboot to create a custom OpenBSD install on sd1
(too old to reply)
Torsten
2018-04-09 07:46:50 UTC
Permalink
Hi!

In short:
I am trying to use installboot to make a new harddrive bootable that
should contain a custom OpenBSD installation, however, when trying to
boot from that new hd I always get "No O/S".


Detailed:
I successfully set up a standard OpenBSD6.3 (machine A) on sd0 using
install.iso. Using custom scripts, I would like to create custom
installations on sd1 to create individual installations (machine B, C
and so on), each on a separate HD that I would swap for sd1 each time.

On (A) I did:

fdisk -iy sd1
echo "a a\n\n2g\n\na b\n\n\n\n\nw\nq\n"|disklabel -E sd1
newfs /dev/rsd1a

mount /dev/sd1a /mnt

cp -R /altroot /mnt/altroot
cp -R /bin /mnt/bin
cp -R /dev /mnt/dev
cp -R /etc /mnt/etc
cp -R /home /mnt/home
cp -R /root /mnt/root
cp -R /sbin /mnt/sbin
cp -R /tmp /mnt/tmp
cp -R /usr /mnt/usr
cp -R /var /mnt/var
cp /bsd* /mnt/

cd /mnt/dev
./MAKEDEV std

installboot -v sd1 /usr/mdec/biosboot /usr/mdec/boot

(also tried
installboot -v -r /mnt/ sd1 /usr/mdec/biosboot /usr/mdec/boot
without success)


Hints and help will be appreciated!

Regards,
T.
Torsten
2018-04-09 11:54:57 UTC
Permalink
I spent another three hours on this and now I've come to a point where
at least my kernel boots.
Post by Torsten
Hi!
I am trying to use installboot to make a new harddrive bootable that
should contain a custom OpenBSD installation, however, when trying to
boot from that new hd I always get "No O/S".
I successfully set up a standard OpenBSD6.3 (machine A) on sd0 using
install.iso. Using custom scripts, I would like to create custom
installations on sd1 to create individual installations (machine B, C
and so on), each on a separate HD that I would swap for sd1 each time.
fdisk -iy sd1
echo "a a\n\n2g\n\na b\n\n\n\n\nw\nq\n"|disklabel -E sd1
newfs /dev/rsd1a
mount /dev/sd1a /mnt
cp -R /altroot /mnt/altroot
cp -R /bin /mnt/bin
cp -R /dev /mnt/dev
cp -R /etc /mnt/etc
cp -R /home /mnt/home
cp -R /root /mnt/root
cp -R /sbin /mnt/sbin
cp -R /tmp /mnt/tmp
cp -R /usr /mnt/usr
cp -R /var /mnt/var
cp /bsd* /mnt/
cd /mnt/dev
./MAKEDEV std
installboot -v sd1 /usr/mdec/biosboot /usr/mdec/boot
(also tried
installboot -v -r /mnt/ sd1 /usr/mdec/biosboot /usr/mdec/boot
without success)
Hints and help will be appreciated!
Regards,
T.
Chris Milham
2018-04-11 11:02:44 UTC
Permalink
It looks to me that you're trying to find a way to quickly set up new
machines which share a similar OpenBSD configuration? Can I suggest an
alternative approach to help achieve this...

Read through: man autoinstall. You can use this approach to set up machines
quickly across a LAN. To get it going you'll also need to refer to man
pxeboot (using pxe shouldn't be a problem as looks like you're on amd64).
You'll have to get dhcpd, tftpd and (optionally) httpd going too. Also be
aware of how to customise the install for your needs with a custom install
set: https://www.openbsd.org/faq/faq4.html#site

I've found autoinstall an excellent approach to setting up new machines. It
does take a bit of setup, but once done it's easy to maintain and get ready
when new OpenBSD releases are made. I download all the install files and
packages for each release, which are served locally by httpd, so it's nice
and quick to install and upgrade. For new installs I have a small VLAN on
my switch, connected to the "install" interface on my file server, which I
then just plug a new machine into, boot via pxe, and then leave it alone to
do the autoinstall. In a few mins OpenBSD is installed and ready to run on
it. Very nice!

Cheers

Chris
Post by Torsten
I spent another three hours on this and now I've come to a point where
at least my kernel boots.
Post by Torsten
Hi!
I am trying to use installboot to make a new harddrive bootable that
should contain a custom OpenBSD installation, however, when trying to
boot from that new hd I always get "No O/S".
I successfully set up a standard OpenBSD6.3 (machine A) on sd0 using
install.iso. Using custom scripts, I would like to create custom
installations on sd1 to create individual installations (machine B, C
and so on), each on a separate HD that I would swap for sd1 each time.
fdisk -iy sd1
echo "a a\n\n2g\n\na b\n\n\n\n\nw\nq\n"|disklabel -E sd1
newfs /dev/rsd1a
mount /dev/sd1a /mnt
cp -R /altroot /mnt/altroot
cp -R /bin /mnt/bin
cp -R /dev /mnt/dev
cp -R /etc /mnt/etc
cp -R /home /mnt/home
cp -R /root /mnt/root
cp -R /sbin /mnt/sbin
cp -R /tmp /mnt/tmp
cp -R /usr /mnt/usr
cp -R /var /mnt/var
cp /bsd* /mnt/
cd /mnt/dev
./MAKEDEV std
installboot -v sd1 /usr/mdec/biosboot /usr/mdec/boot
(also tried
installboot -v -r /mnt/ sd1 /usr/mdec/biosboot /usr/mdec/boot
without success)
Hints and help will be appreciated!
Regards,
T.
Loading...