Ситуация следующая. Мне нужно вот такая разбивка разделов:
[majestio-pc images]# gdisk -l /dev/sdb
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: hybrid
BSD: not present
APM: not present
GPT: present
Found valid GPT with hybrid MBR; using GPT.
Disk /dev/sdb: 1953519616 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7D87765F-B034-4F22-84F5-1033CAB3884E
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953519582
Partitions will be aligned on 8-sector boundaries
Total free space is 0 sectors (0 bytes)
Number Start (sector) End (sector) Size Code Name
1 162 2047 943.0 KiB EF00 EFI System
2 2048 25167872 12.0 GiB 0700 Microsoft basic data
3 34 161 64.0 KiB EF02 BIOS boot partition
4 25167873 1953519582 919.5 GiB 0700 Microsoft basic data
И я ее успешно получаю используя утиль gdisk
. Но не хотелось бы интерактивного режима. Пробую использовать sgdisk
. Но не получается этой утилитой выставить выравнивание секторов == 1. Вот пример:
[majestio-pc majestio]# sgdisk --zap-all /dev/sdb
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
[majestio-pc majestio]# wipefs /dev/sdb
[majestio-pc majestio]# gdisk -l /dev/sdb
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries.
Disk /dev/sdb: 1953519616 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7BDEF847-4289-495D-AF3A-B0D8344B1D79
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953519582
Partitions will be aligned on 2048-sector boundaries
Total free space is 1953519549 sectors (931.5 GiB)
Number Start (sector) End (sector) Size Code Name
[majestio-pc majestio]# sgdisk --set-alignment=1 /dev/sdb
Creating new GPT entries.
[majestio-pc majestio]# sgdisk --new=1:162:2047 --typecode=1:EF00 /dev/sdb
Creating new GPT entries.
Information: Moved requested sector from 162 to 2048 in
order to align on 2048-sector boundaries.
Could not create partition 1 from 162 to 2047
Could not change partition 1's type code to EF00!
Error encountered; not saving changes.
Information: Moved requested sector from 162 to 2048 in order to align on 2048-sector boundaries!
И как это пониматьвашу, что я не так делаю?
PS. # sgdisk --new=1:162:2047 --typecode=1:EF00 --set-alignment=1 /dev/sdb
также не отрабатывает как хотелось бы.