From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Cc: Yureka <yuka@yuka.dev>
Subject: [PATCH] vm: link /sbin to /usr/bin
Date: Thu, 5 Jun 2025 14:08:19 +0200 [thread overview]
Message-ID: <20250605120819.7145-1-hi@alyssa.is> (raw)
This is necessary because the kernel tries to load modules by running
/sbin/modprobe. This should fix Intel wireless cards in netvm. It's
then important to disable Busybox init because /sbin/init takes
precedence over our /etc/init.
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
img/app/Makefile | 2 +-
img/app/default.nix | 1 +
img/app/sbin | 1 +
vm/sys/net/Makefile | 2 +-
vm/sys/net/default.nix | 1 +
vm/sys/net/sbin | 1 +
6 files changed, 6 insertions(+), 2 deletions(-)
create mode 120000 img/app/sbin
create mode 120000 vm/sys/net/sbin
diff --git a/img/app/Makefile b/img/app/Makefile
index 5ea023e..c827fd3 100644
--- a/img/app/Makefile
+++ b/img/app/Makefile
@@ -60,7 +60,7 @@ VM_FIFOS = etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/fifo
# These are separate because they need to be included, but putting
# them as make dependencies would confuse make.
-VM_LINKS = bin etc/ssl/certs/ca-certificates.crt
+VM_LINKS = bin etc/ssl/certs/ca-certificates.crt sbin
VM_BUILD_FILES = build/etc/s6-rc
diff --git a/img/app/default.nix b/img/app/default.nix
index 6e423f6..a196205 100644
--- a/img/app/default.nix
+++ b/img/app/default.nix
@@ -24,6 +24,7 @@ let
CONFIG_FEATURE_IP_ADDRESS y
CONFIG_FEATURE_IP_LINK y
CONFIG_FEATURE_IP_ROUTE y
+ CONFIG_INIT n
CONFIG_IP y
'';
})
diff --git a/img/app/sbin b/img/app/sbin
new file mode 120000
index 0000000..1e881ed
--- /dev/null
+++ b/img/app/sbin
@@ -0,0 +1 @@
+usr/bin
\ No newline at end of file
diff --git a/vm/sys/net/Makefile b/vm/sys/net/Makefile
index 35da669..436ca6e 100644
--- a/vm/sys/net/Makefile
+++ b/vm/sys/net/Makefile
@@ -43,7 +43,7 @@ VM_DIRS = dev etc/s6-linux-init/env run proc sys var/lib/connman
# These are separate because they need to be included, but putting
# them as make dependencies would confuse make.
-VM_LINKS = bin lib var/run
+VM_LINKS = bin lib sbin var/run
VM_BUILD_FILES = build/etc/s6-rc
diff --git a/vm/sys/net/default.nix b/vm/sys/net/default.nix
index 69f9564..b5873eb 100644
--- a/vm/sys/net/default.nix
+++ b/vm/sys/net/default.nix
@@ -22,6 +22,7 @@ let
(busybox.override {
extraConfig = ''
CONFIG_DEPMOD n
+ CONFIG_INIT n
CONFIG_INSMOD n
CONFIG_LSMOD n
CONFIG_MODINFO n
diff --git a/vm/sys/net/sbin b/vm/sys/net/sbin
new file mode 120000
index 0000000..1e881ed
--- /dev/null
+++ b/vm/sys/net/sbin
@@ -0,0 +1 @@
+usr/bin
\ No newline at end of file
base-commit: b5dab0eea25e24531ac856985b8f79ef38c06366
--
2.49.0
next reply other threads:[~2025-06-05 12:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-05 12:08 Alyssa Ross [this message]
2025-06-05 14:11 ` [PATCH] vm: link /sbin to /usr/bin Puck Meerburg
2025-06-05 14:20 ` Alyssa Ross
2025-06-05 14:21 ` Puck Meerburg
2025-06-09 9:51 ` Alyssa Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250605120819.7145-1-hi@alyssa.is \
--to=hi@alyssa.is \
--cc=devel@spectrum-os.org \
--cc=yuka@yuka.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).