PDA

View Full Version : Partitioning and cfdisk how-to and how to ungoof your MBR



rickenbacherus
06-26-2003, 06:51 PM
Of course we first need to get the standard disclaimer out of the way: If you through the use of this document bork your hardware, software, dog, girlfriends goldfish or otherwise don't come crying to me! As always- BACK UP YOUR DATA FIRST!! Especially if you're considering repartitioning your hard drive.

Also- this really belongs in the wiki but since I don't have time, patience or otherwise it would be fantastic if some kind soul could take the time to put it there.

On with the show...........

There is no great science to disc partitioning. A hard drive is actually two discs, one above the other with a gap of apporximately 1/4" seperating them. The 'heads' are little arms that move across all four disc surfaces from outer edge to inner edge and back. They write data to and read data from the disc in 'blocks'. Of course it's a little more complicated than that but that's enough for our intent. When you install windows it automatically makes a partition the size of the entire first hard drive and also formats the drive. Back when a big hard drive was less than 1 gigabyte that was ok- now they are comparatively huge and we can make much better use of disc space by partitioning.

When you partition the disc you are dividing it into sections. Remember how vinyl LP's look? Cmon' now I know I'm not the only one who remembers LP's! :D You could see where each song started and stopped. This is much the same as hard drive partitions except that we must use a graphical representation of the partitions since we cannot physically see the partitions. For all practical intents and purposes you may think of partitions as seperate discs in and of themselves. They will be used as such. There are any number of partitioning programs out there. They all do the same thing. Some are easier than others. I would recommend using qtparted as it is a very easy to understand proram that graphically represents how your disc is partitioned and it is included with Knoppix.

*NOTE*I have heard all sorts of stories about working w/ NTFS from Linux ranging from good to bad. Beware.

Open a root terminal and do this:

qtparted

OR- open any terminal and do this:

sudo qtparted

This should open up qtparted. Go ahead and have a look- you won't hurt anything (just don't 'write' anything). It should show you all of your hard drives and how they are partitioned.

*NOTE* There is still some question as to whether or not qtparted will work for resizing Reiser formatted partitions.

There are several ways that Linux refers to drives. Fortunately this is slowly changing to one standard format called the device file system but we aren't there yet. Your drives are usually referred to like this:

Primary Master- /dev/hda
Primary Slave- /dev/hdb
Secondary Master- /dev/hdc
Secondary Slave- /dev/hdd

Your first drive /dev/hda is usually a hard drive (except for diskless machines!). It is where the Master Boot Record is stored. The MBR contains quite a bit of info- specifically your bootloader which actually has two stages- primary and secondary. The primary bootloader does nothing more than start the secondary boot loader. The secondary boot loader boots the partition with your operating system on it. If you only have one bootable partition then that's fairly straightforward. However, if you wish to dual-boot then you will need a menu from which you can choose the partition you'd like to boot. While ntldr is capable of this it is not very user friendly to configure. LILO and GRUB (the most common Linux bootloaders) while functionally quite different from each other are both fairly easy to configure once you understand the basics-that is another how-to though.

Partitioning:

Each individual partition is numbered. First the disc name '/dev/hda' then the partition number '1,2,3' etc. This gives you /dev/hda1, (first hard drive first partition) /dev/hda2, etc. Another example: /dev/hdc5 (3rd drive 5th partition).

The first four partitions of each disc are usually Primary partitions. Partitions 5-? are usually logical partitions. You could for example create two primary partitions. The first partition ( /dev/hda1 for example) does not need to be very large. 50Mb should do it. It will be a primary partition. Partition number two /dev/hda2
can be any size you wish. Let's say we use the rest of the disc for this partition. We'll assume a total disc of 5000Mb (5Gigabytes) total space. /dev/hda2 will then be approx. 4950Mb (remember that the sizes won't be exact).

*NOTE* Hopefully this does not confuse matters for you. If you only have two partitions, both will be primary. If you then create logical drives or extended partitions inside of partition #2 that partition will then change from #2 to #4. Why? Because partition #4 is the one that is usually used for logical drives.

Logical Drives (extended partitions).

Inside of /dev/hda2 (our second partition on the first hard drive) we will now create two Logical Drives. They will begin with?..../dev/hda5, dev/hda6, etc. Why? See the above paragraphs. You can make them any size you want as long as they fit inside the primary partition. Lets make our first logical drive 3000Mb. This is where we will install the /root directory.

The second logical drive we will make 500Mb. This will be our swap partition.

The 3rd logical drive we will make 1500Mb. This one could be used for our /home partition (refer to the Knoppix docs for a how-to on moving your /home partition).

I personally prefer to use cfdisk to view, create and delete partitions. It is also used during the Knoppix install script so if you intend to install Knoppix it might be a good idea to familiarize yourself with cfdisk.

You may use the above examples and sizes for a Knoppix hd-install. They should work just fine.

Here is another example of a partitioned 20G drive:

#: cfdisk /dev/hda


cfdisk 2.11z

Disk Drive: /dev/hda
Size: 20490559488 bytes, 20.4 GB
Heads: 255 Sectors per Track: 63 Cylinders: 2491

Name Flags Part Type FS Type [Label] Size (MB


hda1 Boot Primary Linux ext2 65.81
hda5 Logical Linux ReiserFS 1003.49
hda6 Logical Linux swap 1497.01
hda7 Logical Linux ReiserFS 1998.75
hda8 Logical Linux ReiserFS 1998.75
hda9 Logical Linux ReiserFS 3002.23
hda10 Logical Linux ReiserFS 3002.23
hda11 Logical Linux ReiserFS 5872.85

[ Delete ] [ Help ] [Maximize] [ Print ]
[ Quit ] [ Type ] [ Units ] [ Write ]


Use the arrow keys to navigate through cfdisk. The options at the bottom are fairly self-explainatory but I'll give a brief description of each one:

[Bootable]- marks a partition as 'bootable'. Note that only the first partition needs to be labeled as bootable IF YOUR BIOS CANNOT BOOT FROM BEYOND THE 1024 CYLINDER LIMIT OR YOU ARE USING NTLDR.
[Delete]- just as it implies it will delete- without question any partition you choose.
[Help]- take a guess.
[Maximize]- An option to maximize the usage of the partition. You will likely never need to use this option.
[Print]Not literally "send to printer" but print to file OR- for those of you that are curious print to screen-you can even choose the format. The following is [Print] [Sectors] to screen.


Partition Table for /dev/hda

First Last
# Type Sector Sector Offset Length Filesystem Type (ID) Flags
-- ------- -------- --------- ------ --------- ---------------------- ---------
1 Primary 0 128519 63 128520 Linux (83) Boot (80)
2 Primary 128520 4128704 0 4000185 Linux (83) None (00)
4 Primary 4128705 40017914 0 35889210 Extended (05) None (00)
5 Logical 4128705 6088634 63 1959930 Linux (83) None (00)
6 Logical 6088635 9012464 63 2923830 Linux swap (82) None (00)
7 Logical 9012465 12916259 63 3903795 Linux (83) None (00)
8 Logical 12916260 16820054 63 3903795 Linux (83) None (00)
9 Logical 16820055 22683779 63 5863725 Linux (83) None (00)
10 Logical 22683780 28547504 63 5863725 Linux (83) None (00)
11 Logical 28547505 40017914 63 11470410 Linux (83) None (00)

[Quit]Just as it implies.
[Type]With this option you can MARK any partition as a certain format type. THIS DOES NOT FORMAT THE PARTITION!! That is a seperate process to be completed later AFTER writing your partition table AND confirming the re-read of your partition table which may involve a reboot.
Changes the format which your partitions are displayed. Your choices are Megabytes, Sectors or Cylinders. Stick with Megabytes unless you know what you are doing. It's much simpler.

*NOTE* A Megabyte is 1024 Kilobytes. Therefor, in the above example /dev/hda10 is 3000 Mb OR 3Gigabytes.
[Write]- Commits your new partition table to the hard drive.

*REMEMBER* [u]If you do not [Write] the partition table to disc nothing will be changed. When you do invoke the [Write] option cfdisk will tell you if it wrote successfully or not and if it succeeded in re-reading the partition table AFTER writing. If it fails to re-read the table you will need to reboot for the changes to take effect. If it successfully re-reads the partition table you should not need to reboot but if it makes you feel better by all means go ahead.

So what are you waiting for? Go ahead, start cfdisk, create and destroy partitions at will- JUST DON'T WRITE ANYTHING! and you'll be fine-just [Quit] cfdisk. Learn your way around the program, what it can and cannot do and how it does it. When you're happy with your partitions you've created then go a head and write the partition table to disc.

*REMEMBER* If cfdisk "failed re-reading partition table" then you MUST reboot before trying to format a partition!!

[b]"I goofed my MBR and now I can't boot windows!"

Two things that are reported to work:

1)Boot w/ win98 boot floppy, at the a: propmt enter:

fdisk /mbr

2)Boot w/ XP or WIN2k cd into recovery mode and run:

fixmbr

three eyes open
07-30-2003, 03:31 AM
Ok, just one very simple question: During the hd installation and you've finished writing the partition table, how do you exit fdisk and get on with the rest of the installation? Because the only way I could see was by exiting the konsole and that exited the installation. Why it worked the third time, I've no idea.

rickenbacherus
07-30-2003, 09:28 PM
On the hdd installs I've done you can just hit the 'Q'` key to quit cfdisk, or hit the [Quit] option, then it proceeds with the installation. You can also invoke a partitioing tool prior to installation, then run the installer and just quit out of the partitioning tool since you've already set up your partitions. It works the same either way.

gtgoku
08-07-2003, 01:02 PM
I have partionmagic 7, can i partion the hd in partionmagic as wanted for a knoppix installation and start the installation, will the installer auto-detect the partions.

Also on what type of partions can knoppix be installed on??

rickenbacherus
08-07-2003, 01:14 PM
Sure you can use partition magic but I wouldn't recommend it. It seems to have made a mess of alot of hard drives lately. The latest Knoppix cd's have a better program called qtparted that does a much better job.

The rule of thumb is: make dos partitions with dos applications and Linux partitions with Linux applications.

Linux can be installed on ext2, ext3, reiser or xfs file systems. My personal recommendations are either ext3 or reiser as they are journaled file systems. In the event that your machine is shut down improperly you have a greater chance of recovering data with a journaled file system. xfs is fine too but you really won't realize any performance gains unless you're building a cluster or somesuch.

jdong
08-27-2003, 08:20 PM
Two things that are reported to work:

1)Boot w/ win98 boot floppy, at the a: propmt enter:

fdisk /mbr

2)Boot w/ XP or WIN2k cd into recovery mode and run:

fixmbr

Yes, those will restore your original MBR... and sometimes the mapping from the MBR to the boot sector is messed up, too, so these two commands also help:


Addition to #1: sys C:

Addition to #2: fixboot

j.drake
09-08-2003, 05:24 PM
I just did a dual boot HD install on an XP machine with two HDs. As someone suggested in another thread, my goal was to keep the C: drive (NTFS) as-is, and partition the other (G: ) drive for the Linux installation. I really, really tried to leave the C: drive MBR alone, with the idea of booting LILO or GRUB off the G: drive (after changing the boot order in BIOS), but somehow the step-by-step of the installation program erroneously assumed without asking that I wanted to d*ck around with the booting on C: . During the installation process, I noticed a menu item that said boot to hda1, and I quick changed it to hdb1 before I exited the program, but it apparently had already messed up the MBR on C:.

As a result, on reboot, I got about five rows of "99999999999999999999" on my boot screen, along with a request to insert a boot disk. I restarted and selected the BIOS setup, and changed the HD boot order to boot off of G:, as I originally intended. So, now I'm in dual boot heaven, and all works well, but I'm afraid that if I ever remove the G: drive from my system, I'll be stuck with booting from floppy. So, to fix my C: drive MBR, since I'm still able to boot, it sounds like I need to do one of the following:

1. Type sys C: from a DOS prompt
2. Typex fixmbr at a DOS prompt
3. Type fdisk /mbr at a DOS prompt
4. Type fixboot at a DOS prompt

Any recommendations as to which would be best, in the case of my XP NTFS disk?

Tacvek
09-12-2003, 01:51 AM
So, to fix my C: drive MBR, since I'm still able to boot, it sounds like I need to do one of the following:

1. Type sys C: from a DOS prompt
2. Typex fixmbr at a DOS prompt
3. Type fdisk /mbr at a DOS prompt
4. Type fixboot at a DOS prompt

Any recommendations as to which would be best, in the case of my XP NTFS disk?

From what it sounds like to me you have 2 choices:
sys C:
fdisk /mbr from dos or

fixmbr
fixboot from xp's recovery console (this is not dos)

ha-junkmail
10-15-2003, 06:42 PM
If you have separate hard drives for Linux and Windows, you can fix the Windows MBR from within Linux.

First, read Little White Dog's excellent how-tos for making a dual-boot Linux system. http://www.littlewhitedog.com/reviews_other_00011.asp
http://www.littlewhitedog.com/reviews_other_00011b.asp

Then (heresy here) burn/buy/borrow the first disk of Mandrake Linux (9.x) and follow these instructions:

1. Boot from the Mandrake Linux installation CD.
2. When the installation screen comes up, press [F1] to get to the repair options screen.
3. Type "rescue" and press[Enter].
One of the options will be to restore your Windows MBR.
Choose it and follow instructions.
4. Exit and reboot.

satoshi
10-19-2003, 12:58 AM
I was wondering, how easy/hard is it to safely resize an NTFS partition? I have two harddrives in my mom's machine. The second one is from before the motherboard blew a capacitor, and the first one is a fresh install of XP Home (both drives were XP Home). I don't wanna wipe the second drive because there may still be stuff on there that we need. My mom said, however, that if we don't touch that other drive for a certain period of time (she never specified), it can be wiped. But I'm impatient :P. So, I was wondering if it's possible to safely resize the NTFS partition and make it about 4gb smaller. I know that Mandrake 9.2 can do this, but I don't wanna get Mandrake just to install Knoppix or DSL. Knoppix says there's about 15.8gb free, Windows (when I can get it to read the drive) says there's about 16gb free. So giving 4gb to Knoppix wouldn't be all that bad. If it's possible to do this without losing any data, that would be great. Thanks.

EDIT: Nevermind, my friend gave me a copy of Partition Magic 8 and it did the trick.

Facteur
11-17-2003, 03:59 PM
Hi,

Defragmenting is not mentioned here, and it is pretty important. Many of these tools won't work without defragmenting your Windows thoroughly.

I used ntfsresize and cfdisk to resize XP Pro on my 450MHzP3 with 6G HD, and create new partitions for Linux.

I didn't use qtparted because, I thought it was poor, although nice to look at.
Fdisk gave me wild info about my HD, saying that it already had four partitions (hda1p1, hda1p2, hda1p3 and hda1p4). Cfdisk appeared the most serious of the tools.

I followed all the available instructions and everything was went fairly smoothly, except when I tried to boot back in XPPro under the newly partitioned HD. The splash screen holds for about a second and then I get a blue screen of death with error type "unmountable_boot_volume". After that, I feared the worst. But I was able to see my original NTFS volume with Knoppix OK and even read some of the files.

I have W98 bootable diskette, and I managed to perform a "fdisk /mbr" as indicated above. I followed it with a SYS C: (again, as advised above) but DOS refused to recognise it. Could be a simple FAT-NTFS problem, I thought ... so I tried to log into XP again (under the various options allowed) and the same error always "unmountable_boot_volume".

In many ways, I wasn't surprised. Windows is a many headed monster which doesn't even know itself, so any changes, no matter how meticulously undertaken are sure to mess it up (after all, it is a mess already).

Can anybody offer any light on this situation? How can I get XP to mount its partition (c: drive) again? The overall head title for this thread really promises more than it gives: it's ungoofing advice seems really rushed. There have got to be more experience and more suggestions ... I can't be the only one for whom it didn't work first time ...

Irgu
11-22-2003, 04:30 PM
I used ntfsresize and cfdisk to resize XP Pro on my 450MHzP3 with 6G HD, and create new partitions for Linux.

I didn't use qtparted because, I thought it was poor, although nice to look at.
Fdisk gave me wild info about my HD, saying that it already had four partitions (hda1p1, hda1p2, hda1p3 and hda1p4). Cfdisk appeared the most serious of the tools.

I followed all the available instructions and everything was went fairly smoothly, except when I tried to boot back in XPPro under the newly partitioned HD. The splash screen holds for about a second and then I get a blue screen of death with error type "unmountable_boot_volume". After that, I feared the worst. But I was able to see my original NTFS volume with Knoppix OK and even read some of the files.

Unfortunately cfdisk is the worst choise. Apparently it rounds down to cylinder boundary opposed to fdisk and QTParted thus you made the end of your partition in the middle of your NTFS filesystem. You can confirm this if you run 'ntfsresize -fi partition', ntfsresize will complain (I managed to do this once before). I just recreated the partition to be bigger and everything worked fine.

Other possibilities are you did't set the partition type to 7 or missed the set the partition's bootable.

Also if your partition wasn't /dev/hda1 then it might be renumbered and NTLDR can't find the right partition because BOOT.INI has the old value. This is also fixable.

QTParted takes care about these annoying details thus why I prefer using it :)

dirty30ex
12-08-2003, 06:35 PM
i cant get to the recovery console (i have XP) to fisk the "mbr"... i cant even figure out how to get dos to boot up so i can attempt a fix... im tryin to get rid of lilo so i can just boot windows normally and use knoppix for my linux... the mandrake i had wasnt cuttin it so i deleted the partition... can i use knoppix to make the changes so lilo wont be in the way? thanks in advance..

Coolnat2004
12-11-2003, 03:50 AM
You'll need to boot from your windows XP installation disk, after it loads the drivers press R. You'll be asked to choose your windows installation and type in your admin password. That will take you to your recovery console/DOS prompt.

andymadigan
12-14-2003, 10:13 PM
Just a bit of clarification for restoring Windows 95/98/ME/2000/XP/2003

If you are using Windows 95/98/ME (or DOS):
1. Boot from the CD that came with Windows OR get a Windows 98 bootdisk www.bootdisk.com
2. Select "Start Computer with CD Support" (you can select anything except Starting Setup and this will work)
3. If you're not in the partition where Windows is installed navigate to it. Type C: will take to the C: drive, ect.
4. Type fdisk /mbr to fix the Master Boot Record. (NOTE: You will no longer be able to boot Linux).
5. This step shouldn't be neccessary, and you should only do it if your using a boot disk/cd from your version of Windows, but if you think you need to, navigate to your CD/floppy (type A: or D:) and type sys C: (or whatever drive Windows is on).

If you are using Windows 2000/XP/2003
1. Insert the CD that came with Windows. (If the CD won't boot, you can get a bootable floppy (which may or may not require the CD anyway) from www.bootdisk.com , or there should be an image on the CD itself)
2. When prompted whether to install Windows or Repair Windows, select repair. (R)
3. Select Repair Console (C).
4. If Windows is still readable by the CD, it will prompt you for a password (if you're not prompted, Windows may need to be reinstalled).
5. If you're not in the partition where Windows is installed navigate to it. Typing C: will take you to the C: drive, etc.
6. Type fixmbr (Note: you will no longer be able to run Linux).
7. Linux generally won't touch the Boot Sector (it only changes the MBR), but just to be on the safe side, you should type fixboot.

After the above steps, your system should run Windows. If you have any problems with these instructions, post a reply or email me at: geekandy(nospam)-news@yahoo.com (be sure to include the dash)

oldgeezer
01-05-2004, 10:18 AM
Sometimes it is difficult to thoroughly clean out the mbr area, especially on older h/ds and lower capacity discs given as gifts by folk condemned to following the bloatware rat-race! Sometimes, even filling all the entries with zeros or FF fails to clean out the boot area. Mark Minasi published a debug script back in 1999 (happy to forward a copy) which has proved 100% successful. Is there a similar Linux script? How to use it?
OG.

Cuddles
01-09-2004, 04:55 PM
OK, after reading this thread, and assuming that the information I was looking for would be in here, it is not... So...

I have installed Knoppix 3.3 on my 41gig HDD, I created a 39gig Linux partition for Linux as a ext3 format, and the remaining 2.0gig was partitioned as a Linux Swap... I know, I learned after getting Knoppix all the way installed and configured, that 2.0gig is WAY TOO much for a swap.

I want to decrease the Linux Swap down to the recommended 500meg, and then increase the MAIN BOOT Linux ext3 partition to take the available free space taken away from the Swap.

I am a little scared at the whole "live" partition changing thing, and, as anyone else would be, a little affraid of the issue of "mucking up" the whole drive and the OS. Knoppix is the ONLY OS on the complete system, so dual-boot issues are not important. My biggest concern is that I need to "shift" partitions, i.e. Swap, which is at the last partition, needs to decrease size at the end of the drive, and then the MAIN partition needs to increase before the Swap the availed 1.5gig free space.

Can this be done with QTParted, and safely, without having to do what I think I have to do, reinstall from scratch again, but this time set the partitions from the begining the "right" way this time.

Confused, and scared,
Cuddles

windos_no_thanks
01-09-2004, 08:22 PM
I know, I learned after getting Knoppix all the way installed and configured, that 2.0gig is WAY TOO much for a swap.

It is only too much if you need the space for something else.

rickenbacherus
01-17-2004, 06:09 AM
You need to convert ext3 partitions to ext2 then qtparted will work.

man tune2fs

It is relatively simple but I think it best if you read up a bit.

joe_bfstplk
02-06-2004, 11:45 PM
Hi all--
I'm a little bit of a noobie at this, although I've been working with RH off & on since 2002 (v 7.2, v 8.0, v9).

I've been less satisfied with RH with each newer incarnation (they seem to be migrating in a M$FT-like direction), and would like to replace the existing installation with a Knoppix HDD install, as the Knoppix CD boots my computer perfectly, finds all the hardware perfectly (including the USB HDD and memory stick I use), where RH does not.

Here's the scenario:

I have three HDDs:
one (27G, 7200RPM) for W2k (the first)

one for data storage (60G, 7200RPM) and swap files (four partitions--W2k swap, data 1, data 2, Linux swap),

one for Linux (10G, 5400RPM--the original HDD from the computer that preceded this one...) with '/boot' (generously allocated 100MB :wink:), '/', and '/home' partitions formatted ext3, and a 750k vfat partition specifically for compiling files while preparing CDs for burning

I'm hoping I can keep the Linux partitions as they are, empty them (I've backed up the /home to the W2k "G:" (data 2) partition), and install Knoppix in them.

I've read the how-tos and FAQs and none of them address this scenario specifically, i.e., loading into pre-existing dual-boot in place of a different Linux distribution. Most of the "I have windows and want to add Knoppix as my second OS" and "I have Knoppix and want to add windows as my second OS" scenarios are well documented, but none answer my big question, which is: Does the Knoppix install routine 'knx-hdinstall' offer GRUB as an option (the McNab article suggests using it, which I'm happy to do, as I'm used to it, but fails to mention if it's part of the normal knx-hdinstall setup or something I'd have to kludge on later), and will it freak out over the fact that the MBR on the first HDD (I installed Windows first and Linux second, so GRUB is on the first HDD) is already GRUB-ed and working quite well as dual-boot?

Has anyone else tried the same thing?

Thanks in advance for any ideas or advice you can give. I'm diving into this this w/e.... If it is successful, I'll post a description of the resulting process, in case anyone else is in a similar boat....


Thanks!

C ya,
Dutch

PS:to richenbacherus--
you play guitar? hang out at ampage.org or the yahoo strat, rigtips, or tubefex groups? your handle sounds familiar....

rickenbacherus
02-07-2004, 09:04 PM
Here's the scenario:

I have three HDDs:
one (27G, 7200RPM) for W2k (the first)

one for data storage (60G, 7200RPM) and swap files (four partitions--W2k swap, data 1, data 2, Linux swap),

1) Point the intaller to your exisitng Linux swap (it should find it on its own however).
2)If you want data1 & data2 partitions mounted automatically on boot simply edit /etc/fstab AFTER the install as there in no capacity for this as of yet.


one for Linux (10G, 5400RPM--the original HDD from the computer that preceded this one...) with '/boot' (generously allocated 100MB :wink:), '/', and '/home' partitions formatted ext3, and a 750k vfat partition specifically for compiling files while preparing CDs for burning
/boot is unnecessary but doesn't hurt anything. Just realize that if you want your kernel on its own partition you'll have to move it yourself. I would advise against it.


I'm hoping I can keep the Linux partitions as they are, empty them (I've backed up the /home to the W2k "G:" (data 2) partition), and install Knoppix in them.
Just reformat your existing partitions. For ext3:
mke2fs -j /dev/hdx?
What size are / and /home? That will be the determining factor. Realize however that the installer is incapable of installing to multiple partitions without a bit of editing on the part of the user. Fear not as it's quite simple to do:


Does the Knoppix install routine 'knx-hdinstall' offer GRUB as an option (the McNab article suggests using it, which I'm happy to do, as I'm used to it, but fails to mention if it's part of the normal knx-hdinstall setup or something I'd have to kludge on later), and will it freak out over the fact that the MBR on the first HDD (I installed Windows first and Linux second, so GRUB is on the first HDD) is already GRUB-ed and working quite well as dual-boot?
1)Simply intall lilo to /root and not mbr. Then just edit menu.lst so that it points to your kernel.
2)Don't use knx-hdinstall. Use knoppix-installer instead.
3)Better yet, get Kanotix (http://kanotix.mipooh.net/viewtopic.php?t=177) It is built w/ sid and makes for a great install cd. Knoppix is really more of a live cd. The installer was created at the request of the users AFAIK.

Boot Kanotix.Make your partitions. Format them as ext3 (or whatever you like). Currently the installer can only format /root. Start the installer:

1)sudo kanotix-installer
2)Configure
3)Quit.
4)Save config? YES
5)sudo xedit /root/.knofig
6)Edit HD_MAP=""
(example)
7) HD_MAP="/dev/hda3:/home /dev/hda6:/tmp /dev/hda7:/var /dev/hda14:/usr"
8)Save
9)sudo kanotix-installer
Review your configuration.
10) In another terminal: mount

You should see your partitions mounted on their respective mount points.
You do not have to move all directories listed in my example to other partitions. Selecting / and /home is suficient. Make sure that / is at least 2G. I'd recommend larger.

Perhaps moving this to its own thread would also get you more visibility.


PS:to richenbacherus--
you play guitar? hang out at ampage.org or the yahoo strat, rigtips, or tubefex groups? your handle sounds familiar....
Yes I play- quite poorly at that. :)

joe_bfstplk
02-07-2004, 11:16 PM
1) Point the intaller to your exisitng Linux swap (it should find it on its own however).
2)If you want data1 & data2 partitions mounted automatically on boot simply edit /etc/fstab AFTER the install as there in no capacity for this as of yet.

Thanks! This worked out pretty well, although the installer had to be told which physical drive to look on, it found the existing swap once I'd done so.


/boot is unnecessary but doesn't hurt anything. Just realize that if you want your kernel on its own partition you'll have to move it yourself. I would advise against it.


I ended up doing exactly as you advise--nixing the /boot. I didn't feel comfortable with moving the Kernel around and such. I stumbled across, er..., found (yeah, that's the ticket) a thread started by jdong also that provided a step-by-step for getting the bootloader set up, which was my main problem after installing. I could see and boot into Win2k, but not into Knoppix.


What size are / and /home? That will be the determining factor. Realize however that the installer is incapable of installing to multiple partitions without a bit of editing on the part of the user. Fear not as it's quite simple to do:
1)Simply intall lilo to /root and not mbr.

That's what I did the last time, after trying and failing with LILO in the MBR (it didn't even show up on the MBR--maybe it put it in the MBR of hd2?). Then I followed (sort-of) jdong's instructions about the boot.ini file in Win2k to get it to boot. My / is about 4.2G, and /CD_PREP is about 750M, leaving 5G for /home. I need to make an ext3 file system on the new /home partition, as I've not done that yet, but then I'll be transferring all the home directories to that partition and wiping out the standard knoppix user in favor of my own account....


Perhaps moving this to its own thread would also get you more visibility.

I think that's a good idea, as it may help someone else in a similar situation (already set up for dual-boot, switching from another distro, etc.). I'll try to get that going tomorrow, after I get done with setup here and installing my new DVD-R/RW drive.... javascript:emoticon(':D')


Yes I play- quite poorly at that. :)

Don't knock yourself, a lot of famous players aren't "all that" either. If you have fun doing it and small furry animals don't spontaneously die upon hearing you play, it's cool. Drop on over to ampage.org if you have any amp/gear related questions. It's a great resource. I hang out there a lot, as I like to build tube amps.... I also enjoy the irony of using advanced technological means (such as computer and internet) to communicate about vacuum tubes.... javascript:emoticon(':lol:')

Thanks again!

C ya,
Dutch

pvdvyve
03-26-2004, 08:32 AM
Hi, after HD install I also could not run win(winxp).
I had several partitions on hda:
1 ntfs for winxp bootable
1 reiserfs for linux
1 swap
1 fat32 for read/write from both os
I looked around when booted with a diskette into knoppix.
I found a command:
install-mbr
Read the help file(manual?) and tried it.
I took the option to boot from hda1 and hda2.
Rebooted straight into winxp.
I boot to linux with my diskette.
Maybe I better put lilo to do the first loading?
Have to work on that.
Greetings from Belgium.

adding notes:
dd.june2005: now I use GRUB, LILO or XOSL to do the booting.

Jack_
03-26-2004, 04:17 PM
Here's some of our notes from a knoppix hd install...

If you put LILO on your windows MBR and later want it off,
you can remove it by booting to your knoppix hd install, open a console then type
lilo -u
reboot and windows will boot as normal.

The boot floopy made by knoppix-installer will still boot linux.

----------
A good way to install knoppix is to put it on the 2nd HD, then install lilo to the partition. Then use mbrwiz a free windows tool, to set that partition active. Now you can use your bios to select the HD to boot from.

If you have the linux drive booting you will get the LILO menu and can boot linux or windows. If you set your bios to boot from the windows HD all will be normal, no LILO menu.

master_b
05-15-2004, 06:59 AM
If you just want to repair the mbr to boot windows, check your hard drive manufactureres website for disk utilities.

I use Seagate drives and have downloaded DiscWizard and Seatools, both as bootable floppy and as bootable cds (iso's provided) many times (for updates).

There is an option (in Seatools I think) to "fix" the mbr.

As for Linux, you should always make a boot floppy just in case Windows screws things up.

master_b

PythonyTJM
05-15-2004, 10:19 AM
On the qtparted command, it says "cannot connect to x server." Also, when using the knoppix-installer it says, when trying to partion the tables, that it cannot write them. I'm a newbie to linux, and would like to get it working. Please help.


-PythonyTJM

Discerner0
05-15-2004, 04:24 PM
On the qtparted command, it says "cannot connect to x server." Also, when using the knoppix-installer it says, when trying to partion the tables, that it cannot write them. I'm a newbie to linux, and would like to get it working. Please help.


-PythonyTJM

Welcome to Knoppix. We need more info re your system. Was it a working OS before you tried to run qtparted? I borked my dual-boot MBR once, tinkering around, and none of the Linux partitioning tools including qtparted would work, apparently because they are carefully designed to not make things worse. I finally solved the problem by running "fixmbr" from the Windows 2000 Pro installation disc (Windows' assertive tendencies can come in handy if you are prepared for the consequences.) The computer would only boot Windows after that, but at least I could use PartitionMagic and I suppose qtparted would have worked as well.

Firmicus
05-19-2004, 04:53 PM
Sure you can use partition magic but I wouldn't recommend it. It seems to have made a mess of alot of hard drives lately. The latest Knoppix cd's have a better program called qtparted that does a much better job.

Just a cautionary tale: I have had a very bad(*) :evil: experience using Partition Magic 8.0 before running knoppix-installer. So I also urge everyone not to use it if you want a dual-boot system. The NTFS partition table of my hda is all messed up now. And the MBR was completely screwed (the infamous L99 99 99... problem) after the knoppix installation, even though I had chosen to install it on the partition instead of the MBR (?!). [This is probably due to my stupidly opting for BootMagic as a dual-boot device :? so this should also be avoided]. Cleaning the MBR from the Win2K CD with fixmbr did not help, and now I can only boot into knoppix from the floppy. Windows 2000 is no longer accessible [:twisted:]. So be warned!

(*) I had a backup of everything, so the disaster was more virtual than real, especially since it occurred on a desktop I will have to abandon before moving back to Europe in a few months. But this mishap still cost me some trouble.

Firmicus
05-19-2004, 10:38 PM
On the qtparted command, it says "cannot connect to x server."

This is because you are not running it as "root". From the "System" menu of KDE, run GKSu (you can also type "gksuexec" in a console). You will be ask for the name of the application you want to run, so type "qtparted". Then you need to enter the root password. If you run Knoppix from the CD then you should first set a root password manually see the second question in this FAQ http://www.knoppix.net/docs/index.php/FaqUsing

Firmicus

A. Jorge Garcia
05-22-2004, 02:17 AM
OK, something went wrong with knoppix-installer for the first time ever (I must have used it hundreds of times by now). So, the PC won't boot-up into Linux on a dual boot. You know the point you're at after knoppix-installer ends and you reboot Linux to edit /etc/lilo.conf and fix the boot order.... Well I can't get there. So the stupid PC just reboots to Linux and Linux don't run. I can boot XP though. So how do I edit /etc/lilo.conf? I guess I don't!

The real question is, how do I fix the mbr back to the original state (booting XP and no dual boot)? I don't have a WIMPdoze CD. So, can this be done somehow from a KNOPPIX CD?

TIA,
AJG

Celebwath
05-23-2004, 07:24 PM
I have a slight problem: my girlfriends computer has been dual booting between Knoppix and WinXP. However some time ago the windows kernel died while patching the system. I can still get to all the files on hda1 (where the XP was installed) from linux, but it cannot be booted. I do not think that there is any way of repairing it, and that is where the problem comes: if I have understood it correctly, re-installing windows will rewrite the mbr and prevent booting into linux.

So the questions is there a way to install XP so that it will allow booting into Knoppix directly, or a way of "fixing" the mbr after the installation? There's quite a lot of data that should be saved and the easiest way would be to just transfer it to the linux partitions and re-transfer it after the installation (there are 2 fat32 partitions for linux-windows interaction on the hd), not to mention that there's quite enough to do configuring and patching the windows side of things.

Any advice?

A. Jorge Garcia
05-23-2004, 10:46 PM
Well, if you boot a KNOPPIX liveCD, you should be able to mount both partitions, right?

Regards,
AJG

Discerner0
05-24-2004, 12:12 AM
I have a slight problem: my girlfriends computer has been dual booting between Knoppix and WinXP. However some time ago the windows kernel died while patching the system. I can still get to all the files on hda1 (where the XP was installed) from linux, but it cannot be booted. I do not think that there is any way of repairing it, and that is where the problem comes: if I have understood it correctly, re-installing windows will rewrite the mbr and prevent booting into linux.

So the questions is there a way to install XP so that it will allow booting into Knoppix directly, or a way of "fixing" the mbr after the installation? There's quite a lot of data that should be saved and the easiest way would be to just transfer it to the linux partitions and re-transfer it after the installation (there are 2 fat32 partitions for linux-windows interaction on the hd), not to mention that there's quite enough to do configuring and patching the windows side of things.

Any advice?

I don't know about XP. I once accidentally managed to install Windows 2000 Pro - which I've heard is similar to XP - after I installed Linux. I had already created and formatted a NTFS partition in an attempt to install W2KPro, which wouldn't go. In the desperate attempt to get something to work, after I figured out the problem I happened to install (Mandrake) Linux, which left the NTFS partition blank. Then I stuck the Windows 2000 Pro installation CD in, and it installed Windows to the pre-formatted NTFS partition without messing up the MBR or LILO or Mandrake Linux. So I recommend that you stick the XP installation CD in and see what happens. That's my story and I'm sticking to it.

PythonyTJM
05-27-2004, 08:29 PM
The OS that is on the computer currently is windows 98.


-PythonyTJM

Discerner0
05-27-2004, 09:09 PM
As per Rickenbackerus' post at the start of this thread,

Boot w/ win98 boot floppy, at the a: propmt enter:

fdisk /mbr
You do have a Windows 98 boot floppy? If not, perhaps the *fdisk /mbr* command can be run from the Windows 98 CD, or a boot floppy created on another machine which is running 98.

Or get to work and convince your girlfriend that Linux is better than Windows anyway.

alucard
06-03-2004, 04:30 AM
Hi peeps,
im not sure whether i did it correctly and im a noob at this.

I have 3 hdisk in my com with the first installed with win xp pro.
2nd and 3th are mainly for storage but i have clean out the 3rd hdisk for linux.
I booted knoppix from the cd and "sudo knoppix-installer" from the terminal.
Qpart boot up and i formatted 5gig and 1 gig.With both as ext2.Im thinkin i did something wrong there.Anyway i continued with the installation and booted knoppix.Everything seems normal but soon i realised i cant configure my adsl/ppoe connection.I went to the info center or control center and found that kernel is not installed or something.Im new to linux and is willin to learn how.I read the FAQ from this site but cant find anything tat helps.
Thinking there shd be a noob article with step by step installation help. :)

Cuddles
06-21-2004, 05:17 PM
With the new v3.4 of Knoppix, I was seriously looking at changing my "one partition" hdd install, into a more, appropriate, multi-partition install....

Examining the "scheme" that Rickenbacherus has suggested, I come up with the following:

hda1 - primary, bootable, ext2 FS, and of 50 MB in size.
hda2 - primary, reiser FS, and of "remaining" device size - in the example, 20 gb, or 19.95 gb.

hda2 is then broken down into chunks like so...
***** logical, reiser FS, 3 gb - for use by /root
***** logical, swap, 500 mb - for use as swap
***** logical, reiser FS, 1.5 gb - for use as /home

First, assuming the example hard drive device was a 20 gb hard drive, where does the extra space go???? ( did I miss something somewhere? ) I only count a device usage of 5.05 gb...

Is the excess "free" space on the /hda2 device intended for adding more users? ( each of them getting the approximate 1.5 gb as well? )

Second, considering I have a 41 gb hard drive, in the "current" scheme:

/hda1 - 39.5 gb in ext3 FS - for Knoppix (everything)
/hda3 - 500 mb for swap.

Could I just break up my /hda1 into two primary partitions, one as /hda1, the other as /hda2, and then forgo the swap within my /hda2 as in the above suggestion? ( since I already have the swap on the /hda3 in my current scheme )

Third, concerning the sizes suggested:
*** 1 ) is 3 gb enough for the root user, or should I bump considering I have a 41 gb hard drive.
*** 2 ) is the 1.5 gb intended for "all" users, or do you break the users /home areas off from the /home to a seperate partition. Also, should I bump the size, as in the /root above, due to having a larger drive than in the example?
*** 3 ) should I use the ext3 or the reiser for my file system? I have a 41 gb device, broken down to 39.5 gb for Knoppix, and .5 gb for swap - in ext3 - and even though I know the ext3 partition is 39.5 gb, KDiskFree only reports 37.3 gb - is this a "overhead" for using ext3, or is it just normal to not get 3.2 gb from your device in Knoppix????

I want to be able to go to this multi-partition scheme with the new kernel 2.6 install, since I usually have to "gut" my system everytime I need to upgrade, and this multi-partition scheme seems to me, to keep the /home data from having to be re-created when you need to do a new hdd install...

Thanks for any, and all, advice on this,
Ms. Cuddles

alexidoia
10-11-2004, 06:17 PM
Okay, I have been spending my afternoon with cfdisk, I understand how it works, but one thing:
I have decided to have the following partitions on my system:
- a swap partition
- a partition for /
- a partition for /usr
- a partition for /usr/local
- a partition for /tmp
- a partition for /var
- a partition for /var/mail
- a partition for /home

that makes a total of 8 partitions, I understand that I can only do 4 partitions, but if one of those is logical I can then create other partitions inside that same one, so:

How can I do this ? I seem to be able to create 4 partitions but I can't do more than that even if one is logical, or cfdisk can't do this ?? Please explain me how I do my 8 partitions.

Alex

jjmac
10-12-2004, 12:18 AM
alexidoia,

I'd kill all that. Just make two primaries then
devote the rest to an "extended" sliced up
into logicals.

My own scheme is basically:

/dev/hdb1 ... 100MB boot partition
/dev/hdb2 ... 250MB swap
/dev/hdb3 ... extended

/dev/hd5 ... logical
.
.
.
etc

It dosen't really matter what tool your using,
cfdisk, fdisk etc. The main point being, to
get a logical you first need to make an
extended partition, in which the logicals wil
be defined.


Ms Cuddles

June is a while ago but, ...

>>
hda1 - primary, bootable, ext2 FS, and of 50 MB
in size.
hda2 - primary, reiser FS, and of "remaining"
device size - in the example, 20 gb, or 19.95 gb.

hda2 is then broken down into chunks like so...
***** logical, reiser FS, 3 gb - for use by /root
***** logical, swap, 500 mb - for use as swap
***** logical, reiser FS, 1.5 gb - for use as /home
>>


It's my own fault i suppose too, for trying
to read a page with a shocking hang over, but....

The second "primary" you have there... you
do mean it as an extended don't you ?.

How can you slice up a primary, unless it's
some sought of BSD partition type ?

As for the missing free space, i haven't read
"Rickenbacherus" input as yet (my head is killing
me), but i will. May be the answers there some
where, or, possibly it's to do with the "reiser" fs.

Iv'e been reading up a little on reiser4 lately,
it certainly seems like a completely different
approach to maintaining a file system than
that used by other formates.

jm

outanet
10-27-2004, 11:05 AM
well, just to add a bit after doing this sort of thing quite alot.

firstly, for ntfs users, until writing to ntfs from knoppix has been resolved, its often a good idea to have a spare fat partition so that files can be edited by both os's. Personaly, my win2k is on a fat partition not NTFS.

secondly, the swap partition is usually said to be 2 and a half times the amount of ram in the machine, ie 128 m of ram should use about 350m swap as a rule of thumb. the theory of more swap = faster machine is wrong, your hard drive is slower than your ram. 1G of swap will just churn like a washing machine. If you have 1G of ram, you probably dont need a swap and you are better off without.(for a desktop machine)
If space is at a premium, you can forgo a swap partition in favour of a swap file which does the same thing., you can then reduce the size of it as you squeeze everything in to your 900 meg drive! ;-)

thirdly, knoppix will automaticaly mount and use a swap partition on a drive, so if you are going to be editing partitions, ensure you specify noswap as a cheat code, and refuse the offer of a swap file, or qtparted will vomit. on low memory machines which complain at this, use twm as a desktop.

lastly, roughly every 10th attempt at using partition magic, i have encountered an error, conversly, as long as i have defragged first, i have never encountered an error using qtparted even ntfs, though i have found that it is not very good at logical volumes (makes numerous physical drives work like one large drive, 'man lvm') or extended partitions, but then it is rare that I come across a machine large enough to warrant them, and when i do, i prefer to use a raid array.
Dont fall in to the recent trend to use extended partitions on your 300G drive like directories, it will slow your machine down and makes the drive work harder, plus you will eventually try to resize them and lose everything. (an oppinion.)

even more lastly, usb dongles (thumb drives) are often made up of 4 extended partitions, this is because of the manufacture process, and should be exchanged for one complete partiton before using for home or config storage.

but then again, i could be talking rubbish. the wife often thinks so!

blaise
01-31-2005, 11:00 PM
Dear people,

I've been reeding al the posts above, but I might I overlooked the solution, but anyway, maybe someone can help me:

I did an KNOPPIX HD-INSTALL on HDC1, whith HDA1 still connected and with WinXP (FAT32).

Now, Linux works fine. Really great, but Windows won't boot. Ergo: blind panic. I've tried everyting from repairing, restoring and now re-installing but NOTHING works. I even re-partioned and reformated the whole HDA-disk, but still WInXP won't install. Is it possible I scr***d my whole HD? Should I buy a new HD?

Anyone ANYWHERE PLEASE???

Blaise

--------------------------MORE TECHNICAL DETAILS BELOW------------------------------------

(PS. HDA was configured this way: 40 GIG,
HDA1: FAT32, winXP OS
HDA2: LinuxSwap
HDA5: FAT32, just ordinary dat

HDC1: Exp3 with Linux from Knoppix
HDC2: LinuxSwap

Now, HDCx is still the same, but I'm trying to re-install Windows on a freshly partioned, freshly re-formatted:
HDA1: NTFS, 10 GB
HDA2: FAT32, 30 GB

The windows SYS files just won't copy to it from CD. In fact, no attampt at all has succeeded to boot anything from it. Not even a boot-flop with XP ?!?!? )

outanet
02-01-2005, 12:59 AM
dont quote me on this, but it could be that lilo didnt see your windows partiton bacause it was on another physical disk.
you could try installing knoppix on a 2.5 gig partiton on hda and a swap on hdc (diferent drives for swap are supposed to be faster)
lilo should then pick up your windows partiton and link to it.

worth a try dont you think, let us know.

A. Jorge Garcia
02-01-2005, 03:38 AM
Did you say you couldn't install WIMxp or couldn't boot WIMxP? Did you edit /etc/lilo.conf and then update lilo?

Regards,
AJG

blaise
02-01-2005, 09:18 AM
Thanks for your reaction. I realise I didn't pose my question clearly enough.Hmmm,...:

After I did an knoppix harddsik install on a second (seperate) HD the following happened:
-KNOPPIX (or Debian-Linux as it has become) works GREAT!!! :D
-WinXP on first HD won't boot anymore :?
-WinXP won't install at all anymore on the first HD, either :(

LinuxSwap was made on an extra partition on BOTH drives.

I assume something messed up something realy essential on my harddisk. CHDISK, FDISK, QTPART, FORMAT or FIXMBR can't cure anything.

kind regards,

Blaise

(btw: Lilo did seem to be able to see my windows partition [i could choose it from the list] but it couldn't boot it. It wend to some kind of DOS-mode (excusez le mot) and quitted )

raj1478
02-02-2005, 09:32 AM
Thanks for your reaction. I realise I didn't pose my question clearly enough.Hmmm,...:

After I did an knoppix harddsik install on a second (seperate) HD the following happened:
-KNOPPIX (or Debian-Linux as it has become) works GREAT!!! :D
-WinXP on first HD won't boot anymore :?
-WinXP won't install at all anymore on the first HD, either :(

LinuxSwap was made on an extra partition on BOTH drives.

I assume something messed up something realy essential on my harddisk. CHDISK, FDISK, QTPART, FORMAT or FIXMBR can't cure anything.

kind regards,

Blaise

(btw: Lilo did seem to be able to see my windows partition [i could choose it from the list] but it couldn't boot it. It wend to some kind of DOS-mode (excusez le mot) and quitted )
Hi,

Boot into hd install of KNOPPIX as "root" and give the command at the root shell "fdisk -l /dev/hda". In the list check system-id of WIN XP partition. If my experience is correct then it should be "Hidden FAT32 or Hidden vfat or something like this" (I don't remember the id). If it is so then run "fdiks /dev/hda" from the root shell, then choose the option to change the system-id of the partition, select the number of partition (in you case it is 1), then type l to get list of system-ids, type the id that corresponds to vfat or FAT32, then type "w" to write changes the reboot.

Try to boot WIN XP now or install it. It should work. If not, post the results.

Good Luck :)

francio
06-15-2005, 09:33 AM
I didn't read all 44 replies so I may be redundant but I'll throw in. I have partition progs out the yin-yan. But for safety I use the DOS prog MBRTOOL.EXE freebie on a simple DOS bootdisk to backup track 0 and the MBR to boot floppy. You may name the files as you wish to reflect your progress in your efforts. You can change default file name mbr_back.128 to, say, mbr_back.001 for the 1st BU and so on. Then when your flights of genius bite you in the butt, you won't bleed to death.

jjmac
06-20-2005, 01:21 PM
How do you use it ... like, copy it to a win start up disk then boot to the A:\ drive. ?

How do you point it at the boot sector to back it up. Does it copy the whole sector ?, including the table ?

Where do you get it ?


Simple tools for a simple process are always best. Small == less bugs !


:)

jm

babelbrennt
06-20-2005, 10:41 PM
When I partioned my drive using XP and knoppix I somehow managed to mess up my MBR/BIOS etc.. Three hard drives and two weeks later things up to press seem ok. I had tried to use FIXMBR or FIXBOOT and SYS C:, but they didn't work. I reset my BIOS by unclipping the CMOS_CLEAR jumper on my motherboard. This time I created the partitions in Windows Restore and Rescue console(accessed using the installation disk) by using the command DISKPART.I formated the windows partitions here and then ran CHKDSK through all the partitions.Then went to Knoppix and CFDISK + Q-parted to format the other drives. This time when I installed Knoppix everything worked fine whereas before XP and/or Knoppix didn't work. Baring in mind I don't really know what MBR and BIOS etc.really are and I am not really sure why this worked other than the CFDISK manual states that Windows file systems shouldn't really be partitioned with Linux file system tools and vice versa.

A. Jorge Garcia
07-03-2005, 05:28 PM
"I goofed my MBR and now I can't boot windows!"


OK, I have the opposite problem. I reinstalled WIMxP on a friend's PC that got borked by too much spyware.... I forgot that I had set that box up as a dual boot (hda1=WIMxP, hda2=knoppix-installer) and now the mbr was "fixed" so the lilo boot screen doesn't come up anymore. Is there an easy fix so I can dual boot this machine again without haveing to knoppix-installer everything again? I never had this problem, I'm sure there must be an easy way to restore lilo in the MBR I just never thought of this scenario....

TIA,
AJG

Markus
07-03-2005, 05:48 PM
Out of memory you do:
- boot knoppix cd and open console
- sudo su
- mount /mnt/hdXn
- chroot /mnt/hdXn
- lilo -v
- Ctrl-d

A. Jorge Garcia
07-03-2005, 08:21 PM
I figured I'd need a KNOPPIX CD and to chroot!

My problem now is that this is the PC with the burner I use (as I'm out of my office for summer break) to make KNOPPIX CDs and windows doesn't have burning software and I recently gave away all my CDs....

Thanx,
AJG

Markus
07-03-2005, 08:23 PM
Do you have an usb stick? http://featherlinux.berlios.de/download.htm

A. Jorge Garcia
07-03-2005, 11:30 PM
No, never got into USB sticks. I guess I should!

I have a couple of old KNOPPIX CDs. Can I boot from an old KNOPPIX CD, say 3.1 or 3.3 and then chroot to my hdinstalled 3.7? IE: is there a problem chrooting from a different Linux kernel?

TIA,
AJG

A. Jorge Garcia
07-04-2005, 03:42 AM
Success! Thank you all, we're back in business. BTW, the old 3.1 CD did the trick!

Just one correction:


mount /dev/hda1 /mnt/hda1

Oh, and I used the knoppix 2 cheatcode. I guess I could have not used any cheats and opened a root shell too.

Regards,
AJG

zillah
12-15-2005, 05:52 PM
Thanks for this details

simonivolda
03-03-2006, 05:29 PM
i only get the fatal error message.

The drive is working.
Why i get that?

coffee12
04-11-2006, 08:40 PM
Sure you can use partition magic but I wouldn't recommend it. It seems to have made a mess of alot of hard drives lately. The latest Knoppix cd's have a better program called qtparted that does a much better job.

The rule of thumb is: make dos partitions with dos applications and Linux partitions with Linux applications.

Linux can be installed on ext2, ext3, reiser or xfs file systems. My personal recommendations are either ext3 or reiser as they are journaled file systems. In the event that your machine is shut down improperly you have a greater chance of recovering data with a journaled file system. xfs is fine too but you really won't realize any performance gains unless you're building a cluster or somesuch.

For dual boot situation I let NTLDR do all the work.

Typical example:

/dev/hda1 = NTFS
/dev/hda2 = riserfs
/dev/hda3 = swap

Install linux on hda2 and install the the linux boot loader ON THE PARTITION OF /dev/hda2 {NOT ON THE MBR!}javascript:emoticon(':shock:')
Install Windows on the /dev/hda1. This will make Windows very happy.
Now I use a FREE Windows utility called bootpart from winimage.com to magically add my Knoppix partition to the NT/XP multiboot menu.

Bootpart notes:
Determine your partition numbers:
c:\> bootpart

Now to add knoppix to you NT/XP multiboot menu:
c:\> bootpart 1 bootsect.lnx Knoppix Linux
Replace the 1 with your linux partition

PostalDude
12-03-2006, 06:34 AM
I have been trying to get this right for some time now, but i cant seem to get the partitions right. Let me know if im doing it wrong.
(Note: im not doing a dual-boot; just Knoppix)



Disk Drive: /dev/hda1
Size: 20003880960 bytes, 20.0 GB

Name Flags Part Type FS Type [label] Size (MB)
hda1 Boot Primary Linux ext2 [asdf] 65.81
hda5 Logical Linux ext2 3142.06
hda6 Logical Linux swap / Solaris 526.42
hda7 Logical Linux ext2 16269.61


Any help greatly appreciated

IanGB
04-02-2007, 08:34 AM
While this all seems sraight forward from within the Linux bistro, after you have partitioned as one full HD the XP CD will not find the drive and just closes down on F3. With no floppy drive in a laptop it appears inpossible to replace the lost MBR.


Ian

isc
06-25-2008, 11:12 PM
Many times and way before Grub became more intelligent.

On Linux install let the OS make a Grub Boot disk.

Let it install Grub in MBR.

Boot into Linux.

Reboot computer onto a Win98 floppy disk or an USB stick equal if you have that option and type

type at DOS prompt
FDISK /MBR

that should remove Grub.

Then type FDISK
say Yes
then Pick 2 option
Set partition 1 or whatever is Winblows "ACTIVE"

remove floppy and reboot.

Insert Grub when you want to boot to Linux.

Jonah
05-20-2009, 02:54 PM
For restoring the MBR, from Linux, go to /boot/grub or /boot/lilo there will be a few files marked mbr.xxx the x being numerals

Then use the command "dd if=mbr.xxx of=/dev/hdx"

dd means overwrite with the input file, if=XXX the output file of=XXX

In this case it will overwrite the current mbr with the ones lilo or grub had stored before.

The "mbrXXX" file or files.

I did that with Win2000, installed it onto an empty DOS partition, with three separate distros of Linux already installed on the system.

DOS installers like to take over the whole thing and there's a way I can't remember that keeps it from re-writing your mbr every time.
For booting ntfs there's an add-in bootloader that you place in the already installed XP or (so I've heard) Vista called grldr.then edit the autoexec.bat file to include grldr

grldr then can invoke the ntldr files to boot windows or grub to boot Linux.

When you're installing Linux pass the option from the grub installer to install the grub files to the root partition of your Linux.

And write the grub files to an already existing grub menu.lst

Adriane (Knoppix 6.X Live CD) gives the option to not overwrite the entire menu.lst, just add the lines to boot Adriane at the end.

That way the mbr doesn't get re-written in the first place.

This works if you have your mega-huge-everything-included large kernel Linux like Fedora or a full install of SuSe and a smaller Debian/Ubuntu distro like DSL or Puppy for or Knoppix for quick booting... already installed

And with Winbloze already installed.

Jonah
05-20-2009, 03:07 PM
I figured I'd need a KNOPPIX CD and to chroot!

My problem now is that this is the PC with the burner I use (as I'm out of my office for summer break) to make KNOPPIX CDs and windows doesn't have burning software and I recently gave away all my CDs....

Thanx,
AJG

My first time using Linux I checked out a book (SuSe 5) from the library.

They're getting pretty good at ordering Linux books at the public Libraries now, the library purchasers check Amazon to find out what books are being ordered online.

For a while there you could scarce find a Linux book at the public library but now, they're everywhere.

And every Linux book has an install medium for Linux...

It would be pointless otherwise

I had gotten a "For Dummies" book just recently...

Knoppix 4.0 with the full-install DVD, bought it at a second-hand store.

For a dollar.

Whoever had donated the book never even opened the CD sleeve.

***see comment about "pointless otherwise"

You didn't say or at least I didn't see how you had resolved not having the CD burning software.

If you latch onto a Knoppix CD or a Puppy CD it will probably have k3b installed by default.