REAL_ROOTFLAGS=''
ROOTFSTYPE='auto'
CRYPT_SILENT=0
+mkdir -p /etc/cmdline /etc/modprobe.d
for x in ${CMDLINE}
do
case "${x}" in
nounionfs)
USE_UNIONFS_NORMAL=0
;;
+ ## for "module.param[=val]" we creating
+ ## /etc/modprobe.d/module.param.conf: "options module param[=val]"
+ ## /etc/cmdline/module.param:"param[=val]"
+ ## first for CONFIG_MODPROBE_SMALL=n, next for script modprobe
+ *=*)
+ case "${x%%=*}" in
+ *.*)
+ y="${x%%[=/]*}"
+ echo "options ${x%%.*} ${x#*.}" >"/etc/modprobe.d/$y.conf"
+ echo "${x#*.}" >"/etc/cmdline/$y"
+ ;;
+ esac
+ ;;
+ *.*)
+ echo "options ${x%%.*} ${x#*.}" >"/etc/modprobe.d/${x%%/*}.conf"
+ echo "${x#*.}" >"/etc/cmdline/${x%%/*}"
+ ;;
esac
done
# Set variables based on the value of REAL_ROOT
case "${REAL_ROOT}" in
- ZFS*)
+ ZFS=*)
ZFS_POOL=${REAL_ROOT#*=}
ZFS_POOL=${ZFS_POOL%%/*}
USE_ZFS=1
fi
if [ ${retval} -ne 0 ]; then
- RESUME_DEV=$(blkid -l -t "${REAL_RESUME}" | cut -d ":" -f 1 2>/dev/null)
+ RESUME_DEV=$(blkid -o device -l -t "${REAL_RESUME}")
retval=$?
fi
fi
if [ ${retval} -ne 0 ]; then
- ROOT_DEV=$(blkid -l -t "${REAL_ROOT}" | cut -d ":" -f 1 2>/dev/null)
+ ROOT_DEV=$(blkid -o device -l -t "${REAL_ROOT}")
retval=$?
fi
done;
+ else
+ got_good_root=0
fi
fi
fi
done
- mkdir initramfs proc tmp sys 2>/dev/null
+ mkdir initramfs proc tmp sys run 2>/dev/null
chmod 1777 tmp
fi
# and not a mountpoint
[ -z "$dev" ] && continue
fstype=$(get_mount_fstype $fs)
- # ro must be trailing, and the options will always contain at least 'defaults'
- opts="$(get_mount_options $fs | strip_mount_options),ro"
+ if get_mount_options $fs | fgrep -q bind ; then
+ opts='bind'
+ dev=${NEW_ROOT}${dev}
+ else
+ # ro must be trailing, and the options will always contain at least 'defaults'
+ opts="$(get_mount_options $fs | strip_mount_options),ro"
+ fi
mnt=${NEW_ROOT}${fs}
cmd="mount -t $fstype -o $opts $dev $mnt"
good_msg "Mounting $dev as ${fs}: $cmd"
echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)${NORMAL}"
cd "${CHROOT}"
-mkdir "${CHROOT}/proc" "${CHROOT}/sys" 2>/dev/null
+mkdir "${CHROOT}/proc" "${CHROOT}/sys" "${CHROOT}/run" 2>/dev/null
echo -ne "${BOLD}.${NORMAL}"
# If devtmpfs is mounted, try move it to the new root