mikshaw
Group: Members
Posts: 4856
Joined: July 2004 |
|
Posted: Sep. 19 2005,03:12 |
|
Use A Persitent Home And/Or Opt On The Same Partition As Root In Frugal
The current DSL init process fails to accept the 'home=' and 'opt=' boot options using the same partition as the KNOPPIX file system unless you use toram and frugal as well. Personally I prefer not to use toram, particularly when working with multimedia applications. So I've come up with a workaround.
NOTE: This procedure runs from bootlocal, so it overwrites any home and opt files automatically restored from mydsl or backup.tar.gz. Do not use it if you autoload other files to home and opt.
Step 1: Create /home/dsl and /opt directories on the partition containing KNOPPIX. These directories should not initially be empty, or you'll lose a lot of functionality. What I did was copy the directories from my DSL ramdisk.
Step 2: Edit /opt/bootlocal.sh and back it up. You can back it up using the backup/restore process, or create a myDSL extension for this file. In addition to whatever other commands you want to run from bootlocal, you should also have the following:
Code Sample | rm -rf /{,ramdisk/}{home,opt} mkdir /{home,opt} mount --bind /cdrom/home /home mount --bind /cdrom/opt /opt |
What this will do is: a) Remove /ramdisk/home, /ramdisk/opt, and the symlinks to these directories. b) Create mountpoints for home and opt. c) Mount the new home and opt. If you want to do *only* home, it would look more like this:
Code Sample | rm -rf /{,ramdisk/}home mkdir /home mount --bind /cdrom/home /home |
This assumes that /cdrom is the location of the frugal install. I'm guessing that this is a standard location, but one should never assume =o) You probably should make sure of the location of KNOPPIX as seen from within DSL before doing this.
Step 3: Reboot using the "frugal" boot option, and pointing either "mydsl=" or "restore=" to the location of your backup or mydsl extension containing the new bootlocal. The frugal boot option is vital, since you will need to be able to write to /cdrom.
EDIT: If you are anything like me you probably do a lot of editing and re-editing of files, and if bootlocal.sh is one of these files you may find it annoying to have to create a backup or mydsl package every time you make a change to bootlocal.sh...particularly when you have a persistent opt that would normally make it very simple to make and keep changes. A way around this is to create a bootlocal.sh containing only the code above, followed by a command to run a second script (e.g. "exec /opt/bootlocal2.sh"). This way you can have all your other bootlocal stuff in an uncompressed, persistent script, making it easy to edit and forget it.
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|