View Full Version : Need help

02-15-2005, 04:02 AM
I have 2 hard drives, both nfts. One is windows 2000 and the other is just there and i keep some files on it. I want to install knoppix on the second one yet keep the files i already have on that drive. I understand i can do this by partioning the drive? yet i am not completly sure how to do so. Please help me

02-15-2005, 10:56 AM
Welcome to the Wonderful World of Multi-Booting! 8)

In the case of just two operating systems, you can call it dual booting, but why limit yourself? It's not only a great way to give Linux a try, but it can turn into a whole hobby in itself. On the Athlon I bought last year, which came with Windows XP, I added five varieties of Linux, and on the Pentium III that sits next to it, I have WinMe and (at the moment) just one Linux.

So be careful, it can get addictive. You might wind up like the guy who wrote a book where he mentions running 8 operating systems on one machine: DR-DOS, Win98, NT 4.0, OS/2, BeOS, FreeBSD, and the two Linux distributions, SuSE and Debian. Should you really want to dig into multibooting down the road, I recommend looking for his book:

- The Multi-Boot Configuration Handbook
- by Roderick W. Smith
- copyright 2000, Que Corporation
- ISBN 0-7897-2283-6
- 640 pages!!!

The book needs some updating - maybe you're the one to write a new "handbook"!

Okay, maybe later. :D

There are different ways to go about this, especially the re-partiitioning, but start by seeing it as only a few steps, with each step a simple concept. Tricky, maybe, or frustrating if things don't go quite right, but simple in concept.

The first three steps are Plan, Plan, Plan. Then make room for the new OS, install the new OS, and tell the computer how to find the new OS so that you get choices at boot time.

The planning is mostly stuff you've already thought about, like your reason for installing a Linux, how much space is on the hard drive in question, how soon you might be getting a larger drive, and your current and near-future uses for Win2K.

Also, you really need to put some thought into What To Do When Things Go Horribly, Terribly Wrong. Not "if," but "when." :shock:

I'm not saying that installing a Linux will trigger that event, but increasing complexity always increases risk. You know that. You also know that any single operating system (such as a Windows) is capable of blowing up all on its own. So you probably have some contingency plans already in place.

The very good news is that a Knoppix CD is itself is a great tool, even if you decide to never have a Linux installed on your hard drives. To see why, I recommend this book:

- Knoppix Hacks
- by Kyle Rankin
- copyright 2005 (but published late last year)
- ISBN 0-596-00787-6

There's a chapter just on how to use Knoppix to fix Things That Went Horribly, Terribly Wrong In Windows.

Okay, before getting into what you asked about, I'm going to make two recommendations. One of them is heresy and may get me banned from the forum, but....

First, the more orthodox suggestion. Re-visit the idea of keeping the Win2K files on the second drive. Is it for insurance, in case the first drive goes down? Do you have another set of backups stored away from your computer, in case a power failure causes head crashes and unreadable sectors on both drives at the same time? Would you like to access those files from both Windows and Linux?

What I'm edging toward is devoting the entire second drive to Linux. Or at least to not having an NTFS partition on that drive. It would make some things a little less complex.

To keep the files accesible by Windows, you'll want them in an NTFS or FAT32 partition. You can store the files inside a Linux partition, but Windows won't see them. But they'll still be there, so if they're backups of files on the first drive you can get to them through Linux (and copy them back out to where Windows can find them).

Until recently, Linux could read and write to FAT32 partitions just fine but reliably only read from NTFS. Now Linux has a way to write to NTFS - I haven't used it, it's supposed to be good stuff, but I use a FAT32 partition to share things between XP and Linux. Works great.

And/or, if you could make it so you're not counting on those files absolutely, positively being on that second drive, you would feel more free to experiment in ways that could make that drive temporarily - ummmm - unreadable. At least by Windows. Fear not, the bootable Knoppix CD will almost certainly be able to Save The Day. Still, if they're your only copies of those cute baby pictures that your spouse will kill you for losing :oops: this could influence your plans.

Okay, second suggestion. Re-visit the idea of installing Knoppix to hard drive.

Yes, Knoppix is great. In fact, I'm willing to stand (nearly) naked on any street corner in America and proclaim that Knoppix is the most important development in personal-computing operating systems in the last five years. That the standard it sets in detecting and configuring hardware is exactly what Linux has needed to reach the average computer user even though others thought that duplicating the look of Windows and complexity of Office would finally spark the revolution of the proletariat.

Still, maybe another Linux for your hard drive.

Knoppix is fantastic as an OS-on-a-disk. And the installation to hard drive is very, very simple by Linux standards. But it has a few issues. One is that the process of hd-install is still a little rough. There seem to be some fumbles with, ironically enough, using CD-ROM drives once it's installed. It's unfriendly to pre-existing multiboot setups. And then, you may find yourself typing on a German keyboard - oops, where did that semicolon go?

There are other varieties of Linux that started from Knoppix and added their own twists. Of these, my favorite is Morphix. The installation to hd is just as easy, is a bit better integrated, and gives better results (for me, anyway). The Morphix flavor they call "light" is a smaller download than Knoppix, which also means it doesn't have as much stuff. (There's a new "heavy" version that I haven't downloaded yet.)

But "light" has everything you need for surfing the web, processing the word, and dinking with Linux. And, as with Knoppix, the underlying base is Debian, so there's a huge repository of stuff you can add plus good tools to help you do that.

Another of my favorite varieties of Linux (or "distros," as they're called - short for "distributions") is Red Hat's Fedora Project. A few years ago this company's product (Red Hat 7.3 to be precise) saved me from completely giving up on Linux. It correctly detected my mouse and video board and just plain worked.

Red Hat is widely scorned as being just as bloated as Windows. The zero-dollar download (now called Fedora Core 3) is four CDs. But that's, what, 30% more software than the 2 GB of uncompressed Knoppix? And FC3 was just ranked #2 by the UK magazine Linux Format. (They ranked Mandrake #1 even while admitting it occasionally crashed. It's beyond me how they could put it in the top 10 when their intended audience is just-folks computer users. Oh well.)

The way that Red Hat handles adding and removing software is different from Debian-based distros and considered not as good. There are other plusses and minusses, and many of them apply to the other big packages that originate with commercial developers, Mandrake and SuSE.

Enough to think about? :P

Write back, and we'll start breaking ... errr ... partitioning that drive!

-- Ed

02-16-2005, 12:34 AM
Thank you so much for your help. Im certain that I want to install knoppix at least for the time being because it is the only linux operating system that I have expieremented with. To make things easier I will call the drive with Windows 2000 drive 1 and the other drive drive 2. I may soon have shortage of space on drive 1 so I must have a small amount of space for Windows files on drive 2. I have a small amount of files on drive 2 which I would like to keep there as well. In other words I would like to have drive 2 divided into part for windows by keeping it ntfs or possibly FAT32 and 1 part for Knoppix. I have read some of the forums and I understand that some people divide their linux hard drive into 3 parts. One was for swap, the other for the operating system I believe, and the other i am unsure. What is the reason for this and would this be a good to do? I feel I should tell you that I only have 192mb ram. Also as you know I need help on partitioning the drive and doing the dual boot OS thing. One last question, Is it possible to have my computer boot on Windows 2000 automatically since I will be using this most often and I share the computer with other people. For example, could I have the computer boot on Drive 1 first, and then when I want to have run knoppix I simply switch the boot order in bios to boot drive 2 first? Again thank you for your help.

02-16-2005, 05:56 AM
I have 2 hard drives, both nfts. One is windows 2000 and the other is just there and i keep some files on it. I want to install knoppix on the second one yet keep the files i already have on that drive. I understand i can do this by partioning the drive? yet i am not completly sure how to do so. Please help me

Yes, this is quite a common setup. First, back up the files on the second drive.

Then (easy way) just install Knoppix on it. The installer should make a partition as part of the install.

Or (better way) make 3 partitions on this drive:
one about 4-5 Gig linux ext3 to put knoppix on. Linux will call this hdb1
one about 500 meg for linux swap (hdb2)
the remainder format vfat (fat 32) for data. Both linux and windows can share this drive. (hdb3)
(Always keep your data separate from your operating system, then you won't lose it if you have a crash).

Then install knoppix. When it asks where to put lilo, put lilo on the MBR. It should end up on the MBR of the first drive (the one with windows on it) since this is what your bios has set as the boot drive.

You should now be able to boot into knoppix. To make windows your default boot, edit /etc/lilo.conf; change 'default=linux' to 'default=windows' (the name used here must match the name found in the image= section which boots your windows system). Then run lilo to implement the changes. You must be root to edit lilo.conf and to run lilo.
To run the text editor kate as root, first set a root password if you dont' already have one ('sudo passwd' is the command to use) then start kate from a terminal with 'kdesu kate /etc/lilo.conf'. Kate has a built-in terminal window you can use to run lilo (you will already be root) or from a normal terminal window 'sudo lilo'.

You can write to you vfat partition from linux but don't write to your windows partition(hda1) unless you use 'captive ntfs'

02-16-2005, 08:19 AM
Oh yes, you absolutely can set Windows to be the default OS. And you can (but don't have to) set a timer so that the computer will go ahead and boot to the default if the user doesn't press a key. The users will see this in the menu at boot time along with information you can customize.

Or you can hide Knoppix from other users, or lock it so a password is required for it. Of course, we all want to encourage people to play with Linux, right? :D And there's no need to mess with BIOS settings. Your boot loader is your friend, and it will just offer you options and obey your commands.

And now a word from our sponsor. You're running out of room on drive 1 - can you budget $5 to $10 a week for a bigger one? At Best Buy a few days ago I saw they were holding steady at about $1/GB (although maximum capacity is growing). I remember being excited when prices came down to $1/MB! A Linux "live CD," such as Knoppix, can help you move everything to the new drive, too. Just a thought.

Okay, back to drive 2 - or /hdb as you'll call it when speaking Linux. You'll want at least 3 partitions: one or more for Windows, a Linux swap, and one or more formatted for Knoppix and data storage for Linux programs.

The rule of thumb for swap partitions is to make them between 1x and 2x the size of your installed RAM. With less RAM there will be more swapping, so 380 or 385 MB would be fine. You usually can't hit an exact number, so anything close will do.

The info page at knoppix.com doesn't give a minimum installation size because - silly people - they think we run Knoppix from CD! You'll want 2.5 GB as an absolute bare minimum, though. That would give you enough room to use the disk-installed programs, write some text files, and cache some web pages while you surf. There won't be much breathing room for downloading and installing more packages though.

More is better, but 5 GB is probably realistic if you can swing it. If you make at least one of the Windows partitions FAT32, you can count some of that for storing a few files that you'd like to work on from within Knoppix. If you want to maximize Windows' ability to expand onto drive 2, this might be part of your thinking.

You may also need to decide about primary and logical partitions - I didn't give Knoppix-installer a choice on this one. You can have from 1 to 4 primary partitions on any hard drive. If you want more than four partitions, you get 1 to 3 primary plus 1 extended, and the extended partition is subdivided into as many logical partitions as you want or need.

Windows must boot from the first primary partition on the first hard drive (hda1 in Linux terms) - you're okay there. Aside from that, it mostly makes no difference whether stuff is on a primary or logical drive. Linux will label the primary partitions on your drive 2 hdb1 to hdb4. Even if you have only one primary partition, extended partitions will start with hdb5.

More thoughts on Windows

(a) one partition, NTFS - this is the easiest; you'll "just" be resizing the (presently whole-drive) partition;

(b) one partition, FAT32 - of course you'll sign in blood the warning that all files on the drive should be backed up before partitioning; in situation (a), they might stay safe; in situation (b), you will lose those files, and they'll have to be restored from backup;

(c) two partitions, one of each - probably best if you want to share files between Windows and Linux and keep the Windows files safe;

(d) two partitions, both NTFS - if you want to play with writing to NTFS from Linux and still keep the pre-existing Windows files safe (by keeping them in their own partition and not writing to it from Linux).

Thoughts on Knoppix

Besides a swap file, it used to be common understanding that you'd make 3, 5, or maybe more partitions per unix-type operating system. But for hobbyist use, I honestly think one is just fine.

The reasons for multiple partitions mostly have to do with safety (and convenience), security, and enforcement of size allocations.

Safety: if one partition gets fouled up for whatever reason, the rest are safe. Also, backups are smaller. The /usr directory, when it's in its own partition, can be backed up nightly whereas system directories can be backed up, say, weekly.

Security: when an intruder breaks into one partition, they may not be able to get at stuff in other partitions.

Size: there are other ways to do this, but basically if something goes wild and writes gigabytes per second to one of the partitions, it will presumably stop when that partition fills up, leaving the stuff that works in other partitions unaffected. Users who hang SPAM ME signs around the net are one source of the problem, computer operations that are generating tons of error and warning messages are another.

Last steps before partitioning

- Back up your Windows files. To disk 1 if you have room, otherwise it depends on the size of your files and what you have available. Write them to CD-ROM, for example. Emailing them to yourself is also used.

- Defragment disk 2. Just having the files defragmented is reason enough (if your defragger will do that), but if you keep the Windows partition as the first one on the drive, and the files have all been moved to the very beginning of the drive, you may not need to restore the files from backup. But if you decide you'll be restoring from backup regardless, skip the defrag. Restoring them from backup will do it for you.

- Choose your partitioner. I do it so often that I buy Partition Magic every time they release a new edition. Don't get it just for this one operation, but if you have it, or have access to it, I think it's the best way to split up a Windows-only drive. It makes sure your Windows files stay in the Windows partition, picking them up and moving them as necessary. I've never had to restore from backup after resizing or moving a Windows partition.

If Partition Magic isn't there for you, just go with the flow in Knoppix-installer.

- Choose your bootloader. This is mostly a warning: if you do use Partition Magic, I plead with you not to also use Boot Magic. It writes its own data to space inside File Allocation Tables (not sure it even works if you don't have a FAT partition). That's way too dangerous.

Knoppix-installer doesn't give you a choice - it installs LILO. You don't have to leave it that way; you can put another bootloader in its place later. But LILO works great.

- Decide where to install LILO. Here's something I don't know about Win2K - is it enough like NT/XP to be able to multiboot? If so, and if that's what you want to use for booting Windows, then tell Knoppix-installer to put LILO in the Linux boot sector so it won't tromp on the Win bootloader.

Otherwise, have Knoppix-installer put LILO in your computer's Master Boot Record. LILO boots all flavors of Windows - and more! :D

Now ... go!

Plan, Plan, Plan is over. It's time to make room for Knoppix, install Knoppix, and customize how Knoppix and Windows boot.

If you use Partition Magic or another Windows-based partitioner, heed this rule: Use Windows tools on Windows partitions and Linux tools on Linux partitions. That is, go ahead and tell Partition Magic that the new partitions will be Linux, but then let Knoppix-installer format them again. Knoppix will be happier that way.

Otherwise just run Knoppix-installer, answer a few questions, and you're done. :roll: If you're going with only one non-swap Linux partition, tell Knoppix-installer to mount it to / - until you have that mount point, K-i won't let you proceed anyway.


- Find your Windows partition(s). Knoppix-installer may hide the Windows partitions on disk 2. Yes, hide. When you boot into Windows, you may be horrified to find that drive 2 has disappeared. :shock: (I know I was!)

If so, here's what happened: Windows can't see the Linux partitions anyway. The NTFS and FAT32 partitions? Knoppix-installer apparently does you the "favor" of changing them from regular to hidden in the drive's partition table. My guess is that it doesn't want Windows to get confused at boot time by seeing more than one Windows operating system, or seeing a Windows system that's outside the first-drive-first-partition rule.

K-i must think that these non-bootable Windows partitions are potentially bootable. It even puts them into the LILO configuration file for you. How nice. Here's a quick sanity check: if the Windows partitions are there, Knoppix sees them. Booting into Knoppix, you can check /etc/lilo.conf and /etc/fstab - they'll be there. Post back for help un-hiding them in the partition table.

- Restore backed-up files.

- Configure LILO the way you want it. Change the default OS, change the timeout, change the text that displays, and on and on. In particular, the timeout may be too short for users to grasp everything that's on the boot menu. If Windows really got set as the default, that may be okay. If not, change the timeout first. It's specified in tenths of a second, so maybe start with 150 to give yourself 15 seconds to get a good idea of how the screen looks to other users.

This stuff is all in /etc/lilo.conf - after you edit that file you must type

# lilo

for the changes to take place. Just rebooting won't do it.

- Find your CD-ROM drive. It's ironic considering that Knoppix is intended to run from CD, but Knoppix-installer completely hosed this up on my installation and that of at least one other person on this forum. If your drive works in Windows but not in Knoppix, post back for help.

Have fun, and don't forget to write! :D

-- Ed

02-16-2005, 11:35 PM
Again I cannot thank you for all of your help. I have decided that if I will need to back drive 2 up that I might as well put them on the other drive. Drive 2 is now empty. So I plan to install knoppix on drive 2 with about 3-4.5gb for knoppix including swap. The remainder I would like to be FAT32 for both Windows and Knoppix (this will most likely be used to hold music and such). This drive is only 6gb and I am definately planning on buying a larger one sometime. My only remaining questions are 1. how do I begin the installation of knoppix 2. is there any special way i need to format the partition for linux and the swap (Im geussing this is simple and I will figure it out on the install screen) and 3. I am considering making linux hidden to others. At first I thought i could simply write lilo onto drive 2 and set bios to boot drive 1 first, but I have come to realize that the 2 hard drives are not seperated in the boot order. How would I proceed in making linux hidden? I hope this is not to much of a hassle. If it is, would i be able to make the bios selection timer for the operating system selection very short ?

02-17-2005, 01:05 AM
I just discovered a problem. My knoppix 3.7 cd can never load fully. it recognizes hardware then trys to load stuff off the cd and i get errors could not load XXXXkb data lost. If you happen to know how to fix this that would be great, otherwise i could look for the problem in the forums. It did say in the loading screen try init=option in kernal, not really sure what this means but i tried typing it in for the boot: but it would not work. Ill try reburning the iso with another burning software. Ive already tryed 2 different iso files with my current one. One more quick question: should i make a windows 2000 boot cd before installing knoppix in case something goes wrong. I have a feeling the answer is that I should already have one.

02-17-2005, 01:43 AM
Well, nuts. Let's tackle stuff in order.

Yes, first do what you need to do to preserve your existing Windows setup. Make a boot CD if that's an option.

Do you have a floppy drive? That will help in a couple of ways, first by also making a boot floppy for Windows (which would possibly make your system come up faster than from a CD). Later on, a boot floppy for Linux may be helpful.

Then, do you have a Windows program to check the Knoppix iso you downloaded? Something that talks about doing an md5sum. I've tried a couple in WinXP that don't seem to work, but there are others. The way this works is, the site you downloaded from tells you what the md5sum is for the iso they have stored. Then you have a program calculate the md5sum on your download.

If the download is off by even one bit, the md5sums won't match, and that has to be resolved before you can move on. But if the two match, the download is good and you troubleshoot from that point onward.

-- Ed

02-17-2005, 02:17 AM
Actually, don't go looking for a Win-32 version of md5sum - you can run it from the Knoppix CD on a file in an NTFS partition. It doesn't affect the file in any way, so there's no danger to Windows.

-- Ed

02-17-2005, 03:56 AM
I have figured out the problem. At the boot screen I would type init=option but i forgot to add knoppix before this. It now boots normally. I find this out because i never had to do this in previous versions. I will make the windows boot cd as soon as possible. In the mean time could you tell me how to begin the installer and if theres a certain way I need to partion drive 2 or is it pretty much self explanatory with the partition for linux, swap, and fat32. Thankyou

02-17-2005, 04:36 AM

Open a terminal wnidow and type

$ sudo knoppix-installer

and you're off to the races!

I've done this in Knoppix only once myself, mind, and I had already partitioned the drive before I started the process. Still, I have the Knoppix Hacks book at hand, and I'm sure all will go well for you.

- k-i should correctly identify your Windows partitions as NTFS. Don't do anything to drive 1, which Linux calls /hda. It will also be /hda1, since the whole drive is one partition.

- disk 2 will be /hdb, so the partitions will be /hdb1, /hdb2, /hdb3.

- the order of Win-swap-Knoppix doesn't matter to Linux, but Win2K might be happier with FAT32 coming first on the drive.

- don't know whether you'll be asked "where do you want Knoppix, where do you want swap?" or whether you'll be asked "how do you want these partitions formatted?" (or, "what kind of filesystem do you want on these partitions?").

- Linux calls FAT32 "vfat".

- Linux swap partitions are always type "swap," so no choices to make there.

- if offered a choice of filesystems for the Knoppix partition, "ext3" will probably be the default, as well as the best choice. It offers more recovery protection than the former standard, ext2. There are several other types, but some will require cheat codes at boot time or maybe even downloading additional kernel modules - ext3 is universal for all of Linux

- there will be configuration changes to make after installation, but when knoppix-install finishes, you should be able to boot from hard drive and choose Windows or Knoppix. The boot screen's timeout may be very short, and the default is likely to be Knoppix, but it should be essentially functional.

Good luck!

-- Ed

02-17-2005, 04:40 AM
Okay, more thoughts.

- with only three partitions on /hdb, the partitioning part of knoppix-installer may or may not ask whether you want the partitions to be primary, extended, or logical. All three as primary partitions is simplest and quite good for your setup.

- if asked the mount point (what part of Knoppix to install) for your single partition, it's /.

- where to install LILO bootloader - computer's Master Boot Record. If the choices are phrased in Linux terms of drive and partition, it's /hda.

-- Ed

02-17-2005, 10:40 AM
Mr. Ed and Andrew,

Many thanks for your discussion. I wish you'd started your conversation a couple of weeks ago, before I started experimenting with Knoppix-to-HDD. And Ed, I hope that your material will be included in the Knoppix Install Manual or FAQ. Invaluable stuff! It should be required reading for every Linux user, not just Knoppix users.

I've installed to HDD twice now, and will probably have to do it one more time. (I made two mistakes the first time: I allocated *way* too much space to Knoppix and the FAT32 shared partition, and selected "Knoppix" as my installation type instead of Debian.) In my current installation, I haven't allocated enough space to either Debian or the shared FAT32 partition. (After fooling with it some, I suspect that I'll actually be *using* Linux, and not just playing with it. I'll probably want a little more elbow room down the line.)

I'm posting this message primarily to add my two cents about re-sizing NTFS partitions.

My system uses a single 80 GB HDD, with about 35 GB occupied. I looked at XP's defrag graphical analysis before I resized. It looked like I wasn't badly fragged (I'd defragged about a week before my experiment) but the files appeared to be scattered all over the drive.

Since I was fully backed up, I decided to experiment a bit and resize without attempting to move that data dcwn into the lower area of the drive, just to see what would happen.

I booted from the CD, then ran QtParted to resize the NTFS partition from 80 GB (nominal) down to about 50 GB. According to the defrag graphic, that would put the partition well below the upper llimit of the data that existed on the NTFS partition. I expected to see QtParted complain, or, at the least, to find that I'd lost data after I returned to XP. But I - apparently - didn't lose a thing!

I can draw one of two conclusions from my experiment: either the XP defrag graphic doesn't reflect the physical location of files, or QtParted is able to re-locate files as it's resizing an NTFS partition. Or maybe XP running CHKDISK when I rebooted had something to do with it. In any case, I was able to resize without a problem.

Oh, yeah - I also lost a couple of days trying to solve the "missing FAT32 partition" mystery. I found the answer by searching this board. The problem, as you state, is caused by lilo, and the solution is to add the keyword "change" to the XP boot entry in lilo.conf. That keeps lilo from hiding the partition.

Also - I've found that I'm more comfortable using parted from the command line than I am using QtParted from the GUI, but I still think I'll continue using QtParted to resize my NTFS partition. It works.

Thanks again, gentlemen. Great information! I hope that everyone will read it.

Best Regards,


02-17-2005, 11:43 AM
Heh. Thanks for your kind words, Tom, and for reminding me that There's More Than One Way To Do Things.

I probably couldn't have helped you a couple of weeks ago because I just did the Knoppix install a few days ago. But I've been multibooting long enough that when I got over the surprise of XP not seeing the FAT32 partition, I felt sure knoppix-installer had made the partition hidden. :evil:

So, my way of fixing that was to run fdisk and change the partition's ID from a number that means hidden to the number for the same type, but not hidden. And then remove the partition from lilo.conf since it couldn't be booted anyway.

It's really great to hear you didn't lose anything in your NTFS resizing! I actually ran XP's defragger three times before firing up Partition Magic - I'm kinda paranoid, huh? :)

The first time I ran it, the graph showed a couple of things that were left way out away from everything else. Ran it again, same thing. Third time, it brought those sectors back to the main pack. Highly weird. You're right; maybe the graph has issues.

But it's super to know you can use something free-as-in-cheap like QtParted as a solid alternative to Windows-based Partition Magic, which is not only not cheap but annoying in how it does some things.

I wrote this in another thread, where the response was, "Please clarify." :wink:

If you know how to fish, teach others. Then they can feed themselves - and teach even more people - and not come back again and again for more fish.

-- Ed

02-17-2005, 06:36 PM

Love the "fishing" saying. Appropos!

You're a brave man, using Partition Magic. I've heard a few horror stories that have scared me away from that tool. It's sort of like a machine gun that works perfectly about 999 out of 1000 times. But every 1000th round or so, it blows up its receiver (and the unfortunate gunner.)

I've always used DOS FDISK or DISKPART. It's done the job. Of course, I never had to resize a live partition before now; my FDISK forays have been on new builds. I was very pleased to see how well QtParted worked. (Now that I think about it, though, I've only used it a few times, and have no idea whether it's bulletproof or the above-mentioned machine gun.)

Anyway, many thanks for your fine efforts. I learned a lot, and am very grateful to you.

Have fun!

Best Regards,


02-17-2005, 11:22 PM
Ok Ed, you must be getting pretty annoyed with all my questions. Just one last one. How would I make the linux hidden and have windows2000 boot right when i turn the computer on. If this is to complex/complicated/time consuming then would i be able to have lilo open up for a very short time? Thank you, Ill be getting the windows boot cd made up tongiht and possibly install tonight as well

02-17-2005, 11:32 PM
Ahh, once again i seem to be confused. From what i have found online, It seems that my windows 2000 install cd will work to boot? If so I guess I dont have to make a windows 2000 boot cd after all

02-18-2005, 02:00 AM
HI again!

... once again i seem to be confused. If you aren't confused, you aren't awake. :D

... my windows 2000 install cd will work to boot? Good. In issues of installing and booting WinStuff, it's best to listen to sources as close to Redmond as possible unless someone is waving a huge flag that says, "I KNOW BETTER!" And listen to those people with caution!

Just one last [question]. No, no, save at least one for when you meet the Superuser of us all. :shock: Until then, question, question, question!

How would I make the linux hidden.... Let me research the LILO answer to this for another hour or two. I think there's a very crude way in LILO, but maybe I was thinking of GrUB when I said an OS could be hidden at boot time.

Or maybe I was doing the old-person version of thinking, which is looking back with nostalgia on half-memories conveniently rebuilt for the purpose of contentment. :oops:

Back soon!

-- Ed

02-18-2005, 09:11 AM
Ummm ... in case you're wondering just how long an hour or two can take, I'm writing it up now and will post it within ... an hour or two! :D

-- Ed

02-19-2005, 03:25 AM

I apologize - I had to quit and go to bed last night when I couldn't see straight anymore. I think the computer was tired, too - it was very sluggish in loading knoppix.net. But here you go!

Hiding Knoppix with LILO

Okay, LILO can offer a combination of obscurity and security, although I wouldn't exactly say that it can hide a boot option. A user who knows the right keystrokes can still find an obscured OS and, unless you password-protect it, boot that OS. Still, LILO might do what you want.

But first, a question: does the computer have a floppy drive? If so, you can keep the Windows bootloader in the computer's Master Boot Record - users who boot from hard drive will never see Knoppix.

Install LILO or GrUB on a floppy that only you have access to, and without any of the variations I outline here, you can quite easily have your multiboot system.

Another possibility is to continue to boot Knoppix from CD while setting up some filespace on the hard drive that will persist from boot to boot. Again, Windows users will never see it.

But let's say you want to multiboot from the MBR. Here's the plan:

1. make everyone boot into Windows by default;

2. hide clues to finding Knoppix with install=;

3. make it even harder to find the clues by removing prompt;

4. make it hard to read and act on the clues with a short timeout;

5. still give yourself enough time to act with single-key and alias; and

6. lock out the barbarians, if you wish. :wink:

First, an ...

Intro to LILO

We call LILO a bootloader, but it's better to think of it as a program. It looks like two different things to us because we see it in two different environments.

At boot time it sure looks like a bootloader, offering choices, accepting input, and passing options to the kernel.

Once Linux is booted, running LILO sets up how the computer boots the next time, and by using a persistent configuration file, the times after that.

If you don't run LILO in this session, you can't change how the next session boots because that was set in some previous session. That's why you have to run LILO after changing the config file. GrUB doesn't work this way, but LILO does, so live with it. :)

If you're (pardon the pun) terminally curious, LILO accepts some command-line arguments that affect only the next boot and then get thrown away. Just so you know.


Like many programs, LILO stores its configuration file in /etc, and also like some, it helpfully flags it with a name that ends in the otherwise unneeded .conf extension. And of course it's a plain-text file that can be edited.

LILO's lilo.conf has two or more sections. First come global settings, then settings for one or more operating systems. To sound quite the geek, call them stanzas.

Also, as is common, there are lines that are ignored, being either blank or starting with #. These latter can be comments or possible options that are switched off for now but can be activated by just deleting the #.

The lilo.conf that Knoppix creates has lots of comments, especially in the global section, and also switched-off options. Good stuff. :)

Defaulting to Windows

One global setting you'll have to change is default=. What goes here is the label or alias (we'll come to that) from the stanza of the given OS.

Of course you're free to change any stanza's label to whatever you want. Instead of WinXP/2K(hda1) you can use Windows 2000 - then change the default line to match. (And run LILO when you're done editing.)

Or, if you like, you can give that OS a second name, an alias. In that stanza just add a line that says alias=something - then you can refer to that OS by either name. (And run LILO when you're done editing.)

If the default line is missing or commented out, the default default is whatever OS comes first after the global settings.

Having no clue

LILO-the-bootloader, at boot time, can take on one of three appearances. It can look like a menu with a bitmap, a text-only menu, or a command line. These are chosen with install= in the global settings, and the Knoppix lilo.conf shows all three.

Knoppix uses bitmap (bmp), but you can change that. If there's no install line active, LILO defaults to text menu (menu). To be obscure, use install=text.

In text mode LILO just sits there displaying its version number and boot: and no other clues, waiting for the user to (optionally type something and then) hit <ENTER>. (How long it waits depends on the optional timers - see next section.) If the user just hits <ENTER>, LILO boots the default OS. If something valid is typed, LILO boots that.

But if something invalid is typed, LILO comes back with the valid options. Also, if the user hits <TAB> instead, the valid options are shown.

Now remove the global setting prompt from lilo.conf. This takes boot: off the screen and disables the <TAB> option. So far so good, but if the user hits <ALT>, <CAPS LOCK>, <CTRL>, or <SCROLL LOCK>, the prompt is displayed again and <TAB> is reactivated.

So this can be part of a hiding solution, but not a complete one.

Think fast!

LILO has two timers in the global settings, timeout and delay. The Knoppix lilo.conf includes both, and the documentation is unfortunately brief and unclear, both on the system and in the file, so the difference between them isn't obvious. So what follows is my observation but could be wrong. It wouldn't be the hundredth time!. :oops:

In the documentation, prompt and timeout are described as working together, while delay makes no mention of prompt. I've rebooted so many times lately that I have as much footwear as Imelda Marcos, but I can't consistently make timeout and delay behave differently from each other.

If both are present, the lower time limit seems to prevail. If neither one is there, the user has unlimited time to find the special keys, so making the times short helps to keep users from discovering your secret OS.

Try them out. (And run LILO when you're done editing.)

Alias Mr. X

By the way, the times in timeout and delay are in tenths of seconds. Set them much less than 10 (that is, one second), and you might have trouble getting to the non-defaults yourself.

But who says you have to call the choices Windows and Knoppix? Why not Windows and Don'tBootThisNoMatterWhat? Or Windows and X?

If you make X an alias in the Knoppix stanza, an X will boot it the same as if you had typed the full name, whatever you decided to call it. (So will x - it seems to be case-insensitive - but check it out yourself.)

Unfortunately, if the user hits <TAB>, both the label and alias will be shown. The display won't draw a link between them, but they'll be there.

So, one final trick: single-key. There seems to be a stupid bug in how it's implemented, but the comments in the Knoppix lilo.conf give correctly working examples of single-key + aliases.

If you man lilo.conf you'll read that single-key is supposed to act on the first letter of all labels and aliases. Therefore none of them can have the same first letter. No Knoppix1 and Knoppix2.

If you put single-key in the global area but don't implement aliases, and then run LILO, you'll get an error that there are no single-letter options available to work with single-key. So it sounds like LILO is ignoring the full words.

If you put in aliases of w for Windows and k for Knoppix, and then run lilo, you'll get a collision error - w and Windows start the same, and so do k and Knoppix. So it's paying attention to the full words after all! :x

So you can do what Knoppix does and give numeric aliases, or you can use some (non-duplicate and hopefully non-obvious) letter. And run ... well, you know.

What's the word?

Passwords can help if you've done your best to hide Knoppix and want to be extra-sure users can't get to it even when they find it. Also, if you decide the risk of users seeing all the possible boot choices isn't worth all this configuring, but you do want to control what they use.

The password= setting can appear in either the global section, one or more OS stanzas, or all of the above. If it's in global, it applies to all boot images.

But for settings like this one that can be in both places, the value given with the image overrides the global one. That is, a password in the top section sets it for all images, and then an OS that you don't want everyone else to boot into can have your own individual password setting.

But you're starting out with only two operating systems, and you want everyone else to freely log into Windows. So if you decide to set a password, you'll put it on Knoppix.

Note that passwords are not encrypted in /etc/lilo.conf - anyone who can read that file can read the passwords. After you edit the file, there's a command-line option that can reduce the risk, but it's still not even medium-strong security.

Final thoughts (on this topic)

If you've played along all the way, you've made Windows the default, hidden the clues to finding Knoppix, and made it so that other users don't have much time to boot Knoppix but that you do.

I hope you've implemented these one at a time and tried them before moving on. Yes, you too will have a boot collection, but it helps to keep things straight and see how they work individually.

If you mess things up enough so that you can only boot into Windows (or maybe not even that), well, your Knoppix CD can save the day, but it's not exactly pleasant. Trust me. :oops:

LILO has quirks, shortcomings, and even bugs, but it's been around a long time and is evidently still trusted by the Knoppix folks. The version installed is 22.6.1! (LILO was already on my Athlon 2800 before I installed Knoppix because the first Linux to go on it was Slackware, which of course uses LILO. :))

If LILO doesn't meet your needs, GrUB is also available in Knoppix. It's newer and more capable, they say. It's version 0.95, at any rate. I have GrUB on another computer but haven't delved into it to this extent.

Finally, LILO requires a "host" Linux to run. If you want to replace Knoppix with another distro, have a plan for transitioning the files and settings to the new Linux (or for replacing LILO with, say, GrUB). If you want to remove all Linux distros and leave only Windows, either LILO or Windows can restore the Win bootloader in the MBR.

Happy multibooting!

-- Ed

02-19-2005, 05:06 AM
The Lilo way seems simple enough to me. I may do that or possibly attempt to use my floppy disk. It has been long out of use so I must check to see if it is still working. I assume that I just have to install Lilo onto the floppy? and boot from the floppy?

02-19-2005, 07:57 AM
Yes, a very simple and effective solution. Sorry I didnt think of it sooner! I haven't made a boot floppy in quite a while.

Let's see, I think you'll still be required to install LILO to hard drive, but instead of putting it into the MBR, you can put it into the Knoppix partition. That will be, I believe, /hdb1. Then if you're not offered the option of making a boot floppy during installation, you can still do it later.

-- Ed

02-19-2005, 04:08 PM
ok thank you. I have already made the partitions. I have 3.7gb for knoppix then around 300 mb for swap. unintentionally I ended up with 2gb left exactly and made this fat32. The only thing that was unexpected with windows was the slower operation, becasue I did not realize I had 786mb of virtual memory on that drive. What would I do if I installed lilo to linux drive but for some reason could not make the floppy. I have read about people saying it is hard to get back on in the forums. I found one command knoppix=root /dev/hdb1 noinitrd ro where hdb1 is the linux drive. If this is a possibility i would certainly use that. It requires the use of a cd to access and a special command.

02-19-2005, 07:59 PM
ive run into some trouble. I installed the beginner installation and booted with the floppy. All went well until after the user name screen. I got tons of errrors , could not read knoppix config, could not find network connection list please run dcopserver, will not save config. Im goign to reformat the drive in windows then load up the knoppix cd, reformat the drive, and reinstall, possibly witht the debian mode. The cd method of booting from the hard drive works, yet I got the same error with both methods. I even tried all 3 versions of linux that appeared on the flopply, one plain linux, linux kernal 2.4 and linux kernal 2.6 with no good results

02-19-2005, 08:04 PM
ahh I dont have enough time right now to reinstall. Ill wait for your reply before trying again. Is there anything I could have done to cause these errors to happen in the previous install? I was messing around with wine for a short time. And which install would you say is better, the debian like, or the beginner knoppix one?

02-20-2005, 05:09 AM
Hi again!

I was messing around with wine....
Had a bit too much, did we? :D That CD tray isn't a glass-holder! :P

If you haven't had problems with the HD or RAM before now, and you just introduced the floppy drive into the equation, my first guess would be an aging floppy drive or - more likely - bad floppy disks.

Another potential problem would be a disagreement (one more serious than usual, that is) between Windows and Linux about the hard drive's geometry. Suspect this if you had problems with the drive during the time you ran Knoppix from CD only. I don't think it's likely, but it's possible.

Another possibility, on about the same level of probability or maybe a tad higher, would be a hose-up by the software that the hard-drive manufacturer installed before they shipped it to the store. A 6-GB drive is large enough to run afoul of computer BIOSes, so the secret hard-drive program is there to, basically, lie to the BIOS.

I was already composing a follow-up post about floppies before I read of your latest problems. Floppies are the least reliable storage medium now available due to vulnerability to physical damage, exposure to strong-ish magnetic fields (such as your monitor), and time-related deterioration of the stored data.

Okay, audio and video casettes are worse because the tape is even more fragile and yet exposed to the outside, but there aren't many computers using casette recorders for mass storage these days.

There are two or three ways to use a live CD such as Knoppix to bring up and fix an otherwise unbootable computer, including one where floppy-boot used to work but no longer does.

So if you like the floppy solution and find that the problem doesn't lie there, you can still recover if you have floppy problems down the road. But I think I'd discourage floppy booting until you were sure.

As for what to do first, now, check RAM for errors. Knoppix has memtest, which may or may not be better than whatever's available in Windows (if anything - I forget). I doubt memtest does a really thorough check - this requires using different patterns of write and read, and lots of time. But a simple check is better than none and may turn up damage caused by, say, an electrical discharge near the chips.

Then run a program to check the HD for errors, and pay special attention to bad sectors. The MBR may be mush, the partition table potted, the FATs gone flabby - those will go away with reformatting.

Actually, bad sectors are no big deal (unless there are a ton of them). Drive platters don't have to be perfect to be put into a unit for sale - the bad sectors just have to be flagged so they're invisible to software. But they do need to be found and flagged.

You don't need to reformat the drive in Windows. It won't hurt, it's just redundant if you do it again from Knoppix (which sounds like a good idea, to make sure Linux likes your drive).

As for choosing between Beginner, Debian, and Knoppix installation scripts: Beginner. In his excellent and very recent book Knoppix Hacks, Kyle Rankin says:

This is the preferred method for installing Knoppix to a hard drive. With this option, Knoppix sets up a multiuser Debian system, but also leaves all of the Knoppix hardware-detection scripts behind.
The Debian install is multiuser but omits the scripts (while still letting you pass kernel parameters at boot time). The Knoppix install keeps the scripts but makes a single-user system with no password, like the CD.

The three types of Knoppix available at boot time are really only two, one for a 2.4 kernel and one for 2.6. The options that just says Knoppix actually boots one or the other, which of course you can change in the bootloader configuration.

That's all for now, mate, but I'll be back.

-- Ed

02-20-2005, 05:23 AM
I think there may be something fishy with the partitions. I deleted the knoppix but i could not delete the swap. I dont think it is mounted because 0 mb are used and it detects ram disk when it usally woudl detect the swap. The message says I cannot delete because the swap is mounted. I went to the knoppix swap manager and it said no dos partitions are available and exited. When I tried to install knoppix again before I had deleted the knoppix partition it said the drive did not meet the requirements of at least a 128 mb swap and 2 gb linux partition. I did meet these and the linux partition was active, so i assumed the problem was with the swap. I dont no how to go about deleting this and then partitioning it again. I guess if I had to I could reformat the entire drive 2, but i dont no how to go about doing this.

02-20-2005, 07:53 AM
I've seen other people in the forum get that "does not meet requirements" message, and theirs were fine too. That one I have no clue about.

But really, starting knoppix-installer from scratch should give you the ability to make the disk right.

To see what the partition table says, do this:

$ sudo fdisk -l /dev/hdb

The -l option just reads the table out to you; no danger of changing anything accidentally.

-- Ed

02-20-2005, 09:22 AM
mr ed, just a comment. memtest takes HOURS and uses diferent read/write patterns...
it is fairly thurough.

02-20-2005, 09:51 AM
... memtest takes HOURS....
Yikes! :shock:

Good information, though - thanks! Now I don't have to let my son the computer tech get away with bragging about the memory testing he does at work! :D

-- Ed

02-21-2005, 09:47 PM
ok thank you I shall try that but I think it would be easy to simply reformat the entire drive yet i dont no how to do this

Durand Hicks
02-24-2005, 05:28 AM
Open a console and type:
swapoff /dev/hdxythat will unmount the swap partition so you can delete and reformat it. Or reboot knoppix cd and pass
knoppix noswapto the kernel.