2017-05-26 20:26:25 +00:00
|
|
|
#!/bin/sh
|
|
|
|
. ./init_functions.sh
|
|
|
|
|
|
|
|
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
|
|
|
/bin/busybox --install -s
|
2017-06-07 21:14:24 +00:00
|
|
|
/bin/busybox-extras --install -s
|
2017-05-26 20:26:25 +00:00
|
|
|
|
|
|
|
# kernel modules
|
|
|
|
modprobe -a @MODULES@
|
|
|
|
|
|
|
|
# mdev
|
|
|
|
mount -t proc -o nodev,noexec,nosuid proc /proc
|
|
|
|
mount -t sysfs -o nodev,noexec,nosuid sysfs /sys
|
|
|
|
echo /sbin/mdev > /proc/sys/kernel/hotplug
|
|
|
|
mdev -s
|
|
|
|
|
|
|
|
# subpartitions
|
|
|
|
mount_subpartitions
|
|
|
|
|
|
|
|
# hooks
|
|
|
|
for hook in /etc/postmarketos-mkinitfs/hooks/*.sh; do
|
|
|
|
[ -e "$hook" ] || continue
|
|
|
|
sh "$hook"
|
|
|
|
done
|
|
|
|
show_splash /splash1.ppm.gz
|
|
|
|
|
|
|
|
# unlock root partition
|
|
|
|
unlock_root_partition
|
|
|
|
|
|
|
|
# switch root
|
|
|
|
show_splash /splash2.ppm.gz
|
|
|
|
killall telnetd mdev 2&> /dev/null
|
|
|
|
mount -w -t ext4 /dev/mapper/root /sysroot
|
|
|
|
umount /proc
|
|
|
|
umount /sys
|
|
|
|
umount /dev/pts
|
|
|
|
umount /dev
|
|
|
|
exec switch_root /sysroot /sbin/init
|