installing knoppix

Upload: syafiq-fauzi

Post on 07-Apr-2018

233 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 Installing Knoppix

    1/19

    ...making Linux just a little more fun!

    Installing Knoppix

    By Edgar Howell

    Polemic

    Given the fact that I started this article quite some time ago, at this writing -- earlyNovember 2006 -- events of the last week or so might make it appear I haduncanny knowledge of the future. (If you believe that, go to [email protected] andgive me your credit card number and I will tell you what horse to bet on nextSaturday.)

    Well, I was extremely unhappy when Novell took over SuSE, but decided to take await-and-see attitude. Novell, in my assessment, back in the heyday of Netwarewas as arrogant and expensive as Microsoft. Hmmm... maybe it's not surprisingthat they're sharing a bed these days.

    Then there is the behavior of -- as someone here put it -- "Oracle's Chief Eccentric".If people are stupid enough to fall for his ploy, that could be the demise of Red Hat.

    Admittedly an extremely pessimistic outlook (but pessimists aren't disapointed asmuch as optimists), what is plan B if the major GNU/Linux distributions on theirrespective sides of the Atlantic effectively go belly up?

    Installing Knoppix on an 8-Year-Old Notebook

    Recently for some reason I thought about trying to get some more use out of anancient notebook. Almost 8 years old, it had served me well for many years, hascrossed the Atlantic with me on numerous occasions. Still, with only 64 MB of memory and 4 GB of hard drive and a slow CPU -- in this day and age, anyhow:

    AMD-K6 475 -- it hasn't seen much use of late.

    On the other hand, Knoppix has been really impressive the last couple of years,including excellent hardware-recognition. Ought to be a snap to install it,particularly on something this old.

  • 8/6/2019 Installing Knoppix

    2/19

    Well, maybe not. Notebooks, proprietary as they are, can be very difficult to installsoftware on. This one gave me considerable grief early on with SuSE because therewas a problem with PCMCIA on initial boot after installation.

    Lest anyone think what is described in the following worked like this off the startingblocks - this was my 3rd attempt. For me, it's always the 3rd attempt that works:the first time, I learn what is going on; the second time, I figure out what reallymakes sense; and the third time is pretty much what I really wanted in the firstplace.

    Preparations for Installation

    Category: Security Blindfolded by people who (maybe) think they are helping to make passwords secure, I am normally forcweak passwords to ensure the ability to enter them correctly again. Believe me, if you can touch-type, you

    same sequence twice and not know what it was!

    Since this machine had been in use at one time, the partitioning was irrelevant andso it was time to re-partition. And because it has far too little memory for currentsoftware, I gave it a swap partition of 256 MB. The remainder of the 4 GB wasavailable for Knoppix. All this, of course, happened after a successful boot from theKnoppix 5.0 CD.

    By the way, if the combination of main memory and disk storage is not adequate,Knoppix complains at length, sounding as if booting will fail. Same thing booting

    from the CD with the parameter NOSWAP.

    But Knoppix boots fine -- it just doesn't boot into KDE. It announces TWM, whichreminds me of FVWM (I think) -- as in "focus follows cursor" -- and I don't knowwhen last I saw that ! Perfectly usable, if you are comfortable with the commandline.

    Also, don't just allocate a partition for swap and expect it to be used. It must havepartition ID 82 and, equally important, must have been initialized by somethinglike: /sbin/mkswap /dev/hda1.

    InstallationAfter that, installation was pretty much a piece of cake, other than a couple of problems discussed below. First, boot Knoppix from CD or DVD and start theinstallation process with "sudo knoppix-installer". All the pretty pictures aren't really

    justified, but just to make clear how straight-forward the process is, here they are:

  • 8/6/2019 Installing Knoppix

    3/19

    After the introductory screen we select 'Install' since we haven't yet had Knoppix onthis machine.

    But before starting the installation, there might be a decision or two needed:

  • 8/6/2019 Installing Knoppix

    4/19

    Initially I had tried to choose 'Knoppix' since I knew it from CD - but ran intoproblems. Debian worked fine, despite being the so-called "unstable" version.

    Other than the swap partition there wasn't much choice.

    I really wanted ext2 but that not being an option we (temporarily) live with ext3.

    Your full name is, of course, up to you.

  • 8/6/2019 Installing Knoppix

    5/19

    As is, ahh, your user name...

    ...and password.

    Note the option not to hide the password as you enter it. In my book that is a signof professionalism. This is quality software. Leave it up to me to decide whether it issafe to show what I am typing. No one can know in advance whether I am in aplace where it is safe for me to look at the password as I enter it. Blindfolded bypeople who (maybe) think they are helping to make passwords secure, I amnormally forced to use very weak passwords to ensure the ability to enter themcorrectly again. Believe me, if you can touch-type, you can re-enter the samesequence twice and not know what it was!

  • 8/6/2019 Installing Knoppix

    6/19

    Now, we choose the root password...

    ...and the host name.

    No need to worry about whether to tromp on the MBR - we're overwriting the entirething, Master Boot Record included.

    OK - we have now reached the critical point! Take a deep breath, and start theinstallation.

  • 8/6/2019 Installing Knoppix

    7/19

    Yes, do save the configuration (otherwise, Knoppix bails out.)

    Here is one last chance to review things.

  • 8/6/2019 Installing Knoppix

    8/19

    And now a couple of informative windows to which no response was needed (I didreject creation of a boot floppy at one point).

  • 8/6/2019 Installing Knoppix

    9/19

    There were many more such informative windows but that essentially was theentire installation. Pretty tame, right?

    ProblemsBy today's standards this machine with 64 MB is so short of memory that almost nocurrent OS could run on it. Even Knoppix can't, without help. Giving it a large(factor of 4) swap partition makes it possible for the system to install and function.But this has consequences that make doing it a judgement call: slow may be betterthan dead in the water, but how useful is it?

    For example, OpenOffice is barely marginally useful. I used it to start this articlebecause it gave me an HTML framework. Unlikely that I could have used it beyondthat because of the "swapping" -- from hard drive to memory, which isn't there --and thus to swap, which is on the hard drive...

    And I wasn't particularly happy with the file system options. At least on this oldhardware, which is never going to be run as a multi-user system, there isabsolutely no need for journaling (besides, ":!sync" is powerful enough for me). SoI turned it off. That, however, required adjusting the entry in /etc/fstab as well.

    root@1[knoppix]# tune2fs -o ^has_journal /dev/hda2tune2fs 1.39-wip (09-apr-2006)

  • 8/6/2019 Installing Knoppix

    10/19

    root@1[knoppix]# mount /dev/hda2 /mntroot@1[knoppix]# vi /mnt/etc/fstabroot@1[knoppix]# head /mnt/etc/fstab# /etc/fstab: filesystem table.## filesystem mountpoint type options dump pass#/dev/hda2 / ext3 defaults,errors=remount-ro 0 1/dev/hda2 / ext2 defaults,errors=remount-ro 0 1

  • 8/6/2019 Installing Knoppix

    11/19

    Category: Old hardware S o what should we do, long-term, with old -- really old -- hardware? With a notebook likely there isn't mudone. But perhaps for an old PC it would be possible to obtain appropriate memory chips -- the most impconsideration in improving performance -- such that it becomes responsive enough for use with OpenOffi

    Linux is supposed to be able to deal well with "old" hardware. True? I certainlythink so. This test was unfair in the sense that it involved a notebook. They arenotorious for creating problems... proprietary stuff is like that.

    In booting this now-ancient notebook, Knoppix had far less trouble than my favoritedistribution at the time. PCMCIA was a significant problem then. With Knoppix --ho, hum... all my notes about "noacpi" and "nopcmcia" as kernel boot parameterswere suddenly irrelevant.

    But when is this a reasonable thing to do? I already mentioned that in myestimation, in this environment OpenOffice is effectively unusable because it'segregiously slow. Perhaps OK for collecting e-mail? Learning how to useOpenOffice? With only a serial interface available, this machine won't be used toaccess the Internet anymore.

    I still haven't decided whether/how to use this newly available resource. Somehow,it seems inherently unreasonable to expect up-to-date desktop performance fromold hardware, regardless of how recent the software release may be.

    Perhaps I should have tried Damn Small Linux -- I didn't. Knoppix is BIG. Their 5.0

    version on CD belongs in your tool-box but it isn't a server, and it wants X andKDE. That's a bit too rich for a basic system.

    So, what should we do, long-term, with old -- really old -- hardware? With anotebook likely there isn't much that can be done. But perhaps for an old PC itwould be possible to obtain appropriate memory chips -- the most importantconsideration in improving performance -- such that it becomes responsive enoughfor use with OpenOffice and Co.

    Nonetheless, I had no trouble using it -- appropriately -- to write this article. As sooften in life, a matter of picking and choosing one's tools (in this case Opera andFirefox and vi) and how one uses them.

    Installing Knoppix in a Partition on a PC

    The procedure in this situation is almost identical, so I won't bother with screen-shots that are the same. More important are the preparations beforehand and whatmight have to happen afterwards.

  • 8/6/2019 Installing Knoppix

    12/19

    In this case, Knoppix is not supposed to take over the entire hard drive but justoccupy one partition. If you don't have a partition available, likely it is best to firstre-partition with familiar tools before starting the installation process. At least that'swhat I chose to do.

    One of the nice things about using Knoppix is that installation does not take place inan unfamiliar and restricted environment; it is done through a script that runs afterhaving booted Knoppix. In other words we have a familiar Linux environment,multiple windows and virtual terminals, and should the need arise, can dosomething that wasn't anticipated without having to cancel the installation and startover.

    The installation script shows available partitions and asks you to select one. Anypartitions that are too small for Knoppix won't be included in the list, so if you wanta particular partition to be used and it isn't offered, you will have to cancelinstallation and increase the size of that partition (very often, that requires re-booting to get the system to use the new partition table). Unfortunately, Knoppixdoesn't tell you this magic number. The DVD version of Knoppix 5.0.1 requiredabout 11.5 GB.

    Since this machine already has a couple of installations, it wouldn't be appropriateto replace the MBR - but that doesn't seem to be an option. So, let's back it up to amemory stick for later re-installation (thanks to Kyle Rankin):

    sudo dd if=/dev/hda of=/media/sdb1/mbr_pc2 bs=512 count=1

    After installation, restore the MBR (with a block size to omit the partition table) withsomething like this:

    sudo dd if=/media/sdb1/mbr_pc2 of=/dev/hda bs=446 count=1

    By the way, having to do it this way isn't necessarily a bug but can be considered afeature: you don't have to figure out what Grub needs in order to boot Knoppix.After installation, I copied /boot/grub/menu.lst to /media/sdb1/knoppix_grub andlater copied the relevant sections from it to the file menu.lst in the partitionnormally used for booting.

    Although this worked, it was Debian and I was still interested in having Knoppix asI know it. And as it turned out, this wasn't particularly difficult: when given theoption to do so, save the configuration file somewhere convenient, then makemodifications as desired. Here is what I used.

    Having done that, you will need to load the configuration when given theopportunity before starting installation.

  • 8/6/2019 Installing Knoppix

    13/19

    The screen where you can review the installation options then reflects thesechanges.

    Strangely enough, booting failed with an error message from Grub. The command"savedefault" was followed by "Error 15: File not found". I didn't want to change

  • 8/6/2019 Installing Knoppix

    14/19

    the default anyhow and just commented out that command. Here is what I addedto menu.lst. Since making that change, there have been no problems booting.

    Conclusion

    By today's standards this PC is getting on in age -- it's almost 3 years old.Something newer would definitely boot a bit faster: it takes some 5 minutes fromthe point in time that Grub is told which partition to boot. No surprise, consideringthat Knoppix goes through its usual check of available hardware. Maybe Debianwould be better?

    Quite some time ago, I was playing with a system that had an option to writestatus information to the swap space when the system was shut down. This couldthen be used on boot to speed the process up. I haven't looked for this withKnoppix, but it seems like a worthwhile idea.

    One of the reasons that installation is so easy is that there are no confusingquestions about what software to install. The downside is that an installation is wayover 4 times the size of what I typically install with SuSE. Well, today hard drivesare huge and cheap.

    Worth note is that both SuSE and Knoppix start user IDs with 1000 -- I wonder if that has to do with conformance to LSB? Well, maybe not: just checked and FedoraCore 6 uses 500 as did SuSE a couple of releases back. Heck, I dunno. At least on aSuSE machine making an existing /home available should be possible (a task foranother day.) The name change of the first user from whatever to knoppix, I couldlive with. Yeah, I know, that's not useful for a big environment -- but this is a smallhome office.

    Before connecting to a network, you ought to consider following the advice of KlausKnopper and modify /etc/sudoers. I did what he suggested and you can seethat here .

    The use of virtual terminals is different from that of SuSE or Red Hat; X runs on 5rather than 7. Not a problem, but I did have to go looking the first time I wanted toreturn to KDE after having used a command line in a VT.

    Although Knoppix belongs in everybody's tool box, it may not be your choice for adesktop environment. However, it is interesting having essentially the same system

    (5.0 vs 5.0.1) on both my notebook and my PC. I am looking forward to gainingmore experience with this configuration once networking is set up and it is possibleto do things like using X11 forwarding to start OpenOffice on the PC and use it fromthe notebook.

  • 8/6/2019 Installing Knoppix

    15/19

    T alkback: Discuss this article with T he Answer Gang

    Edgar is a consultant in the Cologne/Bonn area in Germany. His day jobinvolves helping a customer with payroll, maintaining ancient IBM

    Assembler programs, some occasional COBOL, and otherwise using QMF, PL/1 and DB/2 under MVS.

    (Note: mail that does not contain "linuxgazette" in the subject will be rejected.)

    Copyright 2006, Edgar Howell. Released under the Open Publication license unlessotherwise noted in the body of the article. Linux Gazette is not produced, sponsored, orendorsed by its prior host, SSC, Inc.Published in Issue 133 of Linux Gazette, December 2006

    Home FAQ Site Map Mirrors Translations Search Archives Authors Mailing Lists Join

    Us! Contact Us Home > December 2006 (#133) > Article

    Knoppix Hard Disk Installation HOWTO

  • 8/6/2019 Installing Knoppix

    16/19

    by David McNab here is a link to the original page

    Introduction System Requirements Installation Procedure What is Linux?

    Introduction

    Full GNU/Linux Desktop installed in 20 minutes flat! No more excuses for running W--dows!

    Knoppix is a remarkable Linux 'demo' distribution, in that it can run totally from a CD,without disturbing any existing software or disks on the system it's running on.

    Even better, Knoppix can auto-detect hardware as it starts up, and does quite a good job of configuring this hardware.

    And still better, Knoppix is chock-full of the best desktop software which GNU/Linux hasto offer - office software, games, productivity suites, software development tools,multimedia - you name it!

    After seeing a Knoppix demo, many users decide that they'd like to have Knoppixpermanently installed on their system. This HOWTO gives a simple step-by-step guide toputting Knoppix on the hard disk, with the added bonus that it will run faster from thenon.

    This guide covers a couple of obvious points which are st rangely missing from theKnoppix website, and will help you to go from first boot to a fully set up GNU/Linuxdesktop in 20 minutes flat!

    System Requirements

    To install and run Knoppix on your PC, you'll need:

    y Pentium-class processor, preferably 300MHz+y 64MB RAMy A spare partition on your disk, min 3GBy (of course) a Knoppix CD

    Installation Procedure

    To get Knoppix installed onto your hard drive:

    1. Boot the Knoppix CD.2. When the boot prompt comes up, choose your language.

    Most of us speak English, so we'll type:

  • 8/6/2019 Installing Knoppix

    17/19

    boot: knoppix lang=en

    then press ENTER (you don't type the 'boot:' part, of course)

    3. Wait till the system is fully launched, including the KDE desktop4. Press CT RL-AL T -F1 , to get a root console. You should see a shell prompt5. Type: knx-hdinstall 6. Follow the guided installation menus. This will include:

    o Creating a Linux partition (at least 2.5GBo Creating a Linux Swap partition (at least 256MB)o 'Mounting' the Linux partition as rooto Initialising the swap partitiono Copying all the required files (automatically)o Setting up networkingo Setting passwordso Setting up the bootloader (Note: take care with this stage - it could

    render your system incapable of booting into Windows. If you reallyneed Windows, then it might be a good idea to set up GRUBBootloader with a 'chainloader' entry, so that you can dual boot.Working this out is an exercise left to the reader - there are too many

    possible scenarios for me to cover in this short guide. Also see mangrub and the files in /usr/share/doc/grub )o Rebooting (without the CD)

    7. When you've rebooted Knoppix from your hard disk, click on the KDE ControlCentre icon in the launcher at the bottom of the screen (icon of a colourmonitor with a card in front of it)

    8. Within the Control Center, click on Personliche Einstellungen 9. Click on Land und Sprache 10. Choose the locale and language of your choice11. Click on Andwenden at bottom of that window12. Close and restart the Control Center

    13. Click on Peripherals , then Keyboard , and choose your preferred keyboardlayout (which will probably be US.English . Click OK and close the window14. Press CT RL-AL T -F2 to get to the root console, and log in as root (using the

    password you chose when you ran the installer)15. (Optional) - type apt-get update (followed by ENTER). This will update your

    list of available packages, and takes about 5-10 minutes.16. Hey, presto, you've got a fully installed GNU/Linux desktop

    From here on in, you'll probably want to fine-tune a few things, set up themes,backgrounds etc. But most of the hard work is already done for you!

    And lastly, note that Knoppix is based on Debian , which is arguably the finest GNU/Linuxinfrastructure available. To learn more about your system, and how toadd/change/remove software, go to the Debian website and read the documents. If you

    get really stuck, start upX

    -Chat and loginto irc.debian.org or irc.openprojects.net and join channel #debian . That is onebusy chat room, with Debian Linux experts present 24/7, willing to help.

    What is Linux?

    Linux, or more correctly, GNU/Linux, is an operating system that runs on most knowntypes of computers, including (of course) the popular Intel-based PCs that most people

  • 8/6/2019 Installing Knoppix

    18/19

    use, and Macintoshes, right up to large mainframes and supercomputers.

    GNU/Linux is sweeping rapidly throughout the computer world, from individual usersthrough to small companies, large corporations and government departments.

    GNU/Linux is based on Open Source software - software for which the source code isfreely available. The license conditions for OSS allow you to view and modify the

    software, and share your changes freely.

    Amongst the many advantages of OSS are:

    y Price - total cost of ownership of GNU/Linux based systems is less than half thatof proprietary systems like Windows. Often, it's even a quarter or less.

    y Security - GNU/Linux systems are far less vulnerable to crackers thanproprietary systems.

    y Versatility - with GNU/Linux, you have the freedom to mix and match softwareas you choose, also to change any software as you see fi t.

    y Transparency - with the source code available, you can satisfy yourself that yourprograms are not doing anything undesirable without your consent (not alwaystrue for proprietary Windows systems - for example, Windows keeps secretrecords of everything you do on your computer)

    y Empowerment - with GNU/Linux, no company can gradually encroach onto yourrights and privacy.

    GNU/Linux has advanced to the point where most moderately-skilled computer userscan convert their systems to GNU/Linux, without losing any of their old Windows-baseddata.

    There are thousands of excellent websites relating to GNU/Linux around the world. I list just a few of them here:

    y New Zealand Open Source Society - www.nzoss.org.nz y New Zealand Open Source Vendor Group - www.openz.org y Linux.org y Linux for Newbies

    This page is CopyLeft by David McNab - please feel free to link this page orcopy it elsewhere

  • 8/6/2019 Installing Knoppix

    19/19