Click to See Complete Forum and Search --> : Root partition


rsauve
08-20-2001, 10:56 PM
Hello,

I have an old dual pentium 66 box running RedHat 7.0. The machine has two scsi 1Gb hard drives. I have paritioned the first drive with Fat32 (Win95 installation), Linux swap partition and the rest is ext2. The second drive is the ext2 root '/' partition.

I'm starting to run out of room of my root '/' partition. I want to install the kernel support software in order to rebuild my kernel in order to get both processors going but there is not enough room on '/'. RPM reports that the package requires 60Mb on root, I have around 32Mb left.

I still have 500Mb free on the first drive. My question is how do I expand the root partition to included that extra partition space on the first drive?

I have tried to partition and mount it as '/extra' but RPM wants to installed the kernel developement stuff on '/'.

Any suggestion?


Thank you.

[ 20 August 2001: Message edited by: rsauve ]

bdl
08-20-2001, 11:12 PM
Hmmm. Copying over a 'live' install or part of one to another partition can be very tricky. Ideally, the 500mb partition would be your '/' partition and the other hdd would be your '/usr' partition, the one that takes up the most space. At this point, you might try copying '/usr/local' over to the 500mb space, freeing up enough room to install a couple of packages (of course this works even better if it installs to '/usr/local'). At any rate, try this:

(at your own risk, I assume no resposibility if your system crashes, for data loss, yada yada yada)

prompt# mount -t ext2 /dev/hda3 /mnt
prompt# cd /usr/local
prompt# find . | cpio -pm /mnt
prompt# umount /mnt]
prompt# rm -rf /usr/local

Edit your /etc/fstab file so that your /dev/hda3 partition mounts as /usr/local like so:


/dev/hda3 /usr/local ext2 defaults 1 2

The above procedure is a bit risky, but it might do the trick. Once you reboot the new partition should mount with everything you originally had in its place, thereby freeing up some room on your '/' partition.

In the end, I feel confident that you're going to want to reinstall, with the following partition scheme:

/dev/hda1 - Windows
/dev/hda2 - SWAP
/dev/hda3 - '/'

/dev/hdb1 - '/usr'

That way the '/usr' partition gets a larger partition and you avoid those problems, for awhile anyway...

Bokkenka
08-21-2001, 05:35 PM
What if you make a directory on the empty drive, and link to it from the full drive?

Find out where the stuff wants to install to, such as "/usr/local". Mount the empty drive, such as "/mnt/extra". Create a directory, such as "/mnt/extra/usr/local" Copy anything in "/usr/local" to "/mnt/extra/usr/local". Change the name of "/usr/local" to /usr/local_old". Don't delete it yet, just in case. Now, create a link named "local" in "/usr" that points to "/mnt/extra/usr/local". As long as the empty drive is mounted when you go to install, it should pass right through the link to the empty drive.