Twitter Updates

12/6/2006

Hello, Linux (Part 2)

Filed under: — AlienMind @ 9:06 pm

In Part One of “Hello, Linux” I described the basic machine and setup I use with Knoppix.

Knoppix runs off of a CD-ROM; simply pop in the CD, boot the machine and you’ll have a fully running Knoppix Linux system in a few minutes, and no need for a hard drive.

As my machine has 2 gigabytes of RAM, I can afford to lose some – I won’t be using nearly that amount during normal operations under Knoppix.

There is a downside to loading the whole CD into RAM - this increases the boot time from about a minute to about 8 minutes as it takes a while to read all of that data. However, the advantage is that you won’t have to wait for the CD to spin up when you type command or run programs on the system – all of the executables will be in RAM. It very much depends on what you are doing – for quick system recovery tasks I don’t bother loading things to RAM. For long-term login sessions I almost always do load it into RAM. YMMV

When the boot screen comes up it prompts you for any startup options you wish to give the system. In my case I want to make sure that the system will copy the entire contents of the CD-ROM into RAM (faster, and no disk to spin up and spin down wasting battery life). Also, I want to make sure the system uses the correct screen resolution. Knoppix is pretty good about guessing, but it can be conservative in the guesses and you often end up with a resolution of 800×600 – not bad, but a waste on a machine that can do 1280×1024.

So, my startup arguments to the boot prompt are:

knoppix toram screen=1280×1024 depth=24

This copies Knoppix to the system RAM (“toram”), sets my resolution to 1280×1024 (screen=1280×1024) and sets my screen color depth to 24 bit (depth=24). The options you need to use may vary; simply hit F3 on your keyboard while the boot prompt is displayed to see the various options, or consult the Knoppix Cheat Sheet.

Also, keep in mind that if you don’t type anything for a small period of time (usually 30 seconds) the system will automatically boot.

The biggest disadvantage of Knoppix is the very thing that makes it attractive; it is run off of a CDROM. This means that, with the exception of areas that are layered by a Union Filesystem (more on that later), the entire system is read-only. No changes possible.

That’s nice for making sure that no one can alter your system, but if you want to have persistent data across boots then something has to be done.

Enter the idea of a “persistent home image”. In my case, I have a 100Mb persistant home directory and system setting image on a removable SanDisk thumb drive. This stores all of my settings for various programs (like X-Chat, and IRC client) and also saves all of the system settings for my desktop, such as the placement of icons and the system settings that control my screen resolution.

Creating this is very easy.

  • Insert your thumbdrive – no need to mount it explicity, the system will find it
  • Make any changes to the system you may need to keep permanently
  • Find this entry in the system menus and choose it (click for larger image):

  • Answer this dialog correctly:

At this point the system will ask you where you want to put your persistant image. In my case I chose the thumbdrive I had inserted into the system:

You will then be asked if you want to encrypt the thumbdrive image. As I am on the road and don’t want anyone reading my files, I answered yes. Keep in mind that they system will want a 20 character password so start thinking of that password now, and don’t forget it.

Finally, the system will prompt you for how large you want your persistant home directory to be. 100Mb is the default, but you can have a much larger one if you need it; it all depends on available space.

After this the system will proceed to create your persistant directory and populate it and, optionally, ask you to type in your initial password.

Once you’ve done this it is best to reboot to check out the persistant storage to make sure it works. Do this by logging out of Knoppix and choosing to restart – don’t forget to have your thumbdrive plugged into the machine during boot. . Once the boot prompt comes back up you only need to type “knoppix” or, if you want to run from RAM, “knoppix toram”. Your home directory and settings should be found automatically; if they aren’t, use the additional boot parameters of “home=scan” and/or “config=scan” so they system will search for them.

If the system finds your persistant home it will prompt you, asking if you want to use it. If so, hit the Left arrow key and hit return, accepting the defaults. Also, if you encrypted your persistant home then you will be prompted for your (at least) 20 character password. I hope you haven’t forgotten it…

One additional caveat; once you’ve set up a persistant home the settings contained therein will override the screen resolution you specify in your boot line; so, if you booted with 800×600 and saved your persistant home with that resolution, booting later with “screen=1280×1024” will not do what you want; you will still boot into 800×600 configuration because that is what you have saved on your persistant storage. You will need to change the screen resolution while running Knoppix, then reboot. This will save the new resolution settings to your persistant storage and make sure your boot resolution is what you want it to be.

Next for Part 3: Ok, but my thumbdrive isn’t big enough – I need more space! How to create an encrypted space on the hard drive.

One Response to “Hello, Linux (Part 2)”

  1. Uncle Monster Says:

    Ok, reading all that was enough to make me want to cuddle with a Peruvian nerve squirrel.

Leave a Reply

  20 queries. 0.471 seconds. Powered by WordPress