Re: adding new logical partition in cfdisk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jun 18, 2017 at 07:37:35PM +0200, Istvan Gabor wrote:
> Currently I have version 2.28 which comes
> with default openSUSE Leap 42.2.
> 
> This version doesn't show volume labels
> and it doesn't indicate the file systems
> on the partitions (eg ext3, ext4).

There is a info box with extra information. It should be enabled by
default (or possible to toggle by 'x').

> I would like to add a new logical partition to the
> free space. I select/highlight free space, then select
> "New".

You need free space within the extended partition to create another
logical partition. 

Unfortunately, the current cfdisk does not support any resize
operation. And the current stable  libfdisk does not support extended
partition resize at all ;-(

The libfdisk limitation is already fixed in the git tree, and I'd like to 
improve cfdisk for v2.31 too.

So there is no elegant way to use the free space behind the
extended partition, but there is usable workaround:

* dump your partition table by sfdisk and create a copy

  # sfdisk --dump /dev/sdd > old-mbr
  # cp old-mbr new-mbr

* see free spaces:

  sfdisk --list-free /dev/sdd

* modify the new-mbr (text file and change size
  of the partition sdd4 (your extended partition) to 
  
    current_size + freespace_size

  for your sdd it should be 

   190550817  (= 179670960 + 10879857)

 * save the file and *try* use it to re-create the partition table

  sfdisk --no-act --no-reread /dev/sdd < new-mbr
         ^^^^^^^^

 * if all seems OK then do it without "--no-act"


 You can revert all by
    sfdisk --no-reread /dev/sdd < old-mbr


 I hope for v2.30.1 it's will be possible to enlarge logical and
 extended partition by sfdisk and for v2.31 also by cfdisk.


    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux