Making FreeBSD 9 DVD .iso bootable on a USB drive

At the location I'm at there is no Internet connection. I would like to use a DVD .iso file and boot with it.

I tried Unetbootin with no success.
I tried Universal USB Installer with no success.

Any recommendations?
 
I have a 2+ GB ISO file without a way of making it bootable. The 600MB IMG files work excellent using win32 disk manager (as per handbook's instructions), but I need to "burn" the DVD ISO to a USB drive.
 
If you are on Windows then Unetbootin is by far the easiest method. It is also easy if you have access to a live FreeBSD system as well.
 
bbzz said:
If you are on Windows then Unetbootin is by far the easiest method. It is also easy if you have access to a live FreeBSD system as well.

I tried it, but it failed to boot :(
 
I've tried once more to use UNetBootin to make a i386 FreeBSD DVD iso image bootable on a USB drive. It took about two hours for the process to finish and the results are: non existent. The hardware totally ignores the idea that this USB drive has any bootable information on it (I tested booting of a USB drive prepared with an .img file as described above with good results.

Quite a frustrating problem. I do not yet understand the cause of this unbootability.

:/
 
I quick-formatted a 16gb USB flash drive with FAT32 fs under Windows instead of NTFS. I'm running UNetbootin once more to see if it makes a difference.
 
Have you tried simply dd'ing the file (ISO image) to the USB device? (Note: to the root of the device, eg. da0, not da0s...). It has worked for me in the past (I haven't tried it with 9.0 yet)
 
tingo said:
Have you tried simply dd'ing the file (iso image) to the usb device? (Note: to the root of the device, eg. da0, not da0s...)
It has worked for me in the past (I haven't tried it with 9.0 yet)

Tingo, that flew over my head. Could you explain in detail how to dd.
Thanks!
 
FreeDomBSD, in every RELEASE announcement you can read:
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-9.0-RELEASE-amd64-memstick.img of=/dev/da0 bs=10240 conv=sync

Be careful to make sure you get the target (of=) correct.

Also check dd(1).

You said you were formatting it with FAT32 instead of NTFS, but it doesn't matter since FreeBSD can only be installed on UFS or ZFS and the existing filesystem will be overwritten anyway.
 
The memory stick image (.img) works great. I can't get the .iso file to work. Will the command for .iso retain the format of the .img command?

After reading the man page I was no closer in understanding the function of the command. How is it different from copying?

I will try it out, assuming it's available in Ubuntu.

If I can't get it to work I will buy a USB DVD burner.

Thank you so much for the tips!

:)
 
FreeDomBSD said:
The memory stick image (.img) works great. I can't get the .iso file to work. Will the command for .iso retain the format of the .img command?
The IMG must be dd-ed, the ISOs must be burnt.

FreeDomBSD said:
After reading the man page I was no closer in understanding the function of the command. How is it different from copying?
You mean doing copy/paste or using the cp(1) command? These copy files from a source to a target directory and work on a filesystem level. The dd(1) command has the ability to copy every single block (sector), in other words the boot sector, filesystem structures, etc.

FreeDomBSD said:
I will try it out, assuming it's available in Ubuntu.
It's a standard Unix command so it's available on practically everything UNIX(R)/Unix-like with small usage differences (related to devices and how they work).
 
You can't just dd .iso to USB stick, it won't boot. Instead, partition USB and add bootcode to it. Then mount .iso and copy contents from it to created USB partition. This is very easy if you have a working FreeBSD setup already. You also have dd for Windows, but I never tried it.
 
bbzz said:
You can't just dd .iso to USB stick, it won't boot.
Yes, you can. Or at least, that is what I have done several times in the past. Simply dd the .iso file to the root of a USB memory stick. IIRC, this worked for me on 7.3-RELEASE, 8.1-RELEASE and 8.2-RELEASE at least. Both i386 and amd64. YMMV.
 
Debian's netinst ISO is meant to be used that way, the boot loader (I think it's GRUB) works out of the box both on a CD and on a memory stick.
 
You just could install the base FreeBSD system from the working memstick.img, afterwards mount dvd1.iso to that file system with mdconfig() (see below how to) and pkg_add the needed packages from there, presuming he package collection is what you need from the DVD. No need to buy a USB DVD burner.

# mdconfig -a -t vnode -f /path/to/image.img -u 0
# mount -t cd9660 /dev/md0 /mnt
After you are done:
# umount /mnt
# mdconfig -d -u 0
 
tingo said:
Yes, you can. Or at least, that is what I have done several times in the past. Simply dd the .iso file to the root of a USB memory stick. IIRC, this worked for me on 7.3-RELEASE, 8.1-RELEASE and 8.2-RELEASE at least. Both i386 and amd64. YMMV.
Yep, there's an "emulation mode" where the BIOS sees USB mass storage devices as CDROM or floppies depending on the format.
 
tingo said:
Yes, you can. Or at least, that is what I have done several times in the past. Simply dd the .iso file to the root of a USB memory stick. IIRC, this worked for me on 7.3-RELEASE, 8.1-RELEASE and 8.2-RELEASE at least. Both i386 and amd64. YMMV.

Under Ubuntu, the option to format my 14.91 GiB hard drive was grayed out. So I deleted the old FAT32 partition and made a new unformated partition (I considered not making any new partitions, but decided to try it with an unformated partition spanning the whole disk first).

Alright, so I used the command from the handbook and replaced .img with .iso.
The command went through OK.

I tried to boot off the USB and one again: nothing.

Ubuntu auto-mounts the USB drive as FREEBSD_INSTALL and you can browse the files on it. Meanwhile GParted thinks that the drive is unformatted and as I've mentioned it won't boot from it.

Maybe all I need now is a boot sector? How can I add one?
 
Code:
ubuntu@ubuntu:~$ cd /media/xdrive/
ubuntu@ubuntu:/media/xdrive$ sudo dd if=FreeBSD-9.0-RELEASE-amd64-dvd1.iso of=/dev/sdd bs=10240 conv=sync
233255+0 records in
233255+0 records out
2388531200 bytes (2.4 GB) copied, 715.281 s, 3.3 MB/s
 
dave said:
Why not just go to the local shop and buy a cheap USB CD/DVD drive?

No good reason not to: as I mentioned, I'll do so if nothing else works. I'm just trying to learn a thing or two and operaiting within an environment where resource constraints (no USB DVDRW drive) force me to learn and experiment were always the way I learned the fastest (good way to "dive into" a subject for me as well). Plus it's pretty useful, wouldn't you say?
 
Maybe I can do something like this?
I know these are two different OSs, but boot code is boot code, right?

https://help.ubuntu.com/community/BootFromUSB said:
Either boot from the Ubuntu Desktop Live CD or mount it in the filesystem. Suppose that Ubuntu is running and the live CD is mounted in /media/cdrom (as simple as sudo mount karmic-desktop-i386.iso /media/cdrom), let's make a new dir and store vmlinuz and initrd in it:
Code:
sudo mkdir /boot/usb-boot
sudo cp /media/cdrom/casper/vmlinuz /boot/usb-boot
sudo cp /media/cdrom/casper/initrd.lz /boot/usb-boot

Edit your GRUB's menu (with gksudo gedit /boot/grub/menu.lst) and add at the end:

Code:
title USB FLASH DRIVE
root (hd0,6)
kernel /boot/usb-boot/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper noprompt cdrom-detect/try-usb=true persistent
initrd /boot/usb-boot/initrd.lz
boot

Now you can reboot your system with your Ubuntu Bootable usb device plugged in and choose USB FLASH DRIVE (tested with Ubuntu 9.10 Karmic Koala Alpha 3).
 
Back
Top