Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 202266
Collapse All | Expand All

(-)generic/linuxrc (-7 / +7 lines)
Lines 726-732 fi Link Here
726
if [ "$0" = '/linuxrc' ] || [ "$0" = 'linuxrc' ]
726
if [ "$0" = '/linuxrc' ] || [ "$0" = 'linuxrc' ]
727
then
727
then
728
	[ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1
728
	[ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1
729
	echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting"
729
	echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting${NORMAL}"
730
730
731
	cd ${CHROOT}
731
	cd ${CHROOT}
732
	mkdir ${CHROOT}/proc ${CHROOT}/sys 2>/dev/null
732
	mkdir ${CHROOT}/proc ${CHROOT}/sys 2>/dev/null
Lines 735-741 then Link Here
735
	then
735
	then
736
		sleep 10
736
		sleep 10
737
	fi
737
	fi
738
	echo -n '.'
738
	echo -ne "${BOLD}.${NORMAL}"
739
739
740
	if /tmp/.initrd/bin/[ "${USE_DEVFS_NORMAL}" -eq '1' -a "${CDROOT}" -eq '0' ]
740
	if /tmp/.initrd/bin/[ "${USE_DEVFS_NORMAL}" -eq '1' -a "${CDROOT}" -eq '0' ]
741
	then
741
	then
Lines 762-774 then Link Here
762
		umount /sys 2>/dev/null
762
		umount /sys 2>/dev/null
763
		umount /tmp/.initrd/sys 2>/dev/null
763
		umount /tmp/.initrd/sys 2>/dev/null
764
	fi
764
	fi
765
	echo -n '.'
765
	echo -ne "${BOLD}.${NORMAL}"
766
766
767
	# /usr/src/linux/Documentation/initrd.txt:
767
	# /usr/src/linux/Documentation/initrd.txt:
768
	#	exec chroot . /sbin/init </dev/console >/dev/console 2>&1
768
	#	exec chroot . /sbin/init </dev/console >/dev/console 2>&1
769
769
770
	echo -e "${BOLD}.${NORMAL}"
770
	exec <dev/console >dev/console 2>&1
771
	exec <dev/console >dev/console 2>&1
771
	echo '.'
772
	exec chroot . /bin/sh <<- EOF
772
	exec chroot . /bin/sh <<- EOF
773
		umount /tmp/.initrd || echo "*: Failed to unmount the initrd!"
773
		umount /tmp/.initrd || echo "*: Failed to unmount the initrd!"
774
		/sbin/blockdev --flushbufs /dev/ram0 >/dev/null 2>&1
774
		/sbin/blockdev --flushbufs /dev/ram0 >/dev/null 2>&1
Lines 778-791 elif [ "$0" = '/init' ] Link Here
778
then
778
then
779
	[ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1
779
	[ ! -e ${CHROOT}/dev/console ] && mknod ${CHROOT}/dev/console c 5 1
780
	[ ! -e ${CHROOT}/dev/tty1 ] && mknod ${CHROOT}/dev/tty1 c 4 1
780
	[ ! -e ${CHROOT}/dev/tty1 ] && mknod ${CHROOT}/dev/tty1 c 4 1
781
	echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)"
781
	echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)${NORMAL}"
782
782
783
	cd ${CHROOT}
783
	cd ${CHROOT}
784
	mkdir ${CHROOT}/proc ${CHROOT}/sys 2>/dev/null
784
	mkdir ${CHROOT}/proc ${CHROOT}/sys 2>/dev/null
785
	echo -n '.'
785
	echo -ne "${BOLD}.${NORMAL}"
786
		umount /sys || echo '*: Failed to unmount the initrd /sys!'
786
		umount /sys || echo '*: Failed to unmount the initrd /sys!'
787
		umount /proc || echo '*: Failed to unmount the initrd /proc!'
787
		umount /proc || echo '*: Failed to unmount the initrd /proc!'
788
	echo -n '.'
788
	echo -e "${BOLD}.${NORMAL}"
789
789
790
	exec switch_root -c "/dev/console" "${CHROOT}" ${REAL_INIT:-/sbin/init} ${INIT_OPTS}
790
	exec switch_root -c "/dev/console" "${CHROOT}" ${REAL_INIT:-/sbin/init} ${INIT_OPTS}
791
fi
791
fi

Return to bug 202266