LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to increase root's partition? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-increase-roots-partition-370796/)

snakeo2 10-07-2005 07:47 PM

how to increase root's partition?
 
i know this question has been asked before and i found some useful information regarding the subject in this website, however, i still dont understand and/or feel secure with some of the solutions i found. here is my problem, i have a 200GB drive. I gave XP 90GB, and installed FC3 on the free space. here is my partition table for FC3

Filesystem Size Used Avail Use% Mounted on
/dev/hdb5 9.7G 9.1G 33M 100% /
/dev/hdb2 190M 43M 138M 24% /boot
none 251M 0 251M 0% /dev/shm
/dev/hdb3 25G 8.3G 15G 37% /home

I donwloaded gparted but for some reason it wont compile. I downloaded parted, but not sure how to use it. I tried booting off with Mandrake 10.0 install cd, and use it to increase root's partition to no avail. I dont want to erase everything and re-install because i finally i have my box the way i like it. I was reading about DD and it sounds like it might be a solution but i dont feel confident enought to use it. I have about 55GB of empty space which i want to use to increase my existing root's partition. If anyone has a good suggestion to accomplish this task, i'll appreciated.

Tinkster 10-07-2005 11:08 PM

I suppose the easiest (and least dangerous) method would be
to just create a new partition of 55GB, format it with your
preferred Linux-filesystem. Mount it to a temporary spot,
and then copy everything from root (minus home, proc,
boot) over, edit fstab to point to the new partition and
reboot. If all is sweet you can then re-use the old root
partition for something else, if it's not boot of the rescue
CD and fix potential problems.


Cheers,
Tink

bigrigdriver 10-08-2005 12:23 AM

One important note about dd: don't, under any circumstace, interrupt dd! At leat, not unless you are masochistic You could easily render your systen non-bootable.

My preference for such actions as you propose to do: use Knoppix with Kdar (or tha command-line version Dar).

Parted (and I assume QTparted has the same limitation) can only restore a partition image made on one partition, to another partition OF THE SAME SIZE! Dar doesn't care about partition sizes, and as an added bonus, doesn't make a monolighic arehive such as tar (in dar, each file is archived individually). So, if one file it corrupt, you only loose one file (maybe, read the tutorial for more info on the skip-ahead feature).

So, if you don't have Dar yet, go to the Dar website and study the documentation. You can make seperate archives of each partition you have, including the dar-static version (so that you can copy it to disk and run it from there) and restore each partition from archive to new partition regardless of partition size (only exception: new partition must be large enough to hold the restored partition).

After you have resized your partitions to your liking (using whatever utility you choose), then boot from a rescue disk (such as Knoppix, which includes Kdar) and restore the backups, each to its own partition, mounting one at a time (and restoring) then unmounting that one and mounting another. Resizing the partitions in the interim will re-write the inode tables; restoring the bacups after resizing will restore a bootable system.

I've edited my copy of the Dar tutorial to include examples of commands whigh worked for me [making backups, restoring files/folders, etc] (after emails to the author, and incorporation of his comments). If you would like a copy, PM me, and I'll send you a copy.

snakeo2 10-09-2005 08:26 PM

Your suggestion sounds good Tinkster. what type of partition would I need to create? i know when doing a fresh install, you need to create /, /home,
/swat, /usr,etc., if i create a new partition on the unused space, can i create another /root partition? i thought the /boot partition was separate from /root's partition? are there any possible problems that may arise? thanks in advance

Tinkster 10-09-2005 08:49 PM

Sorry, there seems to be a bit of confusion in the
terminology...

The partition type will be 83 (Linux). What you are
talking about, however, are mount-points. And if you
want to increase / you'll want to point /etc/fstab at the
new / instead of the old.

If you post your /etc/fstab and the output of fdisk -l
we may be able to supply you help better targeted
at your actual set-up.


Cheers,
Tink

snakeo2 10-10-2005 11:18 AM

hey Thinkster, thanks for the reply, you are right i'm confused with regards to the partitions. now that i remember when i installed my distro i created mount points and not partitions, thanks for clarifying that for me. here is the output of fdisk -|

/sbin/fdisk -l

Disk /dev/hdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 12473 100189341 7 HPFS/NTFS
/dev/hdb2 12474 12498 200812+ 83 Linux
/dev/hdb3 12499 15685 25599577+ 83 Linux
/dev/hdb4 15686 17062 11060752+ 5 Extended
/dev/hdb5 15686 16960 10241406 83 Linux
/dev/hdb6 16961 17062 819283+ 82 Linux swap

here is my /etc/fstab

# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/home /home ext3 defaults 1 2
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=SWAP-hdb6 swap swap defaults 0 0
/dev/hda /media/cdrom auto pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
/dev/hdg /media/cdrecorder auto pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0

hope this can help, thanks in advance for the help


All times are GMT -5. The time now is 04:22 AM.