PDA

View Full Version : HDD re-install w/ multipartition questions



Cuddles
11-20-2004, 04:45 PM
Ok, its getting close to when I am going to re-install my hard drive install Knoppix, and I have a few questions on "how" this process is going to be done... ( first time for me )

With the "last" hard drive install, I went with a "multi-partitioning" scheme... /hda device contains my Knoppix, which is broken down into the following;

/hda1 - boot, 50 MB
/hda3 - swap, 512 MB
/hda5 - root, 5 GB
/hda6 - /home, 35 GB

Now, the fun part... Getting a new install to "recognize" the "old install"...

My guess is, I need to get the installer setup to understand that the swap is at /hda3, no biggy, I want LILO to know that it should put the boot information into /hda1, the installer should replace what is found in /hda5, and I dont want the installer to mess with what I have in /hda6, but, use that for the /home... I also realize that after the install, I need to setup any users that I already have in the /home location, and ensure that the same UID's are being used in the new install... I, of course, will need to apt-get install all the programs that I had before this install, but the "users" configs for these programs should still be in there respective home locations, waiting for the programs to be installed...

Here is what I've come up with: Boot the new version CD to be installed. Mount my /hda5 partition ( root ) as read-write, and evaporate all files. Unmount /hda5, in preparation of the install. Start the hard drive installer. Check any configurations. Exit installer, and manually change the configuration file to include /hda1 as boot, /hda3 as swap, and /hda5 as root -=- NOW, the first of the questions, do I change the /home partition in the configuration here, at this time, or do I do it at a later time, say, after the install complete? I want to retain my /home intact...

Once all configuration changes have been made, re-start the installer, and verify settings, then fire off the install...

When completed, do I activate the /home then? I know I will need to add my users, not that big a deal, I only have one user, me, and that was setup as the "default" knoppix user, so the UID is the same number, but with my "name" not knoppix. I also need to add one more user, the next UID after the "knoppix" default UID.

Make sure the /home is working, and all users, before proceeding... Then, set up sources.list, setup fstab to include devices and configs I have currently, and lastly - get the "old" programs back - do a apt-get update, and go for the installs.........

This is going to be my first attempt at using this multipartition, and since, before that, the complete home had to be lost and recreated from scratch, this theory was intended to change that... Once I do this, at least once, it will be either noted what needs to be done, or commited to memory, for the next time.

So, thanks to any assistance, ( the install is not planned for at least a month, but, I like to have as much information as I can, beforehand, so "surprises" can be at a minimum :) )

CrashedAgain
11-20-2004, 08:54 PM
/hda1 - boot, 50 MB
/hda3 - swap, 512 MB
/hda5 - root, 5 GB
/hda6 - /home, 35 GB



Something I never have understood, why separate partitions for boot & root? Why not just a 'normal' install on hda1 or 5 with swap & home as separate partitions.

I do something similar but dual boot:
hda1 windows
hda5 knoppix
hda6 swap
hda7 vfat data
In my case /home is not separate but contains almost nothing, primarily links to hda7. Last couple of reinstalls I have copied most of /home to hda7 then reinstalled then copied it back.

eco2geek
11-20-2004, 09:46 PM
Cuddles: The one thing I don't know is how Kanotix (is that what you're planning to use?) will deal with a separate /boot partition. But my guess is, probably like it deals with a separate /home partition. (Read on...)

When you install it, it will format / (root) automatically. In other words, everything on / will be wiped out, and / will be formatted in your choice of file system (ext3, ReiserFS, etc.), before the files are copied to it.

It should automatically detect and use your existing swap partition.

You already know how you start the installer, configure it, quit, save the configuration, then go to /root and edit the installer's configuration file, .knofig. That's where you tell it where /home is (correct value inserted from what you gave):


# Here you can give additional mappings. (Experimental) You need to have the partitions formatted
# yourself and give the correct mappings like: "/dev/hda4:/boot /dev/hda5:/var /dev/hda6:/tmp"
HD_MAP="/dev/hda6:/home"

(Don't forget the slash / in front of "/home"! You won't get an error message and it won't mount it correctly.)

Then rerun the installer and perform the installation.

/home is not formatted, and the data on /home is not touched (which is why having a separate /home partition is such a good idea -- all the configuration data you already have there is used).

I'd assume /boot would be treated the same way (in other words, untouched), except in this case you want the new files copied to /boot. So maybe you don't want to add /boot to .knofig when you install; maybe you want to manually copy everything from the /boot directory that Kanotix installs on / to your separate /boot partition after you install, then edit /etc/fstab manually.

shah
11-21-2004, 03:13 AM
Okay, let say we have all different partition for /boot, /swap,/root,/home;
but suddently one of the partition got corrupted and beyond repair unless you reinstall knoppix/kanotix.
Will this different partition make any good? Will my data in /home not be wipe out?
Or if I want to repair /root partition, could I just installed /root without touching other partition?

If the above not possible, I don't see why I need different partition.....I see that if single partition is corrupt everything in it can't be saved including my /home folder.....but by doing a backup, I can restore it (after reinstall)...so does different partition.

What about data keep growing from time to time......installing with different partition make it limited to the size given by you to that partition...unless you have the time resizing it every time you need more space.
Unlike single partition, everything can grow to the maximum size of your partition regardless which folder (/home,/root or boot).

Am I on the right track?

:D :D

eco2geek
11-21-2004, 11:27 AM
The main reason people use multiple partitions for Linux seems to be so that if one partition becomes corrupted or trashed, the data on the other partitions is still intact.

With Knoppix/Kanotix, there's an even better reason to use a separate /home partition. When the installer runs, it automatically reformats the partition you're installing it on. Meaning, if you didn't have a separate /home partition, everything would be wiped out.

Of course, you could put the data back if you had a backup, but having a separate /home partition is just easier.

35GB for /home and only 5GB for / ?! You're not planning on installing a lot of programs, are you, Cuddles?

shah
11-21-2004, 12:28 PM
Meaning, if you didn't have a separate /home partition, everything would be wiped out.

You mean reinstall wil not wipeout/format that /home partition?
Anybody has try this,reinstall with data in /home partition still intact?


:D :D

OErjan
11-21-2004, 01:17 PM
if /home is in a separate hddpartition.
then it will be there untouched if you do not tell the installaer to format... that partition, then you can reuse it as /home again.

Cuddles
11-21-2004, 03:40 PM
From what I learned, the reasoning for seperate partitions, is two fold; one, it makes for re-installing only one partition during a OS re-install, thus retaining other partitions, intact. Two, if one partition grows to excess, it doesn't take out anoither one, e.g. /home grows to exceed its "boundaries", it won't eat away from the / (root) partition... The big issue here is, the /boot partition was created because Knoppix uses LILO ( by default ), and can put its files on that "small" partition, saved for it, as the FIRST 50 MB of the physical disk, the problem is, as Eco2Geek says, yes, the re-install is going to be Kanotix, and Kanotix uses GRUB by default, hence, not even Knoppix really has any files on the boot partition, of the drive, it has its LILO files still saved in /boot, which is on the / (root) partition.

What I might want to do; go into cfdisk, disolve the 50 MB as /hda1, and put it into the /hda5, then take a few extra gigabyte from the /hda6, and place it also into /hda1 -=- what would be a good size for root in Kanotix BH9a ????? Now, I'm going to have to learn GRUB, and after I got so used to LILO... Oh well...

EDIT:
Oops, typo, What I meant to say was: take the 50 MB from /hda1 and put it into /hda5, and then take a few of the GB from /hda6 and put it into /hda5 -=- not /hda1, that would be gone. Sorry for the confussion, me bad.
END EDIT

shah
11-21-2004, 05:02 PM
Thanks guys/gals.

Don't you think it be nice for knoppix/kanotix include option to do multiple partition installation in knoppix/kanotix-installer? I mean not manually edit .knofig.

:D

Cuddles
11-21-2004, 05:39 PM
Thanks guys/gals.

Don't you think it be nice for knoppix/kanotix include option to do multiple partition installation in knoppix/kanotix-installer? I mean not manually edit .knofig.

:D
That would make sense, to people who intend on doing a multi-partition install, but...

It might make the install, for those who just do a single partition, a lot more confussing...
It might be more complicated to actually code this; you would need to consider "all" the partitions that could be made as an option, then back that up with possible formats, and finally, code it so it will detect them and check for them properly -=-

Having the edit manually thing, leaves the installer "clean and easy" for the single partition, and if you want to break out partitions, you are left to doing it yourself, and make it the way you want. Heck, considering all the "possibilities" of having a partition broken up during an install; /etc, root, /home, /tmp, etc... it might get extremely complicated doing it through a GUI, lots of check boxes, radio buttons, text boxes, and then, having to devise a way to "assume" that if this "option" for a seperate partition isnt used, that that partition should be "included" into "what" partition, if any, that might have been choosen, kind of stuff.

Right now, for most of those just starting out, having the "extra" partition for a swap, is confussing, and the posts in this forum can prove it. You go adding a ton of more options to them, like a seperate /home, and a seperate boot, /etc, /tmp, and they are just going to go nuts...

Right now, most are familiar with the installer, and requiring the swap partition, and most just use a standard singe partition for everything - its easier for them, if you want to break down into seperates, then, you can get lots of information on how to do it, during, and even after, you are installing. I think the idea was to make the installer less complicated as possible, but, having the edit ability, leaves it open to make it as complicated as you want... I think this was the intention. [ :?: ]

firebyrd10
11-21-2004, 07:57 PM
Wow, this is one complicated topic.
Seeing as I can't tell if it was fixed or not,

Make knoppix install to your root partition, then delete the /home on the root partition and change the fstab to point to the partition with your home on it. I think you can do the same with /boot

shah
11-22-2004, 03:53 AM
If I'm not mistaken, I've seen multiple partition installation option in Mepis.
We don't need complicated multipartion installer.........just the standard one that used by other Distro: /boot; /swap; /root; /home; /var
Put this option in Advanced user so that newbie won't confused.

:D :D

CrashedAgain
11-22-2004, 06:24 AM
From what I learned, the reasoning for seperate partitions, is two fold; one, it makes for re-installing only one partition during a OS re-install, thus retaining other partitions, intact. Two, if one partition grows to excess, it doesn't take out anoither one, e.g. /home grows to exceed its "boundaries", it won't eat away from the / (root) partition... The big issue here is, the /boot partition was created because Knoppix uses LILO ( by default ), and can put its files on that "small" partition, saved for it, as the FIRST 50 MB of the physical disk, the problem is, as Eco2Geek says, yes, the re-install is going to be Kanotix, and Kanotix uses GRUB by default, hence, not even Knoppix really has any files on the boot partition, of the drive, it has its LILO files still saved in /boot, which is on the / (root) partition.

What I might want to do; go into cfdisk, disolve the 50 MB as /hda1, and put it into the /hda5, then take a few extra gigabyte from the /hda6, and place it also into /hda1 -=- what would be a good size for root in Kanotix BH9a ????? Now, I'm going to have to learn GRUB, and after I got so used to LILO... Oh well...

EDIT:
Oops, typo, What I meant to say was: take the 50 MB from /hda1 and put it into /hda5, and then take a few of the GB from /hda6 and put it into /hda5 -=- not /hda1, that would be gone. Sorry for the confussion, me bad.
END EDIT

I'm still confused what sizes that would give in the end. IMHO 5 G is lots for a Linux O/S provided you don't put data on the same partition .
Data should/must go on a a separate partition so it is safe from O/S upsets. You can call it /home and set it up so that your system recognizes it as /home or just call it data & connect to it fro your /home/user via sysmlinks....ie my folder 'pictures' in /home/user is actually a symlink to the folder 'MyPersonalPics' (you don't have to use the same name) on hda6 (Data). This is actually a very flexible setup and I am not limited in any way by drive size. If hda6 is getting to full I can stick some data on hda1 & create another symlink, /home/user will now have a 'pictures2' link which is actually on hda1.

Whether or not it is /home or data, it is not going to get formatted if you reinstall. The installer knows nothing of links and/or /home connections in the existing O/S, it just formats the one and only partition it is told to be the target for the install, in this case hda5.

Cuddles
11-22-2004, 03:32 PM
I think you got it CrashedAgain,

My /hda6, which is affectionately called /home, has my "user" accounts under it, but, also, what I set up, a /gblusr, for GLoBalUSeR. This folder has permissions for root and group fully, and other is set to none. The owner isnt important, but the group is set to "users", which has all the user names set in the group file. I set this folder up as a "common" repository, as you called it, for "data". Nice thing is, is that this /home/gblusr folder, if the partition that /home is using, gets to used up, then another device can be added, possibly another hard drive, and have it use a mount point of /home/gblusr -=- thus increasing the space that "everyone" can use, if the need arrises.

Currently, with Knoppix 3.4, this is what I got, and what is used, and available:

root@Morpheus:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda5 4.6G 3.0G 1.4G 68% / -=- (root)
/dev/hda6 33G 17G 15G 54% /home -=- (home)
/dev/hda1 38G 17G 20G 46% /mnt/hda1 -=- (boot)
/dev/hdc1 2.7G 2.5G 231M 92% /mnt/hdc1 -=- (Win98 Install for Wine)
/dev/hdc2 71G 22G 46G 32% /mnt/hdc2 -=- (Backup ext3 storage)
root@Morpheus:~#
I dont know why /hda1 is reporting the complete /hda device statistics, it should only be reporting 50 MB. The /hdc1 ( Win98 partition ) is quite large because I installed a game, 1.9 GB arcade game, on it, and havent removed it, yet. The Win98 partition usually only has around 1 GB used, and around 1.5 GB free space, nothing is loaded into Windows, its just a plain vanilla install.

My /hdc2 backup partition is where I place my backup images, off-loaded source, and my backups of my Knoppix system, when I am going to do a re-install - just in case. I will take "snap-shots" of the /etc, /sbin, /bin, etc... of the system before this, place them there, and when a re-install completes, locate, and replace back, any scripts that I created, to be used in the new install, like my "adjusttime" script, my "sysstat", ... KMail setups, XFree86, fstab, and sources.list.

As you said CrashedAgain, 5 GB should be enough, but, I dont think when I install something it isnt going into the / (root) partition, only "user" configurations are being saved into the "users" folders. Usually my root partition gets to around 58%, its higher right now because I did a apt-get update, and havent done a "clean" yet. Amazing what those downloaded repositories can add up to.

I guess I will go with Kanotix installing under what I already have set up, and if the need arrises, I can use qtparted to change partitions "live", cant I ???

Having this installed for the amount of time I have had it, and watching for any space usage fluctuations, they havent shot up drastically, and no partition has "bottomed out", yet.I might have a good break-down of partitions, for what I use the system for. I havent done any major sound editing yet, which would create large amounts of storage, but, then again, those files would be either created in the /gblusr folder, having the "lions share" of the disk space, or use my /hdc2 partition, which has a mojority of a 81 GB disk.

I think I have a good idea what I am going to do during this next install, and having already broken out my /home, it will make it a lot easier. I need to "learn up" on GRUB though, being from the Knoppix arena, LILO has been what I have used, all this time. But, from what little I have read about GRUB, it is easier to use than LILO. LILO, when changed, must be "refreshed" into the MBR or partition, and GRUB, once installed, does not require this, when making boot changes, from what I recall. GRUB places its "boot" into where it needs, and when it is called upon to do its magic, it looks for its files, itself. Am I right ???

I am waiting for the Kanotix CD to arrive, and am waiting to "acquire" a NIC, for this computer, before the install can begin... I think "I" am ready though :)

baldyeti
11-22-2004, 04:08 PM
Hi Cuddles,

I think you managed to send waves of excited anticipation through the whole forum !-) Kanotix is one fine distro - I am running mepis myself since over a year, upgraded with Kano's kernel and the occasional upgrade (KDE mostly) from the regular debian pools. Dist-upgrade from unstable is asking for trouble in my opinion.

Anyway I thought I'd suggest the following: why not shrink your big /home, say by 5 Gb, install kanotix to the resulting hda7, and dual-boot with your existing knoppix? This way you can gradually copy/adjust your new distro's settings by merely checking how you did things under knoppix. Just a thought, naturally. Have a lot of fun with the install!

CrashedAgain
11-22-2004, 06:14 PM
I need to "learn up" on GRUB though......

Kanotix does have lilo if you prefer to stick with what you are used to. It's not available as an option through Kanotix's knoppix-installer but you can edit /root/.knofig to specify lilo instead of grub. Also, it seems to want to use reiserfs no matter what you specify using the installer but again you can correct this by editing .knofig if you prefer something else.