Remote OpenBSD install via ssh.
I had a remote FreeBSD 6.3 box that I wanted OpenBSD to be on instead. I thought I would post this as to help anyone else who wanted to as I found very little on the net.
This could pretty much work with any base os. I am in no way up to speed with fdisk and disklabels enough to try and repartition the boot drive, but I cant see why it wouldnt work with that too.
The remote server came with raid so I disabled and used the second drive for this.
Install grub onto the base os. do as superuser...
in FreeBSD: #pkg_add ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.3-release/ devel/autoconf-2.61_2.tbz - devel/autoconf-wrapper-20071109.tbz - devel/m4-1.4.9,1.tbz - devel/perl-5.8.8_1 devel/automake-1.9.6_2.tbz - devel/automake-wrapper-20071109.tbz devel/gettext-0.16.1_3.tbz - converters/libiconv-1.11_1.tbz devel/gmake-3.81_2.tbz misc/help2man-1.36.4_1.tbz - devel/p5-gettext-1.05_1.tbz devel/libtool-1.5.24.tbz sysutils/grub-0.97_1.tbz #reboot. #sysctl kern.geom.debugflags=16 #grub-install /dev/ad4 (substitute for your boot drive) #grub grub> find /boot/grub/stage1 - (hd0,0,a) :should be the result grub> root (hd0,0,a) - Filesystem type is ufs2, partition type 0xa5 grub> setup (hd0) grub>quit #cd /boot/grub #touch menu.lst #vi menu.lst (or whatever your preferred editor is) menu.lst: default=saved timeout 10 #BOOT FREEBSD title FreeBSD 6.3 root (hd0,0,a) kernel /boot/loader boot #OPENBSD title OpenBSD 4.2 root (hd1) chainloader +1 boot
The info we need about the target machine is:
interface, ip, gateway, subnet and dns (openbsd usually detects it the same as freebsd)
FTP src.tar.gz and sys.tar.gz from ftp.openbsd.org into /usr/src. #tar xzf src.tar.gz && tar zxf sys.tar.gz #cd .. #tar xzf yaifo-XX.tar.gz #cd yaifo-XX (this assumes u unpacked yaifo into /usr/yaifo-xxxx) edit config file and enter the information for the target machine. be sure to specify the interface if more then two exist in the target box. #ssh-keygen -t rsa #cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys #cp ~/.ssh/authorized_keys . FTP id_rsa to your laptop or machine you intend doing the ssh connection from. #make obj && make ftp yaifo.fs and yaifo.rd to same machine as id_rsa. convert id_rsa with puttygen if you use putty. FTP yaifo.fs to the freebsd machine.
#dd if=yaifo.fs of=/dev/ad6 now swap the grub entries in menu.lst in /boot/grub, so the openbsd entry is above the freebsd entry. save and reboot the freebsd box.
I hope you find this useful. Obviously, small changes will apply on whatever base os your starting from. This is no way a full proof guide so do say at your own risk of bricking your remote machine, however it went off without a hitch for me.
Yaifo is now available for 4.3 (I did this with 4.2 as yaifo for 4.3 wasnt ready yet and its taken me a while to get back to posting this).
on the openbsd box.
Last edited by Dazhelpwiz; 23rd May 2008 at 04:10 AM.
|install, openbsd, remote, ssh, yaifo|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Install Portaudit On OpenBSD||TheNoob||OpenBSD Installation and Upgrading||4||5th May 2009 11:48 PM|
|Remote OpenBSD ssh-based install problems||artix||OpenBSD Installation and Upgrading||7||13th March 2009 08:52 PM|
|Full install of Gnome on OpenBSD 4.4||mfaridi||OpenBSD Installation and Upgrading||17||9th November 2008 01:54 PM|
|install FileZilla in OpenBSD 4.2||mfaridi||OpenBSD Packages and Ports||3||4th November 2008 08:13 AM|
|install ssh openbsd||darken||OpenBSD Packages and Ports||22||26th September 2008 02:58 AM|