bug-fdisk
[Top][All Lists]
Advanced

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

[bug-fdisk] fdisk hangs on scripted input


From: Kernc
Subject: [bug-fdisk] fdisk hangs on scripted input
Date: Thu, 27 Jun 2013 05:45:21 +0200

Hi,

This hangs fdisk (1.2.4 on Debian wheezy or 1.2.5 from Debian jessie):

$ fallocate --length 100MB hdd.img
$ LOOP_DEVICE="$(losetup --find --show hdd.img)"
$ echo 'n p 1 10 w ' | tr ' ' '\n' | fdisk $LOOP_DEVICE

It stops at
...
write(1, "Device contains neither a valid "..., 247Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
) = 247
write(1, "\n", 1
)                       = 1
write(1, "Using /dev/loop1\n", 17Using /dev/loop1
)      = 17

and is the same for real (e.g. /dev/sdb USB) devices.
Partitioning interactively works.

Basically, the same problem as this guy has:
http://www.linuxquestions.org/questions/programming-9/writing-a-partition-table-to-a-loop-device-using-a-script-fdisk-902301/

What is my problem?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]