Skip to content
Snippets Groups Projects
Commit 108ef418 authored by Natanael Copa's avatar Natanael Copa
Browse files

initram: support for booting off a harddisk

parent 0ff6c912
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,7 @@ eend $RC ...@@ -103,7 +103,7 @@ eend $RC
# load available drivers to get access to modloop media # load available drivers to get access to modloop media
ebegin "Loading boot drivers" ebegin "Loading boot drivers"
[ "$MODULES" ] && modprobe $MODULES 2> /dev/null [ "$MODULES" ] && modprobe -a $MODULES 2> /dev/null
if [ -f /etc/modules ] ; then if [ -f /etc/modules ] ; then
sed 's/\#.*//g' < /etc/modules | sed 's/\#.*//g' < /etc/modules |
while read module args; do while read module args; do
...@@ -114,6 +114,19 @@ scan_drivers ...@@ -114,6 +114,19 @@ scan_drivers
scan_drivers scan_drivers
eend 0 eend 0
# check if root=... was set
if [ -n "$KOPT_root" ]; then
mount $KOPT_root $NEWROOT
cat /proc/mounts | while read DEV DIR TYPE OPTS ; do
if [ "$DIR" != "/" -a "$DIR" != "$NEWROOT" -a -d "$DIR" ]; then
mkdir -p $NEWROOT/$DIR
mount -o move $DIR $NEWROOT/$DIR
fi
done
sync
exec /bin/busybox switch_root $NEWROOT $chart_init /sbin/init $KOPT_init_args
fi
# locate boot media and mount it # locate boot media and mount it
ebegin "Mounting boot media" ebegin "Mounting boot media"
mkdir -p $ALPINE_MNT mkdir -p $ALPINE_MNT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment