LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
Search this Thread
Old 08-13-2011, 09:49 AM   #1
kdelover
Member
 
Registered: Aug 2009
Posts: 311

Rep: Reputation: 36
Adding Unallocated space to extended partition


Hi,

My setup is as shown in the image below,i have 170G of unallocated space which id like to add to my Extended partition so that i can create logical partitions.

I can only create one primary partition now of 170G which i don't need.

Can i boot my machine off a live-cd and a run a gparted and add the unallocated space to the extended partition ? Thanks.

162acux.jpg
 
Old 08-13-2011, 10:35 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950
I don't see why not. It looks easy enough to me.

If you temporarily delete the swap partition, then you should be able to resize or add partitions to the extended block easily. Just add a new swap space to the end when your finished.

And be sure to update your fstab to account for the changes.
 
Old 08-13-2011, 10:48 AM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I think it may dependent on the partitioning tool you use.

I think Gparted (marked by the light blue border around sda5 and sda6) and fdisk have a fixed border for the extended partition making it hard to change.

However cfdisk does not recognise an extended partition so after deleting sda6 you can continuously creating logical partitions. This is because cfdisk has no tool to create an extended partition. The first time you create a logical partition it will automatically grabs the next primary partition device name and converts it.
 
Old 08-13-2011, 11:04 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,616
Blog Entries: 2

Rep: Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072
Quote:
Originally Posted by saikee View Post
I think it may dependent on the partitioning tool you use.

I think Gparted (marked by the light blue border around sda5 and sda6) and fdisk have a fixed border for the extended partition making it hard to change.
At least for GParted this should not be true. You should simply be able to grab the border with the mouse and resize it.
 
Old 08-13-2011, 11:27 AM   #5
kdelover
Member
 
Registered: Aug 2009
Posts: 311

Original Poster
Rep: Reputation: 36
hi,

deleted swap this is what it looks like.i still cannot resize extended partition

Code:
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x51df7687

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              13        7650    61337600    7  HPFS/NTFS
/dev/sda3            7650       16549    71483393    5  Extended
/dev/sda5            7650       16403    70311936   83  Linux
GPARTED:
Attached Images
File Type: jpeg parted1.jpeg (91.2 KB, 12 views)
 
Old 08-13-2011, 11:30 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,616
Blog Entries: 2

Rep: Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072Reputation: 4072
How did you try to resize it?
 
Old 08-13-2011, 11:31 AM   #7
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Try this terminal command in root
Code:
cfdisk /dev/sda
or do as TobiSGD suggested but I cannot vouch Gparted treats an extended partition the same way as a primary or logical partition.

Last edited by saikee; 08-13-2011 at 11:32 AM.
 
Old 08-13-2011, 11:47 AM   #8
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Just tried both methods.

Both work!

As pointed out previous cfdisk does not put in the extended partition border at all.
Attached Images
File Type: png Screenshot.png (104.4 KB, 23 views)

Last edited by saikee; 08-13-2011 at 11:50 AM.
 
Old 08-13-2011, 11:57 AM   #9
kdelover
Member
 
Registered: Aug 2009
Posts: 311

Original Poster
Rep: Reputation: 36
hi

what cfdisk reports is different from gparted or fdisk,but cfdisk is letting me create logical partitions

i dont quite understand why they are reporting differently
cfdisk:
Code:
       Name                  Flags                 Part Type          FS Type                        [Label]                    Size (MB)            
 --------------------------------------------------------------------------------------------------------------------------------------------------- 
                                                    Primary           Free Space                                                     1.05           *
       sda1                  Boot                   Primary           NTFS                                                         104.86           *
       sda2                                         Primary           NTFS                           []                          62809.71           *
                                                    Pri/Log           Free Space                                                     1.05           *
       sda5                  NC                     Logical           Linux ext3                                                 71999.43           *
                                                    Pri/Log           Free Space                                                185154.25

fdisk:
Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              13        7650    61337600    7  HPFS/NTFS
/dev/sda3            7650       16768    73243799+   5  Extended
/dev/sda5            7650       16403    70311936   83  Linux

Last edited by kdelover; 08-13-2011 at 11:59 AM.
 
Old 08-13-2011, 12:03 PM   #10
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I told you in my Post #3
Quote:
cfdisk does not recognise an extended partition
The hard disk partitions are identical in both cfdisk and fdisk except cfdisk does not report the Extended partition because it has no storage but just a border.

In your case the device name sda3 has been used up for the extended partition.

You can learn a lot by using the terminal partitioning tools in Linux because with Gparted the partitioning and formatting are combined together as one operation. Partition creation and deletion are reversible whereas formatting is irreversible. The terminal tools in Linux do partitioning only and a different set of tools are used for formatting.

Last edited by saikee; 08-13-2011 at 12:07 PM.
 
  


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
[SOLVED] unable to create partition in unallocated space adityavpratap Linux - Hardware 3 07-05-2011 04:31 AM
[SOLVED] Add unallocated space from one drive to an lvm2 partition of another drive thebombzen Linux - Hardware 2 01-07-2011 08:58 PM
[SOLVED] Assign unallocated space to existing partition. EricTRA Debian 5 09-16-2009 02:49 AM
31 GB unallocated partition and SuSE 10.1 says "not enough space" G0NZ0 Linux - Hardware 8 10-16-2006 01:16 PM
moving unallocated disk space into reiserfs partition. GUIPenguin Linux - General 3 04-08-2006 04:07 PM


All times are GMT -5. The time now is 09:01 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration