Skip navigation.
Home
The QNX Community Portal

View topic - mkdir won't work

mkdir won't work

Read-only archive of qnx.bsp (Discuss building an image, flashing a board or using a BSP) at inn.qnx.com

mkdir won't work

Postby tflc-gonzo » Tue Apr 05, 2005 2:31 pm

Hi, I have the Total5200. I made a Image and add the binary mkdir. Then I
download it to the Total5200 and burn the Image into the flash. When I
tried to make a new directory with mkdir than one of two error occurs.

1. mkdir: test: No such device or address

or

2. mkdir: /test: Function not implemented

Do I need another binary or library besides the mkdir?

thx
Daniel
tflc-gonzo
Active Member
 
Posts: 18
Joined: Tue Mar 15, 2005 1:45 pm

Re: mkdir won't work

Postby Thunderblade » Thu Apr 07, 2005 10:02 am

See my response in the previous thread. "mkdir" will only work if you have
writeable media, such as flash filesystem, a hard disk or RAM disk.

"Daniel Götz" <tflc-gonzo@gmx.de> schrieb im Newsbeitrag
news:d2u7fp$lfq$1@inn.qnx.com...
Hi, I have the Total5200. I made a Image and add the binary mkdir. Then I
download it to the Total5200 and burn the Image into the flash. When I
tried to make a new directory with mkdir than one of two error occurs.

1. mkdir: test: No such device or address

or

2. mkdir: /test: Function not implemented

Do I need another binary or library besides the mkdir?

thx
Daniel

Thunderblade
Senior Member
 
Posts: 487
Joined: Thu Apr 07, 2005 11:52 am

RE: Re: mkdir won

Postby fklein23 » Fri Nov 09, 2007 7:43 pm

I am having this problem as well.
When I first bring up Neutrino on the Lite5200, there IS a file system.

# ls
bin dev lib proc tmp usr
#

I assume this is in a RAM disk. My intention is to put a file system on the IDE disk that is attached.
To do that, I need to mount the device.
To do that I need to make a mount target.
Under Linux, I would say something like:

mkdir /mnt
mkdir /mnt/disk0

mount /dev/hd0 /mnt/disk0

(Or some variation of that)

My problem is that mkdir doesn't work (for the same reason as the above posting)

# mkdir /mnt
mkdir: /mnt: Function not implemented

I thought it was because I didn't have write privileges to the directory in which I try to make the new directory.
So I reasoned, "put the target directory under the usr directory". So I tried:

# chmod a+rw usr
chmod: changing permission of usr : No such file or directory
#

I'm sure I am missing something here. Anyone KNOW how to get started putting an IDE filesystem on Neutrino?

- Frank
fklein23
New Member
 
Posts: 6
Joined: Mon Nov 05, 2007 8:45 pm

Re: mkdir won

Postby Colin Burgess » Fri Nov 09, 2007 8:06 pm

You don't need to do the initial mknod/mkdir under QNX.

Just run the IDE driver (devb-eide) and then mount the devices, eg

mount -p /dev/hd0 # mount the partitions
mount /dev/hd0t77 /mnt/disk0

check the docs for devb-eide and mount, and also fs-qnx4.so and fs-ext2.so

Cheers,

Colin

fklein23 wrote:
I am having this problem as well.
When I first bring up Neutrino on the Lite5200, there IS a file
system.

# ls
bin dev lib proc tmp usr
#

I assume this is in a RAM disk. My intention is to put a file system
on the IDE disk that is attached.
To do that, I need to mount the device.
To do that I need to make a mount target.
Under Linux, I would say something like:

mkdir /mnt
mkdir /mnt/disk0

mount /dev/hd0 /mnt/disk0

(Or some variation of that)

My problem is that mkdir doesn't work (for the same reason as the
above posting)

# mkdir /mnt
mkdir: /mnt: Function not implemented

I thought it was because I didn't have write privileges to the
directory in which I try to make the new directory.
So I reasoned, "put the target directory under the usr
directory". So I tried:

# chmod a+rw usr
chmod: changing permission of usr : No such file or directory
#

I'm sure I am missing something here. Anyone KNOW how to get started
putting an IDE filesystem on Neutrino?

- Frank


--
cburgess@qnx.com
Colin Burgess
 

Re: mkdir won

Postby Guest » Fri Nov 09, 2007 8:16 pm

fklein23 <rudolph@beaconpower-dot-com.no-spam.invalid> wrote:
I am having this problem as well.
When I first bring up Neutrino on the Lite5200, there IS a file
system.

# ls
bin dev lib proc tmp usr
#

I assume this is in a RAM disk.

Sort of; these directories are part of the Image FileSystem (IFS),
which sits in RAM, but is read-only. If you try to write to /, as
you are doing below, you're trying to write to a read-only filesystem.

If you have a hard drive attached to the IDE interface, you need to
ensure that the eide device driver is running. If you execute the 'pidin'
command, you should see 'devb-eide-mpc5200' in the list of running
drivers.

Under the /dev/ directory, you should see your hard drive:

/dev/hd0

as well as any partitions on the drive; for QNX partitions, they
might appear as:

/dev/hd0t77
/dev/hd0t78
or
/dev/hd0t79

Windows / FAT32 partitions may appear as:

/dev/hd0t11

Before accessing a partition, you need to mount it. For example, to
mount a QNX partition:

mount -t qnx4 /dev/hd0t77 /disk0

now you can cd to /disk0, and see the contents of the drive, write
files, etc.

My intention is to put a file system
on the IDE disk that is attached.
To do that, I need to mount the device.
To do that I need to make a mount target.
Under Linux, I would say something like:

QNX isn't Linux :-). For more information, you can read about QNX device drivers,
the 'mount' command, etc., in the on-line documentation:

http://www.qnx.com/developers/docs/6.3. ... okset.html


mkdir /mnt
mkdir /mnt/disk0

mount /dev/hd0 /mnt/disk0

(Or some variation of that)

My problem is that mkdir doesn't work (for the same reason as the
above posting)

# mkdir /mnt
mkdir: /mnt: Function not implemented

I thought it was because I didn't have write privileges to the
directory in which I try to make the new directory.
So I reasoned, "put the target directory under the usr
directory". So I tried:

# chmod a+rw usr
chmod: changing permission of usr : No such file or directory
#

I'm sure I am missing something here. Anyone KNOW how to get started
putting an IDE filesystem on Neutrino?

- Frank


--

David Green (dgreen@qnx.com)
QNX Software Systems Ltd.
http://www.qnx.com
Guest
 

Re: mkdir won

Postby Pierre AUBERT » Mon Nov 12, 2007 6:00 am

Hi,

Under QNX, there's no need to mkdir for a mount point. You can directly
run
mount /dev/hd0 /mnt/disk0
without any mkdir.

Best regards

fklein23 a écrit :
I am having this problem as well.
When I first bring up Neutrino on the Lite5200, there IS a file
system.

# ls
bin dev lib proc tmp usr
#

I assume this is in a RAM disk. My intention is to put a file system
on the IDE disk that is attached.
To do that, I need to mount the device.
To do that I need to make a mount target.
Under Linux, I would say something like:

mkdir /mnt
mkdir /mnt/disk0

mount /dev/hd0 /mnt/disk0

(Or some variation of that)

My problem is that mkdir doesn't work (for the same reason as the
above posting)

# mkdir /mnt
mkdir: /mnt: Function not implemented

I thought it was because I didn't have write privileges to the
directory in which I try to make the new directory.
So I reasoned, "put the target directory under the usr
directory". So I tried:

# chmod a+rw usr
chmod: changing permission of usr : No such file or directory
#

I'm sure I am missing something here. Anyone KNOW how to get started
putting an IDE filesystem on Neutrino?

- Frank
Pierre AUBERT
 

Re: mkdir won

Postby Colin Burgess » Mon Nov 12, 2007 6:23 pm

Bring this email back into the newsgroup

fklein23 wrote:
I am having this problem as well.
When I first bring up Neutrino on the Lite5200, there IS a file
system.

# ls
bin dev lib proc tmp usr
#

I assume this is in a RAM disk. My intention is to put a file system
on the IDE disk that is attached.
To do that, I need to mount the device.
To do that I need to make a mount target.
Under Linux, I would say something like:

mkdir /mnt
mkdir /mnt/disk0

mount /dev/hd0 /mnt/disk0

(Or some variation of that)

My problem is that mkdir doesn't work (for the same reason as the
above posting)

# mkdir /mnt
mkdir: /mnt: Function not implemented

I thought it was because I didn't have write privileges to the
directory in which I try to make the new directory.
So I reasoned, "put the target directory under the usr
directory". So I tried:

# chmod a+rw usr
chmod: changing permission of usr : No such file or directory
#

I'm sure I am missing something here. Anyone KNOW how to get started
putting an IDE filesystem on Neutrino?

- Frank


--
cburgess@qnx.com
Colin Burgess
 

Re: mkdir won

Postby Colin Burgess » Mon Nov 12, 2007 6:26 pm

Subject:
THanks for posting something to my thread
From:
"Rudolph, Frank" <rudolph@beaconpower.com
Date:
Mon, 12 Nov 2007 12:58:17 -0500
To:
cburgess@qnx.com

To:
cburgess@qnx.com


Colin:

Thanks very much for posting something to my thread. I am having a great
deal of trouble untangling the documentation for exactly how one gets a
file system going on a BSP generated image of QNX Neutrino.



I have successfully booted the image I built for a Lite5200B eval board
from Freescale.

I have connected a hard disk that I populated from the quick-start CD
for an x86 system, and I can boot the drive on my x86 system.

I’d like to just mount the device and read it before I try the exercise
of actually building a second partition on that same disk. My objective
is to ultimately boot from that second partition or start over from
scratch with a new disk. But first, I’d like to must mount an existing
partition, just to see if the file system works.



Here is a log of my commands:





# mount -t qnx4 /dev/hd0t79 /mnt/fs

mount: Can't mount /mnt/fs (type qnx4)

mount: Possible reason: Corrupted file system detected



Can this be because the partition was created on a little-Endian system
and the Lite5200B is a big-endian?

I'm pretty sure that the filesystem is always stored on disk as little endian - fsys gurus can comment?

If you want to try making new partition, use fdisk to create one and then use dinit -h /dev/hd0t78 or
whatever you named it to initialize the partition. Then mount it with a similar command above.



# ls

bin dev lib proc tmp usr



It is interesting that subsequently, I get different reasons for failure
of this mount:



# mount -v -t qnx4 /dev/hd0t79 /mnt/fs

Parsed: mount from [/dev/hd0t79] mount on [/mnt/fs] type [qnx4]

mount: Can't mount /mnt/fs (type qnx4)

mount: Possible reason: No such device or address

# mount -t qnx4 /dev/hd0t79 /mnt/fs

mount: Can't mount /mnt/fs (type qnx4)

mount: Possible reason: Invalid argument

#



If I reboot the image, the FIRST time I try to mount, I get the same
corrupted file system message.



#mount –e



Responds by saying nothing, no matter what mount I try. So I am certain
nothing is mounted.



When I say



# mount -v -t qnx4 /dev/hd0t79 /mnt/fs



How is that going to work if there is no directory /mnt/fs and I can’t
create one by using mkdir?



OK. So let’s say I don’t want to mount an existing file system (since
that isn’t working for me anyway). How do I create a new one on my hard
disk? I’d like it to be a second partition and NOT disturb the first
partition I’ve already created on it.



Frank Rudolph, Ph.D., P.E.

/Embedded Systems Software Engineer/

/Beacon Power Corporation/

/234 Ballardvale Street///

/Wilmington// MA 01887///

/phone: 978-661-2803/

/email: rudolph@beaconpower.com/

/Web: www.beaconpower.com/






--
cburgess@qnx.com
Colin Burgess
 

RE: Re: mkdir won

Postby fklein23 » Mon Nov 12, 2007 10:10 pm

I sincerely wish I knew why, but I am now able to mount hard disk partitions

mount -t qnx4 /dev/hd0t79 /mnt/fs

works fine. I know I loaded several additional resources into the image (more from a trial and error sense than any guided effort) and something must have made the difference, because the spelling here and in my earlier post was exactly the same.

Next challenge: Anyone out there have any hands-on experience with fs-cifs?

I want to install a share on a Windows Exchange Server domain. I have done this with Samba and an x86 based QNX platform with no problem using a simple smb.conf file that says:

security = share
workgroup = QNX
etc.,...

and that worked like a charm, but I can't quite figure out how to duplicate that with fs-cifs

Thanks - Frank
fklein23
New Member
 
Posts: 6
Joined: Mon Nov 05, 2007 8:45 pm

Re: mkdir won

Postby Ryan J. Allen » Tue Nov 13, 2007 1:50 pm

On 12/11/2007 6:56 PM, fklein23 wrote:
I want to install a share on a Windows Exchange Server domain. I have
done this with Samba and an x86 based QNX platform with no problem
using a simple smb.conf file that says:

security = share
workgroup = QNX
etc.,...

and that worked like a charm, but I can't quite figure out how to
duplicate that with fs-cifs

fs-cifs is a client for mounting a share from a server. If you want to
have a QNX node offer an SMB share then you'd need to run samba on it.
(I think some have gone to the effort of porting samba to QNX.)

--
Ryan J. Allen
QNX Software Systems
Ryan J. Allen
 

Re: Re: mkdir won

Postby Mario Charest » Tue Nov 13, 2007 2:36 pm

"fklein23" <rudolph@beaconpower-dot-com.no-spam.invalid> wrote in message
news:fhap7l$op4$1@inn.qnx.com...
I sincerely wish I knew why, but I am now able to mount hard disk
partitions

mount -t qnx4 /dev/hd0t79 /mnt/fs


Do you have a waitfor /dev/hd0 and maybe a wait for /dev/hd0t79/.
It could possibly be a timing issue.
Mario Charest
 


Return to qnx.bsp

Who is online

Users browsing this forum: No registered users and 1 guest