devb-eide automount option ??

Hi,

I’d like to use automount=@filename option in order to automount knowen (permanent) filesystems.
But I get the error message:
io-blk: Failed to automount filesystem at ‘/’ - Can’t access shared library.

CD-ROM is mounted (to preserve additional questions - I also tried to slay and restart devb-eide
when I’m sitting on floppy with all required stuff). fs-qnx4.so is included into image. The file
/etc/fstab is created (I also tried to use /proc/boot/fstab - the same banana).

What’s wrong?
TIA, Eduard.

Here is snippet of my build file (rid of the comments, messages, etc.):

====================================================

[virtual=x86,bios +compress] boot = {
startup-bios -s64k
PATH=/proc/boot:/bin:/usr/bin LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll procnto
}

[+script] startup-script = {
procmgr_symlink …/…/proc/boot/libc.so.2 /usr/lib/ldqnx.so.2
seedres
slogger &
waitfor /dev/slog
display_msg “”

btw, why the first message is printed on the dot line?? smth wrong with loader, imo

display_msg “Starting pci-bios server…”
pci-bios &
waitfor /dev/pci
devc-con -n4 -LP &
waitfor /dev/con1
reopen /dev/con1
devb-eide blk noatime,cache=2m,rmvto=3s,bufsz=512:32k,automount=@/etc/fstab
dos noexec eide dma,ioport=0x1f0,irq=14,nopci eide dma,ioport=0x170,irq=15,nopci

\ it’s single line originally

waitfor /dev/cd0 30
#automnt -v
fs-pkg -a/pkgs/base/safe-config/etc/system/package/packages
[+session pri=10o] /bin/ksh -c /etc/system/sysinit
}
libc.so
[type=link] /dev/console=/dev/con1

Include all tie files for the default filesystems

libcam.so
io-blk.so
cam-disk.so
fs-qnx4.so
fs-dos.so
cam-cdrom.so
fs-cd.so

Binaries/Executables

[data=uip]
seedres
pci-bios
devb-eide
slogger
devc-con
fs-pkg
#/root/amnt/automnt

These files will be unlinked after the system has started

unlink_list={
/proc/boot/devb-*
seedres
#automnt
}

File system table (permanent partitions)

/etc/fstab={
/dev/hd0t79:/:qnx4,
/dev/cd0:/fs/cd0:cd
}

Since you’re getting the mesage ‘can’t access shared library’ (error code
83??), I’d guess that you don’t have the runtime linker setup properly.

I just use the following line (outside the startup script, obviously):

[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so.2



HTH,

James

“ed1k” <ed1k@yahoo.com> wrote in message
news:01c18177$85d98140$106fa8c0@ED1K…

Hi,

I’d like to use automount=@filename option in order to automount knowen
(permanent) filesystems.
But I get the error message:
io-blk: Failed to automount filesystem at ‘/’ - Can’t access shared
library.

CD-ROM is mounted (to preserve additional questions - I also tried to
slay and restart devb-eide
when I’m sitting on floppy with all required stuff). fs-qnx4.so is
included into image. The file
/etc/fstab is created (I also tried to use /proc/boot/fstab - the same
banana).

What’s wrong?
TIA, Eduard.

Here is snippet of my build file (rid of the comments, messages, etc.):

====================================================

[virtual=x86,bios +compress] boot = {
startup-bios -s64k
PATH=/proc/boot:/bin:/usr/bin
LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll procnto
}

[+script] startup-script = {
procmgr_symlink …/…/proc/boot/libc.so.2 /usr/lib/ldqnx.so.2
seedres
slogger &
waitfor /dev/slog
display_msg “”

btw, why the first message is printed on the dot line?? smth wrong with

loader, imo
display_msg “Starting pci-bios server…”
pci-bios &
waitfor /dev/pci
devc-con -n4 -LP &
waitfor /dev/con1
reopen /dev/con1
devb-eide blk
noatime,cache=2m,rmvto=3s,bufsz=512:32k,automount=@/etc/fstab
dos noexec eide dma,ioport=0x1f0,irq=14,nopci eide
dma,ioport=0x170,irq=15,nopci

\ it’s single line originally

waitfor /dev/cd0 30
#automnt -v
fs-pkg -a/pkgs/base/safe-config/etc/system/package/packages
[+session pri=10o] /bin/ksh -c /etc/system/sysinit
}
libc.so
[type=link] /dev/console=/dev/con1

Include all tie files for the default filesystems

libcam.so
io-blk.so
cam-disk.so
fs-qnx4.so
fs-dos.so
cam-cdrom.so
fs-cd.so

Binaries/Executables

[data=uip]
seedres
pci-bios
devb-eide
slogger
devc-con
fs-pkg
#/root/amnt/automnt

These files will be unlinked after the system has started

unlink_list={
/proc/boot/devb-*
seedres
#automnt
}

File system table (permanent partitions)

/etc/fstab={
/dev/hd0t79:/:qnx4,
/dev/cd0:/fs/cd0:cd
}

Hi James,

james <james.n@new.com> wrote in article <9v2baa$qpe$1@inn.qnx.com>…

Since you’re getting the mesage ‘can’t access shared library’ (error code
83??),

No, there was not any error code. Exactly what I wrote.

objdump -x /I_forget_path/io-blk.so.2 | grep NEEDED
shows me only libc.so.2. I think I have this link, all work well if I use mount command (or
automnt, I wrote it myself in C, it finds and mounts partitions)

I’d guess that you don’t have the runtime linker setup properly.

But CD-ROM is mounted. After error message about ‘/’, devb-eide mounts cd-rom as fs/cd0 pretty
well.
Might it be the fs-qnx4.so uses run-time library, but fs-cd.so does not use that one (is it
possible at all)?

I just use the following line (outside the startup script, obviously):

[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so.2

Thanks, I’ll look if it helps.

Eduard.

ed1k <ed1k@yahoo.com> wrote:

io-blk: Failed to automount filesystem at ‘/’ - Can’t access shared library.

File system table (permanent partitions)

/etc/fstab={
/dev/hd0t79:/:qnx4,
/dev/cd0:/fs/cd0:cd
}

There is no library called “fs-qnx4,.so” … remove the trailing “,” …

Hi John,
Thank you, seems it makes sense, I’ll try your suggestion. The reason I’ve written “,” was only
because I was out of luck (option does not work at all). I had read the doc:
http://qdn.qnx.com/support/docs/neutrino_2.11_en/utilities/i/io-blk.so.html
Here is the follow info:
If the @filename version of this option is used, the automounts are as specified in the given file.
The file is a list of mounts (using the same syntax as above), separated by newline characters or
commas.
But now I think the problem was in tabulation chars, to make my build file more readable I have
written as follow:
/etc/fstab={
/dev/hd0t79:/:qnx4
/dev/cd0:/fs/cd0:cd
}
Exactly \0x09 before /dev/…, I think (I did not check out this, but I think my editor does not do
conversion from tab to spaces). Comma was left by the some of my experiments. I was under
impression the comma cannot be impediment because it’s delimiter…


Thank you again,
Eduard.


John Garvey <jgarvey@qnx.com> wrote in article <9v35rm$geo$1@nntp.qnx.com>…

ed1k <> ed1k@yahoo.com> > wrote:
io-blk: Failed to automount filesystem at ‘/’ - Can’t access shared library.

File system table (permanent partitions)

/etc/fstab={
/dev/hd0t79:/:qnx4,
/dev/cd0:/fs/cd0:cd
}

There is no library called “fs-qnx4,.so” … remove the trailing “,” …

ed1k <ed1k@yahoo.com> wrote:

If the @filename version of this option is used, the automounts are as
specified in the given file. The file is a list of mounts (using the same
syntax as above), separated by newline characters or commas.

The key word is OR - there can be commas or there can be a newline, not
both. Also, there can be no leading whitespace (the automount will fail in
this case with ENOENT, whereas the comma/newline will result in ELIBACC
as I described earlier). I will tidy up this file parsing one day, but it
is of less importance now that QNX6 has a mount() function call …

Thank you very much, John. I’ve a little extra question about diskboot’s mountpoints names:
e.g.
hd1t6 → /fs/hd1-dos
hd1t6.1 → /fs/hd1-dos-1
hd1t11 → ?
hd1t11.1 → ??
Just I don’t wish to be far from diskbooted system :wink:

John Garvey <jgarvey@qnx.com> wrote in article <9v4m4a$jtp$1@nntp.qnx.com>…

ed1k <> ed1k@yahoo.com> > wrote:
If the @filename version of this option is used, the automounts are as
specified in the given file. The file is a list of mounts (using the same
syntax as above), separated by newline characters or commas.

The key word is OR - there can be commas or there can be a newline, not
both. Also, there can be no leading whitespace (the automount will fail in
this case with ENOENT, whereas the comma/newline will result in ELIBACC
as I described earlier). I will tidy up this file parsing one day, but it
is of less importance now that QNX6 has a mount() function call …

Agree. I think it simply should be documented :wink:, nothing more…

Eduard.

“John Garvey” <jgarvey@qnx.com> wrote in message
news:9v4m4a$jtp$1@nntp.qnx.com

ed1k <> ed1k@yahoo.com> > wrote:
If the @filename version of this option is used, the automounts are as
specified in the given file. The file is a list of mounts (using the
same
syntax as above), separated by newline characters or commas.

The key word is OR - there can be commas or there can be a newline, not
both. Also, there can be no leading whitespace (the automount will fail
in
this case with ENOENT, whereas the comma/newline will result in ELIBACC
as I described earlier). I will tidy up this file parsing one day, but it
is of less importance now that QNX6 has a mount() function call …

May be if you add ‘automount’ capabilities to the mount call/utility. So far
to get automount behavior we have to use old way, which is not really good
thing.

  • igor

Igor Kovalenko <kovalenko@home.com> wrote:

May be if you add ‘automount’ capabilities to the mount call/utility.

Does “mount -a” with a BSD-style “/etc/fstab” not work for you?!?

John Garvey wrote:

Igor Kovalenko <> kovalenko@home.com> > wrote:
May be if you add ‘automount’ capabilities to the mount call/utility.

Does “mount -a” with a BSD-style “/etc/fstab” not work for you?!?

May be it would, if I knew about it. Neither utility nor system call
have such option documented.

thanks,

  • igor

It might be an devb-eide options prob or simply because you did not mount
/boot/fs/qnxbase.qfs as /pkgs/base before starting fs-pkg. remember to
include ‘mount’ in your binary/executables

devb-eide blk
noatime,cache=2m,rmvto=3s,bufsz=512:32k,automount=@/etc/fstab \

shdn’t it be ‘devb-eide blk automount=hd0t79:/etc/fstab,cache=2m,’ instead of ‘…automount=@/etc/fstab…’
I normally include a ‘waitfor /boot’ before continuing.

dos noexec eide dma,ioport=0x1f0,irq=14,nopci eide
dma,ioport=0x170,irq=15,nopci

why don’t you try to successfully get into the system 1st before trying out
this options?
at least it’s easier to isolate the cause when problem arises.


Wen

Hi Wen,

Wen <xiaowen@axs.com.sg> wrote in article <9v6f5n$q4m$1@inn.qnx.com>…

It might be an devb-eide options prob or simply because you did not mount
/boot/fs/qnxbase.qfs as /pkgs/base before starting fs-pkg. remember to
include ‘mount’ in your binary/executables

It’s no problem. I’ve written my own automnt program - it make that :wink: BTW, if mount of
qnxbase.qfs is missed it causes other problems :wink:, nothing related to devb-eide automount.

devb-eide blk
noatime,cache=2m,rmvto=3s,bufsz=512:32k,automount=@/etc/fstab \

shdn’t it be ‘devb-eide blk automount=hd0t79:/etc/fstab,cache=2m,’ instead of ‘…automount=@/etc/fstab…’

No. The problem was with comma (and extra chars: tab, spaces) in fstab file. But i did not try your
suggestion.

I normally include a ‘waitfor /boot’ before continuing.

Just now I’m working on it. Look at other my message at this thread.

dos noexec eide dma,ioport=0x1f0,irq=14,nopci eide
dma,ioport=0x170,irq=15,nopci

why don’t you try to successfully get into the system 1st before trying out
this options?
at least it’s easier to isolate the cause when problem arises.

Because I’m sure in those settings. I’m trying to rewrite my working build file. Of course,
generally your remark sounds resonable.

Eduard.

Wen
\

John Garvey <jgarvey@qnx.com> wrote in article <9v5nu4$cdh$1@nntp.qnx.com>…

Igor Kovalenko <> kovalenko@home.com> > wrote:
May be if you add ‘automount’ capabilities to the mount call/utility.

Does “mount -a” with a BSD-style “/etc/fstab” not work for you?!?

-a switch does not documented anywhere in docs. Does it work in 6.1A or you are speaking about next
6.1.1 release? Does “mount -a” only mounts fixed partitions enumerated in fstab? Or does it look
for new one additionly?

Well, my problem was with extra comma in fstab file, thanks John. John, I still think you should
not spend time on file parsing (It’s IMHO only :wink:) Just send comments about extra space to doc
folk.

Right now I’m bothering to get boot proccess as fast as possible.

I tried the next algorithms:

  1. start devb-eide <…>&
    waitfor /dev/hd0t79
    start my automnt, it mounts root fs, qnxbase.qfs, cd-rom and looks through /dev and mounts dos
    partitions on my pocket drive.

Sadly, sometimes (always if cd disk is in drive) there is no /dev/cd0 at mount time, so cd-rom is
left unmounted.

  1. the same as 1) but waitfor /dev/cd0.
    It woks reliable, but it waits 1-2 sec for cd-rom (if cd disk is inserted)

  2. start devb-eide <…> automount=@/etc/fstab &
    waitfor /dev/hd0t79
    start other automount, it mounts qnxbase.qfs and “phantom” doses’ partitions.
    /etc/fstab={
    /dev/hd0t79:/:qnx4
    /dev/cd0:/fs/cd0:cd
    }
    It works fast, devb-eide mounts cd-rom in background of automount (I guess so, because I see a
    little pause of automount’s output if there is cd disk in drive).
    And my question here: Is this safe assumption that devb-eide mounts root filesystem as soon as it
    creats /dev/hd0t79? Let me know here, please, because if not I should waitfor /boot

Sadly, this has issue too. Sometimes one of dos partitions is not mounted. I’m guessing here, fix
me, it’s because my root filesystem is on Quantum and pocket drive is older ST

  1. start devb-eide <…> automount=@/etc/fstab &
    waitfor /boot
    start amntbase, it mounts qnxbase.qfs only
    start package filesystem
    start amntdos, it mounts “floating” doses’ partitions.
    /etc/fstab={
    /dev/hd0t79:/:qnx4
    /dev/cd0:/fs/cd0:cd
    }

I guess, it’s more reliable and faster way. But I did not try it yet.

Any comments will be appreciated.

Thanks,
Eduard.




Igor,
Why you don’t wish to look into /dev and mount partitions which you’d like? Take a look at “New fat
bug in diskboot” thread, created 20Nov01 in this conference. You’ll find a small C source/binary
for automount of FAT16 partitions, that’s good for start :wink:
Eduard.


Igor Kovalenko <kovalenko@home.com> wrote in article <9v5k28$8qj$1@inn.qnx.com>…

“John Garvey” <> jgarvey@qnx.com> > wrote in message
news:9v4m4a$jtp$> 1@nntp.qnx.com> …
ed1k <> ed1k@yahoo.com> > wrote:
If the @filename version of this option is used, the automounts are as
specified in the given file. The file is a list of mounts (using the
same
syntax as above), separated by newline characters or commas.

The key word is OR - there can be commas or there can be a newline, not
both. Also, there can be no leading whitespace (the automount will fail
in
this case with ENOENT, whereas the comma/newline will result in ELIBACC
as I described earlier). I will tidy up this file parsing one day, but it
is of less importance now that QNX6 has a mount() function call …

May be if you add ‘automount’ capabilities to the mount call/utility. So far
to get automount behavior we have to use old way, which is not really good
thing.

  • igor

ed1k <ed1k@yahoo.com> wrote:

Well, my problem was with extra comma in fstab file, thanks John.
John, I still think you should not spend time on file parsing

Well, it was only 3 lines to trim leading white space and handle dangling
commas, so it’s done already (won’t be out 'til >6.1.1 though).

Sadly, sometimes (always if cd disk is in drive) there is no /dev/cd0
at mount time, so cd-rom is left unmounted.

The presence of a CD can delay the probing time for the driver (the
drive will spin the disk up etc, which it doesn’t do if there is no
CD inserted). So you do need a “waitfor”. Unfortunately this does
defeat the purpose of trying to dynamically mount everything, as you
have to know what to waitfor. This is the big advantage of the
“automount”, since it is handled by io-blk as soon as a devb driver
attaches a device, all mounts for that device are processed whenever
the corresponding device appears (if it does at all). External
mechanisms must coordinated with device discovery, and there is currently
no way to do this (“the bus scan is completed … now”); diskboot just
polls with a timeout. You could perhaps look at the state of devb tid1
(SIGWAITINFO), but I’m not sure if this is completely reliable, and
certainly don’t quote me on it :wink:

The problem is if you know exactly what hardware/partitions are there,
then they can be easily/explicitly mounted (either through an automount
or a mount() after explicit waitfor); if you don’t know then you need
potentially long timeouts on device discovery (I believe the ATA spec
allows 30 seconds for certain slave devices to respond in some cases)
polling through “/dev” looking for new devices to mount on.

John Garvey <jgarvey@qnx.com> wrote in article <9v5nu4$cdh$1@nntp.qnx.com>…

Igor Kovalenko <> kovalenko@home.com> > wrote:
May be if you add ‘automount’ capabilities to the mount call/utility.

Does “mount -a” with a BSD-style “/etc/fstab” not work for you?!?

Hello,

Sadly, it’s not documented anywhere. Why “use mount” does not tell about -a switch. Does not
developer write usage section? I agree html doc can be delayed… but why builtin message does not
cover all functionality? There is my experiments dump below. I think it might be useful for
developer, because it include coreinfo (thanks, I found the way to throw down the mount :wink:). I’m
sure it just because I’m not familiar with BSD-style and I’d used QNX-style.
The first after bootup, I’d unmounted /dev/cd0 and exclude root filesystem from fstab.

cat /etc/fstab

/dev/cd0:/fs/cd0:cd

mount -a

No fstab entries found for type Memory fault (core dumped)

coreinfo /var/dumps/mount.core

/var/dumps/mount.core:
processor=X86 num_cpus=1
cpu 1 cpu=586 name=Pentium/MMX Stepping 3 speed=167
flags=0xc00000bf FPU MMU CPUID RDTSC INVLPG WP BSWAP MMX PSE
cyc/sec=167104800 tod_adj=1008190222230953963 nsec=843670898600 inc=999847
boot=1008197422 epoch=1970 intr=0
rate=838095345 scale=-15 load=1193
MACHINE=“x86pc” HOSTNAME=“localhost”
hwflags=0x000540
valid=512 heads=255 cyls=524 sectors=63 nblocks=4129408 spare=0
valid=512 heads=64 cyls=1023 sectors=63 nblocks=4129409 spare=0
pid=413711 parent=172052 child=0 pgrp=413711 sid=172052
flags=0x002000 umask=02 base_addr=0x8048000 init_stack=0x8047e34
ruid=0 euid=0 suid=0 rgid=0 egid=0 sgid=0
ign=0000000000000000 queue=ff00000000000000 pending=0000000000000000
fds=5 threads=1 timers=0 chans=1
thread 1 SIGNALLED-SIGSEGV code=1 MAPERR refaddr=0 fltno=11
ip=0xb0336872 sp=0x8047c60 stkbase=0x7fc7000 stksize=528384
state=STOPPED flags=0 last_cpu=1 timeout=00000000
pri=10 realpri=10 policy=OTHER

mount -a /dev/cd0

#mount
/dev/cd0v/cd0 on / type cd (joliet)
/pkgs/repository/qnx/os/core-2.1.2-patchA on / type pkg
/dev/hd0t79 on / type qnx4
/dev/fd0 on /fs/fd-dos type dos (fat12)
/dev/hd0t6 on /fs/hd0-fat16 type dos (fat16)
/dev/hd1t6 on /fs/hd1-fat16 type dos (fat16)
/dev/hd1t6.1 on /fs/hd1-fat16-1 type dos (fat16)
/dev/hd1t6.2 on /fs/hd1-fat16-2 type dos (fat16)
/boot/fs/qnxbase.qfs on /pkgs/base type qnx4

It really mounts my cd at mountpoint /, but I definetelly have no /dev/cd0v/cd0 (there is only
/dev/cd0).

Excuse my ignorance and best regards,
Eduard.

ed1k <ed1k@yahoo.com> wrote:

John Garvey <> jgarvey@qnx.com> > wrote in article <9v5nu4$cdh$> 1@nntp.qnx.com> >…
Does “mount -a” with a BSD-style “/etc/fstab” not work for you?!?
There is my experiments dump below.

Yes, that is already fixed. mount crashes because of your malformed
/etc/fstab - it is not BSD style. I never knew it supported ‘-a’ until
I replied to Igor, and when I tested it, found and fixed the crash, and
verified it then worked as expected. I didn’t write mount, so whoever
did can comment on the reason for the documentation discrepency.

cat /etc/fstab

/dev/cd0:/fs/cd0:cd

This should be (ie white-space delimited fields, option is usually “rw”
or “ro”, and the fsck parallel/pass fields are optional and ignored):
/dev/cd0 /fs/cd0 cd ro 0 0

Does it support ‘+’ notation as in io-blk line, to indicate ‘shared
media’ (dos floppy/qnx floppy, etc)?

  • igor

John Garvey wrote:

ed1k <> ed1k@yahoo.com> > wrote:
John Garvey <> jgarvey@qnx.com> > wrote in article <9v5nu4$cdh$> 1@nntp.qnx.com> >…
Does “mount -a” with a BSD-style “/etc/fstab” not work for you?!?
There is my experiments dump below.

Yes, that is already fixed. mount crashes because of your malformed
/etc/fstab - it is not BSD style. I never knew it supported ‘-a’ until
I replied to Igor, and when I tested it, found and fixed the crash, and
verified it then worked as expected. I didn’t write mount, so whoever
did can comment on the reason for the documentation discrepency.

cat /etc/fstab

/dev/cd0:/fs/cd0:cd

This should be (ie white-space delimited fields, option is usually “rw”
or “ro”, and the fsck parallel/pass fields are optional and ignored):
/dev/cd0 /fs/cd0 cd ro 0 0

John Garvey <jgarvey@qnx.com> wrote in article <9vb1e4$9fp$1@nntp.qnx.com>…

ed1k <> ed1k@yahoo.com> > wrote:
John Garvey <> jgarvey@qnx.com> > wrote in article <9v5nu4$cdh$> 1@nntp.qnx.com> >…

cat /etc/fstab

/dev/cd0:/fs/cd0:cd

This should be (ie white-space delimited fields, option is usually “rw”
or “ro”, and the fsck parallel/pass fields are optional and ignored):
/dev/cd0 /fs/cd0 cd ro 0 0

And after that… Is there any sense to use different styles for automount=@file of devb-* and
mount -a?
It’s safe now since you fixed the crash, but anyway… BTW, what did “mount -a /dev/cd0”? The
result which I had got was unexpected… I was waiting for the new crash or something like…

Eduard.