initramfs-init: mount new root before apkovl is extracted
also create the symlink for kernel modules
This commit is contained in:
parent
7b27ce7bc4
commit
5e4b955f60
|
@ -132,6 +132,8 @@ ebegin "Loading hardware drivers"
|
||||||
scan_drivers
|
scan_drivers
|
||||||
eend 0
|
eend 0
|
||||||
|
|
||||||
|
mount -t tmpfs -o size=50M tmpfs $NEWROOT
|
||||||
|
|
||||||
# look for apkovl
|
# look for apkovl
|
||||||
for i in usb floppy cdrom; do
|
for i in usb floppy cdrom; do
|
||||||
mount /media/$i 2>/dev/null || continue
|
mount /media/$i 2>/dev/null || continue
|
||||||
|
@ -150,7 +152,6 @@ fi
|
||||||
|
|
||||||
# install new root
|
# install new root
|
||||||
ebegin "Installing packages to root filesystem"
|
ebegin "Installing packages to root filesystem"
|
||||||
mount -t tmpfs -o size=50M tmpfs $NEWROOT
|
|
||||||
apk add --root /newroot --repository /media/cdrom/apks \
|
apk add --root /newroot --repository /media/cdrom/apks \
|
||||||
--initdb --quiet --progress $pkgs
|
--initdb --quiet --progress $pkgs
|
||||||
eend $?
|
eend $?
|
||||||
|
@ -164,6 +165,8 @@ cat /proc/mounts | while read DEV DIR TYPE OPTS ; do
|
||||||
done
|
done
|
||||||
sync
|
sync
|
||||||
|
|
||||||
|
ln -sf /.modloop/modules $NEWROOT/lib/modules
|
||||||
|
|
||||||
if [ -x $NEWROOT/sbin/init ]; then
|
if [ -x $NEWROOT/sbin/init ]; then
|
||||||
exec /bin/busybox switch_root $NEWROOT /sbin/init $KOPT_init_args
|
exec /bin/busybox switch_root $NEWROOT /sbin/init $KOPT_init_args
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue