Quote:
Originally Posted by d00bid00b
Stephen
Thanks for your extensive, comprehensive and detail response. That was wonderful. I appreciate you having taken so much time and effort.
Your post did leave me with some questions though:
|
Your welcome.
Quote:
1. When you wrote as the drive is an IDE, the command would be cfdisk /dev/hd? the "?" being because part of my question referred to whether it makes any difference whether or not the drive is installed as a primary master (which I am taking to be hda) or a primary slave (which I think is hdb). Because the current HDD is hda, the new drive should be hdb, but (a) does this make any difference to performance and (b) if I configure the new drive as hdb now can this be changed to hda later or won't it matter one way or another. As you might tell, I am a little clueless about this stuff
|
It would not matter for what your doing the primary slave would show up as hdb for an IDE drive for SATA it does not matter there is no primary/slave drives they each get their own channel. To check for sure how the drive gets detected use the
fdisk -l or
dmesg |less it will show the drives in the system in the output. For the cfdisk command use the second (new) drive eg if it shows as hdc then
cfdisk /dev/hdc will open it for partitioning which should show you a drive of ~200gb with no partitions on it. You need to choose the New option when creating partitions (use the down/up arrow if the unpartitioned space is not selected, right/left to move among the options at bottom of screen then enter to select them) if you will have less than/= to 4 partitions on the drive then you can choose Primary for all the partitions created, choose the size by typing in the size you want it is in mb so if you wanted ~10gb type in 10000 then Enter and take the option to put it at the beginning it will then show the newly created partition to create another use the arrow to select the remaining unpartitioned space then the New again to create another. Now when you get to doing the Swap you need to highlight it again after creating then use the right/left arrows to get to the Type option then Enter key to select and type in
82 then Enter again it will then show up in the list as Linux Swap and for the partition that is / you should select it again then go to the Boot option and hit Enter key you will see an * appear in the column that says Boot this makes it bootable not really necessary for Linux but always good to do to stop the complaining that cfdisk will do without it.
Now when creating more than 4 partitions you need to make the 4th and all higher partitions are what is called Extended which is just a fancy term for a logical partition (a partition that is contained within another special partition) an example,
Code:
HappyTux:/home/stephen# fdisk -l
Disk /dev/sda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 122 979933+ 82 Linux swap / Solaris
/dev/sda2 * 123 1277 9277537+ 83 Linux
/dev/sda3 1278 2432 9277537+ 83 Linux
/dev/sda4 2433 24792 179606700 5 Extended
/dev/sda5 2433 24792 179606668+ 83 Linux
Here you see a drive with 3 primary partitions sda1 to 3 with the sda4 being the Extended partition container which has my sda5 partition taking up the entire Extended space I could have made the sda5 a Primary but I did it to match the partitions I have on another drive so when I am doing as you are going to they match and not have to mess around to much when copying. Now I could have made a sda6,7,8 ... in this extended partition if I had wanted but if the drive will have less than/= to 4 I make them all Primary most of the time it is easier to keep track of.
Quote:
2. You suggest using a Knoppix boot disk. Is this the same as a "live" CD or are you talking about a floppy disk with Knoppix on that? If I don't have a Knoppix boot disk, I presume this is something that I can download from either distrowatch or from Knoppix's home-page? What would I be looking for exactly?
|
Yes a Knoppix live CD you can get it from either place download then burn, there is usually an option in burning programs to make a bootable CD from ISO image you do not want to just burn the .iso file to the CD.
Quote:
3. Just to be sure I have this step correctly: when it comes to mounting both the drives, if the existing 40GB (sorry, in my original post I kept referring to it as a 20GB !!) if the original drive is /dev/hda and the new drive is /dev/hdb then I would type in:
Code:
mount /dev/hda /mnt/hda
mount /dev/hdb /mnt/hdb
And then copying data over would be:
Code:
cp -Rp /mnt/hda/* /mnt/hdb
|
It would be,
Code:
mount /dev/hda1 /mnt/hda1
mount /dev/hdb1 /mnt/hdb1
cp -Rp /mnt/hda1/* /mnt/hdb1/
Quote:
Would this copy the data over and locate it in the appropriate partitions so in effect it would be /dev/hda1 /dev/hdb1 (for the / partition) and hda2 hdb2 for the swap and hda3 hdb3 for the /home?
|
When copying you need to specify the partitions numbers as I show above there is no need to copy /swap there is nothing there until it is in use on a running system, you just use the
mkswap /dev/hdb2 to set it up as swap space and if you wanted too
swapon /dev/hdb2 then it would be mounted and available for use during the copying if needed.
Quote:
I will be loading Slackware as my primary distro, but want to load up a couple of other distros for the experience of playing around with other Linux flavours as well as would like FreeBSD loaded too. IIRC, Slackware uses LILO, but others might use GRUB. Any suggestions on reconciling that?
|
Well you are going to definitely need the extended partitions as I mention above then so make your 3 primary for your install now do the copying then later in the space you can leave unpartitioned or make the partitions if you know what sizes you want to make available as Extended space for these installs. Now with LILO being installed at least in Debian you used to get the option as to where to install the MBR, into the / of your install, install to floppy or not even install it could be the same with Slack. Your best option would probably be install to MBR for now then install Grub if possible it is much easier to deal with. With FreeBSD I am not sure how that would work I only installed a **BSD a couple of times on a spare machine I do seem to remember there being a limitation as to how far into the disk the partitions could be though eg above so many GB it would not boot IIRC.
Ok since you have LILO here are the extra steps to do once the copying is done. Once copied you need to remove old HD setup the new as Primary master then assuming you copied the new partitions to the same locations as the old there should be no need to edit anything you just boot again with the Knoppix CD and,
Code:
mount /dev/hda1 /mnt/hda1
chroot /mnt/hda1/ /sbin/lilo -v
This would mount the / then chroot into it and run LILO to set it up on the MBR, that is assuming that is how it is setup now which I would think it is. Now when installing other Distros that use Grub your probably best off letting one of them install it into the MBR then you will always be able to get to the Grub command shell which I mention in my first post as a recovery option. This will allow you to use the command line to be able to tell the system which install to boot into it would really be best though if you can have it installed in Slack though that way you only would need to edit the /boot/grub/menu.lst in its install to add entries for any other installs you wanted to boot. Hopefully your not totally confused at this point.