View topic - Cannot mount partition from build file.

Cannot mount partition from build file.

Discussion about the QNX6 OS.

Cannot mount partition from build file.

Postby RichardE2 » Thu Nov 02, 2017 3:03 pm

This is a follow-up from my previous posting regarding the use of mkdir and problems with a read-only operating system.

I have now successfully partitioned a USB stick into two partitions. The first partition contains the QNX image and is 256M in size. I can boot from this USB partition. The second partition fills the remaining space of my 16G USB stick and is formatted as FAT32 with a volume label of "B".

Once booted I can mount the second partition using "mount -v -t dos /dev/hd0t12 /B" and access it from the "/B" directory.

However, I have to manually type in this command every time I boot. I really want to do this automatically from the script in the build file, but if I attempt this it fails every time saying:
mount: Can't mount /B (type dos)
mount: Possible reason: Invalid argument

Here is the end of the script in the build file:

display_msg "Mounting DOS partition..."
mount -v -t dos /dev/hd0t12 /B

# Run the script on the second partition (mounted as /B) which is intended to start whatever
# software is installed.

# Then start a Korn shell.
ksh -l


a) Why is it that I cannot mount the partition whilst in the build script, but I can once the Korn shell starts?

b) How can I automatically mount the partition at boot time?
New Member
Posts: 4
Joined: Thu Oct 26, 2017 9:13 am

Re: Cannot mount partition from build file.

Postby denkelly » Fri Nov 03, 2017 3:08 pm

Guessing the environment is different once you start the ksh.

But you can run a ksh command from within the build script...

ksh -c "mount -v -t dos /dev/hd0t12 /B"

The ksh will return when mount exits.
Senior Member
Posts: 163
Joined: Sat Aug 02, 2008 3:27 pm

Return to QNX6 - OS

Who is online

Users browsing this forum: Google [Bot] and 4 guests