26

Odp: [HOWTO] Resize partycji głównej dla x86 - online

Na pendrive działa, zwykłe sata też. Nie sprawdzałem na systemu na nvme i pewnie tu się wysadzi w powietrze.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

27 (edytowany przez DarioX7 2023-10-23 17:21:54)

Odp: [HOWTO] Resize partycji głównej dla x86 - online

Jakby ktoś chciał zainstalować OpenWrt na Proxmoxie z opcją UEFI, to oczywiście wybiera obraz z opisem "(...)x86-64-generic-ext4-combined-efi.img".

I do tych założeń mam mały protip, bo jest problem z rozszerzeniem partycji.

Zdarzy się problem z rozmiarem GPT:

root@OpenWrt:/# fdisk -l /dev/vda
GPT PMBR size mismatch (246303 != 4194303) will be corrected by write.
The backup GPT table is not on the end of the device.
Disk /dev/vda: 2 GiB, 2147483648 bytes, 4194304 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 616C1A7C-DC44-9C6B-FE20-E553F6CF4000

Device      Start    End Sectors  Size Type
/dev/vda1     512  33279   32768   16M Linux filesystem
/dev/vda2   33280 246271  212992  104M Linux filesystem
/dev/vda128    34    511     478  239K BIOS boot

Partition table entries are not in disk order.

Znalazłem, żeby wykonać komendę:

parted -l

parted zapyta

Warning: Not all of the space available to /dev/vda appears to be used, you can
fix the GPT to use all of the space (an extra 10485760 blocks) or continue with
the current setting?
Fix/Ignore?

wpisujemy fix

i po tym możemy skorzystać ze skryptu od Cezarego na rozszerzenie partycji.

root@OpenWrt:/# fdisk -l /dev/vda
Disk /dev/vda: 2 GiB, 2147483648 bytes, 4194304 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 616C1A7C-DC44-9C6B-FE20-E553F6CF4000

Device      Start     End Sectors  Size Type
/dev/vda1     512   33279   32768   16M Linux filesystem
/dev/vda2   33280 4194270 4160991    2G Linux filesystem
/dev/vda128    34     511     478  239K BIOS boot

Partition table entries are not in disk order.
Gateway :Topton Intel Core i3-N305 16GB RAM 6x i226-V 2.5GbE
AP: 3x Netgear WAX220