Samstag, 13 Jun 2009

A friend of mine posted in the German BSDGroup.de a
nice howto to use an USB-Stick as a installmedium.
(German only i’ve translated to english ;-) )

here is a quick howto:

1: clear your stick:

dd if=/dev/zero of=/dev/da0 bs=1k count=1

2: make the USB-Stick bootable

bsdlabel -Bw da0 auto

3: create an UFS2 Filesystem with GEOM Lable “FreeBSD”

newfs -L FreeBSD /dev/da0a

4: mount ISO-Image:

mdconfig -a -t vnode -f 8.0-HEAD-20090609-JPSNAP-i386-dvd1 -u 0 && mount -r -t cd9660 /dev/md0 /mnt/iso

5: mount your USB-STICK

mount /dev/da0a /mnt/USB-Stick

Now copy all files from your mounted cd
in to your USB-Stick, after that you need
to create a fstab for your USB-Stick:

vi /mnt/USB-Stick/etc/fstab and put following in:

/dev/ufs/FreeBSD / ufs ro 0 0

save it. Now you can boot from the USB-Stick.
That’s nice to have for Netbooks or PCs without
a cd/dvd drive. :-) .


20 Responses to “”

  1. Installer FreeBSD 8 depuis un clé USB at FreeBSD-fr: Les nouvelles du géant en français Says:

    [...] [...]

  2. Oliver Says:

    Oh it’s even nicer to have such a thumb drive in your pocket than burn some cd/dvd media again and again :-)

  3. Oliver Says:

    Btw. it’s bsdgroup.de not bsdforen.de ;-)

  4. take your FreeBSD with you | akephalos Says:

    [...] FreeBSD 8.0 install with a USB-Stick. [...]

  5. Martin Says:

    damn, fixed :P

  6. xert Says:

    Thank you for the howto.

    I think fstab must be in /mnt/USB-Stick/etc/fstab instead of /mnt/USB-Stick/fstab – am i right or wrong?

  7. Martin Says:

    @ xert yes you’re a right. I’ll fix that.

  8. Install FreeBSD 8.0 from USB memory stick | FreeBSD - the unknown Giant Says:

    [...] Wilke has a useful step-by-setp guide (via bsdgroup.de) to install FreeBSD 8.0 (stable version yet to be released) from a USB [...]

  9. FreeBSD 8.0 install with a USB-Stick | Martin Wilke Says:

    [...] posted here: FreeBSD 8.0 install with a USB-Stick | Martin Wilke Tags: 7-2-release, and-security, explore-first, german, machine-running, nice-howto, [...]

  10. Andrew Lankford Says:

    Why not use a UFS file system instead of ISO9660?

  11. Sylwester Says:

    @Andrew Lankford:

    Actually the filesystem of the USB Thumb Drive is UFS.
    Only the ISO-Image is cd9660.

    Just thinking of making a custom USB release with
    a customized graphical bootloader.

    See http://wiki.freebsd.org/OliverFromme/BootLoader
    for the BootLoader.

  12. Christofer Says:

    Thanks for the guide!

  13. tobé Says:

    Thanks you!

  14. Thomas Says:

    Hi fellas!
    I was wondering how to make an USF2 filesystem?? Anyone who can explain? I’ve tried with GParted Live CD but it doesn’t support this format…
    Holla at me

  15. raw Says:

    I tried to repeat the process with 7.2 release and have no success…
    If i do /dev/ufs/FreeBSD / ufs ro 0 0 on flash fstab, then FreeBSD starts from flash untill login prompt. Then if i do sysinstall – i have conflict of mountpoints
    here is df -h:
    /dev/ufs/FreeBSD /
    and if we try to install to / – error write coz we have ufs ro mode.

    so i tried another variant – /dev/ufs/FreeBSD /distr on flash fstab.
    Here we go – installation script starts automatically, like from DVD, but when i select “Install from an existing filesystem” and set /distr as root of distribution – i have “Unable to transfer the base distribution from ufs”… What’s wrong with my hands? ;)

  16. raw Says:

    maybe this is about BOOT from usb-flash, not about INSTALL?

  17. ColtonCat Says:

    Or, you can just download the “memstick” image from http://freebsd.org then do the following

    dd if=8.0-RELEASE-amd64-memstick.img of=/dev/da0 bs=10240 conv=sync

    and you will achieve the same result. I guess the advantage of doing it the way in this post is that you can install from the DVD which has all the packages in.

  18. Chris Says:

    tried this, a few years ago.

    Unless something changed dramatically, your stick will have to be *much* larger than the original CD, since there is no way to recreate the hard links on the iso by copying. ISO does not know inode numbers, so the cd9660 driver creates them out of thin air. And it does not understand the hardlinking used on iso file systems.

  19. Patrick Mahan Says:

    I had to do the following to get FreeBSD 8.0 install to boot up on an ATCA-4500 platform:

    % mount /dev/da0a /mnt/usb-stick
    % cd /mnt/usb-stick
    % echo “-P” >> boot.config

    Otherwise, It hangs after the load menu. I’m wondering if I should have modified /boot/loader.conf to use the comconsole as it’s default?

    Patrick

  20. Which *BSD should I try? Says:

    [...] a memstick install… but how do I install it to usb in linux? it says something about /dev/da0? http://miwi.bsdcrew.de/2009/06/freeb…h-a-usb-stick/ is there a floppy net-install for freebsd? the lappy has no cdrom and cant boot from usb without [...]

Leave a Reply

»
«