-   Linux - General (
-   -   Small HD to BIG HD (

TomaCzar 10-17-2004 06:46 AM

Small HD to BIG HD
Currently I have a 40GB HD partitioned as so:

HDA1(P) --> WindowsXP 15gb
HDA2(P) --> Slackware (/) 25gb

And what I wish to achieve with my new 60GB HD is the following:

HDA1(P) --> / 10gb
HDA2(P) --> /boot 1gb
HDA5(L) --> /home 20gb
HDA6(L) --> /tmp 4gb
HDA7(L) --> /usr 20gb
HDA8(L) --> /var 4gb
HDA4(P) --> swap 1gb

The numbers are out of order because I let M$ Partition Magic create my partions and when the smoke cleared, that's where everything was. Currently I have the 60GB hd installed in the system as HDC and am booting off of a boot disk so that neither drive is used to boot off of. I had thought that a 'cp -r' from a mount of the original Slackware partition to mounts of all the partitions on the second hd would get the job done however the '/dev' directory complains about excessive symbolic links. Is there a better way to achieve moving my information from the 40gb HD to the 60gb HD??

Secondary questions:

On the 60gb HDA1, 2, and 4 are Primary and all the rest are logical, does this make a difference??

Are the partitions located is the proper (most logical or practical) place and are they of the correct sizes??

I have 1gb of RAM and in my original setup I configured it with no swap. After about a 8months of running like this I've never noticed the deficiency however in an effort to do things "right" I've added a 1gb swap partition. Are there any applications in Linux that require a swap partition or any other reason why I should have one regardless the size of my installed RAM??

bigrigdriver 10-17-2004 04:40 PM

The order of the partitions doesn't much matter, so long as the bootloader can find the root of the filesystem, and the /boot directory.

To transfer the old Slack to the new disk, well, it's all in one partition in the old install, and split up in the new. You can use partimage to make an image of the old install, and write it back to / (hda1) on the new disk. Then, if I'm not seriously mistaken, you can manually move the /boot directory from / to the /boot partition (hda2), and do the same with the other folders that are going to their own partitions, leaving all the remainder in /.

As for the partition sizes you have, /boot doesn't need to be much over 10MB in size, because it's the least likely to change in size over time. /tmp and /var change minute by minute, but /tmp is cleared out, either at shutdown or bootup, and /var needs to be checked by root regularly to clear out log files, etc. So those two should be good.

/home and /usr will definitely grow over time as you install stuff or acquire stuff in /home. Bear in mind that / will slowly grow (/libs and modules that go with things installed in /usr or /opt).

/swap should be at least equal to the amount of ram you have. If you do graphics intensive stuff, you need that swap. The only change I'd make is to reduce /boot to 15MB, and increase / by the other 985MB.

caps_phisto 10-17-2004 05:02 PM

I would try the "rsync" command myself. It has many options. I use it for backups on my servers. It does have an "--exclude" option. So you might try:

rsync -r --exclude /dev  / /mnt/newpartition
Where "/mnt/newpartition" is where you wish to put your new Slackware partition.
The above command will copy everything from "/" on down (including disk structure) except for the /dev directory. You might even try:

rsync -r / /mnt/newpartition
as rsync may not complain at all about sym-links.

For more information on the rsync command consult its man page, this is an often over looked but impressive tool.
Doing it the second way may even make it so you do not have to install Slackware onto your new partition. Just make sure you have everything important backed up :)

Hope this helped you out.

All times are GMT -5. The time now is 01:56 PM.