Solved booting MacPro1,1 with 32bit EFI (not BIOS/Legacy)

balanga please re-read what has T-Daemon said above; he answered your question.

Let's say though your image is one of these: 13.2-RELEASE-i386-memstick.img. You do this:

Code:
mkdir /a
mdconfig -a -t vnode -f FreeBSD-13.2-RELEASE-i386-memstick.img
gpart show md0
=>      1  2021584  md0  MBR  (987M)
        1  2021584    1  freebsd  [active]  (987M)

mount -t ufs /dev/md0s1a /a
echo new file > /a/afile
umount /a
mdconfig -d -u 0

It depends on what "img" is. Simplified: mdconfig creates a layer for you (backing store), you can mount it as if it was a disk and hence treat it as such.
Again, ".img" can be anything. But with these images it is exactly this.
 
How would you actually create the img file once you have change some file or other in the original image.

You don't need to create a new image from a mdconfig(8) attached .img file.

After mounting and modifying the content of the installer image, just unmount and detach the memory disk. It's like plugging in a USB stick, mounting the file system, copying some files over, and unmounting it.

Code:
# mdconfig -u 0 FreeBSD-memstick.img

Example mount root file system:
# mount /dev/md0s2a /mnt
# cp file /mnt/root
# umount /mnt

Example mount ESP file system:
# mount_msdosfs /dev/md0s1 /mnt
# cp /boot/loader.efi /mnt/efi/boot/bootx64.efi
# umount /mnt

# mdconfig -du 0

In case there are big files to copy over, the .img needs to be extended and the file system grown to fit before attaching it as a memory disk.
 
Oh... I started another thread on this same topic. I installed OpenBSD but really want FreeBSD. OpenBSDs automatic partition layout is insane.
 
Back
Top