PDA

View Full Version : [newbie] resizing



james
05-12-2004, 01:35 AM
Hi,
I'm going to attempt to install knoppix on the hdd but i need to resize my partitions at the moment my hard drive looks like this in QTparted


01 /dev/hda1 ntfs Active 9.09GB <---- windowsXP
02 /dev/hda2 extended 28.17GB
03 /dev/hda5 ntfs 28.17GB <---- Programs
04 /dev/hda-1 free 7.84MB


so i tryed resizing hda5 to 20.17GB but when i booted back into windowsXP it was still 28GB so i need to know how i resize it in Knoppix, Wat is the best way to have the hdd set up for knoppix and i still wanna keep windowsXP

mzilikazi
05-12-2004, 05:23 AM
That has to be one of the strangest partition layouts I've ever seen. In fact, if you could explain to me how it got that way I'd love to know. :) Perhaps you had other extended partitions that were deleted?

NOW you do realize that NTFS has a nasty habit of just leaving bits and bytes lying about wherever it wants right? (hmmm sounds alot like M$- I wonder why??)

SO you need to defrag the disc before resizing it. NO not just once or even twice but over and over again until it shows absolutely no change in file placement on the disc. (yes NTFS really is that bad of a file system and no there is no such thing as defrag in LInux but I digress...).
Even if M$ says the disc doesn't need to be defragged do it again!
REMEMBER: Never trust Microsoft!

anyway.....

Then you might be able to resize your partition(s). Again, I would prefer my partitions to be logical in numerical order but that's just me. :)

Personally (and realize I have never used XP but for 2 or 3 minutes at a time on a handful of occasions) I would copy your programs somewhere else and delete all of your partitions save /dev/hda1.

Please also stop rebooting no matter what you decide to do. Just have a look at your partition table w/ a very simple application called cfdisk. NO it isn't pretty and has nothing you can click but we don't care about that do we? We want functionality!!!

Open a terminal and start typing.....

sudo cfdisk /dev/hda

PLEASE post back if you have any questions at all OR you can also find FREE REALTIME help and alot of good people in #knoppix and/or #kanotix

james
05-12-2004, 07:10 AM
lol, sorry I wouldn't have a clue how it got that way someone set it up for me and i reformated it when I reinstalled windows so it was probably somthing I did wrong. Anyway if I delete all the partitions how should I set them back up and wat program should I use to do it.

mzilikazi
05-12-2004, 01:50 PM
Well unless my math skills have taken leave it looks like you have a 40G drive so with that in mind perhaps something like....
10G Windows
10G FAT partition (can be used by both win & *nix for storage or...?)
7G Linux for /
5G Linux for /home
It is advisable to have 1G of system RAM and swap combined.

You can distribute the rest of the drive however you see fit or even just leave it alone for future use.

1) Install Windows just using only 10G for the install and it may be advisable to make the FAT partition under win too (although I think it won't really matter)

2) Install Linux and make your Linux partitions w/ a Linux utility like QTparted or cfdisk. Some people are scared off by the non-gui nature of cfdisk but I assure you it is extremely easy to use.

3) I don't believe the Knoppix installer is yet capable of putting /home on its own partition but this only requires a simple ediit of the configuration file .knofig.

Why do you want /home on its own partition? Well in the event that you need to reinstall Linux you can easily get it back to the state it was in before reinstallation. You won't have to retweak your desktop for example. It's quite handy. :)

Realize that when you install Linux it will rewrite your MBR and install a Linux boot loader that will allow you to easily select between win or *nix. It IS possible too use ntldr but I'm not familiar w/ the process. You can find docs here on the site.

HTH

james
05-14-2004, 12:56 AM
one more thing.
if my windows partition is ntfs and i install my programs on the shared fat partition will they work

user unknown
05-14-2004, 01:00 AM
are these 'my programs' windows programs?
They should work.

Linux-programs shouldn't be started from a fat-partition, since it doesn's support the user/group/other difference, and flags for executable-files.

mzilikazi
05-14-2004, 02:43 AM
one more thing.
if my windows partition is ntfs and i install my programs on the shared fat partition will they work

Actually I was just referring to a fat partition as a place to store mp3's or divx or html docs or whatever you might want to share between os's.
I have no idea about launching winapps from a fat partition.

james
05-14-2004, 03:27 AM
ok im pretty much set but wat do i edit in the knofig file to make it put /home on a different partition :)

mzilikazi
05-14-2004, 10:12 AM
ok im pretty much set but wat do i edit in the knofig file to make it put /home on a different partition :)

Piece of cake although I would like to point out that the name of the file is .knofig (not knofig). BIG huge difference there. :)


sudo knoppiix-installer

Configure an installation, when you finish w/ configure select Quit. Say YES to "save config?"

sudo xedit /ramdisk/home/knoppix/.knofig

*NOTE* The location of .knofig will vary depending on where kanotix-installer was launched from. If you can't find it simply do:


sudo updatedb
locate .knofig

Edit the line that reads HD_MAP=""
For example:

HD_MAP="/dev/hda2:/home"

Save and restart the installer. You do not need to "load config file"- it will automatically use /ramdisk/home/knoppix/.knofig

Once you've fired up the installer open another term and do:

mount
You should see your partitions mounted on their respective directories for example:

/dev/hda1 on /mnt/hdinstall type ext3 (rw)
/dev/hda2 on /mnt/hdinstall/home type ext3 (rw)

This is opitonal BUT I would recommend using GRUB as your boot loader. lilo is FINE but grub is IMHO better so while you're editing .knofig anyway, why not simply switch 'lilo' to 'grub'

Be sure to install lilo or grub to mbr if you want a menu from which to select your os. IF for some reason the installatiojn fails and/or you're somehow left w/ an unbootable system fret not. The boot loader is easily reinstalled from cd. Boot Knoppix and join IRC for good, free and (usually) quick help. Surely there is at least one post here on how to do that as well.