Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3333687
  • 博文数量: 815
  • 博客积分: 12898
  • 博客等级: 上将
  • 技术积分: 7883
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-25 09:57
文章分类

全部博文(815)

文章存档

2014年(1)

2011年(46)

2010年(192)

2009年(121)

2008年(70)

2007年(385)

分类: BSD

2009-12-17 14:10:25

LiveUSB image with OpenBSD - carry your OS on a memory stick


What is liveusb-openbsd?

It is trivial to a create a bootable USB stick with OpenBSD. I wanted to create one and realized that this will be of general use for anyone who likes a UNIX USB memory stick that they can carry with them on a keychain.

This USB image shall not touch your hard disk in any way. All the operations are done in the USB stick and main memory. Nothing will be written to your MBR or boot loaders!

Please make your choice, download and enjoy!


Quick Download links


How to create your own LiveUSB with OpenBSD?

Really easy. Watch out. Everything is done with by Fabrice Bellard. Just install that package and blindly follow the instructions below.

                # qemu-img create usb-lite.bin 1000000

# qemu -hda usb-lite.bin -cdrom install46.iso

(Install OpenBSD into the file store and whatever packages
you need but create only one partition wd0a)

Now change the line in /etc/fstab

/dev/wd0a / ffs rw 1 1

to

/dev/sd0a / ffs rw 1 1

That is it! You are ready to dd(1) now. See .

Creating a LiveCD is more work because you need a read only OS. No such issue with writeable USB memory sticks.


This is the non Xwindow version for minimalists. Though there is no X, it still is way too powerful! There are ZERO packages. You can install whichever package you need. OpenBSD base install comes with a fully functional DNS server, HTTP server, web browser, command line download with ftp(1) for HTTP and FTP with resume support and so on...

You have 500 MB for storing user files. This can be really convenient!

You can login as user liveusb and password liveusb. The root password is openbsd.

USB image of LiveUSB-OpenBSD-Micromini ~60 MB 7z image from .


LiveUSB-OpenBSD-Minimal shot

This is the non Xwindow version for geeks. Though there is no X, it still is way too powerful! Here are the installed packages. You still have mplayer, pure-ftpd, lftp, dsniff, ncftp, curl, hping, nmap, mutt, procmail, nail, vim, lua, python, rsnapshot, rdiff-backup, rtorrent, and a whole lot of other stuff!

                ImageMagick-6.4.5.6-no_x11 image processing tools
amap-5.2p2 next generation scanning tool
aspell-0.60.6p3 spell checker designed to eventually replace Ispell
atk-1.24.0 accessibility toolkit used by gtk+
bzip2-1.0.5 block-sorting file compressor, unencumbered
cdparanoia-3.a9.8p0 CDDA reading utility with extra data verification features
colorls-4.5 ls that can use color to display file attributes
curl-7.19.5 get files from FTP, Gopher, HTTP or HTTPS servers
cyrus-sasl-2.1.23 RFC 2222 SASL (Simple Authentication and Security Layer)
db-3.1.17p8 Berkeley DB package, revision 3
delay-1.6p0 delay program with feedback to the user
dictd-client-1.9.15p1 Dictionary Server Protocol client
dsniff-2.3p7-no_x11 sniffing tools for penetration testing
dtach-0.8 tiny program emulating the detach feature of screen
echoping-5.2.0 test performance of a remote TCP service
faac-1.26 MPEG-2 and MPEG-4 AAC encoder
faad-2.6.1 MPEG-2 and MPEG-4 AAC decoder
figlet-2.2.2 generates ASCII banner art
flac-1.2.1p0 free lossless audio codec
fping-2.4b2p4 quickly ping N hosts w/o flooding the network
gettext-0.17p0 GNU gettext
ghostscript-8.63p7-a4-no_x11 GNU PostScript interpreter
ghostscript-fonts-8.11p0 35 standard PostScript fonts with Adobe name aliases
glib-1.2.10p3 useful routines for C programming
glib2-2.18.4p3 general-purpose utility library
gmp-4.3.1 library for arbitrary precision arithmetic
gsm-1.0.13 u-law to gsm encoding audio converter and library
hicolor-icon-theme-0.10p4 high-color icon theme shell for GNOME and KDE
hping-2.0.0rc3p1 TCP/UDP ping/traceroute tool
icecast-2.3.2 server for streaming various media formats
ifstat-1.1p0 tool to monitor interface bandwidth usage
ijs-0.35 raster image transmission library
irssi-0.8.13p1-socks modular IRC client with many features (ipv6,socks,proxy)
jasper-1.900.1p0 reference implementation of JPEG-2000
jbigkit-1.6p1 lossless image compression library
jpeg-6bp5 IJG's JPEG compression utilities
lame-3.98.2 lame ain't an MP3 encoder
lcms-1.18a color management library
lftp-3.7.14 shell-like command line ftp and sftp client
lua-5.1.4p0 powerful, light-weight programming language
luaalarm-20061011p2 alarm library for the lua language
luacopas-1.1.0p1 coroutine oriented portable asynchronous services for lua
luacrypto-0.1.1p3 Lua binding for the OpenSSL crypto libraries
luaevent-0.1.1p1 lua binding of libevent
luafs-1.2.1p1 file system library for the lua language
luapack-20061124p0 library for packing and unpacking binary data
luarexlib-2.1.0p1 lua binding of posix and pcre regex libraries
luarings-1.1p0 multiple states library for the lua language
luasocket-2.0.1p2 network support for the lua language
luasqlite3-0.4.1p1 binding of sqlite3 for lua
luastdlib-4p1 lua library of common programming tasks
meanwhile-1.0.2p1 implementation of Lotus Sametime Community Client protocol
mmv-1.01b move/copy/append/link multiple files with wildcards
mpfr-2.3.2 library for multiple-precision floating-point computations
mplayer-1.0rc2p24-no_x11 movie player supporting MPEG, DivX, AVI, ASF, MOV & more
multitail-5.2.2 multi-window tail(1) utility
mutt-1.5.20p1-sasl-sidebar-compressed tty-based e-mail client, development version
nail-12.4 enhanced, MIME capable Berkeley Mail
ncftp-3.2.2 ftp replacement with advanced user interface
netpbm-10.26.57 toolkit for converting images between different formats
nmap-4.76 scan ports and fingerprint stack of network hosts
nmh-1.3 new MH mail handling program
nspr-4.7.3p0 Netscape Portable Runtime
nss-3.12p0 libraries to support development of security-enabled apps
p0f-2.0.8p1 passive OS fingerprinting tool
p5-Lchown-1.00p0 Perl interface to the lchown(2) system call
p5-XML-LibXML-1.69 perl interface to the libxml2 library
p5-XML-LibXML-Common-0.13p0 perl interface for several perl XML modules
p5-XML-NamespaceSupport-1.09p0 perl module to the SAX2 NamespaceSupport class
p5-XML-SAX-0.96p0 perl interface to the SAX2 XML parser
p7zip-9.04 file archiver with high compression ratio
pcre-7.9 perl-compatible regular expression library
pktstat-1.8.4p0 network traffic viewer
png-1.2.35 library for manipulating PNG images
popt-1.7p0 getopt(3)-like library with a number of enhancements
portscanner-1.2 simple and easy to use TCP port scanner
postgresql-client-8.3.7 PostgreSQL RDBMS (client)
procmail-3.22p3 filtering local mail delivery agent
pure-ftpd-1.0.22-postgresql small, easy to set up, fast and very secure FTP server
py-Numeric-23.1p4 fast array facility to the Python language
python-2.5.4p1 interpreted object-oriented programming language
python-2.6.2p0 interpreted object-oriented programming language
qdbm-1.8.77 high performance embedded database library
randtype-1.13 output characters or lines at random intervals
rdiff-backup-1.0.5p2 incremental backup
rsnapshot-1.3.1p0 remote filesystem snapshot utility
rsync-3.0.6 mirroring/synchronization over low bandwidth links
rtorrent-0.8.4 ncurses BitTorrent client based on libTorrent
screen-4.0.3p1-static multi-screen window manager
silc-toolkit-1.1.9p2 toolkit for the development of SILC applications
sing-1.1p3 send ICMP nasty garbage
snownews-1.5.11 text mode rss newsreader
socat-1.6.0.1 socat is a relay for bidirectional data transfer
socket-1.1 create tcp socket and connect to stdin/out
sox-14.2.0p2 Sound eXchange, the Swiss Army knife of audio manipulation
speex-1.2rc1 patent-free speech codec
sqlite3-3.6.13p0 embedded SQL implementation
t1lib-5.1.0p1 Type 1 rasterizer library for UNIX/X11
tiff-3.8.2p4 tools and library routines for working with TIFF images
trickle-1.06p2 lightweight userspace bandwidth shaper
udptunnel-1.1p0 UDP tunnel utility
vim-7.2.190p1-no_x11 vi clone, many additional features
wavpack-4.50.1 Audio codec for lossless, lossy and hybrid compression
wcalc-2.4 natural-expression command-line calculator
wget-1.11.4 retrieve files from the web via HTTP, HTTPS and FTP
x264-20090204 free H264/AVC encoder
xvidcore-1.2.2 ISO MPEG-4 compliant video codec
youtube-dl-2009.05.30 command-line program to download videos from YouTube.com

You can login as user liveusb and password liveusb. The root password is openbsd.

USB image of LiveUSB-OpenBSD-Minimal ~125 MB 7z image from .


I have installed only the most important packages that I required. This does not have firefox browser. I do not need it. If you wish to create your own liveUSB, you can do that of course. You could get in touch with me if you need custom packages.

For now you can make do with this one. This throws up a nice xdm prompt where you can login as user livecd and password livecd. The root pass phrase is openbsd is cool. The password is three words with two spaces in between.

You only need 1GB for this. The packages installed are:

                Xaw3d-1.5p1         3D Athena Widget set that looks like Motif
atk-1.24.0 accessibility toolkit used by gtk+
cairo-1.8.8 vector graphics library
cdparanoia-3.a9.8p0 CDDA reading utility with extra data verification features
faad-2.6.1 MPEG-2 and MPEG-4 AAC decoder
figlet-2.2.2 generates ASCII banner art
gettext-0.17p0 GNU gettext
ghostscript-8.63p7-no_x11 GNU PostScript interpreter
ghostscript-fonts-8.11p0 35 standard PostScript fonts with Adobe name aliases
glitz-0.5.6p1 OpenGL image compositing library
gtk+-1.2.10p7 General Toolkit for X11 GUI
gtk+2-2.14.7p0 multi-platform graphical toolkit
gv-3.5.8p5 PostScript and PDF previewer
hicolor-icon-theme-0.10p4 high-color icon theme shell for GNOME and KDE
ifstat-1.1p0 tool to monitor interface bandwidth usage
ijs-0.35 raster image transmission library
imlib-1.9.14p7 image manipulation library for X11
jasper-1.900.1p0 reference implementation of JPEG-2000
jpeg-6bp5 IJG's JPEG compression utilities
lame-3.98.2 lame ain't an MP3 encoder
lua-5.1.4p0 powerful, light-weight programming language
mplayer-1.0rc2p24-sdl movie player supporting MPEG, DivX, AVI, ASF, MOV & more
openmotif-2.3.0p0 Motif toolkit
pcre-7.9 perl-compatible regular expression library
png-1.2.35 library for manipulating PNG images
popt-1.7p0 getopt(3)-like library with a number of enhancements
qemu-0.9.1p10 multi system emulator
qiv-2.0 very small and pretty fast gdk/Imlib image viewer
randtype-1.13 output characters or lines at random intervals
screen-4.0.3p1-static multi-screen window manager
sdl-1.2.13p11 cross-platform multimedia library
socat-1.6.0.1 socat is a relay for bidirectional data transfer
speex-1.2rc1 patent-free speech codec
tiff-3.8.2p4 tools and library routines for working with TIFF images
vim-7.2.190p1-no_x11 vi clone, many additional features
windowmaker-0.92.0p8 window manager that emulates NEXTSTEP(tm)
wmcalclock-1.25 wm-dockapp; calendar/clock
wmclock-1.0.12.2p0 Window Maker dock.app clock
wmcube-0.98 wm-dockapp; shows rotating 3d-object and CPU load
wmdate-0.7p0 wm-dockapp; shows the current date
wmglobe-1.3p0 wm-dockapp; displays the earth on an icon
wmmoonclock-1.27p1 wm-dockapp; shows the moon phase
wmtime-1.0b2p0 time/date applet for WindowMaker
x264-20090204 free H264/AVC encoder
xloadimage-4.1.16p1 graphics file viewer for X11
xpdf-3.02.3p0 PDF viewer for X11
xpdf-utils-3.02.3 PDF conversion tools
xvidcore-1.2.2 ISO MPEG-4 compliant video codec

You can listen to streaming audio or watch videos with mplayer. You have a nice minimal graphical environment with windowmaker. You can read man pages in color. There are several nice things you can do with this minimal OS. Just download the image and try it out.

USB image of LiveUSB-OpenBSD-Lite ~160 MB 7z image from .


LiveUSB-OpenBSD-Full shot

This is the full version with firefox and every imaginable package. Here is the complete list. In spite of the space taken by packages, you still have 700 MB for storing user files!

                amap-5.2p2          next generation scanning tool
aspell-0.60.6p3 spell checker designed to eventually replace Ispell
atk-1.24.0 accessibility toolkit used by gtk+
axyftp-0.5.1p1 ftp client for X window system
bzip2-1.0.5 block-sorting file compressor, unencumbered
cdparanoia-3.a9.8p0 CDDA reading utility with extra data verification features
colorls-4.5 ls that can use color to display file attributes
curl-7.19.5 get files from FTP, Gopher, HTTP or HTTPS servers
db-3.1.17p8 Berkeley DB package, revision 3
dbus-1.2.14p0 message bus system
delay-1.6p0 delay program with feedback to the user
desktop-file-utils-0.15 utilities for 'desktop' entries
dictd-client-1.9.15p1 Dictionary Server Protocol client
dsniff-2.3p7-no_x11 sniffing tools for penetration testing
echoping-5.2.0 test performance of a remote TCP service
enchant-1.4.2p1 generic spell checking library/wrapper
faac-1.26 MPEG-2 and MPEG-4 AAC encoder
faad-2.6.1 MPEG-2 and MPEG-4 AAC decoder
ffmpeg-20080620p8 audio/video converter and streamer with bktr(4) support
figlet-2.2.2 generates ASCII banner art
flac-1.2.1p0 free lossless audio codec
fping-2.4b2p4 quickly ping N hosts w/o flooding the network
gconf2-2.24.0p0 configuration database system for GNOME
gd-2.0.35 library for dynamic creation of images
gettext-0.17p0 GNU gettext
ghostscript-8.63p7-no_x11 GNU PostScript interpreter
ghostscript-fonts-8.11p0 35 standard PostScript fonts with Adobe name aliases
glitz-0.5.6p1 OpenGL image compositing library
gsm-1.0.13 u-law to gsm encoding audio converter and library
gtk+-1.2.10p7 General Toolkit for X11 GUI
gtk+2-2.14.7p0 multi-platform graphical toolkit
gtkspell-2.0.15 gtk2 spelling checker
hicolor-icon-theme-0.10p4 high-color icon theme shell for GNOME and KDE
hping-2.0.0rc3p1 TCP/UDP ping/traceroute tool
icecast-2.3.2 server for streaming various media formats
ifstat-1.1p0 tool to monitor interface bandwidth usage
ijs-0.35 raster image transmission library
imlib-1.9.14p7 image manipulation library for X11
imlib2-1.4.2 image manipulation library
irssi-0.8.13p1-socks modular IRC client with many features (ipv6,socks,proxy)
jasper-1.900.1p0 reference implementation of JPEG-2000
jbigkit-1.6p1 lossless image compression library
jpeg-6bp5 IJG's JPEG compression utilities
lame-3.98.2 lame ain't an MP3 encoder
lcms-1.18a color management library
lftp-3.7.14 shell-like command line ftp and sftp client
lua-5.1.4p0 powerful, light-weight programming language
luaalarm-20061011p2 alarm library for the lua language
luacopas-1.1.0p1 coroutine oriented portable asynchronous services for lua
luacrypto-0.1.1p3 Lua binding for the OpenSSL crypto libraries
luaevent-0.1.1p1 lua binding of libevent
luafs-1.2.1p1 file system library for the lua language
luagd-2.0.33r2p2 gd binding for the lua language
luapack-20061124p0 library for packing and unpacking binary data
luarexlib-2.1.0p1 lua binding of posix and pcre regex libraries
luarings-1.1p0 multiple states library for the lua language
luasocket-2.0.1p2 network support for the lua language
luasqlite3-0.4.1p1 binding of sqlite3 for lua
luastdlib-4p1 lua library of common programming tasks
meanwhile-1.0.2p1 implementation of Lotus Sametime Community Client protocol
mmv-1.01b move/copy/append/link multiple files with wildcards
mozilla-firefox-3.0.11 redesign of Mozilla's browser component
mplayer-1.0rc2p24-sdl movie player supporting MPEG, DivX, AVI, ASF, MOV & more
multimux-0.2.5.2 create multichannel WAV audio files
multitail-5.2.2 multi-window tail(1) utility
nail-12.4 enhanced, MIME capable Berkeley Mail
ncftp-3.2.2 ftp replacement with advanced user interface
netpbm-10.26.57 toolkit for converting images between different formats
nmap-4.76 scan ports and fingerprint stack of network hosts
nmh-1.3 new MH mail handling program
nspr-4.7.3p0 Netscape Portable Runtime
nss-3.12p0 libraries to support development of security-enabled apps
openmotif-2.3.0p0 Motif toolkit
p0f-2.0.8p1 passive OS fingerprinting tool
p5-Lchown-1.00p0 Perl interface to the lchown(2) system call
p5-XML-LibXML-1.69 perl interface to the libxml2 library
p5-XML-LibXML-Common-0.13p0 perl interface for several perl XML modules
p5-XML-NamespaceSupport-1.09p0 perl module to the SAX2 NamespaceSupport class
p5-XML-SAX-0.96p0 perl interface to the SAX2 XML parser
p7zip-9.04 file archiver with high compression ratio
pango-1.22.4p0 library for layout and rendering of text
pcre-7.9 perl-compatible regular expression library
pidgin-2.5.7-gtkspell multi-protocol instant messaging client
pktstat-1.8.4p0 network traffic viewer
png-1.2.35 library for manipulating PNG images
popt-1.7p0 getopt(3)-like library with a number of enhancements
portscanner-1.2 simple and easy to use TCP port scanner
postgresql-client-8.3.7 PostgreSQL RDBMS (client)
procmail-3.22p3 filtering local mail delivery agent
pure-ftpd-1.0.22-postgresql small, easy to set up, fast and very secure FTP server
py-Numeric-23.1p4 fast array facility to the Python language
py-cairo-1.8.2p0 cairo bindings for Python
py-gobject-2.16.1p0 Python bindings for glib2 gobject
py-gtk2-2.14.1p0 GTK+2 Python bindings
python-2.5.4p1 interpreted object-oriented programming language
python-2.6.2p0 interpreted object-oriented programming language
qdbm-1.8.77 high performance embedded database library
qiv-2.0 very small and pretty fast gdk/Imlib image viewer
rdesktop-1.6.0 open source client for Windows Terminal Server
rdiff-backup-1.0.5p2 incremental backup
root-tail-1.2p1 tails a given file anywhere on your X11 root window
rsnapshot-1.3.1p0 remote filesystem snapshot utility
rsync-3.0.6 mirroring/synchronization over low bandwidth links
rtorrent-0.8.4 ncurses BitTorrent client based on libTorrent
sdl-1.2.13p11 cross-platform multimedia library
silc-toolkit-1.1.9p2 toolkit for the development of SILC applications
sing-1.1p3 send ICMP nasty garbage
snownews-1.5.11 text mode rss newsreader
socat-1.6.0.1 socat is a relay for bidirectional data transfer
socket-1.1 create tcp socket and connect to stdin/out
sox-14.2.0p2 Sound eXchange, the Swiss Army knife of audio manipulation
speex-1.2rc1 patent-free speech codec
sqlite3-3.6.13p0 embedded SQL implementation
startup-notification-0.9 library for tracking application startup
t1lib-5.1.0p1 Type 1 rasterizer library for UNIX/X11
tiff-3.8.2p4 tools and library routines for working with TIFF images
trickle-1.06p2 lightweight userspace bandwidth shaper
udptunnel-1.1p0 UDP tunnel utility
vim-7.2.190p1-gtk2 vi clone, many additional features
wavpack-4.50.1 Audio codec for lossless, lossy and hybrid compression
wget-1.11.4 retrieve files from the web via HTTP, HTTPS and FTP
windowmaker-0.92.0p8 window manager that emulates NEXTSTEP(tm)
wmcalc-0.3 wm-dockapp; simple four-function calculator
wmcalclock-1.25 wm-dockapp; calendar/clock
wmmoonclock-1.27p1 wm-dockapp; shows the moon phase
wmtictactoe-1.1.1 wm-dockapp; TicTacToe game
x264-20090204 free H264/AVC encoder
xloadimage-4.1.16p1 graphics file viewer for X11
xpdf-3.02.3p0 PDF viewer for X11
xpdf-utils-3.02.3 PDF conversion tools
xvidcore-1.2.2 ISO MPEG-4 compliant video codec
youtube-dl-2009.05.30 command-line program to download videos from YouTube.com
yt-10p0 fetch youtube and google videos

To enable mplayer menu while playing a video, please left click the mouse on the video. Enjoy mplayer menus!

You can login as user liveusb and password liveusb. The root password is openbsd.

With this version you can browse the Internet with Mozilla Firefox, chat using pidgin, download youtube videos with yt or youtube-dl and it has several networking tools like nmap, hping, socat and sing thrown in. The repertoire is really interesting.

image of LiveUSB-OpenBSD-Full ~220 MB 7z image from .


These LiveUSB images are based on 4.6 release of OpenBSD made on Nov 1, 2009.

In all the 3 variants you can always add and remove packages with the pkg_add(1) and pkg_delete(1) commands in case my choices do not agree with yours.

Once you download the 7z image, install and unzip the USB image.

                Install 7zip if not already present.
# pkg_add p7zip

Unzip the downloaded image with this command.
$ 7z e usb-lite.bin.7z

Then verify the SHA1 checksums from the table below.

LiveUSB variant Size
usb-micromini.bin 1024000000 Bytes 910e2221589a143e2f3d94fbf7be97dbdd3e1129
usb-minimal.bin 1024000000 Bytes 3412675ac1569c2266052f6931233bdd18029a6e
usb-lite.bin 1024000000 Bytes 534b9ceee8b8c76efb2a1aa0f0edadf5da697438
usb-2g.bin 2048000000 Bytes 779f36848b8a8b863ed17bd041bf00d7be60c1fa

this image to a USB stick with this command on OpenBSD

                # dd if=usb-lite.bin of=/dev/rsd0c bs=8192

Please be aware that your USB stick could be sd0 .. sdn depending upon in what order you insert into your computer.

You can burn this image to a USB stick with this command on Linux.

                # dd if=usb-lite.bin of=/dev/sdb bs=8192

Please check with dmesg and find out whether your stick is identified as sdb or sdc or whatever else.

You can burn this image to a USB stick with the rawrite on Windows. It is a GUI program.

Once you write the image you can test the USB stick without rebooting the computer with this qemu command on OpenBSD.

                # qemu -usb -hda /dev/rsd0c

Once you find that things work fine you can reboot. You can do something similar on Linux and Windows too.

If you are too lazy to burn it into a USB stick you could run this off a qemu emulator.

                # qemu -hda usb-2g.bin

(If you want full networking you boot with)

# qemu -net nic -net tap -hda usb-2g.bin

(You have to change the line
_ETHER= in /etc/qemu-ifup to point to your physical
device like fxp0,vr0 or whatever.)

But you have to change the /etc/fstab from this:

                /dev/sd0a / ffs rw 1 1

to

                /dev/wd0a / ffs rw 1 1

qemu will give you a shell on which you have to run:

                # mount /dev/wd0a /

# cat > /etc/fstab
/dev/wd0a / ffs rw 1 1

Booting resumes from this point and throws up an xdm screen. Doing this saves this fstab into the USB image. Instead you can do better by copying it and using one image for qemu and another for USB burning.


Please e-mail for anything.

阅读(5071) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~