Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Removing RISC OS formatting data from USB stick

4 views
Skip to first unread message

Ian Hamilton

unread,
Nov 19, 2009, 6:07:07 AM11/19/09
to
I have a USB stick which I formatted using !SCSIForm on an Iyonix. I need
a way to remove the formatting data. If I partition to FAT32 (using
gparted under Ubuntu) the disc still contains the RISC OS information.
When plugged into the Iyonix it will show as FAT32 when using Fat32FS and
RISC OS when using SCSIFS. I'd like just the FAT32 to be used. Any ideas?

--
Ian Hamilton (Iyonix RO5) http://www.hamiltoni.pwp.blueyonder.co.uk/

Chris Evans

unread,
Nov 19, 2009, 11:21:42 AM11/19/09
to
In article <50bc9c0f9fI...@AAUG.Net>, Ian Hamilton

<URL:mailto:Ian.Ha...@AAUG.net> wrote:
> I have a USB stick which I formatted using !SCSIForm on an Iyonix. I need
> a way to remove the formatting data. If I partition to FAT32 (using
> gparted under Ubuntu) the disc still contains the RISC OS information.
> When plugged into the Iyonix it will show as FAT32 when using Fat32FS and
> RISC OS when using SCSIFS. I'd like just the FAT32 to be used. Any ideas?

Reformat on an A9home / UniPod etc with mkdosfs
there may be an Iyonix version?

versions at:

http://www.richardspencer.freeuk.com/temp/mkdosfs1.zip

http://oldcoaster.drobe.co.uk/mkdosdisc.zip

http://www.riscos-online.nl/A9support/patches/USBformat.zip

Chris Evans

--
CJE Micro's / 4D 'RISC OS Specialists'
Telephone: 01903 523222 Fax: 01903 523679
ch...@cjemicros.co.uk http://www.cjemicros.co.uk/
78 Brighton Road, Worthing, West Sussex, BN11 2EN
The most beautiful thing anyone can wear, is a smile!

Theo Markettos

unread,
Nov 19, 2009, 3:06:29 PM11/19/09
to
Ian Hamilton <Ian.Ha...@aaug.net> wrote:
> I have a USB stick which I formatted using !SCSIForm on an Iyonix. I need
> a way to remove the formatting data. If I partition to FAT32 (using
> gparted under Ubuntu) the disc still contains the RISC OS information.
> When plugged into the Iyonix it will show as FAT32 when using Fat32FS and
> RISC OS when using SCSIFS. I'd like just the FAT32 to be used. Any ideas?

Since you have Ubuntu, to completely wipe it and fill it with zeroes:

sudo dd if=/dev/zero of=/dev/sdX

where 'X' is the letter of the device ('dmesg' should tell you when you plug
it in). Don't get this wrong or you'll wipe your hard drive!

Replace 'zero' with 'urandom' if you want random data (slower).

It should be simple to write a little program that does the same on RISC OS
with SCSIFS_DiscOp, but I'm not aware of an off-the-shelf version.

Theo

John Crane

unread,
Nov 19, 2009, 4:25:18 PM11/19/09
to
In message <50bc9c0f9fI...@AAUG.Net>
Ian Hamilton <Ian.Ha...@AAUG.net> wrote:

> I have a USB stick which I formatted using !SCSIForm on an Iyonix. I need
> a way to remove the formatting data. If I partition to FAT32 (using
> gparted under Ubuntu) the disc still contains the RISC OS information.
> When plugged into the Iyonix it will show as FAT32 when using Fat32FS and
> RISC OS when using SCSIFS. I'd like just the FAT32 to be used. Any ideas?

if you've got access to Windows 'H2format' may do the job. it is a low
level formatter and should be able to create one full fat32 partition
on the stick.

Google for it. It's German and the helpfile is also in German, but it
can be translated via Google translate or similar and there's websites
with English helpguides about for it in any case


--
John Crane, Iyonix RISC OS User

druck

unread,
Nov 19, 2009, 5:35:12 PM11/19/09
to
Theo Markettos wrote:
> Ian Hamilton <Ian.Ha...@aaug.net> wrote:
>> I have a USB stick which I formatted using !SCSIForm on an Iyonix. I need
>> a way to remove the formatting data. If I partition to FAT32 (using
>> gparted under Ubuntu) the disc still contains the RISC OS information.

> Since you have Ubuntu, to completely wipe it and fill it with zeroes:
>
> sudo dd if=/dev/zero of=/dev/sdX

[sip]

> It should be simple to write a little program that does the same on RISC OS
> with SCSIFS_DiscOp, but I'm not aware of an off-the-shelf version.

I wrote a little one, email me if anyone needs it.

---druck

Jess

unread,
Nov 23, 2009, 5:44:22 AM11/23/09
to
In message <50bc9c0f9fI...@AAUG.Net>
Ian Hamilton <Ian.Ha...@AAUG.net> wrote:

> I have a USB stick which I formatted using !SCSIForm on an Iyonix. I need
> a way to remove the formatting data. If I partition to FAT32 (using
> gparted under Ubuntu) the disc still contains the RISC OS information.
> When plugged into the Iyonix it will show as FAT32 when using Fat32FS and
> RISC OS when using SCSIFS. I'd like just the FAT32 to be used. Any ideas?

Does filling it up from Linux overwrite the RISC OS information?

Alternatively, what about formatting it ext3 first?


--
Jess Iyonix

Rob Kendrick

unread,
Nov 23, 2009, 6:16:02 AM11/23/09
to
On Mon, 23 Nov 2009 10:44:22 GMT
Jess <phant...@hotmail.com> wrote:

> In message <50bc9c0f9fI...@AAUG.Net>
> Ian Hamilton <Ian.Ha...@AAUG.net> wrote:
>
> > I have a USB stick which I formatted using !SCSIForm on an Iyonix.
> > I need a way to remove the formatting data. If I partition to FAT32
> > (using gparted under Ubuntu) the disc still contains the RISC OS
> > information. When plugged into the Iyonix it will show as FAT32
> > when using Fat32FS and RISC OS when using SCSIFS. I'd like just the
> > FAT32 to be used. Any ideas?
>
> Does filling it up from Linux overwrite the RISC OS information?

To *completely* blank a device from Linux, try this:

dd if=/dev/zero of=/dev/sdX

Replace sdX with the SCSI device that appears when the USB mass storage
is plugged in. You will need to be rootly to do this. Make
absolutely sure you're doing it to the right device; you do not want to
do this to your hard disc :) Also take care to make sure it is the
base device you pass, and not one ending in a number (which are
partitions.) It may take some time, as it is writing zeros to every
sector.

> Alternatively, what about formatting it ext3 first?

Never format flash with a journaled file system. If you must have that
sort of reliability, use a log-based one (such as YIFFS or JFFS,
because they're designed for the way Flash works.)

Although good luck getting them to work on USB mass storage :(

B.

Dave Higton

unread,
Nov 23, 2009, 3:50:43 PM11/23/09
to
In message <20091123111...@trite.i.flarn.net.i.flarn.net>
Rob Kendrick <nn...@rjek.com> wrote:

> On Mon, 23 Nov 2009 10:44:22 GMT
> Jess <phant...@hotmail.com> wrote:
>
> > In message <50bc9c0f9fI...@AAUG.Net>
> > Ian Hamilton <Ian.Ha...@AAUG.net> wrote:
> >
> > > I have a USB stick which I formatted using !SCSIForm on an Iyonix.
> > > I need a way to remove the formatting data. If I partition to FAT32
> > > (using gparted under Ubuntu) the disc still contains the RISC OS
> > > information. When plugged into the Iyonix it will show as FAT32
> > > when using Fat32FS and RISC OS when using SCSIFS. I'd like just the
> > > FAT32 to be used. Any ideas?
> >
> > Does filling it up from Linux overwrite the RISC OS information?
>
> To *completely* blank a device from Linux, try this:
>
> dd if=/dev/zero of=/dev/sdX

If you do that, you risk destroying the information about exactly
how big the device is. If you subsequently rewrite the Master
Boot Record with a larger size, the device may well crash when
blocks above its highest numbered block are addressed.

Dave

Rob Kendrick

unread,
Nov 23, 2009, 4:38:36 PM11/23/09
to
On Mon, 23 Nov 2009 20:50:43 GMT
Dave Higton <daveh...@dsl.pipex.com> wrote:

> > To *completely* blank a device from Linux, try this:
> >
> > dd if=/dev/zero of=/dev/sdX
>
> If you do that, you risk destroying the information about exactly
> how big the device is. If you subsequently rewrite the Master
> Boot Record with a larger size, the device may well crash when
> blocks above its highest numbered block are addressed.

Sorry, I had forgotten that some USB mass storage devices are quite
this bad and broken.

B.

Dave Higton

unread,
Nov 23, 2009, 5:32:22 PM11/23/09
to
In message <20091123213...@trite.i.flarn.net.i.flarn.net>
Rob Kendrick <nn...@rjek.com> wrote:

Usually the only block that needs to be blatted in order for RISC
OS not so see an ADFS-formatted drive, is at byte addresses 0xC00
to 0xDFF.

Dave

jess

unread,
Nov 24, 2009, 6:04:35 AM11/24/09
to
On Nov 23, 11:16 am, Rob Kendrick <n...@rjek.com> wrote:
> On Mon, 23 Nov 2009 10:44:22 GMT

> Jess <phantasm...@hotmail.com> wrote:

> > Alternatively, what about formatting it ext3 first?

^^^^


> Never format flash with a journaled file system.  If you must have that
> sort of reliability, use a log-based one (such as YIFFS or JFFS,
> because they're designed for the way Flash works.)
>
> Although good luck getting them to work on USB mass storage :(

It wasn't meant as a suggestion to use as, (obviously to OP wanted to
use it on RISC OS too, otherwise the RISC OS information would be
irrelevant.)

Just since ext3 writes more in a format than fat32, then it might
overwrite the unwanted information.

Rob Kendrick

unread,
Nov 24, 2009, 6:21:01 AM11/24/09
to
On Tue, 24 Nov 2009 03:04:35 -0800 (PST)
jess <jessha...@googlemail.com> wrote:

> > > Alternatively, what about formatting it ext3 first?
>
> ^^^^
> > Never format flash with a journaled file system.

> It wasn't meant as a suggestion to use as, (obviously to OP wanted to


> use it on RISC OS too, otherwise the RISC OS information would be
> irrelevant.)
>
> Just since ext3 writes more in a format than fat32, then it might
> overwrite the unwanted information.

It might write a few extra hundreds of kilobytes. Over a large device,
this is a meaningless amount.

B.

Dave Higton

unread,
Nov 24, 2009, 4:48:13 PM11/24/09
to
In message <cc192d2d-ead5-4228...@e20g2000vbb.googlegroups.com>
jess <jessha...@googlemail.com> wrote:

The likelihood is vanishingly small. The only sector that needs
to be cleared is byte addresses 0xC00 to 0xDFF. In every USB
stick I've ever seen, this is in the reserved space between the
Master Boot Record and the first partition. The extra stuff you
refer to is written inside the partition, i.e. well above the
sector in question.

Dave

Gazza

unread,
Dec 6, 2009, 7:12:05 PM12/6/09
to
On Nov 19, 8:06 pm, Theo Markettos <theom+n...@chiark.greenend.org.uk>
wrote:

I can think of one straight off the bat that can be written in a few
lines of BASIC code. True, it assumes the device is already formatted
as an ADFS device, but should be able to fill the drive with random
garbage. I originally wrote this code to provide a data destruction
method for floppy discs, so that I could demonstrate that I could
destroy data on discs coming into the local computer club. This was to
allow me to use them to transfer stuff between the RO machines in the
museum. If I couldn't destroy data on discs that had been donated in a
satisfactory manner, then I couldn't use them as blanks. Anyhow...
This assumes them to have been formatted to ADFS and be blank. The
code doesn't have to reside on the floppy. It should be easy enough to
modify this so it runs on a USb stick or whatever else...

10 ON ERROR PROCend
15 INPUT "Number of passes";tpass%
20 hdl%=OPENOUT"ADFS::0.$.wipe"
30 a$=""
40 FOR i%=1 TO 255:a%=RND(10)-1:a$+=STR$(a%):NEXT
50 BPUT#hdl%,a$
60 GOTO 30
70 END
80 DEFPROCend
90 IF ERR=<Disc Full> THEN
91 IF pass%>=tpass% THEN
92 CLOSE#hdl%:PRINT"Complete!":END
93 ELSE
94 pass%+=1:CLOSE#hdl%:ENDPROC
95 ENDIF
96 ELSE
97 PRINT"Wipe not complete!"
98 CLOSE#hdl%
99 ENDIF
100 END
110 ENDPROC

This little listing is from memory. Yes... It's quick & dirty, but
then it was only me that needed to use the program. I then deleted the
file called "wipe" on the root directory and proved that the whole
disc was filled with garbage by loading and viewing a number of
"random" sectors using the low-level disc dump tool built into !Zap. I
can't remember the value of ERR for Disc Full!! But it should be
adaptable to wipe data off USB sticks.

Yes... You still have the matter of removing the ADFS partition
afterwards, but you should be able to guarantee that any data
previously written cannot be retrieved. If secure data destruction is
important on the RO platform, then it might be interesting to try and
lift the algorithm from something like Darik's Boot & Nuke (DBAN) and
try to make it run using SWI's under RO. The source is out there and
it's open.

druck

unread,
Dec 7, 2009, 12:42:41 PM12/7/09
to
On 7 Dec 2009 Gazza <use...@garethlock.com> wrote:
> I can think of one straight off the bat that can be written in a few
> lines of BASIC code. True, it assumes the device is already formatted
> as an ADFS device, but should be able to fill the drive with random
> garbage.

Good luck with that, should take about a month to run on an average
sized drive. You really need to do a sector level wipe, blatting out
at least a MB per discOp call, even then you are looking at hours.

---druck

--
The ARM Club Free Software - http://www.armclub.org.uk/free/
32 bit Conversions Page - http://www.armclub.org.uk/32bit/

Gazza

unread,
Dec 15, 2009, 7:21:43 PM12/15/09
to
On Dec 7, 5:42 pm, druck <n...@druck.freeuk.com> wrote:
> On 7 Dec 2009 Gazza <use...@garethlock.com> wrote:
>
> > I can think of one straight off the bat that can be written in a few
> > lines of BASIC code. True, it assumes the device is already formatted
> > as an ADFS device, but should be able to fill the drive with random
> > garbage.
>
> Good luck with that, should take about a month to run on an average
> sized drive. You really need to do a sector level wipe, blatting out
> at least a MB per discOp call, even then you are looking at hours.
>
> ---druck
>
> --
> The ARM Club Free Software -http://www.armclub.org.uk/free/

> 32 bit Conversions Page    -http://www.armclub.org.uk/32bit/

I did say that I'd only tested it on floppies. Which formatted as MS-
DOS only hold 1.44MB and on ADFS only 1.6MB. It serves my purposes, so
that's all I care for. On my A7000+ I'm looking at about 3-5 mins or
so per disk. I very rarely get more than 10-20 disks at a time, and
with about 7 machines in the club's museum, I just stick one in each
of the machines and run 'em all at once.

0 new messages