Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jan 2002 14:25:54 -0500
From:      Randy Pratt <rpratt@ezwv.com>
To:        freebsd-newbies@FreeBSD.ORG
Subject:   Re: how to make ms_dos floppy?
Message-ID:  <200201101919.g0AJJYd17144@mail.ezwv.com>
In-Reply-To: <3C3DDE37@operamail.com>
References:  <3C3DDE37@operamail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 10 January 2002 12:25 pm, you wrote:
> I can't find the command,
> I looked for # mkdosfs. This command is cited in
> "Complete Freebsd" 3rd rd. on p. 288.
> But the cammand has no man pg and is not on my system

This must be an oversight in Greg's book.  The mkdosfs was replaced with by 
newfs_msdos (/usr/src/usr.sbin/mkdosfs Revision 1.6, Sun Jul 19 13:41:01 
1998).

Also, note that the "mformat" command referred to on that same page is not 
part of the base system.  It is a part of the mtools port 
(/usr/ports/emulators/mtools/) which is discussed on page 289.

> I thought I might try # disklabel but my brain
> began to melt after the first couple of paragraphs
> of that man page.
>
> Could you either link me to an easy explaination
> or give me the command line?


Take a look at "man newfs_msdos".  It has an example command for creating an 
msdos filesystem on a formatted floppy disk.  Just follow the operations 
described in the book on pages 286-288 and substitute "newfs_msdos" for 
"newfs".  Here's a typical scenario for creating/using an msdos floppy disk:

k6-2# fdformat /dev/rfd0
Format 1440K floppy `/dev/rfd0'? (y/n): y
Processing VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV done.

k6-2# disklabel -w -r /dev/rfd0 fd1440

k6-2# newfs_msdos -f 1440 -L foo fd0
/dev/fd0: 2847 sectors in 2847 FAT12 clusters (512 bytes/cluster)
bps=512 spc=1 res=1 nft=2 rde=224 sec=2880 mid=0xf0 spf=9 spt=18 hds=2 hid=0

k6-2# mount -t msdos /dev/fd0 /mnt

k6-2# cd /mnt

k6-2# cp /usr/home/rpratt/somenotes.txt ./ 

k6-2# ls -l
total 1
-rwxr-xr-x  1 root  wheel  168 Jan 10 14:05 somenote.txt

k6-2# cd /usr/home/rpratt 

k6-2#  umount /mnt   (you can't umount if you're in the /mnt directory)

You can now take the floppy and read/write to it in a windows/dos environment.

This should get you going.

Randy

cc'd: leegold <leegold@operamail.com>, Greg Lehey <grog@FreeBSD.org>

 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-newbies" in the body of the message




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