PDA

View Full Version : Create custom home enviroment at boot (all from cd !!)



ktheking
03-30-2003, 02:45 PM
I'd like to write a remastering procedure for linux newbies (like myself)
to easely produce remastered knoppix cd's based on 3.2 release with custom home dir. (using the persistant home dir img-file)
Since I'm a linux newbie I'd like some practical advice on how pulling this one off.
What has to be done :
-create a knoppix remastering procedure where I can use the img file
that I use for my persistant home drive (and that's now on harddisk)
If I use it straight fom the cd it will be read-only and could pose problems.
So it got to be used like the default home drive like you get with the original knoppix.
Extra items to be inserted :
-easely create autostartup programs from home dir=>howto
-remove autostart konqueror

Anybody an idea ?

ktheking
03-31-2003, 02:12 AM
Here's another idea:
Maybe adapt some beginscript (knoppix-autoconfig, or something else ??) in order to copy at boot the home img-file from a known directory from the cd to a ramdisk mount ? And then together use the option home=/locationofimgfileinramdrive .. ?
Since I'm a linux newbie I don't know much about which files are doiing what .So these 2 questions here above are just questions to point me out if these ideas are just ridicule or if they are do-able (and if they are do-able maybe point me out which files to adapt ?).

garyng
03-31-2003, 11:11 AM
IMO, the key to customizing KNOPPIX lies in the following two files :

1. the 'linuxrc' file in miniroot.gz(in the boot image)

2. etc/rcS.d/S00knoppix-autoconfig

I have played around with linuxrc but will venture more when I get my system working the way I want.

probono
03-31-2003, 09:08 PM
In my opinion, there should be a /home and a /etc directory on the CD where you could place your configs and the contents of which would overwrite the Knoppix defaults.

ktheking
03-31-2003, 09:36 PM
My goal is that any newbie who uses persistant home drive ,just has to copy the img-home-file to the root of the cd and at boot he got his own personal inviroment with his personal programs (from h-drive and so on).

This can easely be done by creating multi-session cd.

First create a smaller remastered knoppix version (with the proper changes to use the img file from the cd)

Then afterwards add the img file with multi-session.

You're right with the /home and /etc ,but using the img file your sure you got everything from your home enviroment with you and it's easier.

How to create the changes to use the img file from the cd is a lot harder I think,that's why I use the forum. 1000 brains can thin more 8)

ktheking
04-06-2003, 04:26 PM
Ok. I'm really starting my project now.
I went to mount the boot.img located on the cd.
I then extraced the miniroot from miniroot.gz and mounted it. (in read/write mode)
Following the advices I did a vi on linuxrc.

I found the section :
.
..
# New: Also try parallel port CD-Roms [for Mike].
DEVICES="$DEVICES /dev/pcd?"
# New: also check HD partitions for a KNOPPIX/KNOPPIX image
test -n "$FOUND_SCSI" && DEVICES="$DEVICES /dev/sd?[1-9] /dev/sd?[1-9][0-9]"
DEVICES="$DEVICES /dev/hd?[1-9] /dev/hd?[1-9][0-9]"
for i in $DEVICES
do
echo -n "${CRE}${BLUE}Looking for CDROM in: ${MAGENTA}$i${NORMAL} "
if mountit $i /cdrom "-o ro" >/dev/null 2>&1
then
if test -d /cdrom/KNOPPIX
then
echo -n "${CRE} ${GREEN}Accessing KNOPPIX CDROM at ${MAGENTA}$i${GREEN}...${NORM
AL}"
FOUND_KNOPPIX="$i"
break
fi
umount /cdrom
fi
done

Where cdrom drive is mounted and knx looks for an img file on SD or HD devices.
My question:
1)How to change this in order that knx will copy any *.img file from /dev/cdrom to /dev/ramdisk ?
2)How to change this in order that knx adds a home search to /dev/ramdisk ?
I'd like to do the same with config files created on floppy. Meaning : put them on the root
of the cd and boot the system with cd cheatcodes knoppix home=/dev/ramdisk myconfig=/dev/cdrom

If these two items can be inserted ,then I can finally use the easy custom home cd solution.
It's not that I'm lazy,but my scripting knowledge is very limited :oops:

linuxfan
04-07-2003, 02:55 PM
well, all i did was:
started some programs, creating config files and directories at /home/knoppix
(u can tweak kderc, gtkrc, and so on...)
then copied these things to /etc/skel before remastering and edited knoppix-autoconfig to copy these stuff from the cd to /home/knoppix.
then remastered, and alas, it worked :)

ktheking
04-07-2003, 03:43 PM
I agree.
BUT..
Using my method you wouldn't have to recompile everytime your cd
when the content of you home drive has changed.
Just use once the recompiled knx and add you img file in multisession.