very slight OT: creating a *bootable* MSDOS7 memstick

Vlad D. Markov dvoich at
Fri Aug 21 20:13:00 UTC 2020

On Fri, 21 Aug 2020 12:39:55 -0400
TIM KELLERS <trkellers at> wrote:

> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"

Replied to wrong email before, oops.


# empty the disk of all data
dd if=/dev/zero of=/dev/da0 bs=1m count=2

# Create a master boot record on the disk
gpart create -s MBR da0

# add a 64MB slice (partition) of a type
gpart add -s 64m -t \!6 da0      #fat16
#gpart add -s 64m -t \!12 da0   #fat32

# set the first slice (partitiion) active on dev da0
gpart set -a active -i 1 da0

# place the bootcode in the MBR
gpart bootcode -b /boot/mbr da0

# make file system nd install bootstrap code
newfs_msdos -B /home/vlad/mkDos/bootsect -o 63 /dev/da0s1
#newfs_msdos -F 32 -c 1 -S 512 -C 34089472  -B /home/vlad/mkDos/bootsect -o 63 /dev/da0s1

mount_msdosfs /dev/da0s1 /mnt
cp /home/vlad/mkDos/dosFiles/* /mnt

umount /mnt

I dream of a better tomorrow, where chickens can cross the road and not be questioned about their motives.?
? Ralph Waldo Emerson

More information about the freebsd-questions mailing list