sasamy
Пункты: 78556
Регистрация: 14.08.2009
Цитата
Что за магическая комбинация '1,,L' ?
man sfdisk
Цитата
INPUT FORMAT
sfdisk reads lines of the form
<start> <size> <id> <bootable> <c,h,s> <c,h,s>
where each line fills one partition descriptor.
Fields are separated by whitespace, or comma or semicolon possibly followed by whitespace; initial and trailing white‐
space is ignored. Numbers can be octal, decimal or hexadecimal, decimal is default. When a field is absent or empty,
a default value is used.
The <c,h,s> parts can (and probably should) be omitted - sfdisk computes them from <start> and <size> and the disk
geometry as given by the kernel or specified using the -H, -S, -C flags.
Bootable is specified as [*|-], with as default not-bootable. (The value of this field is irrelevant for Linux - when
Linux runs it has been booted already - but might play a role for certain boot loaders and for other operating systems.
For example, when there are several primary DOS partitions, DOS assigns C: to the first among these that is bootable.)
Id is given in hex, without the 0x prefix, or is [E|S|L|X], where L (LINUX_NATIVE (83)) is the default, S is LINUX_SWAP
(82), E is EXTENDED_PARTITION (5), and X is LINUX_EXTENDED (85).
один раздел на весь диск с отступом 1 Мбайт (-u M) от начала с идентификатором LINUX_NATIVE (83)
Цитата
версия sfdisk 2.27.2
попробуйте так
echo '1,' | sfdisk -u M $DISK >> mk-sd.log 2>&1
MaxiHunter
Пункты: 2257
Регистрация: 13.03.2011
спасибо! Получилось сделать с помощью fdisk. Поскольку предложенная ва команда не сработала, поскольку в новой версии:
-u, --unit S deprecated, only sector unit is supported
В fdisk отступ оказался 2048, но это не помешало плате загрузиться.
MaxiHunter
Пункты: 2257
Регистрация: 13.03.2011
Цитата В fdisk отступ оказался 2048, но это не помешало плате загрузиться.
Забавно, но только потом понял, что значение выражено в секторах.... а так как сектор в фдиске имел значение 512 байт, то и получается что отступ составил 1 МБ. ))