[Parted-maintainers] Bug#725949: parted: Failure to create primary partition

Olivier Sallou osallou at debian.org
Thu Oct 10 08:34:05 UTC 2013


Package: parted
Version: 2.3-16
Severity: normal

Dear Maintainer,
I recently updated my Debian sid and, since this update, I have a failure when creating a primary partition on a loopback device.
The exact same commands used to work and have been tested on an Ubuntu with parted 2.3.

The error is:

Error: Error informing the kernel about modifications to partition /dev/loop1p1 -- Invalid argument.  This means Linux won't know about any changes you made to /dev/loop1p1 until you reboot -- so you shouldn't mount it or use it in any way before rebooting.
Error: Failed to add partition 1 (Invalid argument)

Here are the commands to reproduce:

root#qemu-img create -f raw test.img 1000M
root#losetup /dev/loop1 test.img
root#kpartx -a /dev/loop1
root# parted --align optimal --script  /dev/loop1 --  mklabel msdos
root# parted /dev/loop1

GNU Parted 2.3
Using /dev/loop1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                                
Model: Loopback device (loop)
Disk /dev/loop1: 1049MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags

(parted) q                                                                

root# parted --align optimal --script  /dev/loop1 --  mkpart primary ext4 32k -1

Warning: The resulting partition is not properly aligned for best performance.
Error: Error informing the kernel about modifications to partition /dev/loop1p1 -- Invalid argument.  This means Linux won't know about any changes you made to /dev/loop1p1 until you reboot -- so you shouldn't mount it or use it in any way before rebooting.
Error: Failed to add partition 1 (Invalid argument)

root# parted /dev/loop1
GNU Parted 2.3
Using /dev/loop1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                                
Model: Loopback device (loop)
Disk /dev/loop1: 1049MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  1049MB  1049MB  primary

(parted) q

Primary partition appear, but with no file system, and return code is an error.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages parted depends on:
ii  libc6              2.17-93
ii  libparted0debian1  2.3-16
ii  libreadline6       6.2+dfsg-0.1
ii  libtinfo5          5.9+20130608-1

parted recommends no packages.

Versions of packages parted suggests:
pn  parted-doc  <none>

-- no debconf information



More information about the Parted-maintainers mailing list