USB floppy drive formatter

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

USB floppy drive formatter

#1 Post by 8-bit »

This is a low level formatter for USB floppy drives.
I am submitting this because Barry's floppy drive formatter will not work with USB floppy drives.
It is a command line formatter only. In other words no GUI.
If someone wants to try creating a GUI for it, go for it.
To use it, put the file into your / directory and extract there.
Then open a terminal and type: ufiformat --help
This will give you basic commands for it.
You can also do 'man ufiformat' to get more information.
It only does a low level format of a floppy and to put a msdos type file system on it you would type:
mkdosfs -I /dev/name of your usb floppy drive.
Attachments
ufiformat-0.9.4.tar.gz
Command line USB low level floppy formatter
(8.82 KiB) Downloaded 401 times

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#2 Post by 8-bit »

This is a GUI for the USB floppy formatter
It also alows making the disk an msdos disk.
Requires ufiformat
UPDATED! Now allows Selection of 1440 or 720 k floppys
Final Update!!
Now checks for USB Floppy and will exit with Message if none is found.



Try it and leave feedback.
Attachments
USB_Floppy_Formatter_GUI-1.3.bz2
GUI for USB Floppy Formatter
(1.46 KiB) Downloaded 365 times
Last edited by 8-bit on Sun 13 Sep 2009, 04:19, edited 1 time in total.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#3 Post by 8-bit »

Actually. I need some help with the code!
If one enters ufiformat -i in a terminal, it will return the path of a usb floppy if present and I can put the results in a one line string variable.
But I do not know how to manipulate the string to just be the '/dev/xxx' of the floppy.

The string I get in my variable is "disk generic /dev/sdd /dev/sg4"
So how do I code to just have my variable show "/dev/sdd"
If the string is empty, then I can exit with no USB drive found.

This is actually the final step to finalizing my GUI.
And currently it looks like my attached jpg.
Attachments
fdformat.jpg
(20.3 KiB) Downloaded 1270 times

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#4 Post by mikeb »

Code: Select all

DEVICE=`ufiformat -i |  cut -f 3 -d ' '`
one way

mike

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#5 Post by 8-bit »

My original code to get the output of ufiformat -i into a String variable was: echo -e 'ufiformat -i' $FLOPPY
I am using a short bash script to test output and if I do echo $FLOPPY as the next line, I get
disk generic /dev/sdd /dev/sg6

Your example when used with echo -e `ufiformat-i | cut -f 3 -d ' '` FLOPPY$
returns Permission Denied /dev/sdd

So I am closer, but still wrong.
I tried to use grep, but I just am not that much of a programmer since I got away from the ATARI.
When I had it, I wrote a program in assembly to rotate a character set 90 degrees and download it to a printer as it's font.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#6 Post by mikeb »

Use the code as is, no echo...this will put the result into the variable $DEVICE

used as you showed its actually trying to run the result...must say I've never used that syntax but bash is quite a mixture of languages

mike

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#7 Post by 8-bit »

mikeb wrote:Use the code as is, no echo...this will put the result into the variable $DEVICE

used as you showed its actually trying to run the result...must say I've never used that syntax but bash is quite a mixture of languages

mike
This is the code I used that worked

FLOP="`ufiformat -i`"
WORD1="`echo $FLOP | cut -f 3 -d ' '`"

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#8 Post by 8-bit »

Ok People! I know there have to be some others out there that have USB floppy drives.
I never did receive any feedback on my GUI efforts.
But for those of you that want a painless test in Puppy, I created a Pet package
that includes ufiformat, my GUI program for it, and an entry for the menu under System.
So if you try it and think it is shit, let me know.
If you like it and think it meets your needs, let me know to.
This was my first attempt ever to make a program and to also make a Pet package.
And yes, it both installs and uninstalls fine.
It also works with Puppy v4.3.
Attachments
USB_Floppy_Formater-1.3.pet
(10.41 KiB) Downloaded 375 times

ohenenana
Posts: 4
Joined: Sat 11 Jul 2009, 01:19

#9 Post by ohenenana »

Hey 8-bit

gr8 lil number.

I tried it and it waqs good.

Just wondered:

1./ Could u get it to return back oif the floppy inserted is locked. (allow u to unlock and try again)
2./ Is it possible to add additional capacities e.g 1770 (tomsrbt I think http://www.toms.net/rb/tomsrtbt.FAQ ) or is there a fixed capacity for usb drives preventing this.

Thanks for looking after us usb floppy users

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#10 Post by 8-bit »

It is a wonder that I got the GUI as far as I did.
I tried implementing some error checking using Barry's floppy utility, but I could not figure how to make it work.
As to floppy sizes, I based the GUI on ufiformat and the designer of it allowed sizes from 1440K to 360k.
Since I have never seen a usb fkiooy drive that could handle formats below 720k that is as far as I went.
When I have time later, I might look into modifying my GUI to do some error checking.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#11 Post by 8-bit »

I have implemented a new version that has more error checking on checking for write protected, mounted, existence of floppy in drive.
It also takes you back to the main program screen in case of some errors.
If there is any interest, I will upload a PET for it.
Comments?

Post Reply