ISO on flash drive?

I've successfully installed FreeBSD using the FreeBSD-10.2-RELEASE-amd64-memstick.img. However, no iso boots from a flash drive. I see a momentary flash, but then see my normal grub screen.

The FAQ page describes the img image as being sufficient for a flash drive. However, unless I'm missing it, there's no mention that iso images can't be used.

I've successfully written ISO images to flash drives with other distributions. So, is the FreeBSD iso image designed to not be used on a flash drive?
 
The ISO image is solely for CD/DVD, it cannot be used for flash drives. That's why we have separate images.
 
It's possible to make an universal image that works both on CD/DVD and a flash drive (for example the netinst image on Debian) but it's not yet possible on FreeBSD because of how the boot blocks and loader(8) work.
 
It's possible to make an universal image that works both on CD/DVD and a flash drive (for example the netinst image on Debian) but it's not yet possible on FreeBSD because of how the boot blocks and loader(8) work.

Thank you, it makes more sense now.

I'm not trying to start a distribution war, but as writing an ISO to flash is so common, shouldn't the FAQ page specifically state the ISO images don't work with flash drives? I realize there are separate files, but why is the img image so much smaller? Does it contain the same content as the iso?

The size of the img led me to think that file exists to fit on a smaller storage device. That, coupled with no disclaimer, led me to assume the problem was on my end.
 
Aren't you comparing the sizes of the mini-memstick image to the CD image? The memstick image and CD images aren't that much different in size.

No, I'm comparing it to the dvd image. FreeBSD-10.2-RELEASE-amd64-dvd1.iso is 2,674,556 KB while FreeBSD-10.2-RELEASE-amd64-memstick.img is 755,520 KB.

As with memstick, I assumed the CD image exists as a smaller size due to the storage capacity of the CD.
 
dvd1

This contains everything necessary to install the base FreeBSD operating system, the documentation, and a small set of pre-built packages aimed at getting a graphical workstation up and running. It also supports booting into a "livefs" based rescue mode. This should be all you need if you can burn and use DVD-sized media.

memstick

This can be written to an USB memory stick (flash drive) and used to do an install on machines capable of booting off USB drives. It also supports booting into a "livefs" based rescue mode. There are no pre-built packages.

As one example of how to use the memstick image, assuming the USB drive appears as /dev/da0 on your machine something like this should work:

# dd if=FreeBSD-10.2-RELEASE-amd64-memstick.img \
of=/dev/da0 bs=1m conv=sync

Be careful to make sure you get the target (of=) correct.
 
This can be written to an USB memory stick (flash drive) and used to do an install on machines capable of booting off USB drives. It also supports booting into a "livefs" based rescue mode. There are no pre-built packages.

As I mentioned in my original post, I successfully installed FreeBSD with the memstick img. But, if an ISO can't be written to a flash device, why is the img data inferior to the ISO? I understand there are no pre-built packages, but why? My flash device can easily accommodate the data in the DVD ISO.

After installing, I mounted the iso I'd written to my flash device as /dist. I then executed setenv REPOS_DIR /dist/packages/repos and built some packages as a test. But if the data on the img and iso versions were identical I could do so from the flash img.

This is not the end of the world, but that's my take as a new user.
 
Last edited by a moderator:
But, if an iso can't be written to a flash device, why is the img data inferior to the iso?
It isn't. The memstick image is the same as the CD image. It's the DVD image that's the odd one out.

You really shouldn't be using the packages on the DVD any way. By the time you install the release the packages are old and will require updating. So it's best not to install them from DVD and pull them directly from the repositories.
 
You can always convert the ISO to IMG. Keep in mind that packages from the original distribution will be outdated, so installing over the Internet is recommended.
 
It isn't. The memstick image is the same as the CD image. It's the DVD image that's the odd one out.

You really shouldn't be using the packages on the DVD any way. By the time you install the release the packages are old and will require updating. So it's best not to install them from DVD and pull them directly from the repositories.

I prefer installing from medium and creating a backup image before connecting to the internet. For updates, the internet is necessary, but for installation I disagree. Different philosophies, in my opinion (what do I know?) the memstick should be brought up to the dvd level.
 
You can always convert the ISO to IMG. Keep in mind that packages from the original distribution will be outdated, so installing over the Internet is recommended.

Thank you, that's a good idea. I just converted it with dd and will test it tomorrow.
 
I prefer installing from medium and creating a backup image before connecting to the internet. For updates, the internet is necessary, but for installation I disagree. Different philosophies, in my opinion (what do I know?) the memstick should be brought up to the dvd level.
You might want to give PC-BSD a try, that's probably more like you expected.
 
You might want to give PC-BSD a try, that's probably more like you expected.

I tried PC-BSD after attempting the FreeBSD ISO. Although I could boot to the PC-BSD ISO on my flash drive, the installation encountered ACPI errors. I had roughly the same problem with FreeBSD but boot -m fixed it. Perhaps there's a comparable PC-BSD solution but I have FreeBSD up and running.
 
Last edited by a moderator:
You can always convert the ISO to IMG. Keep in mind that packages from the original distribution will be outdated, so installing over the Internet is recommended.

Converting to an IMG image with dd did not work. It's probably more complicated.

I have FreeBSD installed so this is more from curiosity. Is there a method other than dd bs=4M if=InFileName.iso of=FreeBSD.img?
 
Last edited by a moderator:
You are confused: that dd is just a copy cp file.a file.b, dd converts nothing (except lowercase/uppercase and such). Renaming mv file.a file.b would do the same, when original file is not needed anymore.

Also, any bs= above 128k (usually, depends on system's MAXPHYS) is not worth much, it just hinders caching.
There will be read-ahead and write-behind, which work best when you use the MAXPHYS. There might be exceptions to this, usually depending on the output device.

Juha

Edit: Often perpetuating misinformation, I checked the numbers:

Code:
1GB random img
dd bs=1m of=/dev/da0p3 if=img    562 seconds real (crappy memstick)
dd bs=128k of=/dev/da0p3 if=img 550 seconds real
dd bs=128k of=/dev/mmcsd0s2b    88.71 seconds real (less crappy SD) 
dd bs=1m of=/dev/mmcsd0s2b      88.72 seconds real
 
You are confused: that dd is just a copy cp file.a file.b, dd converts nothing (except lowercase/uppercase and such). Renaming mv file.a file.b would do the same, when original file is not needed anymore.

That makes sense as I did a "diff" on the files and they're identical. I've used dd, but only to burn images to flash drives. The reason I tried dd is I found some posts suggesting that very thing for converting from ISO to IMG.
 
cmp(1) would be more appropriate when comparing binary data.

CD image would be an ISO9660 formatted thing, memorysticks have different partitioning. There are plenty of ways to convert, but I don't know the best way (except just getting the proper image).

You could insert the memstick and mount the CD image via mdconfig(8), then start install from the mounted CD to the memstick device, but you could easily trash your harddisk installation instead.

Juha
 
ISO9660 CD images use 2K blocks and have a special filesystem. Some computers can boot from those images when they are copied to a flash drive, but not all. Converting an ISO9660 image to a real hard drive/flash drive image is much more complicated. For FreeBSD, there is very little point, it is usually quicker and easier to just download the correct type of image.
 
From my OSX environment it is very easy actually (sorry for the off topic answer)

hdiutil convert -format UDRW -o /path/to/target.img /path/to/source.iso
sudo dd if=/path/to/target.img of=/dev/rdiskN bs=1m (where N is the USB disk#)
 
Back
Top