PDA

View Full Version : question, How do i install knoppix on my hardrive



DonVergonio
04-08-2004, 04:18 AM
i'm moving away from windows and want to start with using knoppix. you see, i only have 1 cd drive on my notebook and i want to have it available while using knoppix, so how do i install knoppix on my machine.

thanks.

lyran
04-08-2004, 05:01 AM
You go into root shell from the knoppix menu at the bottom of the desktop 2nd from the left and go to root shell.
When your in the root shell type the command
knx-hdinstall
and that sud be it ill leave the rest of the options to you.

DonVergonio
04-08-2004, 05:12 AM
lyran, i apreciate it man, thannnkss

DonVergonio
04-08-2004, 07:31 AM
hi it's me again. it went all perfect except for one thing. when i turn on my system i don't get that nice booting table where you choose whichever os you want to boot if you have more than one of course. so i have no way to boot to knoppix except again from the cd. i remember almost at the very end of the installation it asked something about creating a booting table and i answered no (don't created) thinking that the bios or windows would detect my new os from the start (now that i think about it i don't know what the hell was i thinking). so i think that's the mistake i made.

QUESTION 1>How do i get to that question again so that it creates a booting table? or how do i boot to knoppix because my machine is behaving as if there's only windows on it?

At some point in the installation it asked me for a swap partition so i had to make one, then it asked me for a different linux partition so i spent quite sometime why it was asking me for one then for the other one, so finaly i made 2 partitions one is a swap partition and the other linux partition.

QUESTION 2>Why did it asked me for two partitions? is knoppix really residing on those 2 partitions? can i delete one to use that space for other stuff?

At some point in the installation it asked me too for the type of filesystem and it gave me like 6 or 7 choices, i had no idea whic one to choose so i choose the first one.

QUESTION 3>which file system is better? what are the differeces, advantages/disadvantages of each of them.

i really really appreciate the help from you guys, you guys are great. thanks.

Neo-Rio
04-08-2004, 08:13 AM
You should get asked if you want to place a boot record on the MBR, which you absolutely MUST do if you want to dual boot.
The other option about placing it on the first boot sector is only for really old crusty machines with tiny hard drives... which don't concern most people.

Knoppix needs a minimum of two partitions.
A ' / ' root partition (where you save all your stuff)
And a Linux swap partition. It's best to make the swap partition about twice as big as the amount of RAM in your system. So if you have 512MB DDR in your box, make the swap 1GB big or something.

Filesystem.... hmmm, my version of knoppix doesn't ask me for filesystem type. As a default, I'd stick to ext3.

ext2 - ext2 can use quotas depending on users. Its mainly useful say if you were working as an ISP you had a mail server with mailboxes for different users. You can adjust how much disk space a user has on the system when they pay you more money ;) In practical home use it's bad because you have to do the linux equivalent of scandisk should you not shutdown properly.

ext3 - much like ext2, but without the quotas. Is a journaling filesystem. Don't need to fsck this one in case of a bad shutdown.

ReiserFS - Supposedly really cool. I don't know the details. Never used it.

Reiser4 - The Open Source equivalent of MS's forthcoming WinFS ;)

OErjan
04-08-2004, 09:35 AM
to begin with, it is possible to get NT4, win2000, XP to boot linux for you, it takes a whole lot of tinkering though, some knowlege may be requird, ask here if you feel uncertain. i will post a sketchy "howto" further down. just to se if it helps.
The lilo to bootable partition is NOT for old crappy hardware. it is necesary on some (older?) laptops, they use part of MBR for BIOS information, not a good thing to wipe. and there might be other things forcing it.
as to filesystem ext3 is good for most parts.

ok here comes the lilo on xp howto.

you could use the Win2000/NT/XP bootloader.
to do that I let the nt bootloader and lilo work together for me. works well.
quick sketch what i do, write LILO to a floppy, make a "image" of the floppy-mbr put that image in C:\ edit BOOT.INI mine looks like this.


[boot loader]
timeout=2
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S
[operating systems]
C:\linux.ipl="LINUX"
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect

a few more details.

1) make lilo write to floppy, have this line in lilo.conf:

boot=/dev/fd0

or give floppy as an argument to lilo

lilo -b /dev/fd0

2) make a image of the floppy-mbr: and put it in C:\

dd if=/dev/fd0 of=/mnt/C/linux.ipl bs=512 count=1

3) Modifiy c:\boot.ini -- add a line with:

C:\linux.ipl="Linux"

4) Edit the BOOT.INI (what i have written is examples not the gospel)
Microsoft ntldr now believes you have yet another windows installed. happy booting

repeat 1) and 2) every time you run LILO (that is make new kernel, install new version of os, install win (that will wipe mbr).
keep that floppy, it is easy to boot linuxfrom in a disaster (if the rest of linux is still there that is)

oh btw, i have several linuxes booting from that same lilo, that is when the lilo menu opens it has several linux entries in it.

lyran
04-08-2004, 05:11 PM
Does the command knx-hdinstall partion your HD aswell or do u need to do that seperate with other commands?
Im running Win Xp right now and im on a laptop.
And aslo if u dont get lilo or somethings rong with it can you change the bios at the start to boot another partion i think iv saw it before when changing my boot to CD.
Also how can i back up my xp i dont have a cd-r on my laptop and havnt got a floppy drive please help me out.
Also if your knx-hdinstall
doesnt run from your root shell just go into a normal console and type sudo knx-hdinstall
that sud be it.

DonVergonio
04-08-2004, 06:20 PM
hey guys, thank you sooo much. i will try that.

lyran, tha knx-hdinstall takes you through and checks your hd to see if there are any linux partition, if it doesn't find one, it brings up a partition tool and there you can do it.

i got into the bios but there was no useful options in regards to linux.
thnks, read you later.

lyran
04-08-2004, 06:44 PM
u sure it wont just overwrite my windows xp partion if it doesnt find any other partions?

OErjan
04-08-2004, 08:01 PM
not unless you tell it to.
OR something goes wrong with the partitioning, that is why a backup is recomended. if you lived near me you could have used one of my external cdburners, one is for pinterport (paralellport, can write in 2X MAX) and one for usb ( 24x). they both work under knoppix...
do you know anyone with similar gear? or perhaps a external hdd?

Durand Hicks
04-08-2004, 08:04 PM
Lyran,

Use qtparted to resize your windows partition (make it smaller so you can create a linux and swap partitions). If you also want, you can create a data partition for sharing data between winxp and linux, but it must be formatted as fat32. The linux and swap partition should be formatted as ext3 and swap, respectively. Basically, the steps I take is as follows:
1) Run knoppix from cd. Open console and type sudo qtparted. Press enter.
2) In qtparted, choose the hard drive (should be /dev/hda) and it will show your partitions in the right hand pane.
3) In the right hand pane, right-click the partition you want to resize and choose resize from the menu that pops up.
4) Tip: the linux partition should be > 3.5GB for breathing room for addtitional package installation, kernel sources, etc. The swap partition should be at least >= your installed memory, i.e. if your memory is 512 then swap should be 512, so the total size to reduce your windows partition is about 4GB minimum, but 4.5GB or higher is better. For this example, I'm going to use the following assumptions for a 20 GB drive:
/dev/hda1 = 14.5 GB ntfs windows xp
/dev/hda2 = 1GB vfat32 data transfer partition
/dev/hda3 = 4 GB ext3 main linux partition
/dev/hda4 = 512 MB swap swap partition.
Click apply to ok your choices and it will resize. Do not format at this time. Close qtparted.
5) Sudo qtparted again to see if it successfully resized your windows partition. If you see free space equal to what you have resized from the windows partition (5.5 GB), then you're ready for formatting. Right click the free space and resize it so you have your data and swap partition separate from the soon to be linux partition. Click apply or write to resize. Once done, then you can format only the linux partition and the swap partition, choose each one and format one at a time. Do NOT format the windows partition with the linux tools, ever. When in Rome do as the romans do, when in Egypt, do as the egyptians do, in other words, format linux with linux tools and format windows with windows tools.
6) When done formatting close qtparted, and while in the same console, type sudo knoppix-installer and choose option #1 to setup your choices. When finished, save the configuration and quit the installer.
7)Type ls -la to find the filename of the installer file and type mcedit installerfilename. Edit this file to your exact preferences. Here you can check to see if the swap partition is recognized or not, plus turn on/off services, accept or refuse creation of a boot floppy, among others. Save the file and exit mcedit.
8) Type sudo knoppix-installer and load your saved config file into the installer and then choose option #3, to format and install to your hard drive. It will let you confirm that your choices are exactly as you have preferred it to be and if it all checks out, click ok and let it do its thing. Grab a cup of coffee or can of beer and relax, in 20 minutes, linux will be installed complete with applications.
9) Regarding lilo, I don't have it installed to my mbr, I prefer to add it to nt's bootloader as the other posters have suggested. In other words from the installer file you should choose to have lilo installed to the root partition. This will allow you to create a lilo bootsector that you can copy to a floppy, but it's my understanding that you don't have one. In that case, you would be better served to have an additional partition of say 1 GB for data transfer storage. Copy lilo to that partition (if it was already partitioned using the windows cd), this means you'll have to boot the windows xp cd and format that partition and then boot the knoppix cd to complete the transfer of lilo to nt. (I'm going to assume this partition was formatted ahead of time before you ran knoppix-installer to k.i.s.s.) The commands from the console is:
1) mount -t vfat /dev/hda2 /mnt/hda2 -o rw
2) mount -t ext3 /dev/hda3 /mnt/hda3 -o rw
3) chroot /mnt/hda3
4) cd /etc
5) mcedit lilo.conf (edit your file so root=/dev/hda3 and boot=/dev/hda3 is there.
6) lilo
7) dd if=/dev/hda3 of=/mnt/hda2/bootsect.lin count=1 bs=512
8) exit
9) umount /mnt/hda2
10) umount /mnt/hda3
Exit the console and logout of knoppix cd and reboot to windows xp.
Once in windows, copy the bootsect.lin file to nt's partition, namely /dev/hda1 or c:\bootsect.lin.
Edit boot.ini and add the following lines:
c:\bootsect.lin="Linux" Save and close the file. Reboot and choose linux from nt's bootloader and enjoy linux. :)

HTH,

Durand

lyran
04-08-2004, 08:25 PM
Yeh when i got into qtpartion or what ever its called
on the right pane theres only 1 in the list my windows OS.
So how do i make a new partion so that theres 2 then i can install
linux on one of them and then do the rest swaping or watever?

lyran
04-08-2004, 08:33 PM
right wait..
So when i reduce the size how can i make it have an extra item on the the q parted thing.

DonVergonio
04-09-2004, 02:09 AM
OErjan how do i exactly do the first step:


1) make lilo write to floppy, have this line in lilo.conf:
Code:
boot=/dev/fd0


or give floppy as an argument to lilo
Code:
lilo -b /dev/fd0


is lilo a program or a file????? those lines of code do i type them in the root console or the regular one????? can you please expand on this first step, thanksssss :cry: 8) :lol:

DonVergonio
04-09-2004, 02:23 AM
lyran: if i was able to install it you can do it man. i don't know shit about linux. just run knx-hdinstall and it will take you step by step. when you get to the partition tool it will show you all the partitions you have. what really helped me was that i already had tree partitions on my hd before attempting to install knoppix, so i suggest you do the same thing, that way you wont have to rezise windows partitions (which i'm assuming is baddd just like someone pointed out before) when you get there. so anyway i saw 3 partitions and i was given several choices (delete, resize, create partitions etc.) BEFORE ATTEMPTING ANY OF THESE MOVES I MADE SURE A PARTITION OTHER THAN THE XP PARTITIONS WAS SELECTED, that way in case i screw up only a partition other than the windows was gone. so there is no way knoppix will overwrite your windows partition (unless you want otherwise). best of luck man!!!!!

Ripper
04-09-2004, 02:40 AM
Hi, as someone who is totally new to linux may I recommend an excellent article on DistroWatch.com? It's entitled "Knoppix - Instant Gratification" and is a combined review/walkthrough on using Knoppix for the first time. It has an excellent section on installing to the HDD and speaking as someone whose previous experience of linux was to install Mandrake or Suse and then feel confused and go back to XP I have to say the author has done a good job. I installed Knoppix to HDD yesterday with no problems at all and I think I am mesmerised and hooked! :shock:

Neo-Rio
04-09-2004, 03:11 AM
Just wanted to say that there is even a "knoppix-installer" program which does the HD install as well. I had to hunt around on the CD for it, but it does the HD install a little differently to "knx-hdinstall"

Durand Hicks
04-09-2004, 04:26 AM
Lyran,

Did you read the steps I wrote? You need to select the windows partition and reduce it by 5.5 GB as in the example I gave you earlier. That's the first step, and it will resize windows but will not damage it if you're careful. Note that when you boot back into windows afterwards, windows will do checking to make sure nothing is lost, which should not be too disconcerting. Once that's done, then windows will fully boot and function as normal even though the partition has been reduced. Just keep one thing in mind, when formatting partitions, use the windows cd to format the fat32 partition and use the linux cd to format the linux partition, as long as you follow these rules, you will be ok. Stray from the rules, and you can potentially kiss your data goodbye.


right wait..
So when i reduce the size how can i make it have an extra item on the q parted thing.
Simply right click the partition and choose resize. You will have to enter the numbers for the size of the partition you want, i.e. in a 20GB partition, you want to make it 14.5GB just type 14500000 or click on the percentage and reduce by 22% which works out to roughly equal to 4.5GB. Then you have to tell it to write to the partition table and it will resize. Pretty simple, actually, even if it's kinda scary. Then you right-click the free space and chop that into the data transfer, linux, and swap partitions respectively and then write that to the parition table. It should take you no more than 5 to 10 mins tops.

HTH,

Durand

DonVergonio
04-09-2004, 04:26 AM
ripper thanks a lot for that article, i just read it i'm feeling better now. btw i also have morphix and morphix do come with an easy installation button, i don't know why i choose to install knoppix instead. does any have any experience with morphix and knoppix???? what are the differences advantages/disvantages?????

according to the article i made only one mistake. that was to answer this question no. Do you want to install the boot loader (LILO) into the master boot record (MBR)?

now i'm being punished!!!! but you know what i'm gonna do this minute. i'm going to erase, wipe out, revert installation, exterminate, anhilate unix, linux, knoppix, gnome or whatever is that i installed and i'm going to install it again and this time i will answer that question <YES>.

I'll be back to let you know how i did.

lyran
04-10-2004, 12:56 PM
Yeh ok i got some free space and made a swap partition but when i try to reduce windows partition past 5.20gb it says "this partition is fragmented try to defrag it or resize to 5567." but b4 that i had defragged my windows and then after it said that i defraged my windows about 5 times with its built in defragger. Then after i defragged it yet again i went back to knoppix tryed to to resize it and still got the same error.

Durand Hicks
04-10-2004, 05:25 PM
That's something I remember encountering. Apparently, you'll need a heavy-duty defragger such as diskeeper (www.executivesoftware.com) or perfectdisk (www.raxco.com). Both do the job nicely as they can move metadata that the built-in defragger can't even though it's licensed from diskeeper. I think diskeeper does have a lite version on site that is free, it lacks certain high-end features but it will do the job. Download the trial versions if it is offered and use it to defrag your windows partition. You may have to run it more than once, I had to run it 3 times, IIRC, in this order, defrag, reboot to knoppix, resize, logout knoppix and reboot to windows, defrag again, reboot to knoppix, resize some more, logout and reboot to windows, defrag a final time, reboot to knoppix and do a final resize to the size I wanted. Then I formatted the linux partitions and then finally ran the installer which found the partitions I wanted to install linux to and I edited the config file to suit my tastes before committing the installation.

HTH,

Durand[/url]

yogb21
04-12-2004, 01:58 PM
Hey Buddy if U dont mind try this procedure
http://www.knoppix.net/forum/viewtopic.php?t=9647&highlight=

Heatman
04-13-2004, 04:16 PM
i understand how to install knoppix on the hdrive but i have an external hdrive how would could i install knoppix on that drive? plz let me know.