Subject: Re: bootable USB flash drive. how?
To: Dave <firstname.lastname@example.org>
From: Pierre Bourgin <email@example.com>
Date: 03/07/2004 14:35:56
Dave a écrit:
> I think I'm clear on how to make a bootable USB flash drive using ffs.
> Does anyone here know how to do this using the msdos filesystem?
> newfs_msdos -B foo -F 32 /dev/rsd0e doesn't work. "foo" == kernel.sys or
> sys.com, both from FreeDOS (http://www.freedos.org).
> # newfs_msdos -B kernel.sys -F 32 /dev/rsd0e
> newfs_msdos: kernel.sys: inappropriate file type or format
I think you misunderstood how to create FAT16/32 DOS-bootable partitions.
To create such a FileSystem, you need to provide a bootblock to
newfs_msdos that allow such a partition to be bootable.
Once you've done it, you will have to put the required OS files at the
beggining of the filesystem.
So you must use something like the following commands:
## make a FAT16 DOS-Bootable
% newfs_msdos -F 16 -B dos_fat16.dd /dev/rwd0e
## OR make a FAT32 DOS-bootable
% newfs_msdos -F 32 -B dos_fat32.dd -k 6 /dev/rwd0e
## put the required OS-files (in the right order)
% mount_dos /dev/rwd0e /disk
% cp io.sys msdos.sys command.com emm386.exe himem.sys ... /disk/.
files dos_fat16.dd and dos_fat32.dd comes from a previous formatted
DOS-bootable partition, thanks to Microsoft DOS tools (or DOS of windows
98 for instance).
You'll get these bootlocks with the following commands on such a
partition (depending on how you created it: FAT16 or FAT32):
% dd if=/dev/rwd0e of=/tmp/dos_fat16.dd bs=512 count=1
% dd if=/dev/rwd0e of=/tmp/dos_fat32.dd bs=512 count=3
I don't know about FreeDos, must it must be something like described
above (perhaps this project provides directly the bootblocks ?).
Please also notice that you probably have to deal with '-u' and '-h'
options of newfs_dos: you must provides the "good" (faked) DOS geometry.
Hope this help,