Mount SanDisk

Hi,

I’m using a PCM-3350 PC104+ system. It has a builtin slot for a
SanDisk. The devb-eide driver finds it and shows it as /dev/hd1. I can’t
seem to initialize it and mount it. This is what I do when using a
DiskOnChip. Should this not work for a SanDisk also?

// clear existing partition table
dd if=/dev/zero of=/dev/hd1 count=100
// create a partition using fdisk
fdisk /dev/hd1 add 1 qnx all
fdisk /dev/hd1 boot qnx
fdisk /dev/hd1 loader
mount -e /dev/hd1
dinit -h /dev/hd1t77
dinit -hb /dev/hd1t77

now when I try to mount it like
mount /dev/hd1t77 /mnt/test
it says that a corrupted file system has been detected.

Thanks for the HELP!

Nervermind. I really hate it when you do things that should work and they
don’t. I just tried it again and it works now. Weird.



“Paul Vander Byl” <paul@gandacar.ca> wrote in message
news:ajbnrk$pcn$1@inn.qnx.com

Hi,

I’m using a PCM-3350 PC104+ system. It has a builtin slot for a
SanDisk. The devb-eide driver finds it and shows it as /dev/hd1. I can’t
seem to initialize it and mount it. This is what I do when using a
DiskOnChip. Should this not work for a SanDisk also?

// clear existing partition table
dd if=/dev/zero of=/dev/hd1 count=100
// create a partition using fdisk
fdisk /dev/hd1 add 1 qnx all
fdisk /dev/hd1 boot qnx
fdisk /dev/hd1 loader
mount -e /dev/hd1
dinit -h /dev/hd1t77
dinit -hb /dev/hd1t77

now when I try to mount it like
mount /dev/hd1t77 /mnt/test
it says that a corrupted file system has been detected.

Thanks for the HELP!

Paul Vander Byl wrote:

Nervermind. I really hate it when you do things that should work and they
don’t. I just tried it again and it works now. Weird.

You didn’t turn the power off in between the dinit and your mount did
you? Sandisk has a very nasty habit of taking it’s own sweet time about
writing your changes to disk. This may be several seconds on smaller
Sandisks and I have seen problems with large Sandisks where the write
never really gets to the flash until more than 10 seconds after the os
thinks it is finished.

Rick…

Rick Duff Internet: rick@astranetwork.com
Astra Network QUICS: rgduff
QNX Consulting and Custom Programming URL:
http://www.astranetwork.com
+1 (204) 987-7475 Fax: +1 (204) 987-7479

I think something to this sort is happening. It seems that everytime
something goes wrong the SanDisk becomes corrupt. Would mounting it as read
only help? Can I expect these problems in production? ie. A power loss
will usually require a reflash of the corrupt filesystem?

Maybe I should stick to the DOC instead.
What is recommended?



“Rick Duff” <rick@astranetwork.com> wrote in message
news:3D596F23.E9FB6BD0@astranetwork.com

Paul Vander Byl wrote:

Nervermind. I really hate it when you do things that should work and
they
don’t. I just tried it again and it works now. Weird.


You didn’t turn the power off in between the dinit and your mount did
you? Sandisk has a very nasty habit of taking it’s own sweet time about
writing your changes to disk. This may be several seconds on smaller
Sandisks and I have seen problems with large Sandisks where the write
never really gets to the flash until more than 10 seconds after the os
thinks it is finished.

Rick…

Rick Duff Internet: > rick@astranetwork.com
Astra Network QUICS: rgduff
QNX Consulting and Custom Programming URL:
http://www.astranetwork.com
+1 (204) 987-7475 Fax: +1 (204) 987-7479

Paul Vander Byl wrote:

I think something to this sort is happening. It seems that everytime
something goes wrong the SanDisk becomes corrupt. Would mounting it as read
only help? Can I expect these problems in production? ie. A power loss
will usually require a reflash of the corrupt filesystem?

Maybe I should stick to the DOC instead.
What is recommended?

Given my experience, I would never recommend SanDisk for any projects I
have worked on.

Rick…

Rick Duff Internet: rick@astranetwork.com
Astra Network QUICS: rgduff
QNX Consulting and Custom Programming URL:
http://www.astranetwork.com
+1 (204) 987-7475 Fax: +1 (204) 987-7479

Rick Duff <rick@astranetwork.com> wrote:

Paul Vander Byl wrote:

I think something to this sort is happening. It seems that everytime
something goes wrong the SanDisk becomes corrupt. Would mounting it as read
only help? Can I expect these problems in production? ie. A power loss
will usually require a reflash of the corrupt filesystem?

Maybe I should stick to the DOC instead.
What is recommended?


Given my experience, I would never recommend SanDisk for any projects I
have worked on.

If you can, switch to a laptop HD. We are having simular
problems here. As near as I can figure if the flash disk is in
the middle of a write when the power gets pulled the block may
be left in a indeterminate state. Which of course is very
painfull if that happens in the ROOT block, or any directory
block for that matter. We are going to great lengths to protect
our data!

The theory is that FLASH has to be erased first, if the erase
cycle is not completed before the power is lost, the write can
not be ocmpleted. Where as, the hard drive is an over write, and
they usually have enough internal capacitance to finish the last
write.

regards,
Tom

Paul,
take a look at:
http://www.embeddedlinuxworks.com/articles/jffs_guide.html

as well look at the qdn.public.qnxrtp.os discussion group and try to get a
post on February 20, 2001 3:17 PM by David Hawley.

Janusz Ruszel.

“Rick Duff” <rick@astranetwork.com> wrote in message
news:3D5A9E83.6F9A7CB1@astranetwork.com

Paul Vander Byl wrote:

I think something to this sort is happening. It seems that everytime
something goes wrong the SanDisk becomes corrupt. Would mounting it as
read
only help? Can I expect these problems in production? ie. A power
loss
will usually require a reflash of the corrupt filesystem?

Maybe I should stick to the DOC instead.
What is recommended?


Given my experience, I would never recommend SanDisk for any projects I
have worked on.

Rick…

Rick Duff Internet: > rick@astranetwork.com
Astra Network QUICS: rgduff
QNX Consulting and Custom Programming URL:
http://www.astranetwork.com
+1 (204) 987-7475 Fax: +1 (204) 987-7479