Hi all,
this is the single patch for rework and generalisation of last
partition expansion.
As usual has been sent by elastic mail SMTP and it went in moderation.
UPDATE: the unpartition volume resizing has been tested in this way
git clone
https://github.com/robang74/isar-nvidia-debian.git
cd isar-nvidia-debian
source .profile
build basic-os
wicshell
cd /boot
cp -arf vmlinuz-5.10.0-19-amd64 initrd.img-5.10.0-19-amd64 /work
exit
wicinst file:image.wic
sudo losetup -P $(losetup -f) image.wic
sudo dd if=/dev/loop3p2 bs=1M > disk.wic
dd if=/dev/zero bs=1 seek=$[4*1024*1024*1024] count=1 oflag=append
conv=notrunc,sparse status=none of=disk.wic
sudo qemu-system-x86_64 --cpu host --enable-kvm -smp 4 -m 1024 -drive
format=raw,file=disk.wic -device sdhci-pci -kernel
build/tmp/work/vmlinuz-5.10.0-19-amd64 -initrd
build/tmp/work/initrd.img-5.10.0-19-amd64 -append "root=/dev/sda
console=ttyS0" --nographic; echo ">>> press ENTER"; read; reset
dmesg | grep expand
df -h
poweroff
Best regards, R-
===========================================
The script has been reworked to simplify its code:
- the last partition free space is not computed anymore because useless
- on exit a function take care of some final tasks and logs in /dev/kmsg
and to extend its functionalities supporting new filesystems:
- filesystem type is managed by a switch-case block of code
- temporary directory to mount is created relying on TMPDIR
- unsupervised systems have the option to reboot because error
- if temporary directory creation fails 2nd try with /dev/shm
- additional ext2, ext3 and btrfs filesystems supported
- udev support: udevadm settle is the first task to run
- unpartitioned volumes are resized as well (tested)
This patch has been created by a collection of 7 patches to be applied on
ilbers ISAR, branch next, commit d26660b724b034b602f3889f55a23cd9be2e87bd
Author: Roberto A. Foglietta <
roberto....@gmail.com>
This code has been developed taking inspiration by suggestions and code from:
Felix Moessbauer <
felix.mo...@siemens.com>
Tobias Schmidl <
tobias...@siemens.com>
Henning Schild <
henning...@siemens.com>
Signed-off-by: Roberto A. Foglietta <
roberto....@gmail.com>