On most recent laptops the BIOS ships set to "RST" (also called "Optane" or "RAID") rather than AHCI: the NVMe drive is no longer on the PCIe bus directly, it sits behind an Intel VMD controller which creates its own PCI domain. FWS could not install on those machines. The advice found everywhere -- switch the BIOS to AHCI -- is both unnecessary and often impossible. Unnecessary because the kernel has read those drives through the vmd module since 4.5, and it is in Arch's kernel. Impossible because plenty of BIOSes expose no such toggle at all, and because on a dual-boot machine the change stops Windows from booting. FWS therefore never asks for it first; it is the last resort, and the Windows consequence is spelled out when it comes to that. Where this really bit was the reboot, not the install. The live medium sees the drive because its kernel loads vmd, the install runs to completion, and then the installed machine does not come up: the initramfs has no vmd, so the root device cannot be found before it is mounted. A silent failure, invisible during the install itself. fws-intel-rst holds all the logic, the way fws-setup-hardware holds the driver logic, so there is only one detection to keep correct. It reads sysfs rather than lspci: always present, works inside the %post chroot, and it is the only source that gives the PCI domain, which is what proves an NVMe really is behind the VMD rather than plugged in directly. Controllers are matched on class plus vendor, not on device IDs, which change every generation. The %pre loads the module before anything else, and that is the step that makes the whole thing automatic. run_pre_scripts() is called by /usr/bin/anaconda before the kickstart is even parsed, so before the disk inventory and long before the UI. Without it the lsblk just below found no drive, the target fell back to its /dev/sda default, a disk that does not exist on these machines, and clearpart aimed at nothing, leaving no safe default. The --ensure mode returns immediately on a machine with no VMD: no PCI rescan, no waiting, since this sits on the startup path of every install. The %post writes vmd and nvme into the target's MODULES before mkinitcpio runs, and adds the mdadm_udev hook for firmware RAID volumes. Both modules are declared explicitly instead of being left to autodetect, which works from the modules loaded at image build time: missing vmd there shows up only at reboot, on a machine that no longer starts. The new installer screen, fws_rst.py, is the fallback for when even that failed. It never shows on an ordinary machine: completed returns True as soon as the engine says there is nothing to do, and _instantiateAction destroys any completed standalone without displaying it. Machines with no VMD controller, or with a working one, see nothing, so there is no extra box to understand for the majority that needs none. When it does show, it explains the situation in plain French with one button, and no VMD, initramfs or modprobe in any visible string. Continue stays enabled and Précédent leads back to the network screen, so the chain back to the keyboard choice stays whole; the wizard now resolves that chain to the last standalone actually on the stack instead of a fixed name. Verified on synthetic sysfs trees, 27 cases: the four hardware states, both false-positive guards (an Intel audio controller and a non-Intel RAID controller), initramfs rewriting including idempotence, and the display decision with Anaconda stubbed out. A missing engine or an unexpected exit code shows nothing rather than worrying the user. The modprobe and PCI rescan themselves are untested, there being no VMD controller on this machine. Signed-off-by: nocode <suzuku295@gmail.com>
44 lines
1.6 KiB
Bash
44 lines
1.6 KiB
Bash
#!/usr/bin/env bash
|
|
# shellcheck disable=SC2034
|
|
|
|
iso_name="fws"
|
|
iso_label="FWS_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)"
|
|
iso_publisher="FWS"
|
|
iso_application="FWS Live/Rescue DVD"
|
|
iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
|
|
install_dir="fws"
|
|
buildmodes=('iso')
|
|
bootmodes=('bios.syslinux'
|
|
'uefi.systemd-boot')
|
|
pacman_conf="pacman.conf"
|
|
airootfs_image_type="squashfs"
|
|
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M')
|
|
bootstrap_tarball_compression=('zstd' '-c' '-T0' '--auto-threads=logical' '--long' '-19')
|
|
file_permissions=(
|
|
["/etc/shadow"]="0:0:400"
|
|
["/root"]="0:0:750"
|
|
["/root/.automated_script.sh"]="0:0:755"
|
|
["/root/.gnupg"]="0:0:700"
|
|
["/usr/local/bin/choose-mirror"]="0:0:755"
|
|
["/usr/local/bin/Installation_guide"]="0:0:755"
|
|
["/usr/local/bin/livecd-sound"]="0:0:755"
|
|
["/usr/bin/load_policy"]="0:0:755"
|
|
["/usr/bin/setstatus"]="0:0:755"
|
|
["/usr/local/bin/fws-setup-hardware"]="0:0:755"
|
|
["/usr/local/bin/fws-intel-rst"]="0:0:755"
|
|
["/usr/local/bin/fws-grub-finalize"]="0:0:755"
|
|
["/usr/local/bin/fws-keys"]="0:0:755"
|
|
["/usr/local/bin/fws-vr-setup"]="0:0:755"
|
|
["/usr/local/bin/fws-hello"]="0:0:755"
|
|
["/usr/local/bin/fws-update"]="0:0:755"
|
|
["/usr/local/bin/fws-updates-check"]="0:0:755"
|
|
["/usr/local/bin/fws-proton-ge"]="0:0:755"
|
|
["/usr/local/bin/fws-recovery"]="0:0:755"
|
|
["/usr/local/bin/fws-recovery-session"]="0:0:755"
|
|
["/usr/local/bin/fws-recovery-gui"]="0:0:755"
|
|
["/usr/local/bin/fws-powermenu"]="0:0:755"
|
|
["/usr/local/bin/fws-about"]="0:0:755"
|
|
["/usr/local/bin/fws-bugreport"]="0:0:755"
|
|
["/etc/grub.d/42_fws-recovery"]="0:0:755"
|
|
)
|