Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 42

Thread: ~/etc/

  1. #31
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    USA, IL
    Posts
    1,041
    >> Now if you could install a program chroot /home/knoppix/.root then have the system be able to check there first then goto /, I think that would be more efficient. This is easily done via the PATH statement as long as it is checked first for executables, however, where I get lost are things like lib, etc and other crucial directories and links, especially if you have to add a module to the kernel (such as for a winmodem.)

    --This is kind of what /usr/local/bin is for. But for libs and stuff, you may have to re-run ' ldconfig ' - see man page for it.

    --In the case of new modules, I'd push Klaus to include it. If that's not possible due to licensing or whatever, you can just mount a file over loopback that has been formatted as a filesystem (' du -s -h /lib/modules ' and make sure you DD your file to be big enough, plus a bit extra), copy /lib/modules to it, umount it, mount it as /lib/modules, and copy your kernel module to it. Then depmod -a and modprobe. Post if you need details, but check my Linuxtips page ( http://wolfrdr.tripod.com/linuxtips.html ) also.

    --The only thing is that you'd have to mount the file as /lib/modules at every boot, but that's part if what KPH is going to include as functionality.

    Quote Originally Posted by sireasoning
    Quote Originally Posted by lilliput
    If think I have found the simple way to install some application ..
    but i have still a little pb !!

    the command I'd used are :

    lndir /KNOPPIX/usr /mnt/hda2/install_dir
    mount --bind /mnt/hda2/install_dir /usr

    but the problem is that I can not access to much of applications after ...
    Why ?? /KNOPPIX/usr is different from /usr or is something bad on command ..?

    So I return to my try .. and doc yeap MAN PAGE !!!! I love IT LOL

    __________________________________________________ ___________

    Un lilliputien en délire ....
    It doesn't appear that you have really done anything different. Currently /usr is just linked to /Knoppix/usr. What you did was create a link to /Knoppix/usr, mounted it in a different directory and then remounted it as /usr. The only way the above would work (with persistent home) would be if you had enough hard drive space to do something like this:

    mkdir /home/knoppix/.root
    cp -R /Knoppix/usr /home/knoppix/.root/
    mount --bind /home/knoppix/.root/usr /usr

    However /usr is huge and it would seem you would need a VERY large usb pen drive to do it this way. Now if you could install a program chroot /home/knoppix/.root then have the system be able to check there first then goto /, I think that would be more efficient. This is easily done via the PATH statement as long as it is checked first for executables, however, where I get lost are things like lib, etc and other crucial directories and links, especially if you have to add a module to the kernel (such as for a winmodem.)

  2. #32
    Member registered user
    Join Date
    Jan 2003
    Posts
    38
    I was on IRC last night with eadz and he came up with a much simpler approach that I will expand upon now.

    He said that he could write a script which would automatically do recursive linking from the /Knoppix cd root tree.
    Currently there is a single link to such large directories as /usr to /KNOPPIX/usr. Although this in many ways simplifies things, it also creates problems for those who wish to make changes. If I understand him correctly, his script would automatically create recursive links all the way down the /usr tree for example so that every item is linked instead of an entire directory. This is a crucial first step.

    I think that next we would create a directory such as /home/profiles. This is where one could keep diferent root tree profiles for different situations. For instance: /home/profiles/laptop/.root would be the root tree for a laptop (with some of the programs installed plus extras such as a module to run the internel winmodem, modules to activate the special buttons, etc that would be specific to that laptop. You may want another profile such as /home/profiles/generic/.root that would house only the extra programs you would want, etc. These .root trees would only include the extra stuff installed by the user so they do not necessarily need to take up much space. In addition, they could easily be created with the current persistant home program. When the system is loaded (or after a program is installed there) a script is run which will auto load items from the chosen profiles' .root directory on top of the main root tree.

    When installing to each profile one could chroot /home/profiles/XXX/.root. So in essence, this may still be small enough to fit on a floppy in some instances, but could easily be run with persistant home from a usb pen drive, etc. The possibilities and portability of this approach would allow for maximum flexibility.

    to load the profiles.... maybe have an option at boottime such as:
    knoppix profiles
    this would then begin the loadup process and after the drive has been discovered and it is ready to write from a profile onto the main root tree, a menu could pop up asking you to choose the profile you wish and list them (in the above scenario you could choose laptop or generic).

  3. #33
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    Auckland, New Zealand
    Posts
    818
    just to clarify
    * I didn't say I could write it
    * it goes down the .root ( we'll call the place for changes .root ) tree, not the /KNOPPIX/ tree

    and example

    1 - standard knoppix
    /lib is a symlink
    /lib -> /KNOPPIX/lib
    2
    /lib is a directory in / (ramdisk ) however it only contains symlinks and directories
    - in .root/ there is lib/modules/2.4.20-custom - a kernel modules

    /lib/ is created in ramdisk
    /lib/iptables -> /KNOPPIX/iptables
    /lib/modules/2.4.20 -> /KNOPPIX/lib/modules/2.4.20
    /lib/modules/2.4.20-custom -> .root/lib/modules/2.4.20-custom
    /lib/libacl.so.1.0.3 -> /KNOPPIX/lib/libacl.so.1.0.3
    ...
    /lib/libz.so.1 -> /KNOPPIX/lib/libz.so.1
    /lib/security -> /KNOPPIX/lib/security
    now, yes thats a lot of symlinks
    the general rule, is that if you make a directory, or add a file in a directory, there will me as many symlinks as files in that directory.

    How the script would work :

    It travels down the .root tree, IF there is a directory say in /lib/modules/ then instead of linking /lib to /KNOPPIX/lib it makes /lib in ramdisk, and starts linking files, either to /KNOPPIX/ or to .root.

    That means that if say you don't add anything to /etc, it will still link to /KNOPPIX normally, so you _dont_ have to recreate the _whole_ tree as symlinks

    sorry if i'm not clear on this, im not a technical writer

  4. #34
    Member registered user
    Join Date
    Jan 2003
    Posts
    38
    how smart will this script have to be?

    For instance:
    lets say that you wanted to add a plugin to mozilla.
    mozilla is at /usr/lib/mozilla on Knoppix X1 version of CD
    the user installs the plugin chroot /home/.root and it is now located at /home/.root/usr/lib/mozilla/plugins

    My understanding of how your script would perform is that the script would create /usr symlink to every directory and file under /KNOPPIX/usr to /usr with the exception of /usr/lib.
    the script now creates the /usr/lib directory
    the script now would have to create symlinks to every directory and file in /KNOPPIX/usr/lib with the exception of mozilla...
    and so on.

    Now, lets assume that Knoppix X2 is released
    in this version he has removed program A and decided to include program B. Both were orignially installed into /usr/lib. Would your script have to know of this change in advance to function or could the script remain the same over the change of CD versions? Or would it require prior knowledge of the full directories (and files) in the root tree?

  5. #35
    Member registered user
    Join Date
    Jan 2003
    Posts
    40
    Suggestion
    we could make 2 scripts
    The first one is scanning (/home/.root/usr/....) and writing all the existing files and directory in
    /home/.root/.files2symlink
    the second one at the boot time just read .files2symlink and make the link..

    So you have just to run the first script when you make any modification...
    The second script could run the first script if he detects any errors...

  6. #36
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    USA, IL
    Posts
    1,041
    --Any script(s) which traverses /usr and makes symlinks, are going to run for quite some time. Don't forget the decompression overhead. The mount / bind and lndir suggestions seem to be worth looking into, if they add similar functionality with less overhead.

    --Remember, K.I.S.S. Nobody wants an extra *1* minute added to their boot time, much less 3 or 5... ' knx-hdinstall ' is included for a reason. We need to keep this functionality limited to a certain extent, and as *fast* as possible.

    Quote Originally Posted by lilliput
    Suggestion
    we could make 2 scripts
    The first one is scanning (/home/.root/usr/....) and writing all the existing files and directory in
    /home/.root/.files2symlink
    the second one at the boot time just read .files2symlink and make the link..

    So you have just to run the first script when you make any modification...
    The second script could run the first script if he detects any errors...

  7. #37
    Member registered user
    Join Date
    Jan 2003
    Posts
    40
    other Idea;
    why not do not use a real separate one /home/.root/usr
    with application install with the command
    config --prefix=/home/.root/usr (here an alias like "config=./config --prefix=/home/.root/usr" is enough )
    make
    make install
    make clean

    or for a debian paquet use the command
    dpkg -x name.deb /home/.root/usr
    (same sort of alias for dpkg !!)
    We have just to renews some variable like $PATH; or some links paths to the lib; to compile a news program fo exemple ;
    I think we could even re-configure kpackage to install the paquet in right way;

    To finish a question how do you envisage to creat a symlink to a read only media.. I've made a lot of research and look likes impossible directly. So what's the method ??

  8. #38
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    Auckland, New Zealand
    Posts
    818
    Quote Originally Posted by lilliput
    other Idea;
    To finish a question how do you envisage to creat a symlink to a read only media.. I've made a lot of research and look likes impossible directly. So what's the method ??
    / (root) is in ramdisk, so it's read-write.

  9. #39
    Senior Member registered user
    Join Date
    Dec 2002
    Posts
    196
    mount --bind-ing sure is an efficient way to do this, i mean, morphix uses it [/plug]

    then again, it uses between 10-20 of em, but overkill never hurts :P

  10. #40
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159
    I think what we really need here is an overlay or translucency file system like the one at
    http://mailman.linuxtag.org/pipermai...st/000828.html
    This mounts a second filesystem over the first. Does anyone know why it was not implemented in Knoppix? Perhaps anyone out there can do it...

Page 4 of 5 FirstFirst ... 2345 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Dell X1018 X-Series Smart Managed Switches 16-Port Gigabit 2-Port SFP Switch picture

Dell X1018 X-Series Smart Managed Switches 16-Port Gigabit 2-Port SFP Switch

$42.00



Cisco Catalyst WS-C3650-24PS-L 24-Port Gigabit Ethernet Network Switch TESTED picture

Cisco Catalyst WS-C3650-24PS-L 24-Port Gigabit Ethernet Network Switch TESTED

$49.99



NETGEAR GS108 ProSafe (GS108-400NAS) 8 Port Standalone Gigabit Ethernet Switch picture

NETGEAR GS108 ProSafe (GS108-400NAS) 8 Port Standalone Gigabit Ethernet Switch

$44.99



Cisco Small business SG300-28P Managed 28 Port Gigabit Ethernet Switch  picture

Cisco Small business SG300-28P Managed 28 Port Gigabit Ethernet Switch

$67.95



Dell PowerConnect 6224 Rackmount 24-Port Gigabit Managed Ethernet Network Switch picture

Dell PowerConnect 6224 Rackmount 24-Port Gigabit Managed Ethernet Network Switch

$31.99



TP-LINK TL-SF1005D 5-Port 10/100Mbps Desktop Switch picture

TP-LINK TL-SF1005D 5-Port 10/100Mbps Desktop Switch

$8.99



Juniper Networks EX2200-C Gigabit Ethernet Managed Switch | EX2200-C-12T-2G picture

Juniper Networks EX2200-C Gigabit Ethernet Managed Switch | EX2200-C-12T-2G

$49.99



NEW TP-Link TL-SG108PE 8-port Gigabit PoE+ Swith w/ 4-port PoE -RES LLC STORE- picture

NEW TP-Link TL-SG108PE 8-port Gigabit PoE+ Swith w/ 4-port PoE -RES LLC STORE-

$49.50



TP-Link 24-Port Gigabit Ethernet Unmanaged Switch Desktop/Rackmount TL-SG1024D picture

TP-Link 24-Port Gigabit Ethernet Unmanaged Switch Desktop/Rackmount TL-SG1024D

$59.49



Cisco WS-C3750X-48PF-S 48 Port PoE Gigabit Switch w/ C3KX-NM-10G & Dual 1100WAC picture

Cisco WS-C3750X-48PF-S 48 Port PoE Gigabit Switch w/ C3KX-NM-10G & Dual 1100WAC

$114.88