# 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 is currently in use - repartitioning is probably a bad idea.
Umount all file systems, and swapoff all swap partitions on this disk.
Use the --no-reread flag to suppress this check.
그런데 어디에 쓰이는지 찾을 수가 없네요.
# grep mmc /proc/mounts
# grep mmc /proc/swaps
# lsof /dev/mmc*
# fuser /dev/mmc*
sfdisk
에서 util-linux 2.29.2-1+deb9u1
.
# strace -f sfdisk /dev/mmcblk0p1
...
write(1, "\33[0mChanges will remain in memor"..., 115Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
) = 115
write(1, "\n", 1
) = 1
fstat64(3, {st_mode=S_IFBLK|0660, st_rdev=makedev(179, 1), ...}) = 0
ioctl(3, BLKRRPART) = -1 EINVAL (Invalid argument)
write(1, "Checking that no-one is using th"..., 62Checking that no-one is using this disk right now ... FAILED
답변1
ioctl(3, BLKRRPART) = -1 EINVAL (Invalid argument)
실제로 메시지가 정확하면 오류 코드가 표시되지 EBUSY
않아야 합니다 EINVAL
.
를 전달했기 때문에 "잘못된 인수"가 있습니다 /dev/mmcblk0p1
. 이것은 파티션입니다. sfdisk
모든 파티션을 나열하는 테이블을 편집합니다. 전체 장치를 전달해야 합니다.
# sfdisk /dev/mmcblk0