Author Topic: Preparing an USB Flash drive with FAT32 with DFSee  (Read 637 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 251
  • -Receive: 46
  • Posts: 1674
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Preparing an USB Flash drive with FAT32 with DFSee
« on: November 13, 2017, 12:57:41 am »
Hi

I don't know much about DFSee, and  I wanted to try several USB Flash drives (16GB, 8GB) with ArcaOS. But I noticed that if you just format those on Windows 10 as FAT32 it will not work on ArcaOS.

Can someone please show me the steps to prepare the USB Flash drive with DFSee since I'm starting to learn how to use it?

Is there other way (without DFSee) to prepare a 8GB or 16GB flash drive with FAT32 so it can be recognized on ArcaOS?

Regards


Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 7
  • -Receive: 88
  • Posts: 1142
    • View Profile
Re: Preparing an USB Flash drive with FAT32 with DFSee
« Reply #1 on: November 13, 2017, 01:30:46 am »
In DFSee, just go to the Scripts menu and choose Make FAT32 Data (USB) disk and choose your disk and follow instructions.
You can probably do the same by partitioning with LVM and formatting the drive with the FAT32.IFS format command now. Previously we had no way to format FAT32.
Using Lars's USB stack, you should be able to read the USB stick that was formatted under Windows, which defaults to making a large floppy rather then a partitioned disk

Lars

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 20
  • Posts: 145
    • View Profile
Re: Preparing an USB Flash drive with FAT32 with DFSee
« Reply #2 on: November 13, 2017, 10:00:54 am »
In DFSee, just go to the Scripts menu and choose Make FAT32 Data (USB) disk and choose your disk and follow instructions.
You can probably do the same by partitioning with LVM and formatting the drive with the FAT32.IFS format command now. Previously we had no way to format FAT32.
Using Lars's USB stack, you should be able to read the USB stick that was formatted under Windows, which defaults to making a large floppy rather then a partitioned disk

Some additional info: if the first sectors of a stick are completely wiped (overwritten with zeros), then Windows will make it a large floppy stick if you select to format it. However, I you buy a stick in a store, then it is likely that it is already partitioned (with one partition usually). In that case Windows will keep the partitioning when you choose to format and will format the already existing partition. My USBMSD.ADD does its best to support "large floppy" if the stick is "virgin" as well as keeping and supporting the proper CHS layout if already partitioned.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 251
  • -Receive: 46
  • Posts: 1674
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Preparing an USB Flash drive with FAT32 with DFSee
« Reply #3 on: November 13, 2017, 05:00:09 pm »
Hi Dave. Thanks for the information. I had tried DFSee (Scripts - Make FAT32 Data (USB) disk) according to your suggestion and it worked fine for a FAT32 8GB Flash drive. So, the first part of my question is solved.

Lars about your comments I have some doubts. If the first sectors of a stick are completely wiped (overwritten with zeros) as you said,  and I format it FAT32 on Windows, does it means this to work as an alternative of using DFSee? If yes, what is the procedure to "complete wipe the USB Flash (overwritten with zeros)" that you know?

General Question: I want to write this down on the wiki to don't forget it on the future. What is the correct name for this problem?  "Un-proper CHS layout on the disk?"

Regards


Martin Iturbide
OS2World NewsMaster
... just share the dream.

Valery Sedletski

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 10
  • Posts: 68
    • View Profile
Re: Preparing an USB Flash drive with FAT32 with DFSee
« Reply #4 on: November 13, 2017, 08:27:36 pm »
No need in using any scripts. Usually, the flash disks are partitioned. But some of them are not, like my Silicon Power 16 GB was. In this case, you need to create a partition first. (but if the stick is already partitioned, no need to repartition and reformat)

First, when working with DFSee, you need to select the current disk with File->open object to work with->Partition->...  No need to reformat and repartition. Just add the LVM info, eject and reinsert the disk and it will be seen under OS/2. This is indestructive, you can do this (add LVM info) without losing any files from the stick, as the only info added is the LVM DLAT sector immediately before the partition boot sector. I do this with any friends or clients flash sticks they are carrying to me to pass me their files.

So, usually, you only need to add the LVM info, and it will work fine under OS/2.Those sticks that are big floppies, can be seen with Lars' USBMSD.ADD version. It adds a virtual DLAT sector too, so no need to add it with DFSee. But partitionable media are better and more secure, so, it is recommended to repartition your flash disks. You only create the partition, and that's it.

For booting from flash disks, you may need to normalize the geometry in the partition table. Some BIOSes, like mine, doesn't like some flash disks geometries (cylinders/heads/sectors numbers), and as a result, won't boot from them. So, it is better to redefine the flash geometry to the geometry having 255 heads and 63 sectors per track. This is done with GEO command in DFSee. You can run "geo" without parameters to see the current disk geometry. It will show the cylinders, heads and sectors numbers.

The total number of sectors on the disk is equal to Cylinders * Heads * Sectors. So, you just multiply the current values to get the total number of sectors. Then divide the result to (255 * 63) and you will get the new number of cylinders.

Then wipe the disk with the

Quote
wipe "" 0 2048

command, which overwrites the disk with an empty pattern ("") starting from 0 sector, and rewrite 2048 sectors then, starting from the 0 sector.

Then enter the

Quote
geo Cyls 255 63

where Cyls is the new number of cylinders you just calculated. This should change the current geometry of the disk. Then go to Mode=FDISK->Create new partition, and create a primary partition, occupying all the disk. When operation finishes, quit DFSee, eject and reinsert the disk. Then do lvm /rediscoverprm and the new drive letter will appear. Then do

Quote
format o: /fs:fat32

and format the disk. You should install the latest version of fat32.ifs 0.10 for this command to be working.

But these steps are not mandatory. They can help the flash stick to be capable of booting from it, and to convert the stick from the big floppy to the partitionable one (which will improve the compatibility with majority of OS'es, including OS/2 installations, which haven't Lars' USBMSD.ADD installed) The mandatory thing is a command to add the LVM info. You need to define an explicit drive letter, or set the drive letter to "*:" (which means, the 1st available one). WIthout this, the drive letter won't be assigned to an USB stick/hard disk and the disk contents won't be seen.

Valery Sedletski

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 10
  • Posts: 68
    • View Profile
Re: Preparing an USB Flash drive with FAT32 with DFSee
« Reply #5 on: November 13, 2017, 08:48:12 pm »
Also, the [micro/mini]SDXC flash cards (these are those larger than 32 GB) are usually formatted as exFAT on the factory. This is the cause some OS'es or devices cannot see such flash cards, because of an exFAT FS, unknown to them. Newer versions of fat32.ifs contain an experimental exFAT support, so you can see such flash cards in OS/2. But if your device does not see the exFAT filesystem, it is better to reformat it to FAT32. The disadvantage of FAT32 (compared to exFAT) is that files >= 4 GB are unsupported (because the file size field in directory entry is 32-bit, which limits the file size to 2^32 == 4 GB). But the FAT+ feature of fat32.ifs allows the 64-bit file size on FAT32 (it is stored in special EA, and bits 32..34 are duplicated in three previously reserved bits of the directory entry. So, first 35 bits are still stored in the directory entry, allowing files with sizes up to 2^35 == 32 GB to store their sizes in the direntry, instead of an EA. If the size is bigger than 32 GB, the full 64-bit size is stored in EAs). But the FAT+ feature is supported with OS/2 only (and with DR-DOS too, but with a bit other way than OS/2. So, you can only move big files on FAT32 disks between different OS/2 copies. WIndows will not understand such big files on FAT32, unfortunately).

I have a 128 GB microSDXC card which I use with mini USB cardreaders. It is used instead of a USB flash disk. I use it for carrying data, as well as for booting from it (most USB microSD cardreaders are bootable). I changed its geometry to normal hard disk geometry and it could be bootable on all my computers. Also, I reformatted it from exFAT to FAT32 as it has more stable support in fat32.ifs and FAT32 is supported by most operating systems. Windows can't be bootable from exFAT, at least. But GRUB4DOS, FreeLDR and QSINIT can boot from both, FAT32 and exFAT. Linux can't boot from exFAT too, at least, with FUSE exFAT driver. Maybe, it will boot with Samsung exFAT driver (if it is compiled into the kernel), but I didn't tried.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 251
  • -Receive: 46
  • Posts: 1674
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Preparing an USB Flash drive with FAT32 with DFSee
« Reply #6 on: November 18, 2017, 02:47:57 pm »
Hi

For the moment I had used DFSee's Script called "Make FAT32 Data (USB) disk" to destruct the partition, format it as FAT32 and make it usable under ArcaOS.

About the second alternative that will be to "add the LVM info". I was lost first because I needed to change the DFsee US to "Expert Mode". After that, I found the " File->open object to work with->Partition->" but it only list the partition of the HDD and does not show the Flash Drive. I'm also not sure where is the "add the LVM info" function on the DFsee UI.

About the "large floppy stick" how does one produce it? Does it depends on the hardware of the stick?

Regards

Martin Iturbide
OS2World NewsMaster
... just share the dream.

Pete

  • Hero Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 26
  • Posts: 540
    • View Profile
Re: Preparing an USB Flash drive with FAT32 with DFSee
« Reply #7 on: November 18, 2017, 04:19:33 pm »
Hi Martin

USBcfg contains a "USB Removables - Care and Feeding FAQs" IN the FAQs section of the Help. This FAQ is also available online at http://www.os2voice.org/VNL/past_issues/VNL0606H/feature_2.html if you do not have USBcfg installed.


Regards

Pete
« Last Edit: November 19, 2017, 02:31:39 am by Pete »

Valery Sedletski

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 10
  • Posts: 68
    • View Profile
Re: Preparing an USB Flash drive with FAT32 with DFSee
« Reply #8 on: November 19, 2017, 02:14:41 am »
2Martin: Yes, you should to switch the "Expert mode" on in newer versions of DFSee, unfortunately. I don't know why the author removed it in non-expert mode, because it is one of the most needed functions, at least, for me. If "File->open object to work with->Partition->" does not list the flash disk, this means that you deleted the partition on it, or your flash disk is big floppy. You should back up it and erase, and create a partition then.

> I'm also not sure where is the "add the LVM info" function on the DFsee UI.

It is called "Edit->Edit LVM Info" in newer versions of DFSee. It is near the "Edit partition tables", which is used very frequently, too. (Need to switch the Expert mode on, of course)

> About the "large floppy stick" how does one produce it? Does it depends on the hardware of the stick?

You want to create a big floppy? You should erase the beginning of the flash disk with zeroes with the

Quote
wipe "" 0 2048

command, then try formatting it. (But select the full disk first, if you don't want to occassionally erase the wrong disk!) Lars' version of USBMSD.ADD should emulate the MBR with partition table, and the LVM info. I'm not sure if DFSee will allow you to format a flash disk without a partition created, but you can try my FAT32.IFS format instead. Unfortunately, format of the flash stick without a partition may not work under OS/2. But you can erase it under OS/2 and format it under windows then.

2Pete: What is USBcfg for? Never used it.
« Last Edit: November 19, 2017, 02:27:32 am by Valery Sedletski »

Valery Sedletski

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 10
  • Posts: 68
    • View Profile
Re: Preparing an USB Flash drive with FAT32 with DFSee
« Reply #9 on: November 19, 2017, 03:16:41 am »
Unfortunately, if you'll try to use FORMAT frontend with an erased flash stick, you'll get the following:

Quote
[d:\var\log]format j: /fs:fat32 /v:spower
SYS1512: The requested function is not supported on this disk or
diskette for file system FAT32.

But

Quote
[d:\var\log]fat32fmt j: /fs:fat32 /v:spower
FAT32 version 0.10.r331 compiled on Nov 11 2017
The new type of file system is FAT32.
Диск не имеет метки тома.
Warning!  All data on hard disk j: will be lost!
Proceed with FORMAT (Y/N)? y
Size: 14336 MB 30282525 sectors.
512 Bytes Per Sector, Cluster size 8192 bytes.
The volume label is SPOWER.
The Volume Serial Number is 0CEA-3537.
32 Reserved Sectors, 14772 Sectors per FAT, 2 fats.
15140864 kilobytes total disk space.
15122432 kilobytes are available.
0 kilobytes are in bad blocks.

Formatting...

100% of the disk has been formatted.

Wrote 15151104 bytes in 7.06 seconds, 2.05 Megabytes/sec
Clearing out 29592 sectors for
Reserved sectors, fats and root cluster.
Initialising reserved sectors and FATs.
WARNING: failed to set the volume label, rc=26


Format completed successfully.


will succeed. So, you can try to format with a standalone FORMAT utility. The minor problem that it fails to set the volume label with DosSetFSInfo, because of ERROR_NON_DOS_DISK == 26 error. But you can try it again after FORMAT. The FORMAT.COM frontend fails to pass control to FAT32 format routine, unfortunately.

Note that big floppy flash disks have "Fake Disk" disk name, and "Fake volume" / "Fake partition" in the volume/partition name. That is the default LVM Info, which Lars is emulating on big floppies.
« Last Edit: November 19, 2017, 03:34:58 am by Valery Sedletski »

Valery Sedletski

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 10
  • Posts: 68
    • View Profile
Re: Preparing an USB Flash drive with FAT32 with DFSee
« Reply #10 on: November 19, 2017, 04:39:28 am »
> What is the correct name for this problem?  "Un-proper CHS layout on the disk?"

The problem is generally with missing LVM info. If no explicit LVM info on disk, it won't be mounted under OS/2, so, you should create it for OS/2 kernel to call MOUNT for IFS drivers. (To be exact, the kernel will call only in-kernel FAT driver to mount disks without explicit LVM info, which will fail. It won't call IFS'es FS_MOUNT routines). Un-proper CHS layout is another problem. It prevents to add the LVM info with LVM.EXE. But DFSee allow to do this with any disk geometry (so, you can avoid destroying partitions. If the flash stick is not your own, but your friends' or clients', then repartitioning is undesirable. But you can optionally do a repartition, if you want better compatibility with LVM.EXE and your BIOS, if you want it to be bootable)
« Last Edit: November 19, 2017, 04:44:53 am by Valery Sedletski »