Why is rufus not available under FreeBSD ?

Michael Sierchio kudzu at tenebras.com
Wed Jan 29 23:00:58 UTC 2020


One small inline note below...

On Wed, Jan 29, 2020 at 12:15 PM Vlad D. Markov via freebsd-questions <
freebsd-questions at freebsd.org> wrote:

For some reason I wanted a bootable dos usb in the distant past. I found
> this on my computer:
>
> #!/bin/sh
>
> # empty the disk of all data
> dd if=/dev/zero of=/dev/da0 bs=1m count=2
>

If you're going to create a gpart partition scheme to the disk, you want to
erase the beginning and end (in the case there was already gpart scheme)

BOOTSIZ="128k"

DISK="$1"


offset=`diskinfo $DISK | awk '{ print $4 - 128 }'`

dd if=/dev/zero of=/dev/$DISK bs=${BOOTSIZ} count=1

dd if=/dev/zero of=/dev/$DISK seek=$offset

Or the equivalent..


> # 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
> cd /mnt && touch IO.SYS MSDOS.SYS COMMAND.COM
> cp /home/vlad/mkDos/dosFiles/* /mnt
>
> umount /mnt
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe at freebsd.org"
>


-- 

"Well," Brahmā said, "even after ten thousand explanations, a fool is no
wiser, but an intelligent person requires only two thousand five hundred."

- The Mahābhārata


More information about the freebsd-questions mailing list