LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-14-2011, 07:27 AM   #1
natibo
LQ Newbie
 
Registered: Sep 2011
Location: Cincinnati, OH
Distribution: Arch, LMDE, many others
Posts: 10

Rep: Reputation: Disabled
Trouble Resizing Extended Partition - Gparted


I am having trouble resizing a partition. I have 3 partitions, 3 logical and one extended. I am not very experienced with partitions, but I like to install many different Linux OS's and play around with them. to date, i can only have 3 running in three logical partitions. I thought i understood that I could create extended partitions and have more. To do that I wanted to enlarge the size of by extended partition. Currently there is only one sub-partition in there, the linux swap. I was wondering if I needed to move one of the existing partitions to accomplish this. In order to help, I have attached a link to a snapshot I took when gparted was running.

https://picasaweb.google.com/lh/phot...eat=directlink
 
Old 10-14-2011, 10:32 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Hi,

Welcome to LQ!

You have left unallocated 366GB space between drives. Your sda3 has 435GB of which 24GB is allocated. If you need to save all this then backup everything first before anything else is performed on the drive. That is if you need to save anything.

If sda3 filesystem is not needed then delete both sda2 and sda3. Then setup allocated space for your extended partition. The 'swap' space can be setup with the 'extended partition or as a primary. Notice below the first three primary partiton allocations then the '/dev/sda4' allocation(extended partition) with the logical(s) within.

I usually setup 'swap' on the second primary but you can place it within the extended as a logical partition.
Quote:
sample disk configuration;
~#fdisk -l

Disk /dev/hda: 122.9 GB, 122942324736 bytes
16 heads, 63 sectors/track, 238216 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 19842 10000336+ 83 Linux
/dev/hda2 19843 23811 2000376 82 Linux swap
/dev/hda3 23812 25796 1000440 83 Linux
/dev/hda4 25797 238216 107059680 5 Extended
/dev/hda5 25797 29765 2000344+ 83 Linux
/dev/hda6 29766 41671 6000592+ 83 Linux
/dev/hda7 41672 47671 3023968+ 83 Linux
/dev/hda8 47672 55609 4000720+ 83 Linux
/dev/hda9 55610 75451 10000336+ 83 Linux
/dev/hda10 75452 95293 10000336+ 83 Linux
/dev/hda11 95294 115135 10000336+ 83 Linux
Quote:
sample cfdisk of same drive;
cfdisk 2.12r

Disk Drive: /dev/hda
Size: 122942324736 bytes, 122.9 GB
Heads: 16 Sectors per Track: 63 Cylinders: 238216

Name Flags Part Type FS Type [Label] Size (MB)
------------------------------------------------------------------------------
hda1 Boot Primary Linux ext3 [site] 10240.38
hda2 Primary Linux swap 2048.39
hda3 Primary Linux ext3 [root] 1024.46
hda5 Logical Linux ext3 [home] 2048.39
hda6 Logical Linux ext3 [usr] 6144.64
hda7 Logical Linux ext3 [var] 3096.58
hda8 Logical Linux ext3 [tmp] 4096.78
hda9 Logical Linux ext3 [arc1] 10240.38
hda10 Logical Linux ext3 [arc2] 10240.38
hda11 Logical Linux ext3 [arc3] 10240.38
Logical Free Space 63521.62
Sure the above is for a '/dev/hda#' but things are applicable. You do not have too create partitions for other mounts but there are advantages to doing it this way. Of course your allocations will be for your install. Notice the free space at the end of the extended that can be allocated for additional logical partition(s).

You can do moves or copies with Qparted but I find using fdisk provides advantages of knowing the block allocations in case of problems in the future.
 
Old 10-14-2011, 06:50 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
*Don't* be playing with partitions from the real system - use a liveCD.
Partitions (included the extended) can only be made larger if they have unallocated space contiguous to them. You have a few options.
- delete the swap and current extended (sda5 and sda2) and create the extended in the current free space. Add the swap back in and fix the fstab. Simple.
- as above, and move the sda3 to the right - will add the 7.8 Gig to the current unallocated.
- move sda3 all the way left to abut sda1. Extend sda2 to use all the (now contiguous) unallocated space. Has the advantage no other adjustments to swap/fstab are needed.
 
Old 10-14-2011, 07:24 PM   #4
natibo
LQ Newbie
 
Registered: Sep 2011
Location: Cincinnati, OH
Distribution: Arch, LMDE, many others
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thanks everyone for your help. I deleted all partitions but sda1 (my main Arch OS) created a 16GB swap on sda2 (2 x RAM) have sda3 for ubuntu and then created an extended partition to install many linux versions.
 
Old 08-04-2015, 08:02 PM   #5
Seff
Member
 
Registered: Aug 2015
Distribution: Mint Rafaela
Posts: 144

Rep: Reputation: Disabled
I'm no expert, but I don't think you need a sixteen-gig swap...
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't boot after resizing partition with gparted blaszta Linux - General 5 11-18-2010 02:12 AM
GParted resizing has corrupted a partition troy.mcclure Linux - General 1 11-16-2009 06:02 PM
gparted - does the extended partition need to be the last one? Olaus Linux - Software 5 09-18-2009 05:01 PM
How can I create extended partition without GParted? alan_ri Linux - Hardware 27 02-10-2008 06:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:17 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