summaryrefslogtreecommitdiff
path: root/setup-disk.in
AgeCommit message (Collapse)Author
2023-01-26setup-disk: accept any bootfs with BOOTLOADER=noneNatanael Copa
Dont be picky if we don't install any bootloader. This is useful for rootfs on virtiofs for example. fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10499
2023-01-26setup-disk: don't use system repositories when testingNatanael Copa
We should not depend on the running systems configuration for anything
2023-01-26setup-disk: support BOOTLOADER=noneNatanael Copa
Allow disable bootloader install fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10526
2023-01-26setup-disk: NO_DISK_UUID for fstabWilliam Wilhelm
2023-01-24setup-disk: use `openrc` instead of `rc`Natanael Copa
2023-01-24setup-disk: fix detection of EFI directoryNatanael Copa
Try autodetect the EFI directory instead of hardcoding it to /boot/efi. This is needed when /boot is the EFI directory and no encryption is used.
2023-01-24setup-disk: add test for install_mounted_rootNatanael Copa
2022-11-17setup-disk: fix partitioning failureEdin Taric
Previously, setup-disk could fail when installing over an existing identical partition table. The additions ensure that a clean disklabel is created and existing partitions are wiped. Signed-off-by: Edin Taric <unicorn@regrow.earth>
2022-11-13setup-disk: increase default /boot size to 300MBNatanael Copa
Ref: https://gitlab.alpinelinux.org/alpine/alpine-conf/-/merge_requests/106 Fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10476
2022-11-11setup-disk: add -w option for writing selected diskmodeNatanael Copa
Use an option to setup-disk to write the selected diskmode instead of using an undocumented /tmp/alpine-install-diskmode.out Adjust setup-alpine to use this, and make sure that we write the diskmode when installing to a mounted root. fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10444
2022-11-11setup-disk: minor clean up of install to mounted rootNatanael Copa
Only give warning about MBR on x86 and x86_64 and when in legacy bios mode. (syslinux or grub). Make sure grub is installed if needed, by using select_bootloader_pkg.
2022-11-11setup-disk: ignore non-existing firmware packagesNatanael Copa
Some modules wants non-existing firmware like b43 and b43legacy fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10530
2022-11-11setup-disk: add tests for find_efi_sizeNatanael Copa
2022-11-11setup-disk: move calculation of EFI size to a functionJakub Jirutka
2022-11-11setup-disk: increase default boot partition size for EFIJakub Jirutka
Consider my laptop with linux-lts on UEFI with Secure Boot: System.map-lts.....4 MiB initramfs-lts.....36 MiB vmlinuz-lts........8 MiB linux-lts.efi.....44 MiB (signed Unified Kernel Image) linux-lts.efi.bak 44 MiB (backup of the previous) Total............136 MiB 256 MiB might be enough, but what if the user wants to experiment with more kernel variants? It would be still too tight. On the other side, if the user has only 1 GiB disk (e.g. ncopa uses 1GiB images for testing), then even 256 MiB would be too much. Originally, I just increased the default to 512 MiB, but ncopa pointed out that it's too much for small disks and he personally uses 1GiB disks (images) for testing. For this reason, I chose a more sophisticated approach that takes into account the size of the disk. * 512 MiB if disk > 8 GiB * 264 MiB if disk > 2 GiB * 160 MiB otherwise And the size is never lower than the approximate minimal allowed size of the FAT32 filesystem for the disk's block size (32 MiB for 512 bytes blocks, 260 MiB for 4096 bytes blocks). Issue reported by Andrey Maslyuk <andrey@maslyuk.net> (via email).
2022-11-11setup-disk: default block size to 512Jakub Jirutka
0 is not a safe fallback for a block size.
2022-11-11Add vmd to modules list when nvme is added to itDermot Bradley
VMD is Intel's Volume Management Device. Some Intel-based machines have a BIOS/UEFI option to present a NVME SSD via either VMD or as a "native" NVME device. If Alpine is installed on a NVME device when it is presented via VMD then once the Alpine ISO/USB boots the 'vmd' kernel module will be loaded by /etc/init.d/hwdrivers and Alpine will see a /dev/nvme0n1 device to which setup-alpine can install successfully. However, once the newly installed system is then booted from the NVME device the initramfs' init will fail to find the rootfs to mount/boot from as, without the 'vmd' module being loaded, no NVME device will be visible. This MR ensures that the 'vmd' kernel module is added to the cmdline modules list whenever the 'vmd' has been automatically loaded by hwdrivers init.d when booting Alpine prior to running setup-alpine/setup-disk. This MR works together with https://gitlab.alpinelinux.org/alpine/mkinitfs/-/merge_requests/112 (which ensures that 'vmd' present in the initramfs).
2022-11-11setup-disk: add tests for find/setup_partitionsNatanael Copa
2022-11-11Make dir $mnt/boot before writing files to itThomas Zeman
2022-11-10setup-disk: avoid basism parameter expansionNatanael Copa
fixes use with yash.
2022-11-09setup-disk: fix typo in error messageNatanael Copa
and add test from missing block device
2022-11-09setup-disk: mock swapoff and vgchangeNatanael Copa
we dont dont that for real when testing
2022-11-09setup-disk: refactor and test find_disksNatanael Copa
2022-11-09setup-disk: env SETUP_DISK_TESTFUNC for unit testingNatanael Copa
Use an env var SETUP_DISK_TESTFUNC to run individual functions for unit testing purposes.
2022-11-09setup-disk: remove unused is_vmware functionNatanael Copa
not used since commit 427a14cb8d80 (setup-disk: remove grsec traces)
2022-11-09setup-disk: prefix $ROOT/sysNatanael Copa
prefix /sys/... with $ROOT so we can test it
2022-11-06always quote vars in 'local' assignmentJakub Jirutka
Some shells may apply word splitting after expanding variable in `local a=$1`. I know just about yash, but since `local` is supposed to be a builtin *command*, the "correct" behaviour of common shells is actually a special case for `local` - it doesn't apply for other commands. See https://osdn.net/projects/yash/ticket/46041.
2022-11-05replace 'echo -n' and 'echo -e' with printfJakub Jirutka
'echo -n' and 'echo -e' are not portable, not all commonly used shells support both of them (in the same way). 'echo -e' is not even defined in POSIX. https://pubs.opengroup.org/onlinepubs/009604599/utilities/echo.html: > New applications are encouraged to use printf instead of echo. > ... > Conforming applications that wish to do prompting without <newline>s > or that could possibly be expecting to echo a -n, should use the > printf utility derived from the Ninth Edition system.
2022-11-04setup-disk: fix /boot size for UEFI and encryptionNatanael Copa
Currently, /boot becomes 34 MB, which is too small. Fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10536
2022-11-04setup-disk: minor cleanupNatanael Copa
Make code slightly more readable. No functional changes
2022-07-15setup-disk: fix hang with UEFI and interactive 'none'Natanael Copa
Fix a hang that happens with interactively selecting 'none' with efi mode. Fixes commit 851247d96340 (setup-disk: calculate size of ESP parition for grub)
2022-07-12setup-disk: allow set LVM partition size with LVM_SIZENatanael Copa
fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10501
2022-07-01setup-disk: exit if either mode or disk is 'none'Natanael Copa
2022-06-28setup-disk: Die if disklessShaRose
If you pass -m none, just return immediately: For non-interactive diskless setups.
2022-05-25setup-disk: use logical_block_size to calculate ESP sizeNatanael Copa
fixes https://gitlab.alpinelinux.org/alpine/aports/-/issues/13839
2022-05-25setup-disk: fix whitespace errorNatanael Copa
fixes https://gitlab.alpinelinux.org/alpine/aports/-/issues/13861
2022-05-23setup-disk: retry on password mismatchNatanael Copa
Retry create luks device if the entered password does not match rather than exit with error. fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10514
2022-05-23setup-disk: fail early on partition failureNatanael Copa
Fail early if disk is too small or similar
2022-05-19setup-disk: calculate size of ESP parition for grubNatanael Copa
some devices, like NVME may have a physical block size of 4096, in which case FAT32 needs minimum 260MB. Use physical_block_size to calculate the size for ESP
2022-05-18setup-disk: use smaller ESP partition for UEFINatanael Copa
Grub's efi files are just a few MB, so we can reduce the size of the ESP. We also enforce FAT32, which requires minimum 32MB. Apparently many UEFI firmware implementations only support FAT32. https://wiki.osdev.org/EFI_System_Partition#Format
2022-05-13setup-disk: fix -h usage textNatanael Copa
2022-05-10setup-disk: honor BOOT_SIZE env var for EFI installNatanael Copa
fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10512
2022-05-04setup-disk: detect raid under cryptNatanael Copa
Make sure we add raid to initfs when we have encrypted raid.
2022-05-04setup-disk: add nvme for early module loadNatanael Copa
Some nvme devices has problems getting detected by nlplug-finds. Work around it by always load nvme early when needed.
2022-05-04setup-disk: enable nvme initfs feature for crypt on nvmeNatanael Copa
fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10498
2022-05-04setup-disk: enable nvme feature for mdadm on nvmeNatanael Copa
2022-05-04setup-disk: add cryptsys for shorthand of crypt+sysNatanael Copa
2022-05-04setup-disk: remove debug lineNatanael Copa
2022-05-02setup-disk: only install firmware that is usedNatanael Copa
2022-05-02setup-disk: remove grsec tracesNatanael Copa
we have nto supported grsec for a while. Remove everything about grsec and PAX.