Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (14) </ ... 6 7 8 9 10 [11] 12 13 14 >/

[ Track this topic :: Email this topic :: Print this topic ]

new topic new poll
Topic: DSLv3.0RC1< Next Oldest | Next Newest >
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: June 01 2006,18:46 QUOTE

clacker, Hmmm, very interesting.
Now dd only exists in the bottom most leve of the union space  /bin in the branch /KNOPPIX/bin
Before mydsl-loading of myapp.unc whereis dd displays /bin/dd
After loading myapp.unc whereis dd displays /bin/dd /opt/myapp/bin/dd
but the unionctl /bin --list displays /opt/myapp/bin/dd above /KNOPPIX/bin as it should and therefore the /opt/myapp/bin/dd should and does run as it is in a higher level of the stacked filesystem.

But like you said upon a removal and then re-loading even though the unionctl /bin --list or listu displays the same branch structuring, the shell ignores the upper branch and falls through to the bottom or lowest level of the stacked filesystem. Not good.

Typically, we would be adding additional binaries and libraries and not trying to overwrite existing system code. But as you discovered when looking at makeing a gnu-utils.unc this issue has surfaced.

The boot option unionfs call /etc/init.d/mkunion script. This is where I setup the union space. The mydsl-load calls mountci for uci and unc type (mountable) extensions. The unc type not only mounts but call /etc/init.d/unc to handle the branch management.
Back to top
Profile PM WEB 
ggordon Offline





Group: Members
Posts: 17
Joined: May 2006
Posted: June 01 2006,20:47 QUOTE

Quote (pr0f3550r @ June 01 2006,14:34)
Quote (roberts @ May 29 2006,22:45)
1. New unionfs as a boot option

I may be retarded but I can't see the unionfs option at boot time.
Pressing F2 or F3 I really can't see it.
I have definitely downloaded the right iso...

Unionfs is a boot option, although it is not yet a visible choice, at boot do a 'dsl unionfs' and your'e set. Rem current release is beta and RC1 so be patient on the little stuff..




ggordon
Back to top
Profile PM 
clacker Offline





Group: Members
Posts: 570
Joined: June 2004
Posted: June 01 2006,21:56 QUOTE

Robert, I think the problem is that /bin is still a link to /KNOPPIX/bin, so aren't the top and bottom levels pointing to the same place (/KNOPPIX/bin)?  Wouldn't that cause problems?  I really think that mkunion needs to create both /ramdisk/bin and a /ramdisk/holder/bin, set up the union with /KNOPPIX/bin, and then redirect the /bin link to point at /ramdisk/bin.

Code Sample
mkdir /ramdisk/holder

mkdir /ramdisk/bin
mkdir/ramdisk/holder/bin
mount -t unionfs -o dirs=/ramdisk/holder/bin=rw:/KNOPPIX/bin=ro unionfs /ramdisk/bin
ln -sf /ramdisk/bin /


The following is a though for how it might work, although what follows has problems with the /etc and /var directories:

Code Sample
#!/bin/bash

mkdir /ramdisk/holder

#first handle the easy directories
for i in bin boot lib sbin usr
do
   mkdir /ramdisk/$i
   mkdir /ramdisk/holder/$i
   mount -t unionfs -o dirs=/ramdisk/holder/$i=rw:/KNOPPIX/$i=ro unionfs /ramdisk/$i
   ln -sf /ramdisk/$i /
done

# Then take care of /etc by making a copy of it
mkdir /ramdisk/holder/etc
mkdir /ramdisk/etc
cp -rp /etc /ramdisk/holder/etc_copy
mount -t unionfs -o dirs=/ramdisk/holder/etc=rw:/ramdisk/holder/etc_copy=ro unionfs /ramdisk/etc
# copy mtab or their may be problems since there is another entry in the current one
cp /etc/mtab /ramdisk/etc/mtab
rm -rf /etc
ln -sf /ramdisk/etc /

# to undo the above section you need the following:
#      rm /etc
#      cp -r /ramdisk/holder/etc_copy /etc
#      umount /ramdisk/etc

# now handle the /var directory
mkdir /ramdisk/var
mkdir /ramdisk/holder/var
mv /ramdisk/var /ramdisk/holder/var_old
mount -t unionfs -o dirs=/ramdisk/holder/var_holder=rw:/ramdisk/holder/var_old=ro unionfs /ramdisk/var

# to undo the above section you need the following:
# umount /ramdisk/var
# rm -r /ramdisk/var
# mv /ramdisk/holder/var_old /ramdisk/var


Then your /etc/init.d/unc would need to change the way it mounts and unmounts:

unionctl /$dir --$ACTION --$WHERE /opt/$APP/$DIR

becomes

unionctl /ramdisk/$dir --$ACTION --$WHERE /opt/$APP/$DIR
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: June 01 2006,22:34 QUOTE

clacker, I will try this setup.
But...
I am not happy with
cp -rp /etc /ramdisk/holder/etc_copy
That will use up alot of inodes which I was hoping to avoid.

If unionfs has the same or more impacts, via inode use, as mkwriteable then the benefits are much reduced from what I was hoping for.

I am planing for a more standard unionfs setup on dsl-n.
But seeing what JB4X4 had posted earlier, I was hoping for an extremely minimal setup for dsl, ie., minimal inode/ramdisk use with no copying to ramdisk. This would really help the ultra low end machines which has always been our target. Maybe I am too optimistic
Back to top
Profile PM WEB 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: June 02 2006,00:31 QUOTE

clacker, after all of that and still I see the same behavior.
The myapp.unc/dd script still fails with the same error message upon second loading of myapp.unc /bin/dd Invalid argument.
Back to top
Profile PM WEB 
69 replies since May 30 2006,02:45 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (14) </ ... 6 7 8 9 10 [11] 12 13 14 >/
new topic new poll
Quick Reply: DSLv3.0RC1

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code