Installing from USB flash drive.

Installing and upgrading FreeBSD.

Installing from USB flash drive.

Postby Barnon » 14 May 2009, 14:06

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 .
Closed minds can not learn anything new.
Barnon
Junior Member
 
Posts: 5
Joined: 24 Nov 2008, 14:52

Postby leo2501 » 25 May 2009, 12:34

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
Perfection is achieved, when there is nothing left to take away. -- Antoine de Saint-Exupery
User avatar
leo2501
Junior Member
 
Posts: 25
Joined: 10 May 2009, 12:52
Location: Buenos Aires, Argentina

Postby leo2501 » 25 May 2009, 13:07

i'll try this out http://docs.freebsd.org/cgi/getmsg.cgi?fetch=107264+0+/usr/local/www/db/text/2006/freebsd-hackers/20060326.freebsd-hackers

"a tiny script to convert a FreeBSD install iso image to a
binary ufs image ready to be flashed e.g. on an USB pendrive."

:D:D:D:D:D:D

EDIT: GRRRR it seems the script is for BSD already :'( but i didn't have a BSD machine yet
Perfection is achieved, when there is nothing left to take away. -- Antoine de Saint-Exupery
User avatar
leo2501
Junior Member
 
Posts: 25
Joined: 10 May 2009, 12:52
Location: Buenos Aires, Argentina

Postby lme@ » 26 May 2009, 16:36

Perhaps you can use a FreesBIE Live CD to create the usb boot pen?
User avatar
lme@
 
Posts: 611
Joined: 08 Oct 2007, 19:42
Location: Düsseldorf, Germany

Postby leo2501 » 26 May 2009, 22:13

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 :)
Perfection is achieved, when there is nothing left to take away. -- Antoine de Saint-Exupery
User avatar
leo2501
Junior Member
 
Posts: 25
Joined: 10 May 2009, 12:52
Location: Buenos Aires, Argentina

create freebsd flash drive from linux

Postby Barnon » 02 Jun 2009, 14:12

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.
Closed minds can not learn anything new.
Barnon
Junior Member
 
Posts: 5
Joined: 24 Nov 2008, 14:52

Postby leo2501 » 03 Jun 2009, 00:39

thankyou for that guide! i'll try that for sure! :)
Perfection is achieved, when there is nothing left to take away. -- Antoine de Saint-Exupery
User avatar
leo2501
Junior Member
 
Posts: 25
Joined: 10 May 2009, 12:52
Location: Buenos Aires, Argentina

Postby sprewell » 19 Aug 2009, 15:09

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.
sprewell
Junior Member
 
Posts: 35
Joined: 19 Aug 2009, 14:12
Location: Phoenix, AZ


Return to Installing & Upgrading

Who is online

Users browsing this forum: No registered users and 1 guest