English
Ask Your Question
0

resizing extended partition using fdisk

asked 2014-01-01 10:48:31 +0000

keshav0129 gravatar image

updated 2014-09-30 13:35:33 +0000

mether gravatar image

Friends,

I've 80 GB HDD which has about 60 GB used by windows, 10 GB by fedora19 and about 5 GB of unused space (which I have generated by resizing windows partition after installation of fedora using Easyus tool). see output of below:


(parted) print free
Model: ATA WDC WD800JD-60LS (scsi)
Disk /dev/sda: 80.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      32.3kB  64.3GB  64.3GB  primary   ntfs            boot
        64.3GB  69.5GB  5240MB            Free Space
 2      69.5GB  70.1GB  524MB   primary   ext4
 3      70.1GB  72.2GB  2181MB  primary   linux-swap(v1)
        72.2GB  72.2GB  1016kB            Free Space
 4      72.2GB  80.0GB  7783MB  extended                  lba
 5      72.2GB  80.0GB  7783MB  logical   ext4
        80.0GB  80.0GB  90.1kB            Free Space

I am learning Linux here (disk partitioning in particular) using fdisk. I want to create a new partition with fdisk but I get the no free sector error as shown below.


[root@localhost bin]# fdisk /dev/sda
Welcome to fdisk (util-linux 2.23.1).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): n
All primary partitions are in use
Adding logical partition 6
No free sectors available

And Here's an output of fdisk -l.


[root@localhost bin]# fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes, 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000f1481

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63   125580104    62790021    7  HPFS/NTFS/exFAT
/dev/sda2       135815168   136839167      512000   83  Linux
/dev/sda3       136839168   141099007     2129920   82  Linux swap / Solaris
/dev/sda4       141100993   156301311     7600159+   f  W95 Ext'd (LBA)
/dev/sda5       141101056   156301311     7600128   83  Linux

Disk /dev/sdb: 320.1 GB, 320072933376 bytes, 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x636c7956

From what i've understood from various other similar questions, I get only four partitions in Linux (last one being extended) and because i chose default settings during installation my entire extended partition (sda4) has been taken by root (sda5). Hence, there's no way to add a new partition unless i extend my sda4 partition by adding the unused 5 GB to it.

I want to do this using fdisk. Is there a way out?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-01-01 11:57:18 +0000

deusdara gravatar image

updated 2014-01-01 12:37:12 +0000

Hi

Please use another app to solve your problem.

One hint is

GParted is a free partition manager that enables you to resize, copy, and move partitions without data loss.

http://gparted.sourceforge.net/download.php

The partition will have to be unmounted before you can resize it.

The GParted Live CD is my favorite partition manager.

edit flag offensive delete link more

Comments

Thanks bro :) got your point

keshav0129 ( 2014-01-11 10:44:28 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Stats

Asked: 2014-01-01 10:48:31 +0000

Seen: 8,464 times

Last updated: Jan 01 '14