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.
Advertisements
Categories: Uncategorized
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.
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!
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.
cool 🙂 but is there any chance to get a linux version of this script? thx
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.
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.
…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.
@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.