Home > Uncategorized > Install NetBSD from a USB memory stick the easy way

Install NetBSD from a USB memory stick the easy way

I got tired of having to jump through hoops to install NetBSD on my Eee PC, so I wrote a simple script to take a NetBSD release ISO and convert it to an image that can be written to a USB memory stick.

The script can be found here: http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/mkmemstick.sh

So use the script, simply feed it an ISO and tell it where to write the resulting image:

$ sh mkmemstick.sh i386cd-5.0.1.iso i386memstick-5.0.1.img

The resulting image can be written to a memory stick using dd(1):

$ dd if=i386memstick-5.0.1.img of=/dev/sd0d

Please note that this script depends on the sysutils/cdrtools package for extracting the contents of the release ISO.

Hopefully this will be integrated with the build process so these images are available for those who cannot prepare an image due to lack of access to a NetBSD machine.

About these ads
Categories: Uncategorized
  1. Thorsten
    August 10, 2009 at 3:07 am

    Note that MirBSD ISOs are already prepared for this. Maybe someone from TNF wants to contact us to see how it’s done? I said that a year ago or so… we also have a lot of makefs(8) related bug fixes, which – in the TNF version – creates invalid ISO filesystems.

  2. Aaron
    November 9, 2009 at 2:34 am

    Hi! Just wanted to let you know that this script worked perfectly for me! It\’d be a lot easier if the image was integrated with the build process like you mentioned. But since it isn\’t, I installed NetBSD on a VM and ran it from there. No problems running the script, and the resulting IMG file worked a treat. I used Win32DiskImager to write it to a USB stick. No problems with boot or install, target is an ASUS EeePC 900A. Though, once it was all installed there wasn\’t much I could do- ethernet didn\’t work, contrary to the "NetBSD on Netbooks" page on the wiki. WLAN doesn\’t work, but I expected that. Nor does the trackpad. Back to Linux, I suppose. :/Thanks for the script!

  3. Apek
    March 5, 2011 at 9:36 pm

    Excellent. Thank you. Could you hook it up for Linux Ubuntu as well? I’ve seen a script like this requested atleast fifty times for both NetBSD and OpenBSD, from frustrated linux users who are trying to easily get BSD sat up on their EEE machines lacking a cdrom.

  4. br1
    March 15, 2011 at 11:15 pm

    cool :) but is there any chance to get a linux version of this script? thx

    • June 14, 2011 at 8:02 am

      If you want a version of this utility for linux, try out unetbootin. It runs on Windows, Linux, or Mac OS X and works with almost all Linux distributions.

  5. August 17, 2011 at 3:54 pm

    Note that NetBSD seem to provide an img file for USB installs, they keep it hidden under ‘essentials’ however. The img for the latest version of NetBSD (5.1 at time of writing) is available here:

    http://www.netbsd.org/mirrors/torrents/#5.1-essentials

    Once you have that downloaded, you can follow Jareds instructions above to use dd to write the img to your USB stick.

    • August 17, 2011 at 4:39 pm

      …or not. The fs file from the link I gave above cannot be written to disk using dd. Back to the drawing board, sorry for the noise.

  6. September 7, 2011 at 7:05 pm

    @iswa:
    NetBSD *does* provide USB images for installation from a usb memory stick.
    See ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-5.1/memstick/
    I installed netbsd on my netbook this way.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: