[beta1] tool fdisk do not support disks with more than 65535 cylinders

Bug #1288564 reported by Abdul on 2014-03-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mac-fdisk (Ubuntu)

Bug Description

Installed Ubuntu beta1 build ISO on a Power 8 machine as a KVM guest

Trying to create partition on a 1 tera byte scsi disk using fdisk, but could not create as the cylinders are not shown if it is more than 65535.


uname -a
Linux ubuntu 3.13.0-14-generic #34-Ubuntu SMP Thu Feb 27 22:35:16 UTC 2014 ppc64le ppc64le ppc64le GNU/Linux

Detail logs

user@ubuntu:~$ lsblk
sda 8:0 0 1T 0 disk
vda 253:0 0 80G 0 disk
├─vda1 253:1 0 7M 0 part
├─vda2 253:2 0 76.7G 0 part /
└─vda3 253:3 0 3.3G 0 part

====> create parition on sda using fdisk

root@ubuntu:~# fdisk /dev/sda
The number of cylinders for this disk is set to 65535.
This is larger than 1024, and may cause problems with:
1) software that runs at boot time (e.g., LILO)
2) booting and partitioning software form other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 7300 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/sda: 255 heads, 63 sectors, 65535 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot Begin Start End Blocks Id System

Command (m for help): n
Command action
   e extended
   p primary partition (1-4)
Partition number (1-4): 1
First cylinder (1-65535): 1
Last cylinder or +size or +sizeM or +sizeK ([1]-65535): 65535 =====> cannot select more than 65535 as I want to create more partition using all cylinders of the disk

Command (m for help): p

Disk /dev/sda: 255 heads, 63 sectors, 65535 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot Begin Start End Blocks Id System
/dev/sda1 1 1 65535526409856 83 Linux native

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
(Reboot to ensure the partition table has been updated.)
Syncing disks.

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional

=======> check if the parition is created
root@ubuntu:~# lsblk
sda 8:0 0 1T 0 disk
├─sda1 8:1 0 502G 0 part
├─sda2 8:2 0 208G 0 part
├─sda3 8:3 0 176G 0 part
└─sda4 8:4 0 144G 0 part

====> dmesg logs:
[ 104.576752] type=1006 audit(1394083820.277:27): pid=844 uid=0 old auid=4294967295 new auid=1000 old ses=4294967295 new ses=1 res=1
[ 246.220015] sda: sda1 sda2 sda3 sda4
[ 246.220772] sda: p2 size 1811966464 extends beyond EOD, enabling native capacity
[ 246.222415] sda: sda1 sda2 sda3 sda4
[ 246.222541] sda: p2 size 1811966464 extends beyond EOD, truncated
[ 246.222619] sda: p3 size 1879076352 extends beyond EOD, truncated
[ 246.222673] sda: p4 size 1946186240 extends beyond EOD, truncated
[ 248.252926] sda: sda1 sda2 sda3 sda4
[ 248.253858] sda: p2 size 1811966464 extends beyond EOD, truncated
[ 248.253930] sda: p3 size 1879076352 extends beyond EOD, truncated
[ 248.253995] sda: p4 size 1946186240 extends beyond EOD, truncated
[ 456.215618] type=1006 audit(1394084171.917:28): pid=914 uid=0 old auid=4294967295 new auid=1000 old ses=4294967295 new ses=2 res=1
[ 560.438928] kjournald starting. Commit interval 5 seconds

====> Problem : I did not create the last 3 partition and they are not in size as I need, so fdisk tool needs support for the large disk

====> my guest xml

<domain type='kvm' id='93'>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>1</vcpu>
    <type arch='ppc64' machine='pseries'>hvm</type>
    <boot dev='hd'/>
  <clock offset='utc'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/libvirt/images/abdul/ubuntu_b1_disktest.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source dev='/dev/sdf'/>
      <target dev='sdf' bus='scsi'/>
      <alias name='scsi0-0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    <controller type='scsi' index='0'>
      <alias name='scsi0'/>
      <address type='spapr-vio' reg='0x2000'/>
    <interface type='network'>
      <mac address='52:54:c0:a8:7a:18'/>
      <source network='default'/>
      <target dev='vnet21'/>
      <model type='e1000'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    <serial type='pty'>
      <source path='/dev/pts/7'/>
      <target port='0'/>
      <alias name='serial0'/>
      <address type='spapr-vio' reg='0x30000000'/>
    <console type='pty' tty='/dev/pts/7'>
      <source path='/dev/pts/7'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
      <address type='spapr-vio' reg='0x30000000'/>
  <seclabel type='dynamic' model='selinux' relabel='yes'>

Please let me know if you need more information

AlsaDevices: Error: command ['ls', '-l', '/dev/snd/'] failed with exit code 2: ls: cannot access /dev/snd/: No such file or directory
AplayDevices: Error: [Errno 2] No such file or directory
ApportVersion: 2.13.2-0ubuntu5
Architecture: ppc64el
ArecordDevices: Error: [Errno 2] No such file or directory
CRDA: Error: [Errno 2] No such file or directory
DistroRelease: Ubuntu 14.04
HibernationDevice: RESUME=UUID=fcb8ad5e-d41d-412c-ba0c-3d07ed0a3ea5
InstallationDate: Installed on 2014-03-05 (1 days ago)
InstallationMedia: Ubuntu-Server 14.04 LTS "Trusty Tahr" - Alpha ppc64el (20140302)
IwConfig: Error: [Errno 2] No such file or directory
Lsusb: Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Package: linux (not installed)

 PATH=(custom, no user)

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinux-3.13.0-14-generic root=UUID=b91ab1b1-7661-4c7c-907e-05822ce8077f ro splash quiet vt.handoff=7
 pseries_rng 3309 0 - Live 0xd0000000007c2000
 rtc_generic 2711 0 - Live 0xd0000000007ce000
ProcVersionSignature: Ubuntu 3.13.0-14.34-generic 3.13.5
 linux-restricted-modules-3.13.0-14-generic N/A
 linux-backports-modules-3.13.0-14-generic N/A
 linux-firmware 1.125
RfKill: Error: [Errno 2] No such file or directory
Tags: trusty
Uname: Linux 3.13.0-14-generic ppc64le
UpgradeStatus: No upgrade log present (probably fresh install)

_MarkForUpload: True

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1288564

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: trusty

apport information

tags: added: apport-collected
description: updated

apport information

apport information

Abdul (abdhalee) wrote : Lspci.txt

apport information

apport information

apport information

Abdul (abdhalee) wrote : UdevDb.txt

apport information

Abdul (abdhalee) wrote : UdevLog.txt

apport information

apport information

Kalpana S Shetty (kalshett) wrote :

Please mark this High.

Abdul (abdhalee) on 2014-03-07
Changed in linux (Ubuntu):
status: Incomplete → Confirmed

It affects an essential hardware component (disk controller, built-in networking, video card, keyboard, mouse).

Changed in linux (Ubuntu):
importance: Undecided → High
tags: added: ppc64el
Andy Whitcroft (apw) wrote :

Adding util-linux as this is likely an fdisk bug.

Phillip Susi (psusi) wrote :

This is very strange.. fdisk has defaulted to using sectors rather than the long obsolete/nonsense cylinders for quite some time now. Please run fdisk -v and post the output.

Abdul (abdhalee) wrote :

user@ubuntu:~$ sudo fdisk -v
fdisk v2.1 (>4GB)

Anders (eddiedog988) on 2014-03-13
Changed in util-linux (Ubuntu):
status: New → Confirmed
Phillip Susi (psusi) wrote :

That does not appear to be util-linux''s fdisk. What does dpkg -S `which fdisk` show?

Phillip Susi (psusi) wrote :

Also, can you try using parted instead of fdisk?

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Changed in util-linux (Ubuntu):
status: Confirmed → Incomplete
Phillip Susi (psusi) wrote :

So on ppc, fdisk is provided by the mac-fdisk package, which appears to be long unmaintained and falling apart. It should probably be removed as soon as we finally update util-linux, which I believe now has mac partition table support upstream.

In the mean time, use parted rather than fdisk.

no longer affects: linux (Ubuntu)
affects: util-linux (Ubuntu) → mac-fdisk (Ubuntu)
Changed in mac-fdisk (Ubuntu):
status: Incomplete → Confirmed
Changed in mac-fdisk (Ubuntu):
importance: Undecided → High
Abdul (abdhalee) wrote :

I could able to create partitions on large disk using 'parted' command.

root@ubuntu:~# parted -l
Disk /dev/sda: 1143GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 32.3kB 100GB 100GB primary ext3
 2 100GB 500GB 400GB primary
 3 501GB 1000GB 499GB primary
 4 1000GB 1143GB 143GB primary

If fdisk is not maintained to support ubuntu, we will use parted, so we can close this bug.


Anton Blanchard (anton-samba) wrote :

Another workaround is to use ddisk, which appears to be the util-linux version of fdisk on ppc. Confusing!

I agree it would be nice to get rid of mac-fdisk completely.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers