Skip to content

install: PPPoE checks that the kernel can do PPPoE first — a clear error instead of a rollback after 90 s - #148

Merged
Cd1s merged 1 commit into
mainfrom
fix/install-kernel-check
Oct 17, 2026
Merged

Cd1s merged 1 commit into
mainfrom
fix/install-kernel-check

Conversation

@Cd1s

@Cd1s Cd1s commented Oct 17, 2026

Copy link
Copy Markdown
Owner

What

  • install.sh: when PPPoE is chosen, pppoe_kernel runs modprobe -q pppoe and requires /proc/net/pppoe (registered per network namespace by the pppoe driver, built in or as a module; pppoe pulls in ppp_generic). Without it the installer stops before asking for the account, in Chinese and English, with the fix: apk add linux-lts && reboot (on *-virt: "the linux-virt kernel has no PPPoE"; otherwise also "reboot after a kernel upgrade"). The MR_APPLY=0 part is not touched.
  • rootfs/etc/init.d/mr-pppoe: start_pre fails with the same reason (also logger -p daemon.err), so an apply that switches a WAN to PPPoE rolls back at once and says why.
  • mr doctor: a PPPoE WAN without an address and without /proc/net/pppoe reports "the kernel has no PPPoE (the pppoe module is not loaded)" with the fix instead of "cable, account, ISP". Test: TestDoctorPPPoEWithoutKernelSupport; the healthy fake environment now has /proc/net/pppoe.
  • docs/install-alpine.md: one paragraph on the kernel requirement.

Why

Alpine's linux-virt kernel (cloud images, many VMs) is built with # CONFIG_PPPOE is not set. install.sh used to write the config, wait 90 s for a session that could never come up and roll back with PPPoE did not come up within 90s; only pppd's log said Couldn't open the /dev/ppp device.

Verification

  • sudo ./tools/ci.sh: ALL CHECKS PASSED (shellcheck of install.sh at -S warning clean). The new doctor test fails without the doctor change.
  • Fresh-environment lab, together with net: network.sh creates /run/mini-router itself — install.sh no longer rolls back on fresh machines #147's fix (needed for any apply on current main):
    • linux-virt, PPPoE install: install.sh stops at step 3 with the message above, nothing applied.
    • linux-virt, DHCP install, then the API switches the WAN to PPPoE: rolled back after 4 s with mr-pppoe.wan: … kernel 6.18.35-0-virt has no PPPoE (modprobe pppoe failed); Alpine: apk add linux-lts, reboot, also in /var/log/messages.
    • linux-lts, PPPoE + DHCPv6-PD scenario: 8/8 (session, delegated prefix, client IPv4/IPv6, ping6 to the ISP).
  • Reviewed by a second agent from a different model family (Gemini): /proc/net/pppoe is right for built-in, module and namespaces; a built-in pppoe with a failing modprobe is not misreported; a failing start_pre keeps supervise-daemon from respawning pppd every 5 s and does not block the boot.

Closes #146

🤖 Generated with Claude Code

…ror instead of a rollback after 90 s (Closes #146)

Alpine's linux-virt kernel (cloud images, many VMs) is built without CONFIG_PPPOE. install.sh with
MR_WAN_PROTO=pppoe used to write the config, wait 90 s for a session that can never come up and roll
back ("PPPoE did not come up within 90s"). Now:
- install.sh loads pppoe when PPPoE is chosen and stops with the fix (apk add linux-lts, reboot)
  when /proc/net/pppoe does not appear;
- mr-pppoe's start_pre fails with the same reason (also to syslog), so an apply rolls back at once
  and says why;
- mr doctor: a PPPoE WAN that is down without /proc/net/pppoe names the kernel, not the cable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Cd1s
Cd1s merged commit 131c565 into main Oct 17, 2026
2 checks passed
Cd1s added a commit that referenced this pull request Oct 17, 2026
…s with simulated ISPs (DHCP, PPPoE, DHCPv6-PD) and a LAN client (#149)

* tools/lab: add isolated fresh environment harness

* tools/lab: record A1 verification results

* tools/lab: keep veth pairs inside lab namespaces

* tools/lab: isolate LAN and add guest seed installation

* tools/lab: add ISP slirp PPPoE hooks and live scenarios

* tools/lab: record leakage and ISP milestones

* tools/lab: complete cloud-init guest handoff and fallback LAN services

* tools/lab: fix cloud-init seed YAML and document guest limits

* tools/lab: update A1 continuation report

* tools/lab: seed Alpine router package layer for offline install

* tools/lab: protect host resolver and namespace state

* tools/lab: continue guest install with offline packages

* tools/lab: add A1 handover notes

* tools/lab: run the real install.sh — signed offline apk mirror, virtio agent console, deferred install, PPPoE/PD ISP rework

* tools/lab: lts base, virtio agent console, PPPoE + DHCPv6-PD ISP, lab.sh change, scenarios on lib.sh, A1c report

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* tools/lab: no host daemon config or services, isp --gw, 03 for same-subnet modems after #138

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* tools/lab: README links the product fixes #147 #148

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* tools/lab: review fixes — pinned downloads, image lock, pppd off the host's /run, cleanup on every exit

- the cloud image and the minirootfs are fixed versions with pinned SHA256s (checked against Alpine's
  .sha512 / .sha256); the package chroot is always re-extracted from the verified tarball
- one lock (mr-lab-images/.build.lock) for all shared image initialisation; temp dirs from mktemp;
  loop mounts on fresh mount points, unmounted by the exit trap
- veth pairs are created inside the lab namespaces (ip -n <sw> link add ... peer ... netns <ns>)
- pppoe-server and its pppd run with a private tmpfs /run: no /run/ppp0.pid or pppd2.tdb on the host
- processes are stopped TERM first, KILL after 3 s; isp_stop / ns_del signal everything inside the
  lab namespace, pid files only a process whose name still matches; powercut goes through kill_qemu
- host guard: INT/TERM/HUP run it in dash, symlinks under /etc/ppp, a baseline across commands
  (lab.sh guard-reset); up refuses to run next to host dnsmasq / kea / radvd services
- scenarios: the lab is taken down on any exit (MRLAB_KEEP=1 keeps it), failed setup steps bail out
- README: dependencies (mask services before installing; python3, openssh-client; no socat),
  download trust, host safety

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@Cd1s Cd1s mentioned this pull request Oct 18, 2026
52 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

install.sh: PPPoE on a kernel without PPPoE (Alpine linux-virt) rolls back after 90 s without saying why

1 participant