OpenQNX :: The QNX Community Portal

May 18, 2008 - 01:33 AM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 43 unlogged users and 2 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
lychnobite
Post subject: Accessing FAT32 disk(partitioned in QNX) in Windows  PostPosted: Mar 20, 2008 - 11:36 AM
New Member


Joined: Feb 23, 2008
Posts: 5

Hi,

I want to copy some files from an embedded system running QNX into a CF and then access it on a windows pc for my project. So i partioned the CF as FAT32 in QNX system, but was not able to read it in a windows PC.

This is what i did

1) Connected the CF to QNX system
2) fdisk /dev/hd1 -s 1 -t 12 -p100
3) dinit -h /dev/hd1t12
4) Copied some files into the CF
4) Then umounted and connected it to a windows(XP) pc using a CF card reader. It showed the disk but when i opened it asked whether to partition it or not and was not able to get the files???

Can anyone help me on this regard!!!!

Regards
Lychnobite
 
 View user's profile Send private message  
Reply with quote Back to top
Tim
Post subject:   PostPosted: Mar 20, 2008 - 01:58 PM
Senior Member


Joined: Mar 10, 2004
Posts: 516

Lychnobite,

fdisk/dinit creates a QNX file system not a DOS one.

So there is no way a windows machine is going to read this filesystem.

What you need to do is format the CF disk under windows as a FAT32. Then in QNX you mount the CF as a DOS file sytem and copy your files to the CF card.

Tim
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
lychnobite
Post subject:   PostPosted: Mar 21, 2008 - 08:29 AM
New Member


Joined: Feb 23, 2008
Posts: 5

Hi Tim,

Thanks a lot.

Is there any utility in QNX to format the CF in FAT32 and access it in Windows?
 
 View user's profile Send private message  
Reply with quote Back to top
Tim
Post subject:   PostPosted: Mar 21, 2008 - 01:51 PM
Senior Member


Joined: Mar 10, 2004
Posts: 516

Lychnobyte,

I'm only aware of FAT32 formatting being available for floppies not for HD/CF cards.

I'm curious why you'd want or need to format in FAT32 in QNX. Every CF card I've ever bought already comes formatted for FAT32. You just insert the card and read/write to it. All you will need to do in QNX is specify DOS format to the mount command.

Tim
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
maschoen
Post subject:   PostPosted: Mar 22, 2008 - 03:05 AM
QNX Master


Joined: Jun 25, 2003
Posts: 977

A cheap and questionable way to format would be to first format under Windows, and make an image of the first sectors that represent the root directory and FAT tables. Then you can just copy this back when you want to re-initialize. The questionable part is that Windows puts some random serial number on the front of the disk so that it knows when the disk is replaced. This is true for removable media, like floppies.
 
 View user's profile Send private message Send e-mail Visit poster's website  
Reply with quote Back to top
lychnobite
Post subject:   PostPosted: Mar 24, 2008 - 07:00 AM
New Member


Joined: Feb 23, 2008
Posts: 5

Hi Tim,

This is what we want to do

Create two partitions in the CF: one supporting QNX file system and another partition supporting DOS file system.

We will have some files in QNX partition that we will load into an embedded system and those should not be accessed in Windows. The files we download from embebbed system will be stored in the DOS partition and those should be accessible in both QNX and Windows.

Please help????

Reg
Lychnobite
 
 View user's profile Send private message  
Reply with quote Back to top
Tim
Post subject:   PostPosted: Mar 24, 2008 - 02:05 PM
Senior Member


Joined: Mar 10, 2004
Posts: 516

Lychnobite,

This is going to be a multi-step process in order to put 2 file systems on the CF.

1) On a Windows PC, you have to partition the CF into 2 parts, one for FAT32 and one for QNX. After partitioning the CF, you can format one partition for FAT32 from the Windows PC. This gives you your Fat32 partition and splits the CF into 2 parts.

You didn't say whether or not you wanted to install the QNX O/S on the other partition and run from it or whether it was just going to hold files and you were running the QNX O/S from another drive/flash memory. So I'll give you a hint on doing both.

If you want to install the QNX O/S and run from the QNX partition then...

2) Install QNX to the 2nd partition. This should be a straight forward QNX installation. You'll have to specify which partition you want to install to and make sure you set the active partition (the one you boot from) to be the QNX partition.

If you want to have a QNX filesystem and no QNX O/S then...

2) On a QNX machine, use the fdisk command to create a QNX partition. Use the dinit command to initialize the QNX file system (basically everything you wrote in your initial post).

Tim
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
lychnobite
Post subject:   PostPosted: Mar 25, 2008 - 06:55 AM
New Member


Joined: Feb 23, 2008
Posts: 5

Thanks a lot Tim....
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.