PDA

View Full Version : Two Knoppix boot options?



kernco
04-04-2005, 06:06 AM
I'm working on a modified KNOPPIX distribution to give to CS students at my school so that they can work on assignments from their own computers in their dorms. I want to give them two options: boot KNOPPIX normally or connect to the computing lab. The idea is that if they choose to connect to the computing lab, KNOPPIX will start X with the -indirect option to our xdm servers, and they will go straight to logging on to a Linux maching in the lab.

My idea is to modify lilo.conf in KNOPPIX to offer these two choices, and have the second choice boot to an unused runlevel, which I will provide a startx script for. Does this sound reasonable? I've been able to boot to a different run level using the normal KNOPPIX boot prompt, but I can't see anyway to specify the rl in lilo.conf. Is there a better way to do this?

Thanks,
Colin Kern

UnderScore
04-04-2005, 03:38 PM
There are two scripts that control how Knoppix is booted: linuxrc and 45xsession.
linuxrc: Knoppix loads the kernel and mini root partition from /KNOPPIX-CD-ROOT/boot/isolinux. If you use the 2.4 kernel on knoppix then the kernel loaded is linux24 and the mini root is minirt24.gz. If you use the 2.6 kernel on knoppix then the kernel loaded is linux26 and the mini root is minirt26.gz. You can view the mini root by copying it to another location, unziping it, and loop mounting it.
cd $HOME
cp /KNOPPIX-CD-ROOT/boot/isolinux/minirt24.gz ./
mkdir foobar
gunzip minirt24.gz
sudo mount -t ext2 -o loop minirt24 ./foobar
Inside the minirt you will find a executable script named linuxrc. This linuxrc script is init script for Knoppix and controls many of the bootime cheat codes.

45xsession: This script lets Knoppix figure out how to manage the knoppix user's home directory, starting X, and other cheat codes. See my HOWTO http://www.knoppix.net/forum/viewtopic.php?t=13867 where I edit the 45xession file in order to correctly populate the /home/knoppix directory.

I hope this helps.
James

kernco
04-04-2005, 05:15 PM
The 45xsession script seems to be processed after the X display has been started. I want to find where KNOPPIX executes startx and add some options (-indirect). My linuxrc file is only six lines or so. It seems to only mount proc, tmpfs, and ramfs.

Thanks,
Colin

UnderScore
04-04-2005, 05:19 PM
The 45xsession script seems to be processed after the X display has been started. I want to find where KNOPPIX executes startx and add some options (-indirect). My linuxrc file is only six lines or so. It seems to only mount proc, tmpfs, and ramfs.

Hmmm, only six lines? Here is the linuxrc from Knoppix 3.8 http://www.virtualacuity.com/james/knoppix-unionfs/linuxrc-3.8.html.

firnsy
04-05-2005, 08:35 AM
startx is started in /etc/inittab

If you wish to check for the boot parameters then the linuxrc that UnderScore mentions has some bash functions that allow you to read the boot parameters entered on boot up. Using this method you can insert the cd and at the boot prompt you can go "boot> knoppix" for a normal boot or "boot> knoppix lab" for a lab boot.