DaemonForums  

Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 14th February 2015
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 283
Default Installing OpenBSD from a USB flash drive

I wanted to upgrade a 5.5-i386 machine to 5.6-i386 with a fresh installation and a new disk partition layout. There were no blank CD's in the house but there was an old USB thumb drive that might do the trick. The FAQ has a section - Creating a bootable install flash drive from Unix - but I suspect that installation method would require network access. Unfortunately, the target machine's wpi(4) network interface requires an fw_update(1) with non-free firmware before it is usable.

This method creates a bootable USB installation device (yeah, I said "installation device" (hey, it's been a long day)) from the contents of the install56.iso CD image.

First, inspect the USB device:

From $ dmesg
sd1: 247MB, 512 bytes/sector, 506880 sectors

This one is ancient and barely has enough capacity but it will work.

Then as root: (in the following, be sure to replace values in red with values from your USB drive)
Code:
vnconfig vnd0 install56.iso
mount /dev/vnd0a /mnt
tar xzf /mnt/5.6/i386/base56.tgz -C /tmp/
dd if=/dev/zero of=disk.img bs=512 count=506880
vnconfig vnd1 disk.img
fdisk -y -f /tmp/usr/mdec/mbr -i vnd1
echo "a\n\n\n\n\nw\nq\n" | disklabel -E vnd1 
newfs /dev/rvnd1a
mkdir /mnt2
mount /dev/vnd1a /mnt2
cp -r /mnt/* /mnt2/
installboot -r /mnt2 vnd1 /tmp/usr/mdec/biosboot /tmp/usr/mdec/boot
dd bs=512 count=506880 if=disk.img of=/dev/rsd1c
umount /mnt
umount /mnt2
vnconfig -u vnd1
vnconfig -u vnd0
rmdir /mnt2
rm disk.img
And that seems to work.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I correctly mount a flash drive in OpenBSD? Justin_i OpenBSD General 5 22nd October 2011 05:01 AM
Creating USB flash drive drive image from FreeBSD disc1.iso FBSD Guides 1 10th February 2010 04:42 PM
Installing packages from USB drive (OpenBSD 4.5) divadgnol67 OpenBSD Packages and Ports 26 30th July 2009 04:21 PM
which Flash Drive I must buy for FreeBSD and OpenBSD mfaridi General Hardware 18 22nd October 2008 07:43 PM
USB flash drive criglerj NetBSD General 1 26th July 2008 01:25 AM


All times are GMT. The time now is 04:11 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick