On 06/20/2013 07:22 PM Ethan Rosenberg, PhD wrote:
Dear list -

I am trying to copy FreeDOS to a flash drive.  I can't make it work.

This is what I have done -

Command (m for help): p

Disk /dev/sdb: 4051 MB, 4051697664 bytes
125 heads, 62 sectors/track, 1021 cylinders, total 7913472 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00077d8f

    Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048      989184      493568+   c  W95 FAT32 (LBA)
/dev/sdb2          989185     7913471     3462143+  83  Linux

Notice that sdb1 doesn't start at the beginning of the media, but rather 2048 sectors in. If your FreeDOS image is really a boot image (as the name of the file suggests), then you need to start the copy at the very beginning of the media, i.e., sector 0. So I would try:

dd if=/home/ethan/Downloads/FreeDOS-1.1-USB-Boot.img of=/dev/sdb




I then delete the DOS partition since it seems to be corrupted and add
regenerate the  FAT Partition, and write it out.

Make file system:

mkfs.vfat /dev/sdb1
mkfs.vfat 3.0.16 (01 Mar 2013)

No sense making a file system because 'dd' is going to overwrite it.



Check file system:

fsck.vfat /dev/sdb1
dosfsck 3.0.16, 01 Mar 2013, FAT32, LFN
/dev/sdb1: 0 files, 0/61661 clusters

Copy FreeDOS:

dd if=/home/ethan/Downloads/FreeDOS-1.1-USB-Boot.img of=/dev/sdb1
63488+0 records in
63488+0 records out
32505856 bytes (33 MB) copied, 1.30864 s, 24.8 MB/

Check Mount:

/dev/sdb1 on /media/bkup type vfat
(ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)

After you do the 'dd' command I suggested above, then do

fdisk -l /dev/sdb

to see what partitions are listed. There will likely be just one. You can add more later. Best anyway to see what the 'dd' command leaves you.





Check Contents:

rosenberg:/media# ls -la bkup
ls: cannot access bkup/%f IN (-.--s: Input/output error
ls: cannot access bkup/in a bat.ch: Input/output error
ls: cannot access bkup/
   label: Input/output error
ls: cannot access bkup/ng used.in: Input/output error
ls: cannot access bkup/ colon.
: Input/output error
ls: cannot access bkup/ry [size.]

....

hth,
ken


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/51c398ce.5040...@mousecar.com

Reply via email to