Le 18/08/2016 à 20:57, Thomas Schmitt a écrit :

  $ /sbin/fdisk  /dev/sdc
  ...
  Command (m for help): n
  Select (default p): p
  Partition number (3,4, default 3): 3
  First sector (505856-3915775, default 505856):
  Last sector, +sectors or +size{K,M,G,T,P} (505856-3915775, default 3915775):

  Created a new partition 3 of type 'Linux' and of size 1.6 GiB.
  Command (m for help): w
  The partition table has been altered.
  Calling ioctl() to re-read partition table.
  Re-reading the partition table failed.: Permission denied

(I wonder by what method fdisk tries to read the table and fails)

Fdisk does not tries to read the table, it calls the system call to tell the kernel to re-read the partition table to update its view of the partitions on the device. I guess this is a privileged operation.

Note also that this old system call fails if any partition of the device is in use (mounted filesystem, active swap, active RAID member, part of an active LVM...). Parted, partprobe and other tools based on libparted use a newer system call which does not have this flaw.

Let's hope the USB stick still boots via BIOS and EFI ...

It boots via any decent BIOS. I haven't tested EFI boot with it, but I don't see why it would not work as the new partition is "regular".

Reply via email to