Page 1 of 5 123 ... LastLast
Results 1 to 10 of 42

Thread: ~/etc/

  1. #1
    sireasoning
    Guest

    ~/etc/

    What would be nice is to have /etc in the home directory and have knoppix supercede any configuration from the cd /etc with ~/home/etc/* (esp while using persistant home). This would allow for specific configurations such as the hosts file to be included at boot.

  2. #2
    lilliput
    Guest
    I'm searching the same things...
    My idea was something like this

    persistant mount the /dev/hdax partition

    directory; just link* if present in the persistant "home" partition
    | to directory in the / Filesystem
    hdax---/ \/
    ----/home/knoppix/
    ----/etc/.../
    ----/usr/local

    I have test and he works fine but i haven't create a script..
    We need 2 scripts one to copy all the requires file (during the install process)
    and the second to mount the partition during the boot.

    link* I do not know when the persistant home script is launch but to create the link we have to do something like ..
    erase the real directory from the ram memory and creat a symbolique link ... (ln -s )
    or directly change the directory inode (I don't think it's possible in a script)
    If you have any suggestion


    __________________________________________________ ____________________________________________
    lilliput@free.fr
    Smaller we are, bigger our exploration is...

  3. #3
    Member registered user
    Join Date
    Jan 2003
    Posts
    38
    the main problem with that approach is when you change computers (one of benefits of Knoppix). That is why only certain files need to be changeable in ~/.etc (and supercede /etc) and then let knoppix auto create all others. How does one make /home/knoppix/.etc supercede /etc? Is there a path statement for config files?

    I have replaced /usr/local with ~/bin although I like that idea. What about ~/local? That would only require a change of the path statement to include /home/knoppix/local/bin. That should be minor enough to be included, esp in conjunction with persistant home.

  4. #4
    lilliput
    Guest
    I was thinking about an another things ..
    If you burn persistant home in you have burn home persistant in your cd ;; when you boot in a normal PC it's the same as usually (you have even the option "boot : knoppix nohome")...
    So we could add in this script the new linking way ;;;

    When I was speaking about ~/etc/... it's not a burn on the cd it justt a partition who has been mount dutring the boot wiith home persistant and which the script has re-link the directorie ... (if I'm not clear, tell it me, I'm not english ...)
    The approach could be in different way the script burn doesn't need to change I think, I've to look more about it...

    __________________________________________________ ___________
    lilliput@ifrance.com

  5. #5
    Member registered user
    Join Date
    Jan 2003
    Posts
    38
    To make sure we are on the same page I will rehash our approaches:

    my understanding of your approach:
    using persistant home to store on the hard drive (or usb pen drive, etc) the home directory, /etc, and /usr/local. At bootup with persistant home the stored directories are then symlinked into the directory tree replacing the ones normally created by Knoppix.

    my approach:
    Knoppix adds /home/knoppix/local/bin and /home/knoppix/local/sbin to the path statement and creates a /home/knoppix/local directory with the normal subdirectories.
    Knoppix also makes a change in how /etc is referenced so that it first checks /home/knoppix/.etc then /etc for the configuration to use. This way any changes made in ~/.etc will supercede /etc allowing for only specific changes to be made (and unmade if necessary).

    my evaluation:
    I think either version of the local directory would work well. The only reason I might prefer my approach is that it would not depend on persistant home to be used and it only involves a minor script change.

    As far as /etc goes. The greatest weakness to your approach is that the stored /etc drive may have portability problems accross machines. For instance, if the only thing you need to change is the /etc/hosts file, one would still have all of the stored settings in say /etc/sysconfig or /etc/fstab from their old machine. With only certain files stored in ~/.etc I think it is more portable and it also does not rely on using persistant home.

    Another possible approach:
    I haven't fully thought this out yet, but what about having a /home/knoppix/.root directory with a full directory tree. Anything in this directory tree would supercede aything in /. This tree would only be populated with changes and would be checked first (and maybe any changes would be symlinked into the main tree.) Using this approach a script could be written to search ~/.root and if it finds anything there it creates a symlink in the same position (overwriting what was in main). This script would be accessible from the KNOPPIX menu so that after changes are made, they can be implemented through this script. As a failsafe the script can first make the old item in root into a .old file before it replaces it. For instance, we would handle /etc and /usr/local in the following way:

    ~/.root/usr/local
    the path statement in Knoppix would begin with the following lines:
    /home/knoppix/.root/bin, /home/knoppix/.root/sbin, home/knoppix/.root/usr/bin, /home/knoppix/.root/usr/sbin, /home/knoppix/.root/usr/local/bin, /home/knoppix/.root/usr/local/sbin, /home/knoppix/.root/opt/bin, /home/knoppix/.root/opt/sbin, (rest of existing path)

    This would not need to be symlinked or replaced, just a change to the path statement works here.

    ~/.root/etc
    Lets say this only contains a hosts file (~/.root/etc/hosts). The script would read this, change /etc/hosts to /etc/hosts.old and symlink ~/.root/etc/hosts as /etc/hosts

    So now instead of just persistant home, we have a form of persistant root. This approach may be superior than the first two in that it creates a whole new territory of possibilites and configuration playing for advanced users. For instance, an admin could just burn Knoppix CD's for workstations and store on the local hard drive (or connect through NFS to a central hard drive) all office specific configurations and programs. The main OS would be impervious to attacks and upgrades would be as easy as burning the latest Knoppix CD's. If the upgrade fails, put back in the older cd. This may broaden Knoppix's reach considerably!

  6. #6
    Schwarze
    Guest
    Hi sireasoning, hi lilliput.

    Just out of curiosity: What's wrong with saveconfig? It collects all changed files under /etc and saves them to floppy (or a persistent home).

    I think, this comes pretty close to sireasoning's idea. Furthermore you don't depend on KPH (but you can take advantage of it) and it's already on the CD.

    Matthias

  7. #7
    Senior Member registered user
    Join Date
    Jan 2003
    Location
    42.3° N 122.9° W
    Posts
    166
    I've only run Knoppix Linux so I'm still a newbie's newbie. Most of what you've said is beyond me at this time. However, what I'd like to see is a hard drive config save option built in to Knoppix out of the box. Knoppix would always look for these config files and then give you the option to use them, maybe choose from several that you'd named as say KDE.knx, IceWM.knx, steve's custom.knx, etc. If you don't want to save a config (say you really hosed your last session) you just say no to the save config option as you log off. Next session, you pick from your saved good configs.

    BTW you could burn your HD config files to CD-R/W and when you get on another PC, you copy them to the HD and then boot into Knoppix and pick up where you left off on the last PC. Of course Knoppix always has to auto detect hardware every session as it won't know anything about the PC it's on or the last session until it checks the hardware first and then access the configs. If the last configs are incompatible with the differant PC's hardware, then it will default to the just detected settings.

    I know what I'd like but not how to do it.

  8. #8
    Guest
    I'm totatly agree with the third proposition ...
    There no problem at all for the ~/.root/local and etc...

    ~/.root/etc your suggestion to rename hosts to hosts.old is great ()

    Oups I forget why not create a particular directory in the /
    like /persitant (just an example) could be better in the case we add user
    with different access right. And more easily to access to install some applications

    (why not ...We could apply a persitant_home for each user of couse without general config file.. and duplicate the
    /home/knoppix to
    /home/user1 and apply the persistanthome to this user1 home)


    This solution is clean and proper

    So to resume:
    1) Make the /etc modification
    (we have to look if all the "new" files have been loaded ie fstab)
    2) Link the applications directories
    3) Link the other users directory
    3) apply the actually persistant home to get the config
    4) i don't miss to update the $PATH, generate a script to launch with .bashrc or something like that
    5) If more than 1 user (exept root) ask fort the login
    6) I think it's finish


    Any suggestion and critic of course is welcome
    I prefer critic because the work is more construct after.
    Sorry about my english errors

  9. #9
    Member registered user
    Join Date
    Jan 2003
    Posts
    40
    Oups I didn't send my post rapidly so no login ...sorry ..

  10. #10
    Member registered user
    Join Date
    Jan 2003
    Posts
    38
    Quote Originally Posted by Schwarze
    Hi sireasoning, hi lilliput.

    Just out of curiosity: What's wrong with saveconfig? It collects all changed files under /etc and saves them to floppy (or a persistent home).

    I think, this comes pretty close to sireasoning's idea. Furthermore you don't depend on KPH (but you can take advantage of it) and it's already on the CD.

    Matthias
    I have been playing with saveconfig and it does some things well but fails in others. For instance, say I wanted to build a module for my winmodem. There is a program available called ltmodem that will do this. It will also create a deb file. I tried to get it to install to the root system but it failed (mostly because of all of the links to the cdrom. However when I removed those links and copied those files into the root tree, it still failed.) However, even if I had succeeded, it would have been gone by the next boot. However with a ~/.root directory tree I could concievable copy over the relative files needed to its proper place in the ~/.root tree, then installed chroot ~/.root or something like that. Maybe the deb file installer can be modified to install to the .root tree, copying over any existing files from the current root tree that need to be modified? This would allow specialty installs that can be portable with a usb pen drive, etc.

    Also, when will persistent home be part of the knoppix startup so that a floppy would not be necessary with persistant home?

Page 1 of 5 123 ... 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
  •  


Bare S100 CPU Replacement for ALTAIR 8800 IMSAI 8080 JAIR Single Board Computer picture

Bare S100 CPU Replacement for ALTAIR 8800 IMSAI 8080 JAIR Single Board Computer

$42.00



MITS ALTAIR 8800  Original Vintage Microcomputer picture

MITS ALTAIR 8800 Original Vintage Microcomputer

$6000.00



S-100 backplane motherboard bare PCB 9 slot (for Altair/IMSAI) picture

S-100 backplane motherboard bare PCB 9 slot (for Altair/IMSAI)

$30.00



Altair MITS 8800 CPU Parts Kit not IMSAI 8080 S100 (board NOT included) picture

Altair MITS 8800 CPU Parts Kit not IMSAI 8080 S100 (board NOT included)

$64.95



MITS ALTAIR 8800  Original Vintage Microcomputer  S-100   Buy It Now $5999 picture

MITS ALTAIR 8800 Original Vintage Microcomputer S-100 Buy It Now $5999

$5999.00



MITS ALTAIR 8800  Original Vintage Microcomputer with 14 boards - Buy It Now picture

MITS ALTAIR 8800 Original Vintage Microcomputer with 14 boards - Buy It Now

$9500.00



1974 Early Microcomputers by MITS Altair 8800's Ed Roberts HP-9810 Mark-8 Scelbi picture

1974 Early Microcomputers by MITS Altair 8800's Ed Roberts HP-9810 Mark-8 Scelbi

$55.00



Altair Model 202 picture

Altair Model 202

$22.50



VINTAGE DEC 1975 VOL 1 ISSUE 1 SCCS INTERFACE MAGAZINE MITS ALTAIR COVER & ADS picture

VINTAGE DEC 1975 VOL 1 ISSUE 1 SCCS INTERFACE MAGAZINE MITS ALTAIR COVER & ADS

$359.99



Vintage Altair 8088 CPU Wire Wrapped S100 Card w Mon EPROM circuit board #T71 picture

Vintage Altair 8088 CPU Wire Wrapped S100 Card w Mon EPROM circuit board #T71

$99.00