initramfs: Mount proc et al. earlier
The `/proc` filesystem has to be mounted before the kernel command line arguments can be parsed.master
parent
9d2c710be9
commit
64e47b3b9b
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
|
mkdir -p /proc /run /sys
|
||||||
|
mount -t sysfs sysfs /sys
|
||||||
|
mount -t proc proc /proc
|
||||||
|
mount -t tmpfs tmpfs /run
|
||||||
|
|
||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
set -- $(cat /proc/cmdline)
|
set -- $(cat /proc/cmdline)
|
||||||
while [ $# -ge 1 ]; do
|
while [ $# -ge 1 ]; do
|
||||||
|
@ -15,11 +20,6 @@ while [ $# -ge 1 ]; do
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
mkdir -p /proc /run /sys
|
|
||||||
mount -t sysfs sysfs /sys
|
|
||||||
mount -t proc proc /proc
|
|
||||||
mount -t tmpfs tmpfs /run
|
|
||||||
|
|
||||||
for path in /sys/class/net/*; do
|
for path in /sys/class/net/*; do
|
||||||
[ -e "${path}" ] || continue
|
[ -e "${path}" ] || continue
|
||||||
ip link set "${path##*/}" up
|
ip link set "${path##*/}" up
|
||||||
|
|
Reference in New Issue