public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* WARNING: expand-on-first boot might shrink your partition on Debian bookworm
@ 2022-07-07  7:48 Florian Bezdeka
  2022-07-07  8:20 ` Schmidl, Tobias
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Florian Bezdeka @ 2022-07-07  7:48 UTC (permalink / raw)
  To: isar-users
  Cc: Jan Kiszka, Henning Schild, felix.moessbauer, Schmidl,
	Tobias (T CED SES-DE)

Hi all,

here comes another Debian bookworm related problem. This time related to
expand-on-first-boot, which destroys my image during the fist boot.

The linux-util packages has been updated and includes some changes
related to partition alignment. See [1]. (Thanks Henning for pointing me
here.) It might happen now that the last partition is shrinked instead
of expanded.

This is especially relevant for setups where the last partition is the
root partition and where no more space is available (e.g. booting up a
wic image with qemu where disk size = image size)

The original partition table looked like this:

label: gpt
label-id: 8CC4BCD4-F7B9-45F1-A066-DFB4068D6DFC
device: /dev/sda
unit: sectors
first-lba: 34
last-lba: 4554194
sector-size: 512

After expand-on-first-boot it looks like that:
(note the last-lba field)

label: gpt
label-id: 5305C98F-17AD-4B41-9388-7DC319741C9D
device: talker-debian-bookworm-qemuamd64.wic
unit: sectors
first-lba: 34
last-lba: 4554320
sector-size: 512

Booting up again stops in the initrd with the following error:

(initramfs) [    1.978569] EXT4-fs (sda2): bad geometry: block count
550586 exceeds size of device (550400 blocks)

resize2fs called from expand-last-partition.sh already throws a warning
resize2fs: New size smaller than minimum (550586)

Ideas welcome...
Taking over even more...

Best regards,
Florian


[1]
https://github.com/util-linux/util-linux/commit/921c7da55ec78350e4067b3fd6b7de6f299106ee

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-07-08  6:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07  7:48 WARNING: expand-on-first boot might shrink your partition on Debian bookworm Florian Bezdeka
2022-07-07  8:20 ` Schmidl, Tobias
2022-07-07  8:54 ` Henning Schild
2022-07-07 10:51   ` Bezdeka, Florian
2022-07-07 11:18     ` Henning Schild
2022-07-07  8:59 ` Henning Schild
2022-07-07  9:30   ` Schmidl, Tobias
2022-07-07  9:33     ` Henning Schild
2022-07-08  6:35 ` Schmidl, Tobias
2022-07-08  6:46   ` Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox