Ramdisk Root

Hello, all,

Is it possible to use a ramdisk as root? I am booting from a disk on
chip, and want to copy or untar its contents onto a ramdisk, then use
that ramdisk as root. However, I still need access to the disk on
chip, in order to save changes to config files.

Thanks,
Kevin


He that breaks a thing to find out what it is has left the path of
wisdom – Gandalf the Grey

sure.
neutrino supports union filesystems so the last filesystem to mount will
be written to first. this can be confusing…

what i prefer to do is to mount a ramdisk as /ram and then make symlinks
to specific directories within it. that way i know where things are
going.

for fun, try this … but again, this can get confusing…:

devf-ram -s0,4M & # for a 4M ramdisk

flashctl -p /dev/fs0p0 -e -f -n / -m

now you are mounted as root.
create any new file in / … it will go to the ramdisk.

slay devf-ram

the new files you created are gone.

what fun!!

Kevin Lacquement <klacquement@syscor.com> wrote:

Hello, all,

Is it possible to use a ramdisk as root? I am booting from a disk on
chip, and want to copy or untar its contents onto a ramdisk, then use
that ramdisk as root. However, I still need access to the disk on
chip, in order to save changes to config files.

Thanks,
Kevin


He that breaks a thing to find out what it is has left the path of
wisdom – Gandalf the Grey


Randy Martin randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579

Hi Randy,

This is interesting. I’ve been re-prefixing the root directory ‘/’ on QNX 4
for years. But this works quite nicely. Can you define union file systems
any better. Is it simply that the most recent process that claims that name
space prefix wins?


Bill Caroselli - Sattel Global Networks
1-818-709-6201 ext 122



“Randy Martin” <randy@qnx.com> wrote in message
news:9f6b5n$hif$2@nntp.qnx.com

sure.
neutrino supports union filesystems so the last filesystem to mount will
be written to first. this can be confusing…

what i prefer to do is to mount a ramdisk as /ram and then make symlinks
to specific directories within it. that way i know where things are
going.

for fun, try this … but again, this can get confusing…:

devf-ram -s0,4M & # for a 4M ramdisk

flashctl -p /dev/fs0p0 -e -f -n / -m

now you are mounted as root.
create any new file in / … it will go to the ramdisk.

slay devf-ram

the new files you created are gone.

what fun!!

Kevin Lacquement <> klacquement@syscor.com> > wrote:
Hello, all,

Is it possible to use a ramdisk as root? I am booting from a disk on
chip, and want to copy or untar its contents onto a ramdisk, then use
that ramdisk as root. However, I still need access to the disk on
chip, in order to save changes to config files.

Thanks,
Kevin


He that breaks a thing to find out what it is has left the path of
wisdom – Gandalf the Grey


Randy Martin > randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems > www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579

“RM” == Randy Martin <> randy@qnx.com> > writes:

[…]

RM> what i prefer to do is to mount a ramdisk as /ram and then
RM> make symlinks to specific directories within it. that way i
RM> know where things are going.

This will probably be easier; that’s sort of what I’m doing right now.

[…]

RM> now you are mounted as root.
RM> create any new file in / … it will go to the ramdisk.

How can I get the new/edited files to go to the original filesystem?

Cheers,
Kevin


He that breaks a thing to find out what it is has left the path of
wisdom – Gandalf the Grey

Bill Caroselli <Bill@sattel.com> wrote:

Hi Randy,

This is interesting. I’ve been re-prefixing the root directory ‘/’ on QNX 4
for years. But this works quite nicely. Can you define union file systems
any better. Is it simply that the most recent process that claims that name
space prefix wins?


Bill Caroselli - Sattel Global Networks
1-818-709-6201 ext 122

Take a look at the Neutrino System Architecture Guide as well as the
documentation for resmgr_attach() where it describes the behaviour
of the _RESMGR_FLAG_DIR, _RESMGR_FLAG_BEFORE, _RESMGR_FLAG_AFTER,
_RESMGR_FLAG_OPAQUE flags.

Also take a look at the name resolution process:

http://staff.qnx.com/~thomasf/nto.html → QNX2000 Open PPT stuff


Thomas

“Randy Martin” <> randy@qnx.com> > wrote in message
news:9f6b5n$hif$> 2@nntp.qnx.com> …
sure.
neutrino supports union filesystems so the last filesystem to mount will
be written to first. this can be confusing…

what i prefer to do is to mount a ramdisk as /ram and then make symlinks
to specific directories within it. that way i know where things are
going.

for fun, try this … but again, this can get confusing…:

devf-ram -s0,4M & # for a 4M ramdisk

flashctl -p /dev/fs0p0 -e -f -n / -m

now you are mounted as root.
create any new file in / … it will go to the ramdisk.

slay devf-ram

the new files you created are gone.

what fun!!

Kevin Lacquement <> klacquement@syscor.com> > wrote:
Hello, all,

Is it possible to use a ramdisk as root? I am booting from a disk on
chip, and want to copy or untar its contents onto a ramdisk, then use
that ramdisk as root. However, I still need access to the disk on
chip, in order to save changes to config files.

Thanks,
Kevin


He that breaks a thing to find out what it is has left the path of
wisdom – Gandalf the Grey


Randy Martin > randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems > www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579

Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com Neutrino Development Group
(613)-591-0931 http://www.qnx.com/~thomasf

Kevin Lacquement <klacquement@syscor.com> wrote:

“RM” == Randy Martin <> randy@qnx.com> > writes:

[…]

RM> what i prefer to do is to mount a ramdisk as /ram and then
RM> make symlinks to specific directories within it. that way i
RM> know where things are going.

This will probably be easier; that’s sort of what I’m doing right now.

[…]

RM> now you are mounted as root.
RM> create any new file in / … it will go to the ramdisk.

How can I get the new/edited files to go to the original filesystem?

i honestly do not know. i have not had to try that… maybe others can
comment. i would not build a system based on that model though… just my
personal opinion.
if you are trying to solve a redundancy problem, then a possible solution is
to build a simple resmgr that takes over a portion of the namespace and
responds to opens. it can redirect opens to other mountpoints.
the ‘inflator’ program does something like this (sits in front and checks
for a compression signature on any open for any file in its mountpath(s))


Randy Martin randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579

“RM” == Randy Martin <> randy@qnx.com> > writes:

[…]

RM> if you are trying to solve a redundancy problem, then a possible solution is
RM> to build a simple resmgr that takes over a portion of the namespace and
RM> responds to opens. it can redirect opens to other mountpoints.
RM> the ‘inflator’ program does something like this (sits in front and checks
RM> for a compression signature on any open for any file in its mountpath(s))

Thanks. I’ll take a look at trying that.


He that breaks a thing to find out what it is has left the path of
wisdom – Gandalf the Grey