|
||||
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 |
|
|||
I may be missing something here but why not use
install56.fs with # # dd if=/location/install56.fs of=/dev/rsd1c bs=1m ? This assumes the drive is recognized as sd1.See the FAQ for more details. After the install, reformat the usb drive # newfs -t msdos sd1c Download the firmware (assuming you have access to a second computer) and copy it to the thumb drive. Load the firmware on the new OpenBSD 5.6 install from the thumb drive, configure wireless and go from there. What would be kinda of neat would be to mount the image loopback and insert the needed firmware. The Debian developers also share the OpenBSD view on distributing proprietary firmware and have an install option where the firmware can be accessed from removable media (floppy, usb thrumb drives and CD's). I wonder if it is possible to escape to a command prompt during the OpenBSD install and mount a usb drive and load the firmware for a network install? Last edited by shep; 14th February 2015 at 04:14 PM. Reason: handbook -> FAQ per jggimi's Politically Correct Prodding |
|
||||
Quote:
Quote:
|
|
|||
Yes. Lots of people do this. You can drop to a shell by typing ! anywhere in the installer.
|
|
||||
Oh geez, I'm retarded. When I saw that in the FAQ, for some bizarre reason I assumed install56.fs was a floppy image meant to be used in some kind of network install. If it's a full install image for a USB device, the method I posted is kind of pointless.
I think I will spend the next Friday the 13th in bed. |
|
|||
Quote:
|
|
|||
Don't sweat it hanzer, that's a neat bit of code for someone new to OBSD.
__________________
Linux since 1999, & also a BSD user. |
|
|||
Quote:
Also, check file sizes: floppy57.fs 13-Feb-2015 14:25 1.4M install57.fs 13-Feb-2015 14:25 280M There's also a minirootXX.fs that is a USB installer where you bring your own sets (such as http install). |
Thread Tools | |
Display Modes | |
|
|
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 |