diff --git a/iso/README.md b/iso/README.md index 6ba2fdd..04c4525 100644 --- a/iso/README.md +++ b/iso/README.md @@ -49,8 +49,5 @@ mDNS (`proksi.local`) via avahi is installed but not yet wired. First milestone ## Known rough edges - **Disk space**: the first time you build on a fresh host, the squashfs/xorriso steps need ~15 GB free. If the host's LVM-root is smaller, `xorriso` silently dies at the very end with "Image size exceeds free space on media". -- **Flask `/` route** returns "Hello World" instead of redirecting to `/install/step1`. Harmless but surprising; will be cleaned up when we wire up screens 4–8. - **No HTTPS yet**. The Furtka plan is "local CA + green padlock on `https://proksi.local`" — that's a later milestone. For now, plain HTTP. -- **archinstall is not invoked**. The wizard collects input but doesn't write to disk yet. Still a walking skeleton, not an installer. - **Drive list includes `/dev/loop0` and `/dev/sr0`**. `/dev/loop0` is the live ISO's own squashfs mounted in RAM; `/dev/sr0` is the CD-ROM itself. Both appear as install targets, which is wrong. Filter lives in `webinstaller/drives.py` and hasn't been added yet. -- **GRUB menu still says "Arch Linux install medium"**. We inherit releng's bootloader config. Cosmetic, fix when we care about end-user polish. diff --git a/iso/build.sh b/iso/build.sh index fc45ca0..6a61d3e 100755 --- a/iso/build.sh +++ b/iso/build.sh @@ -55,6 +55,16 @@ find "$PROFILE_WORK/grub" "$PROFILE_WORK/syslinux" "$PROFILE_WORK/efiboot" \ | xargs -0 sed -i \ -e 's/Arch Linux install medium/Furtka Live Installer/g' +# Mark the default entry as (Recommended) so first-time users know which to +# pick. Targets the main entry only — speech/accessibility variants stay +# unlabeled to avoid suggesting they're the normal choice. +sed -i 's/^title Furtka Live Installer (%ARCH%, UEFI)$/title (Recommended) Furtka Live Installer (%ARCH%, UEFI)/' \ + "$PROFILE_WORK/efiboot/loader/entries/01-archiso-linux.conf" +sed -i 's/^MENU LABEL Furtka Live Installer (%ARCH%, BIOS)$/MENU LABEL (Recommended) Furtka Live Installer (%ARCH%, BIOS)/' \ + "$PROFILE_WORK/syslinux/archiso_sys-linux.cfg" +sed -i "/--id 'archlinux'/s/menuentry \"Furtka Live Installer/menuentry \"(Recommended) Furtka Live Installer/" \ + "$PROFILE_WORK/grub/grub.cfg" "$PROFILE_WORK/grub/loopback.cfg" + mkdir -p "$PROFILE_WORK/airootfs/opt/furtka" cp -a "$REPO_ROOT/webinstaller/." "$PROFILE_WORK/airootfs/opt/furtka/" rm -rf "$PROFILE_WORK/airootfs/opt/furtka/__pycache__" diff --git a/webinstaller/app.py b/webinstaller/app.py index 4e8a589..b062059 100644 --- a/webinstaller/app.py +++ b/webinstaller/app.py @@ -57,24 +57,52 @@ def validate_step1(form): return errors, values +def build_disk_config(boot_drive): + # archinstall 4.x dropped the `use_entire_disk` shortcut — `default_layout` + # now requires fully-specified partitions. We call suggest_single_disk_layout + # with ext4 + no separate /home, which short-circuits its interactive prompts. + import asyncio + + from archinstall.lib.disk.device_handler import device_handler + from archinstall.lib.disk.disk_menu import suggest_single_disk_layout + from archinstall.lib.models.device import ( + DiskLayoutConfiguration, + DiskLayoutType, + FilesystemType, + ) + + device_handler.load_devices() + device = device_handler.get_device(Path(boot_drive)) + if device is None: + raise RuntimeError(f"archinstall could not resolve device {boot_drive!r}") + + device_mod = asyncio.run( + suggest_single_disk_layout( + device, + filesystem_type=FilesystemType.Ext4, + separate_home=False, + ) + ) + layout = DiskLayoutConfiguration( + config_type=DiskLayoutType.Default, + device_modifications=[device_mod], + ) + return layout.json() + + def build_archinstall_config(s): return { "archinstall-language": "English", "timezone": "Europe/Berlin", "ntp": True, "bootloader": "Systemd-boot", - "disk_config": { - "config_type": "use_entire_disk", - "device": s["boot_drive"], - "filesystem": "ext4", - }, + "disk_config": build_disk_config(s["boot_drive"]), "hostname": s["hostname"], "kernels": ["linux"], "packages": ["docker", "docker-compose", "vim", "git", "htop", "curl"], "profile": {"type": "server"}, "services": ["docker"], "network_config": {"type": "iso"}, - "users": [{"username": s["username"], "sudo": True, "groups": ["docker"]}], "ssh": True, "audio_config": None, "locale_config": { @@ -85,9 +113,19 @@ def build_archinstall_config(s): def build_archinstall_creds(s): + # archinstall 4.x expects `!root-password` and `!password` (plaintext + # sentinels). Users with neither `!password` nor `enc_password` are + # silently dropped by User.parse_arguments — hence login failures. return { - "root_password": s["password"], - "users": [{"username": s["username"], "password": s["password"]}], + "!root-password": s["password"], + "users": [ + { + "username": s["username"], + "!password": s["password"], + "sudo": True, + "groups": ["docker"], + } + ], } diff --git a/webinstaller/templates/install/step1.html b/webinstaller/templates/install/step1.html index 51f3fb5..77ea833 100644 --- a/webinstaller/templates/install/step1.html +++ b/webinstaller/templates/install/step1.html @@ -20,12 +20,12 @@