Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Thread Tools Display Modes
  #1   (View Single Post)  
Old 12th May 2009
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,052
Thanked 36 Times in 32 Posts
Default OpenBSD LiveUSB

Can anybody share with me (jggimi you come first to my mind) your experience in creating LiveUSB image of the OpenBSD. I Google little bit and I saw how to on OpenBSD wiki pages. Without careful inspection I am concern that the described process doesn't take into account that USB stick is writable media unlike LIveCD. In another words 8Gb LiveUSB should be nothing else but removable SCSI hard drive. I want to be able
to add and remove packages and have 2GB of home space.

I also saw that Jacek Artymiak is selling LiveUSB images of OpenBSD for something like 50 euros. Since he is very credible person I would imagine that LiveUSB image is not that difficult to create.

Would a simple installation on the machine to which USB is attached before the boot work as long as I select SCSI drive instead regular HDD?

I saw howtos for NetBSD and FreeBSD on line. OpenBSD should not be to different than NetBSD.

Jggimi can you tell me little bit about those kernel changes in OpenBSD 4.5 which are making creating LiveCD easier?

Finally, it looks also that I could use BoulFish
script can be used. Any thoughts on that one?
Reply With Quote
  #2   (View Single Post)  
Old 12th May 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
Join Date: May 2008
Location: USA
Posts: 4,832
Thanked 214 Times in 189 Posts

USB mass storage is managed through sd(4). It is a virtual SCSI device, no matter if the device is flash memory or hard drive.

You can do a standard installation to any USB device, as long as it has sufficient capacity. Since it is treated as a hard drive, use an MBR on architectures that require them, as well as a standard disklabel.

If your BIOS permits booting from USB, nothing else is needed.

If your BIOS does not permit booting from USB, you just need a boot loader on some other media, such as: diskette, optical disc, or network.

The only changes I've made to LiveCD kernels are to point the root partition to cd0a. This is no longer necessary with 4.5, and is entirely unnecessary with sd devices. The major changes for read-only (live) media are not kernel. The changes, instead, are to /etc/rc. In general, one mounts a set of MFS filesystems for read/write.

Modern flash media is supposed to have good write lifespan, therefore, with modern BIOS and modern USB devices, the general recommendation is to treat your stick like a disk drive, and not worry.

Since most modern sticks are much larger than the storage used in tiny embedded systems, I don't think bowlfish is necessary. It's hard to find USB sticks with less than 1/2 GB of storage these days, and a complete i386 or amd64 system will fit in that with room to spare.
Reply With Quote
  #3   (View Single Post)  
Old 12th May 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts

Adding to jggimi's informative post, one problem you might encounter is geometry related.

When a system boots from USB, the BIOS will emulate a hard drive temporarily for real mode disk access.. this allows the MBR and the PBR code to read and write from/to the USB mass storage device.

Sometimes this emulated device will have geometry that's different from what was determined via the umass/sd(4) probing, the side effect is the second stage loader cannot find /boot on some systems. (..you'll likely see "ERR M" if this is the case).

I've only witnessed this on some older systems, but you might scratch your head wondering why the device boots on some systems.. but not others.

Hope that helps.
Reply With Quote
  #4   (View Single Post)  
Old 12th May 2009
ocicat ocicat is offline
Join Date: Apr 2008
Posts: 3,148
Thanked 190 Times in 160 Posts

Originally Posted by BSDfan666 View Post
Sometimes this emulated device will have geometry that's different from what was determined via the umass/sd(4) probing, the side effect is the second stage loader cannot find /boot on some systems. (..you'll likely see "ERR M" if this is the case).
As an anecdote, I have seen this when developing an application to clone disks on Sun hardware which expects all partitions to be aligned on cylinder boundaries. When attempting to use dump(8) & restore(8) on an identical disk which was attached via USB, I still had to massage where partitions were located such that they could later be mounted; a straight bit-by-bit copy (even using dd(1)...) would lead to incorrect results because the sd(4) interface exposes a different geometry than wd(4).

FWIW, i386 & macppc platforms don't have this additional requirement. Copying from wd(4) to sd(4) works fine. Cylinder alignment is simply specific to Sun hardware done to improve performance.
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

All times are GMT. The time now is 10:53 AM.

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