1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Installing from USB flash drive.

Discussion in 'Installing and Upgrading FreeBSD' started by Barnon, May 14, 2009.

  1. Barnon

    Barnon New Member

    Messages:
    5
    Likes Received:
    0
    I have successfully installed FreeBSD 7.2Release (i386) from a
    USB flash drive. It involves a little more work than installing
    from CD/DVD but the convenience of having it on a USB flash drive
    makes it worth it.

    I created a single bootable slice with only a "/" partition. Then I used tar to copy everything from the FreeBSD DVD ISO image to the
    flash drive. I know cpio is a potentially better way to do it, but
    I wanted to keep this description simple.

    The problem that people have posted on before is that they did not
    know how to mount an "existing filesystem" so "sysinstall" can
    find the files. Well, this is fairly simple to do as it turns out.
    During the drive selection, you see the IDE drive you want to
    install to, and the USB flash drive. Select both , but only partition
    the destination drive. When you create the mount points for the
    new drive, you will see an entry for the existing USB flash drive
    filesystem with no mount point of its own, yet. Select that entry
    and hit "m" to set the mount point. I set mine to /mnt, of course
    after I created the "/" entry on the destination drive. Now you
    have the mount point, and you can tell sysinstall to mount it
    as an existing file system.

    I put together a crude first approximation of the process at
    http://www.pa.msu.edu/people/tigner/BootUSB.html. I will try
    to clean it up when I get a chance, or feel free to improve on
    it yourself .
     
  2. leo2501

    leo2501 New Member

    Messages:
    25
    Likes Received:
    0
    thank you for the job you take doing this! but i have a problem, i don't have a working freebsd machine yet, i wanna install freebsd in my netbook and i used unetbootin with a couple of isos right now and when i boot it says, CORRUPTED KERNEL IMAGE or something like that... any way you think i can have a working bootable usb disk? my working linux distro have some .img files together with the isos and you only "dd" it to the pendrive and its ready to boot
     
  3. leo2501

    leo2501 New Member

    Messages:
    25
    Likes Received:
    0
  4. lme@

    lme@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    624
    Likes Received:
    9
    Perhaps you can use a FreesBIE Live CD to create the usb boot pen?
     
  5. leo2501

    leo2501 New Member

    Messages:
    25
    Likes Received:
    0
    dont worry, i'll buy a dvd burner and install from there :) but it'll be nice to have the img files along with the isos, maybe in the near future :)
     
  6. Barnon

    Barnon New Member

    Messages:
    5
    Likes Received:
    0
    create freebsd flash drive from linux

    Hi, so sorry not to have gotten back to you earlier about this.

    I suggest that you install qemu , a hardware emulator that lets
    you run filesystem images in a window under X11. I can not give
    you step by step instructions on how to do that on a linux kernel
    distribution, since I believe it might be affected by exactly
    what distribution you are currently using.

    Once Qemu is installed, and you have downloaded the FreeBSD iso
    that you want, you should be able to create a bootable FreeBSD
    partition on the USB flash drive.

    For simplicity lets say your bsd image is called BSD.iso, and that
    the USB flash drive is currently blank (you can use dd to erase it)
    and it shows up as /dev/da0.

    qemu -boot d -cdrom BSD.iso -hda /dev/da0

    This will let you boot to the BSD.iso in a window under X11. Once
    the BSD installer is up, I suggest (again for simplicity) that
    you select to install the minimal bsd installation on ad0 (which
    is what qemu thinks the usb flash drive is. At this point you the
    USB flash drive is a bootable FreeBSD USB flash drive. Exit qemu.

    You should now be able to mount the UFS image on the flash drive
    to an appropriate mount point (create one if you want). At this
    point, delete all files on the flash drive. Now use tar to copy
    the contents of the BSD.iso to the mount point you used for the
    flash drive. Unmount the flash drive and it should now be a
    bootable FreeBSD install device.
     
  7. leo2501

    leo2501 New Member

    Messages:
    25
    Likes Received:
    0
    thankyou for that guide! i'll try that for sure! :)
     
  8. sprewell

    sprewell New Member

    Messages:
    35
    Likes Received:
    0
    This guide worked for me, so much easier than a CD install, particularly since I don't use CDs at all. I wrote the first CD's iso to my flash stick and was able to do a (kern?)-developer install with X in sysinstall without needing the other CDs. I'm glad to see that FreeBSD 8.0 will have a flash image to make this even easier, hope the next 7.* releases also have them. Most of all, sysinstall needs to be replaced with something more current.