|
Lines 1096-1243
Link Here
|
| 1096 |
<author> |
1096 |
<author> |
| 1097 |
<firstname>Julio</firstname> |
1097 |
<firstname>Julio</firstname> |
| 1098 |
<surname>Merino</surname> |
1098 |
<surname>Merino</surname> |
| 1099 |
<contrib>Contributed by </contrib> |
1099 |
<contrib>Original work by </contrib> |
| 1100 |
</author> |
1100 |
</author> |
| 1101 |
</authorgroup> |
1101 |
</authorgroup> |
| 1102 |
<!-- 24 Dec 2001 --> |
1102 |
<!-- 24 Dec 2001 --> |
|
|
1103 |
<authorgroup> |
| 1104 |
<author> |
| 1105 |
<firstname>Martin</firstname> |
| 1106 |
<surname>Karlsson</surname> |
| 1107 |
<contrib>Rewritten by </contrib> |
| 1108 |
</author> |
| 1109 |
</authorgroup> |
| 1110 |
<!-- 10 Apr 2003 --> |
| 1103 |
</sect1info> |
1111 |
</sect1info> |
| 1104 |
|
1112 |
|
| 1105 |
<title>Creating and Using Floppy Disks</title> |
1113 |
<title>Creating and Using Floppy Disks</title> |
| 1106 |
|
1114 |
|
| 1107 |
<para>Floppy disks are, nowadays, an old-fashioned medium to |
1115 |
<para>Storing data on floppy disks is sometimes useful, for example |
| 1108 |
store/share data. Although, there are still some times when you |
1116 |
when one does not have any other removable storage media or when one needs |
| 1109 |
need to use them, because you do not have any other removable |
1117 |
to transfer small amounts of data to another computer.</para> |
| 1110 |
storage media or you need to use what you have saved in them on |
|
|
| 1111 |
any other computer.</para> |
| 1112 |
|
1118 |
|
| 1113 |
<para>This section will explain how to use floppy disks in |
1119 |
<para>This section will explain how to use floppy disks in |
| 1114 |
FreeBSD, that is, formating and copying/restoring data from |
1120 |
FreeBSD, and will cover formating, copying, and restoring data from |
| 1115 |
them. But... I really have written this to help you about how to |
1121 |
floppies.</para> |
| 1116 |
create forced-size floppies.</para> |
|
|
| 1117 |
|
1122 |
|
| 1118 |
<sect2> |
1123 |
<sect2> |
| 1119 |
<title>The device</title> |
1124 |
<title>Formatting floppies</title> |
|
|
1125 |
|
| 1126 |
<sect3> |
| 1127 |
<title>The device</title> |
| 1120 |
|
1128 |
|
| 1121 |
<para>Floppy disks are accessed through entries in |
1129 |
<para>Floppy disks are accessed through entries in |
| 1122 |
<filename>/dev</filename> (like any other device). To access the |
1130 |
<filename>/dev</filename>, just like other devices. To access the |
| 1123 |
raw floppy disk you can use <filename>/dev/fd<replaceable>X</replaceable></filename>, |
1131 |
raw floppy disk one uses <filename>/dev/fd<replaceable>N</replaceable></filename>, |
| 1124 |
where <replaceable>X</replaceable> stands for the drive number, usually 0. When the disk is |
1132 |
where <replaceable>N</replaceable> stands for the drive number, |
| 1125 |
formatted you can use <filename>/dev/fd<replaceable>X</replaceable></filename>, or |
1133 |
usually 0, or in 4.8 or older |
| 1126 |
whichever of the other devices named |
1134 |
<filename>/dev/fd<replaceable>NX</replaceable></filename>, |
| 1127 |
<filename>/dev/fd<replaceable>XY</replaceable></filename>, where <replaceable>Y</replaceable> stands for a |
1135 |
where <replaceable>X</replaceable> stands for a letter.</para> |
| 1128 |
letter. These are all the same.</para> |
1136 |
|
| 1129 |
|
1137 |
<para>In 5.0 or newer, simply use |
| 1130 |
<para>Other important devices are |
1138 |
<filename>/dev/fd<replaceable>N</replaceable></filename>.</para> |
| 1131 |
<filename>/dev/fd<replaceable>X</replaceable>.<replaceable>size</replaceable></filename>, where <replaceable>size</replaceable> is a floppy disk |
1139 |
|
| 1132 |
size in kilobytes. These entries are used at low-level format |
1140 |
<sect4> |
| 1133 |
time to determine the disk size.</para> |
1141 |
<title>The disk size in 4.8 or older versions</title> |
| 1134 |
|
1142 |
|
| 1135 |
<para>Sometimes you will have to (re)create these entries under |
1143 |
<para>There are also <filename>/dev/fd<replaceable>N</replaceable>.<replaceable>size</replaceable></filename> |
| 1136 |
<filename>/dev</filename>. To do it, you can issue:</para> |
1144 |
devices, where <replaceable>size</replaceable> is a floppy disk |
| 1137 |
|
1145 |
size in kilobytes. These entries are used at low-level format |
| 1138 |
<screen>&prompt.root; <userinput>cd /dev && ./MAKEDEV "fd*"</userinput></screen> |
1146 |
time to determine the disk size.</para> |
| 1139 |
<note><para>In FreeBSD 5.0, &man.devfs.5; will automatically |
1147 |
|
| 1140 |
manage device nodes in <filename>/dev</filename>, so use of |
1148 |
<para>Sometimes the entries under <filename>/dev</filename> will |
| 1141 |
<command>MAKEDEV</command> is not necessary.</para></note> |
1149 |
have to be (re)created. To do that, issue:</para> |
|
|
1150 |
|
| 1151 |
<screen>&prompt.root; <userinput>cd /dev && ./MAKEDEV "fd*"</userinput></screen> |
| 1152 |
</sect4> |
| 1153 |
|
| 1154 |
<sect4> |
| 1155 |
<title>The disk size in 5.0 or newer versions</title> |
| 1156 |
|
| 1157 |
<para>In 5.0, &man.devfs.5; will automatically |
| 1158 |
manage device nodes in <filename>/dev</filename>, so use of |
| 1159 |
<command>MAKEDEV</command> is not necessary.</para> |
| 1160 |
|
| 1161 |
<para>The desired disk size is passed to &man.fdformat.1; through |
| 1162 |
the <userinput>-f</userinput> flag. Supported sizes are listed in |
| 1163 |
&man.fdcontrol.8;</para> |
| 1164 |
</sect4> |
| 1165 |
</sect3> |
| 1166 |
|
| 1167 |
<sect3> |
| 1168 |
<title>Formatting</title> |
| 1169 |
|
| 1170 |
<para>A floppy disk needs to be low-level formated before it can |
| 1171 |
be used. This is usually done by the vendor, but formatting is a good way |
| 1172 |
to check media integrity. It can also be used to force a larger |
| 1173 |
disk size.</para> |
| 1174 |
|
| 1175 |
<para>To low-level format the floppy disk you need to |
| 1176 |
use &man.fdformat.1;. This utility expects |
| 1177 |
the device name as an argument.</para> |
| 1178 |
|
| 1179 |
<para>Forced disks will take longer to format due to |
| 1180 |
the larger disk size. Other disk |
| 1181 |
sizes found in <filename>/dev</filename> can be used, |
| 1182 |
but the most stable and compatible forced |
| 1183 |
size is 1720kB for 3.5inch disks.</para> |
| 1184 |
|
| 1185 |
<para>Make note of any disk error , as this can help determining if |
| 1186 |
the disk is good or bad.</para> |
| 1187 |
|
| 1188 |
<sect4> |
| 1189 |
<title>Formatting in 4.8 or older versions</title> |
| 1190 |
|
| 1191 |
<para>Use the |
| 1192 |
<filename>/dev/fd<replaceable>N</replaceable>.<replaceable>size</replaceable></filename> devices |
| 1193 |
to either format the floppy to its real size, or to force a larger |
| 1194 |
disk size. Insert a new 3.5inch floppy disk in your drive and issue:</para> |
| 1195 |
|
| 1196 |
<screen>&prompt.root; <userinput>/usr/sbin/fdformat /dev/fd0.1440</userinput></screen> |
| 1197 |
|
| 1198 |
<para>To force the floppy disk size, use other entries |
| 1199 |
in <filename>/dev</filename>. With the same floppy, issue:</para> |
| 1200 |
|
| 1201 |
<screen>&prompt.root; <userinput>/usr/sbin/fdformat /dev/fd0.1720</userinput></screen> |
| 1202 |
</sect4> |
| 1203 |
|
| 1204 |
<sect4> |
| 1205 |
<title>Formatting in 5.0 or newer versions</title> |
| 1206 |
|
| 1207 |
<para>Use the <filename>/dev/fd<replaceable>N</replaceable></filename> |
| 1208 |
devices to either format the floppy to its real size, or to force a larger |
| 1209 |
disk size. Check &man.fdcontrol.8; for the size you want the disk to |
| 1210 |
have. Insert a new 3.5inch floppy disk in your drive and issue:</para> |
| 1211 |
|
| 1212 |
<screen>&prompt.root; <userinput>/usr/sbin/fdformat -f 1440 /dev/fd0</userinput></screen> |
| 1213 |
|
| 1214 |
<para>To force the floppy disk size, use other entries |
| 1215 |
in <filename>/dev</filename>. With the same floppy, issue:</para> |
| 1216 |
|
| 1217 |
<screen>&prompt.root; <userinput>/usr/sbin/fdformat -f 1720 /dev/fd0</userinput></screen> |
| 1218 |
</sect4> |
| 1219 |
</sect3> |
| 1142 |
</sect2> |
1220 |
</sect2> |
| 1143 |
|
1221 |
|
| 1144 |
<sect2> |
|
|
| 1145 |
<title>Formatting</title> |
| 1146 |
|
1222 |
|
| 1147 |
<para>A floppy disk needs to be low-level formated before it can |
|
|
| 1148 |
be used. This is usually done by the vendor but you may want to |
| 1149 |
do it to check media integrity or to force the disk capacity to |
| 1150 |
be bigger.</para> |
| 1151 |
|
| 1152 |
<para>To format the floppy at a low-level fashion you need to |
| 1153 |
use &man.fdformat.1;. This utility expects |
| 1154 |
the device name as an argument. We will use those |
| 1155 |
<filename>/dev/fd<replaceable>X</replaceable>.<replaceable>size</replaceable></filename> devices, which will allow us |
| 1156 |
to format the floppy to its real size, or force them. So you |
| 1157 |
insert a new 3.5inch floppy disk in your drive and issue:</para> |
| 1158 |
|
| 1159 |
<screen>&prompt.root; <userinput>/usr/sbin/fdformat /dev/fd0.1440</userinput></screen> |
| 1160 |
|
| 1161 |
<para>This will take a while... You should notice any disk error |
| 1162 |
here (this can help you determining which disks are good or |
| 1163 |
bad).</para> |
| 1164 |
|
| 1165 |
<para>To force the floppy disk size, we will use other entries |
| 1166 |
in <filename>/dev</filename>. Get the same floppy and issue: |
| 1167 |
|
| 1168 |
<screen>&prompt.root; <userinput>/usr/sbin/fdformat /dev/fd0.1720</userinput></screen> |
| 1169 |
|
| 1170 |
<para>It will take some more time than before (forced disks are |
| 1171 |
slower). When it finishes, you will have a 1720kB floppy disk, |
| 1172 |
but for the moment you will not notice any difference. You may |
| 1173 |
use other disk sizes that you can find in <filename>/dev</filename>, but the most |
| 1174 |
stable/compatible is the 1720kB for 3.5inch disks.</para> |
| 1175 |
</sect2> |
| 1176 |
|
1223 |
|
| 1177 |
<sect2> |
1224 |
<sect2> |
| 1178 |
<title>The disklabel</title> |
1225 |
<title>The disklabel</title> |
| 1179 |
|
1226 |
|
| 1180 |
<para>After low-level formatting the disk, you will need to |
1227 |
<para>After low-level formatting the disk, you will need to |
| 1181 |
place a disklabel on it. This disklabel will be destroyed |
1228 |
place a disklabel on it. This disklabel will be destroyed |
| 1182 |
later, but it is needed by the system to determine the size of |
1229 |
later, but it is needed by the system to determine the size of |
| 1183 |
the disk and its geometry later.</para> |
1230 |
the disk and its geometry later.</para> |
| 1184 |
|
1231 |
|
| 1185 |
<para>The new disklabel will take over the whole disk, and will |
1232 |
<para>The new disklabel will take over the whole disk, and will |
| 1186 |
contain all the proper information about the geometry of the |
1233 |
contain all the proper information about the geometry of the |
| 1187 |
normal or forced floppy. Take a look to |
1234 |
normal or forced floppy. The geometry values for the disklabel |
| 1188 |
<filename>/etc/disktab</filename> now; you will see geometry |
1235 |
are listed in <filename>/etc/disktab</filename> now. |
| 1189 |
values of all kinds of floppy disks. |
|
|
| 1190 |
|
1236 |
|
| 1191 |
<para>You can run now &man.disklabel.8; |
1237 |
<para>You can run now &man.disklabel.8; like so:</para> |
| 1192 |
like:</para> |
|
|
| 1193 |
|
1238 |
|
| 1194 |
<screen>&prompt.root; <userinput>/sbin/disklabel -B -r -w /dev/fd0 <replaceable>fdsize</replaceable></userinput></screen> |
1239 |
<screen>&prompt.root; <userinput>/sbin/disklabel -B -r -w /dev/fd0 <replaceable>fdsize</replaceable></userinput></screen> |
| 1195 |
|
1240 |
|
| 1196 |
<para>Replace <replaceable>fdsize</replaceable> with <literal>fd1440</literal>, <literal>fd1720</literal> or whichever size you |
1241 |
<para>Replace <replaceable>fdsize</replaceable> with |
| 1197 |
want. The last field instructs disklabel which entry to take |
1242 |
<literal>fd1440</literal>, <literal>fd1720</literal> or whichever size you |
| 1198 |
from <filename>/etc/disktab</filename> to use.</para> |
1243 |
want. The last field instructs disklabel which entry |
|
|
1244 |
from <filename>/etc/disktab</filename> to use.</para> |
| 1199 |
</sect2> |
1245 |
</sect2> |
| 1200 |
|
1246 |
|
| 1201 |
<sect2> |
1247 |
<sect2> |
| 1202 |
<title>The file system</title> |
1248 |
<title>The file system</title> |
|
|
1249 |
|
| 1250 |
<para>Now the floppy is ready to be high-level formated. This |
| 1251 |
will place a new file system on it, which will let FreeBSD read |
| 1252 |
and write to the disk. After creating the new file system, the |
| 1253 |
disklabel is destroyed, so if you want to reformat the disk, you |
| 1254 |
will have to recreate the disklabel.</para> |
| 1203 |
|
1255 |
|
| 1204 |
<para>Now your floppy is ready to be high-level formated. This |
1256 |
<para>The floppy's file system can be either UFS or FAT. |
| 1205 |
will place a new file system on it, which will let FreeBSD read |
1257 |
FAT is generally a better choice for floppies.</para> |
| 1206 |
and write to the disk. After creating the new file system, the |
|
|
| 1207 |
disklabel is destroyed, so if you want to reformat the disk, you |
| 1208 |
will have to recreate the disklabel another time.</para> |
| 1209 |
|
| 1210 |
<para>You can choose now which file system to use on your floppy. |
| 1211 |
You can use UFS or FAT, though UFS is not a good idea for |
| 1212 |
floppies. Choose FAT which is nice for floppies.</para> |
| 1213 |
|
1258 |
|
| 1214 |
<para>To put a new file system on the floppy do this:</para> |
1259 |
<para>To put a new file system on the floppy, issue:</para> |
| 1215 |
|
1260 |
|
| 1216 |
<screen>&prompt.root; <userinput>/sbin/newfs_msdos /dev/fd0</userinput></screen> |
1261 |
<screen>&prompt.root; <userinput>/sbin/newfs_msdos /dev/fd0</userinput></screen> |
| 1217 |
|
1262 |
|
| 1218 |
<para>As we created a disklabel before, &man.newfs.8; |
1263 |
<para>The disk is now ready for use.</para> |
| 1219 |
will be able to fetch disk data and construct the new |
|
|
| 1220 |
file system. And now, your disk is ready for use.</para> |
| 1221 |
</sect2> |
1264 |
</sect2> |
| 1222 |
|
1265 |
|
|
|
1266 |
|
| 1223 |
<sect2> |
1267 |
<sect2> |
| 1224 |
<title>Using the floppy</title> |
1268 |
<title>Using the floppy</title> |
| 1225 |
|
|
|
| 1226 |
<para>You have two choices to use the floppy. You can either |
| 1227 |
mount the disk with &man.mount.msdos.8;, or you can |
| 1228 |
use <application>mtools</application>. |
| 1229 |
<application>Mtools</application> are great, but you will need |
| 1230 |
to install them from the ports system.</para> |
| 1231 |
|
1269 |
|
| 1232 |
<para>Try it; issue a <application>mdir</application>. If you forced the |
1270 |
<para>To use the floppy, mount it with &man.mount.msdos.8; (in 4.8 or older) or |
| 1233 |
disk, you will notice its extra size!</para> |
1271 |
&man.mount.msdosfs.8; (in 5.0 or newer). |
|
|
1272 |
One can also use <application>mtools</application> from the ports collection.</para> |
| 1234 |
|
1273 |
|
| 1235 |
<para>A last note about forced disks: they are compatible with |
1274 |
<para>A last note about forced disks: they are compatible with |
| 1236 |
practically all other operating systems without any external |
1275 |
practically all other operating systems without any external |
| 1237 |
utility to read/write them. Microsoft systems will recognize |
1276 |
utility to read from them or write to them. Microsoft™ systems |
| 1238 |
them without problems. But note that there may be times when the |
1277 |
will recognize them without problems. Note however that there may be |
| 1239 |
floppy drive itself is not able to read them (this may happen |
1278 |
times when the floppy drive itself is not able to read them, for example |
| 1240 |
with very old drives).</para> |
1279 |
when using very old drives.</para> |
| 1241 |
</sect2> |
1280 |
</sect2> |
| 1242 |
</sect1> |
1281 |
</sect1> |