Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The root partition on my Linux install is filling up fast (I only gave it 3.78Gb on install - next time I'll do more!), but I have lots of room on other (unused) partitions. I wanted to somehow merge the space on another partition with my root partition, but without having to reformat my HDD and start again. I wondered if there was a way (using GParted, perhaps) I could manipulate the existing partitions by perhaps deleting an existing unused one and expanding my root partition to use that freed-up space.
If I knew a terminal command that would output for you the relevant information, I would use it, but since I don't, I uploaded a screenshot of GParted here: http://www.btinternet.com/~stevewy/GParted.jpg. In case this board deletes hyperlinks as Spam, a rough description is:
My root partition is on sda8 (ext3, size 3.78Gb, only 317Mb free).
sda8 is part of an "extended" sda4, which encompasses sda8, sda9 (linux-swap), sda6 (ext3, 8.59Gb, only 3% used), sda7 (439Mb) & sda5 (871Mb), both Linux-swap, possibly from earlier now-deleted distros.
sda3 is a nice unused 5.42Gb ext3 partition, sda2 is my /home, and sda1 is Windows XP.
Phew.
So basically I want to maybe delete sda7 and sda6 and merge the freed-space with sda8 (my root). Would that work?
Sorry to be so confusing, but any advice would be appreciated.
gparted is very good - you can do it all from there. Either just "grab" the side of a partition and drag it, or highlight and use the resize button. Then apply it.
Needs some thought to arrange things properly, but reasonably straight-forward.
Do yourself a favour and download the gparted liveCD and do it all from there - playing with mounted partitions (from your active system) is asking for trouble.
After-thought: you may have to fix your boot-loader after this if that gets moved in all the re-arrangements.
If the partitions are contiguous you may be able to grow a partition. With your seriously sub-divided sda4, I would consider:
1. backup your root partition by copying contents of sda8 to sda3 - if you boot using a live CD then you can simply use "cp -a" (archive) to copy all of sda8 to sda3 (well, after mounting those partitions somewhere)
2. delete all 'logical' partitions (from your description most are unused, 1 is your swap, and 1 is your current root partition)
3. create one large root partition and one swap partition
4. copy your root partition backup to the final root partition
5. edit the fstab file to reflect the new root and swap partitions
6. reinstall (or reconfigure) the bootloader
7. decide what to do with 'sda3'
Personally I find 10GB good for the root partition of most of my installs; some installs I do use as much as 20GB, none are set up for more than 40 (and the few that have a 40GB '/' barely use half that space). Of course the amount of space actually taken depends on your own habits.
Posting that link is fine---the other way to do it would be to post the output of fdisk -l (ell, not one).
I think you can do what you want with GParted (use it from a liveCD), but I would recommend starting over. One potential issue is that all the moving and resizing might mess up the bootloader configuration. Assuming you have GRUB, it gets "hard-coded" to point to the partition containing its files.
What I would do is:
Backup all important data
Delete everything except sda1 (Windows, I assume)
Resize sda1 (down)
Create a new swap (1GB minimum) at the end
Create a new Linux partition (~8-10GB)
Create a new partition for shared data (can be FAT32 or even ext3---if ext3, then use something like ext2fsd in Windows to access the data) Make this one a logical
Re-install on the new Linux partition (Use it as / and don't bother with a separate partition for /home)
Ideally, I would allocate space roughly as follows:
Windows 10-12 GB
Linux 8-10 GB
Shared data 20-30 GB (logical--inside an extended partition)
Keep the rest as spare (logical--inside an extended partition)
Distribution: Fedora 10[Cambridge] and Ubuntu 9.04[Jaunty]
Posts: 201
Rep:
Quote:
Originally Posted by Steve W
The root partition on my Linux install is filling up fast (I only gave it 3.78Gb on install - next time I'll do more!), but I have lots of room on other (unused) partitions. I wanted to somehow merge the space on another partition with my root partition, but without having to reformat my HDD and start again. I wondered if there was a way (using GParted, perhaps) I could manipulate the existing partitions by perhaps deleting an existing unused one and expanding my root partition to use that freed-up space.
If I knew a terminal command that would output for you the relevant information, I would use it, but since I don't, I uploaded a screenshot of GParted here: http://www.btinternet.com/~stevewy/GParted.jpg. In case this board deletes hyperlinks as Spam, a rough description is:
My root partition is on sda8 (ext3, size 3.78Gb, only 317Mb free).
sda8 is part of an "extended" sda4, which encompasses sda8, sda9 (linux-swap), sda6 (ext3, 8.59Gb, only 3% used), sda7 (439Mb) & sda5 (871Mb), both Linux-swap, possibly from earlier now-deleted distros.
sda3 is a nice unused 5.42Gb ext3 partition, sda2 is my /home, and sda1 is Windows XP.
Phew.
So basically I want to maybe delete sda7 and sda6 and merge the freed-space with sda8 (my root). Would that work?
Sorry to be so confusing, but any advice would be appreciated.
how far have you been? are you still facing problems? in my opinion the best option is to use Gparted as already mentioned. thanks.
Hmm. As this doesn't appear that straightforward, I might wait until I install Ubuntu 8.10 later on in the year. Especially since "starting from scratch" seems to be the preferred option. I'll use GParted on my Knoppix live DVD to remove all partitions except the Windows one and my /home, then install onto the newly merged "big" partition. In fact, Ubuntu is known for having a flexible installer, so it might help me out itself there.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.