LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need to merge partitions (https://www.linuxquestions.org/questions/linux-newbie-8/need-to-merge-partitions-827337/)

mruschmann 08-19-2010 07:52 PM

Need to merge partitions
 
I have many partitions on my harddrive:

/dev/sda1 * 1 14779 118707168 7 HPFS/NTFS
/dev/sda2 14780 30401 125483715 5 Extended
/dev/sda5 14780 14846 538146 82 Linux swap / Solaris
/dev/sda6 14847 15812 7759363+ 83 Linux
/dev/sda7 15813 30075 114567516 83 Linux
/dev/sda8 30076 30401 2618563+ 83 Linux


Its a little messy i did a bunch of stuff .... i need to merge sda7 and sda 8 together ... sda7 is my /home and 8 is just free. i have looked around online and they all seem flaky or i dont get them.

plz help

Meson 08-19-2010 08:10 PM

Considering the last partition is empty, you can just delete it and resize 7 to the end of the disk with cfdisk, then use resize2fs, which will automatically take up all of the free space.

Alternatively you can just use gparted which I think will do all of this for you with a gui.

This is actually a pretty simple operation. But I still recommend you backup your important info *just in case*

thorkelljarl 08-19-2010 08:29 PM

Just delete and expand...

GpartedLive or PartedMagic, both live-cd partitioning tools with a graphic presentation, would make the job easier.

http://partedmagic.com/download.html

Meson 08-19-2010 10:56 PM

What is the file system? Why bother going through the trouble of making a boot disk if his filesystem supports online resizing? My guess is we're talking about an ext3 or ext4 fs here, so he can just do it in place. Even if it's a different filesystem, being that sda7 is only /home, his system can run just fine without it.

mruschmann 08-20-2010 06:40 AM

oh my
 
i have been looking at the commands well i dont know why i didnt think of this earlier, but i am gonna just move all the files onto the windows partition, delete it all, and resize.

MUST OF FORGOT OF THAT CRUDDY WINDOWS SECTION

fbobraga 08-20-2010 07:00 AM

mruschmann, you don't have to download anything to use Gparted, if you already have the liveCD: just boot with that (the liveCD) and run Gparted from "System" > "Administration" menu (look https://help.ubuntu.com/community/Li...0your%20LiveCD)

... and there, just delete /dev/sda8 and expand/resize /dev/sda7 :D


All times are GMT -5. The time now is 06:53 AM.