Creating your own LiveUSB

feature-image

How to create your own flavor of OpenBSD?

Really easy. 😄

Everything is done with Qemu emulator by Fabrice Bellard.

Just install that package using your package manager on Linux.

  root# qemu-img create LiveUSB-Minimal.img 57000m

  root# qemu-system-x86_64 -hda LiveUSB-Minimal.img -cdrom install72.iso

Warning

When the disk initializes please ensure that you choose GPT as the partition scheme.

It will warn you that the machine may not boot, but that is what we want.

I tried all other alternatives, they do not boot on my laptop.

Also after above step, the disk partitioning should have only one partition to keep things simple.

So choose Custom and not auto partition. Do not forget to make a 4GB swap partition(wd0b).

Once you finish installation reboot and proceed to steps outlined below.

Minimal customization

First fix terminal type.

   root# su - live
   $ echo "TERM=wsvt25" >> ~/.profile

Then add user live.

    root# adduser

adduser on OpenBSD

Next install packages by downloading this pkg list

   root# pkg_add `cat minimal-pkg.txt`

Then add banner.

   root# vim /etc/motd
   :2,$d
   :r !figlet -f 5x7 LiveUSB
   :wq

Next we create a nice ~/.vimrc.

    $ cat >  ~/.vimrc
     se nu
     sy on
     se textwidth=72
     autocmd filetype markdown se spell
   <Ctrl-D>

XFCE customization

First install packages by downloading this pkg list

   root# pkg_add `cat xfce-pkg.txt`

Then add user live.

    root# adduser

adduser on OpenBSD

Then add banner.

   root# vim /etc/motd
   :2,$d
   :r !figlet -f 5x7 LiveUSB
   :wq

Then point .xsession to startxfce4.

   root# su - live
   $ echo "/usr/local/bin/startxfce4" > ~/.xsession

Gnome customization

First install packages by downloading this pkg list

   root# pkg_add `cat gnome-pkg.txt`

Then add user live.

    root# adduser

adduser on OpenBSD

Then add banner.

   root# vim /etc/motd
   :2,$d
   :r !figlet -f 5x7 LiveUSB
   :wq

Then replace xenodm with gdm and add messagebus and avahi daemon.

   root# rcctl disable xenodm
   root# rcctl enable multicast messagebus avahi_daemon gdm

General tips

OpenBSD serves as a wonderful desktop OS for mundane uses too.

To get qemu on Linux simply use the package manager.

Once you learn how to partition disks and install OpenBSD base system and other distribution sets all you have to do is install the required packages using pkg_add.

How is it different from Linux ?

OpenBSD is not a distribution. It is not a tangled mess of kernel and userland.

It is one single unit.

Moreover the licensing is also very liberal. There is no GNU copyleft or any such nonsense.

All software is BSD licensed which means it is free for commercial uses s too.

Can you help me build one for me?

Sure, just mail me or Tweet me .

You need to pay to get me to help you. You can use the buy me a coffee link to do that.

[ Usually 10 coffees would suffice. ]

Enjoy OpenBSD. ☀️

Go back to project page .