|
|
@ -1550,6 +1550,63 @@ setup_squashfs_aufs() {
|
|
|
|
mount --bind "${CDROOT_PATH}" "${new_cdroot}"
|
|
|
|
mount --bind "${CDROOT_PATH}" "${new_cdroot}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
livecd_init() {
|
|
|
|
|
|
|
|
good_msg "Making tmpfs for ${NEW_ROOT}"
|
|
|
|
|
|
|
|
mount -n -t tmpfs tmpfs "${NEW_ROOT}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local dirs=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dirs="dev mnt proc run sys tmp mnt/livecd"
|
|
|
|
|
|
|
|
dirs="${dirs} mnt/key tmp/.initrd mnt/gentoo"
|
|
|
|
|
|
|
|
for i in ${dirs}; do
|
|
|
|
|
|
|
|
mkdir -p "${NEW_ROOT}/${i}"
|
|
|
|
|
|
|
|
chmod 755 "${NEW_ROOT}/${i}"
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
[ ! -d "${CDROOT_PATH}" ] && mkdir -p "${CDROOT_PATH}"
|
|
|
|
|
|
|
|
[ ! -e "${NEW_ROOT}/dev/null" ] && mknod "${NEW_ROOT}"/dev/null c 1 3
|
|
|
|
|
|
|
|
[ ! -e "${NEW_ROOT}/dev/console" ] && \
|
|
|
|
|
|
|
|
mknod "${NEW_ROOT}"/dev/console c 5 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# For SGI LiveCDs ...
|
|
|
|
|
|
|
|
if [ "${LOOPTYPE}" = "sgimips" ]; then
|
|
|
|
|
|
|
|
[ ! -e "${NEW_ROOT}/dev/sr0" ] && \
|
|
|
|
|
|
|
|
mknod "${NEW_ROOT}/dev/sr0" b 11 0
|
|
|
|
|
|
|
|
[ ! -e "${NEW_ROOT}/dev/loop0" ] && \
|
|
|
|
|
|
|
|
mknod "${NEW_ROOT}/dev/loop0" b 7 0
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Required for splash to work. Not an issue with the initrd as this
|
|
|
|
|
|
|
|
# device isn't created there and is not needed.
|
|
|
|
|
|
|
|
if [ -e /dev/tty1 ]; then
|
|
|
|
|
|
|
|
[ ! -e "${NEW_ROOT}/dev/tty1" ] && \
|
|
|
|
|
|
|
|
mknod "${NEW_ROOT}/dev/tty1" c 4 1
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${REAL_ROOT}" != "/dev/nfs" ] && \
|
|
|
|
|
|
|
|
[ "${LOOPTYPE}" != "sgimips" ]; then
|
|
|
|
|
|
|
|
bootstrap_cd
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${REAL_ROOT}" = '' ]
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
warn_msg "No bootable medium found. Waiting for new devices..."
|
|
|
|
|
|
|
|
COUNTER=0
|
|
|
|
|
|
|
|
while [ ${COUNTER} -lt 3 ]; do
|
|
|
|
|
|
|
|
sleep 3
|
|
|
|
|
|
|
|
let COUNTER=${COUNTER}+1
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
sleep 1
|
|
|
|
|
|
|
|
bootstrap_cd
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${REAL_ROOT}" = '' ]
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
# leave stale mounts around, make possible to debug
|
|
|
|
|
|
|
|
bad_msg 'Could not find CD to boot, something else needed!'
|
|
|
|
|
|
|
|
CDROOT=0
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
get_mounts_list() {
|
|
|
|
get_mounts_list() {
|
|
|
|
awk '
|
|
|
|
awk '
|
|
|
|
/^[[:blank:]]*#/ { next }
|
|
|
|
/^[[:blank:]]*#/ { next }
|
|
|
|