Questions tagged [sfdisk]

A script-oriented tool for partitioning block devices.

45 questions
4
votes
1 answer

sfdisk - "This disk is currently in use" - but nothing seems to be using it?

# sfdisk /dev/mmcblk0p1 Welcome to sfdisk (util-linux 2.29.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Checking that no-one is using this disk right now ... FAILED This disk…
sourcejedi
  • 50,249
1
vote
0 answers

sfdisk not showing correct partition information

sfdisk (version 2.23.2) on CentOS 7.6 is not showing the correct partition information about a disk: Disk /dev/sdb: 15566 cylinders, 255 heads, 63 sectors/track Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot…
dwagon
  • 111
0
votes
1 answer

Copying a partition table with sfdisk from a larger device to a smaller one

I'm testing a Python script intended for use on Raspberry Pi systems for reformatting and copying partition info and partition data. To get the information from the first device (often a USB memory stick), I use: sfdisk -d /dev/sda…
Tango
  • 353