LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-22-2015, 01:51 PM   #1
newbiesforever
Senior Member
 
Registered: Apr 2006
Location: Iowa
Distribution: Debian distro family
Posts: 2,384

Rep: Reputation: Disabled
moving and merging partitions


What software will move and merge disk partitions or unused sections? I moved all files on a partition to some other location, and don't need the now-empty partition anymore, so I want to delete the partition and consolidate it with the other unused space. I tried to do it in Gparted, but I guess it can't. I think I did it once with Partition Magic, but that was a long time ago and I have no idea if Partition Magic is around anymore.
 
Old 01-22-2015, 06:57 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,189

Rep: Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131
Quote:
I tried to do it in Gparted, but I guess it can't.
Guess again. gparted is the tool for this.
What did you try, and what didn't work.
 
1 members found this post helpful.
Old 01-22-2015, 08:02 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,672

Rep: Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526
Post your partition information, the output of fdisk -l run as root.
To merge unallocated space with a partition it needs to be contiguous.
If you delete a logical partition, any logical partition with a lower number will have its partition number changed which can cause problems.
You need to unmount a partition before you can act on it.
Posting more info as requested would be your first step to get help.
 
1 members found this post helpful.
Old 01-24-2015, 08:08 PM   #4
newbiesforever
Senior Member
 
Registered: Apr 2006
Location: Iowa
Distribution: Debian distro family
Posts: 2,384

Original Poster
Rep: Reputation: Disabled
Code:
Disk /dev/sda: 160 GB, 160039272960 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System 
/dev/sda2            6528        8486    15727635   83  Linux
Warning: Partition 2 does not end on cylinder boundary.
/dev/sda3            8486       11097    20972857   83  Linux
Warning: Partition 3 does not end on cylinder boundary.
/dev/sda4           11097       19458    67159732    5  Extended
Warning: Partition 4 does not end on cylinder boundary.
/dev/sda5           11097       11880     6289447   82  Linux swap
Warning: Partition 5 does not end on cylinder boundary.
/dev/sda6           11880       13838    15727635   83  Linux
Warning: Partition 6 does not end on cylinder boundary.
/dev/sda7           13838       16449    20972857   83  Linux
Warning: Partition 7 does not end on cylinder boundary.
/dev/sda8           16449       19458    24169792   83  Linux
Warning: Partition 8 does not end on cylinder boundary.

Disk /dev/sdb: 7 GB, 7755890688 bytes
32 heads, 63 sectors/track, 7514 cylinders
Units = cylinders of 2016 * 512 = 1032192 bytes

   Device Boot      Start         End      Blocks   Id  System 
/dev/sdb1   *           1        7514     7574080    b  FAT32
Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.
Error: /dev/sr0: unrecognised disk label
I don't need sda2 anymore, so I was going to delete it; then I was hoping to move it and the 50 MB unallocated space down to the bottom and merge them with the much smaller unallocated space.

Last edited by newbiesforever; 01-24-2015 at 08:54 PM.
 
Old 01-24-2015, 08:34 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,672

Rep: Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526
sda4 is an Exteneed partition and sda5 - sda8 are logical partitions within the Extended partition. sda3 is between sda2 and sda4 so you can't merge them sda2 into the Extended partition, sda4. The easiest thing to do is to just use sda2 as a data partition. Is your system partition sda3? If it is and you moved the Extended partition to the left you would potentially create all kinds of problems.

Last edited by yancek; 01-24-2015 at 08:35 PM.
 
1 members found this post helpful.
Old 01-24-2015, 08:56 PM   #6
newbiesforever
Senior Member
 
Registered: Apr 2006
Location: Iowa
Distribution: Debian distro family
Posts: 2,384

Original Poster
Rep: Reputation: Disabled
I keep my two Linux distros on sda6 and sda7 on the extended partition. Sda3 is my home partition. I keep rips of all my CDs on sda8. Well, I was afraid I couldn't move the empty space easily. That answers my question.
 
Old 01-24-2015, 09:51 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,189

Rep: Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131Reputation: 4131
Quote:
Originally Posted by yancek View Post
sda3 is between sda2 and sda4 so you can't merge them sda2 into the Extended partition, sda4. The easiest thing to do is to just use sda2 as a data partition. Is your system partition sda3? If it is and you moved the Extended partition to the left you would potentially create all kinds of problems.
I have to disagree - all Linux partitions can be moved safely/easily with gparted.
Delete sda2, move sda3 left, enlarge sda4, then shuffle the logicals as needed. I have done this several times - can be time consuming, but is safe. It is possible fstab and (especially) the bootloader may need some attention, but certainly do-able. Best done from a liveCD.
 
1 members found this post helpful.
Old 01-25-2015, 08:33 AM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,672

Rep: Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526Reputation: 2526
I was mistakenly assuming his system partition was on sda3 which would have created problems with booting, particularly for a new user. With his Linux distros on the logical partitions, it should not be a problem although I'm not sure about the 'easily' part of it for a new user. Given the needs of the OP and the structure, it would probably be simpler to delete sda2 and move sda3, the /home partition to the left.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
please help: Merging partitions elsheepo Linux - Software 3 03-08-2008 08:39 AM
merging partitions kreon28 Linux - Newbie 9 05-27-2007 12:26 PM
Merging partitions? Jorophose Linux - Newbie 3 04-05-2007 06:23 PM
Merging Unalocated Partitions lramos85 Linux - Newbie 6 07-22-2004 02:29 PM
Merging partitions Chrissi Linux - General 7 06-08-2003 08:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration