View | Details | Raw Unified
Collapse All | Expand All

(-) generic/linuxrc (-7 / +7 lines)
 Lines 726-732   fi Link Here 
if [ "$0" = '/linuxrc' ] || [ "$0" = 'linuxrc' ]
if [ "$0" = '/linuxrc' ] || [ "$0" = 'linuxrc' ]
then
then
	[ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1
	[ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1
	echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting"
	echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting${NORMAL}"
	cd ${CHROOT}
	cd ${CHROOT}
	mkdir ${CHROOT}/proc ${CHROOT}/sys 2>/dev/null
	mkdir ${CHROOT}/proc ${CHROOT}/sys 2>/dev/null
 Lines 735-741   then Link Here 
	then
	then
		sleep 10
		sleep 10
	fi
	fi
	echo -n '.'
	echo -ne "${BOLD}.${NORMAL}"
	if /tmp/.initrd/bin/[ "${USE_DEVFS_NORMAL}" -eq '1' -a "${CDROOT}" -eq '0' ]
	if /tmp/.initrd/bin/[ "${USE_DEVFS_NORMAL}" -eq '1' -a "${CDROOT}" -eq '0' ]
	then
	then
 Lines 762-774   then Link Here 
		umount /sys 2>/dev/null
		umount /sys 2>/dev/null
		umount /tmp/.initrd/sys 2>/dev/null
		umount /tmp/.initrd/sys 2>/dev/null
	fi
	fi
	echo -n '.'
	echo -ne "${BOLD}.${NORMAL}"
	# /usr/src/linux/Documentation/initrd.txt:
	# /usr/src/linux/Documentation/initrd.txt:
	#	exec chroot . /sbin/init </dev/console >/dev/console 2>&1
	#	exec chroot . /sbin/init </dev/console >/dev/console 2>&1
	echo -e "${BOLD}.${NORMAL}"
	exec <dev/console >dev/console 2>&1
	exec <dev/console >dev/console 2>&1
	echo '.'
	exec chroot . /bin/sh <<- EOF
	exec chroot . /bin/sh <<- EOF
		umount /tmp/.initrd || echo "*: Failed to unmount the initrd!"
		umount /tmp/.initrd || echo "*: Failed to unmount the initrd!"
		/sbin/blockdev --flushbufs /dev/ram0 >/dev/null 2>&1
		/sbin/blockdev --flushbufs /dev/ram0 >/dev/null 2>&1
 Lines 778-791   elif [ "$0" = '/init' ] Link Here 
then
then
	[ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1
	[ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1
	[ ! -e ${CHROOT}/dev/tty1 ] && mknod ${CHROOT}/dev/tty1 c 4 1
	[ ! -e ${CHROOT}/dev/tty1 ] && mknod ${CHROOT}/dev/tty1 c 4 1
	echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)"
	echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)${NORMAL}"
	cd ${CHROOT}
	cd ${CHROOT}
	mkdir ${CHROOT}/proc ${CHROOT}/sys 2>/dev/null
	mkdir ${CHROOT}/proc ${CHROOT}/sys 2>/dev/null
	echo -n '.'
	echo -ne "${BOLD}.${NORMAL}"
		umount /sys || echo '*: Failed to unmount the initrd /sys!'
		umount /sys || echo '*: Failed to unmount the initrd /sys!'
		umount /proc || echo '*: Failed to unmount the initrd /proc!'
		umount /proc || echo '*: Failed to unmount the initrd /proc!'
	echo -n '.'
	echo -e "${BOLD}.${NORMAL}"
	exec switch_root -c "/dev/console" "${CHROOT}" ${REAL_INIT:-/sbin/init} ${INIT_OPTS}
	exec switch_root -c "/dev/console" "${CHROOT}" ${REAL_INIT:-/sbin/init} ${INIT_OPTS}
fi
fi