# Loading DVD iso to USB key



## pathiaki (Apr 24, 2014)

Hi,

Is there a way to do this with a recent distro release?  I've found several and none seem to work, but the latest was an 8.x distro release. Also, while we're at it, can this be done with zfs as the filesystem on the key or does it require ZFS? Next, is fdisk and bsdlabel the only way to do this?  Can I use gpart?  If so, how?

Thank you,

Paul


----------



## wblock@ (Apr 24, 2014)

Why not just download the memory stick image and write it as shown in the Handbook?  The DVD used to have extra packages.  I don't know if they still do, but the packages were usually quickly obsolete anyway.


----------



## pathiaki (Apr 24, 2014)

Warren,

Yes, I did that.   It works great.  However, I have some software that also needs installation from that memory as well. I didn't realize the memstick has everything comparing the size to the dvd.  It will work fine for this purpose. My next question is how do I either: add to the ISO image? *O*r slice the 32 GB USB into two partitions with the other software on the second partition? I assume the former can be done with growisofs or some tools like that and the latter can be done through labelling/partitioning but how?

Thank you for the help! 

Paul


----------



## wblock@ (Apr 24, 2014)

Sorry, do you mean you want to use one USB stick for multiple ISO images?  Or that you want to combine an ISO with the memory stick so the contents of the ISO are available when installing?


----------



## pathiaki (Apr 24, 2014)

Warren,

Yes.  Either will work.  FreeBSD memstick.iso and mysoftware.iso.  Basically, I want to install FreeBSD followed by my software.  I can do this easily by going to 'shell' from the install prompt.  At that point, if it's part of the FreeBSD iso, that's fine.  If it's not, and it's on a partition on the key, that's great.  I'll just mount the partition from 'shell' and install it from there.  (I'd actually prefer the latter option as it will allow me to segment the software and work on revisions of my software while keeping the FreeBSD version at the most recent RELEASE version.)


----------



## wblock@ (Apr 24, 2014)

It will depend on the other ISO.  There are several ways to put multiple ISO images on a memory stick.  YUMI can create them.  That can be done manually with Syslinux.

After writing a FreeBSD memory stick, you could modify it with gpart(8), adding another partition for the other ISO.  Then that ISO will have to be unpacked into that partition.  Some way to boot that second partition will have to be found, maybe boot0cfg(8).  Or you could enlarge the FreeBSD installation filesystem and just save the entire second ISO image to it.  Boot to a shell and use mdconfig(8) to mount that image.


----------



## pathiaki (Apr 24, 2014)

Warren,

The other ISO is nothing more than an cd9660 data drive with software on it.  I can easily unpack it into the second partition of disk after creating it with gpart() and an MD.  No issue there. 

I'm trying to load the FreeBSD 10.0 RELEASE memstick into that partition.

However, my biggest problem seems to be that if I:

`dd if=<FreeBSD memstick image> of=/dev/da0a bs=64k conv=sync`

I can boot until it tries to mount the drive.

I then get the


```
Mounting from ufs:/dev/ufs/FreeBSD_Install filed with error 19.
```

`gpart show da0` show:

```
=>            0      62554112  da0  BSD  (29G)
               0                 32       - free -  (16k)
             32       16777216   1  freebsd-ufs  (8.0G)
  16777248        44040192  2  freebsd-ufs  (21G)
  60817440          1736672      - free -  (848M)
```

Do I need to install boot blocks somewhere?  (doubtful as it got through BTX, loaded the kernel, and then tried to mount)
Do I need to modify /boot/loader.conf in the FreeBSD partition (1)?

Am I totally on the wrong track here or is the reason you suggested growfs() and everything else is the only way to do this?

Thank you,

Paul


----------



## wblock@ (Apr 24, 2014)

I did not suggest growfs().

Error 19 is ENODEV.  Usually it means the device is not present.  Sometimes that happens with USB because the USB device appears too late.  It may be fixable by reconnecting the USB stick before that error, to force a reconnection.  That might also not work, depending on whether the installer is running from a memory disk or not.

Really, this is totally unrelated to partitions and filesystems, unless the UFS label is being wiped out.  Use `tunefs -p da0p1` to show the UFS label.


----------

