Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Aug 2020 16:12:53 -0400
From:      "Vlad D. Markov" <dvoich@aim.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: very slight OT: creating a *bootable* MSDOS7 memstick
Message-ID:  <20200821161253.c058d5d8dbaa0bc2a65139c0@aim.com>
In-Reply-To: <83bc6915-fd36-846c-841f-ebfc159c46c7@gmail.com>
References:  <CAGBxaXmEu_B-jtuC6J7oN8QShwcVf5wR-BUc81ymH4NAwjMgPw@mail.gmail.com> <CAGBxaX=QqduKdMvQT%2BhqVbHiKST4c8-UJ2Sg3TGhX-f2_fABaw@mail.gmail.com> <83bc6915-fd36-846c-841f-ebfc159c46c7@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 21 Aug 2020 12:39:55 -0400
TIM KELLERS <trkellers@gmail.com> wrote:

>=20
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o=
rg"

Replied to wrong email before, oops.

#!/bin/sh

# empty the disk of all data
dd if=3D/dev/zero of=3D/dev/da0 bs=3D1m count=3D2

# 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
~


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200821161253.c058d5d8dbaa0bc2a65139c0>