echo -e " ${BOLD}${BLUE}*${NORM} Searching for the CRUX media..."
mkdir -p /.tmpfs/.media
CRUXMEDIA=""
- CDROM_DEVICES="`grep 'drive name:' /proc/sys/dev/cdrom/info | awk '{print $3 }'`"
+ CDROM_DEVICES="`grep 'drive name:' /proc/sys/dev/cdrom/info | awk '{ print $3 }'`"
MMC_DEVICES="`grep -E 'mmcblk' /proc/partitions | awk '{ print $4 }'`"
BLOCK_DEVICES="`grep -E '[sh]d' /proc/partitions | awk '{ print $4 }'`"
for DEV in $CDROM_DEVICES $MMC_DEVICES $BLOCK_DEVICES
then
echo ", CRUX media."
CRUXMEDIA=$DEV
- #ln -s $DEV /dev/media
break
else
echo ", but it's not the CRUX media."
# check if the media was mounted properly. if not, spawn a shell
if [ ! -e /.tmpfs/.media/crux-media ]
then
- echo
echo -e " ${BOLD}${RED}*${NORM} The CRUX media was not properly mounted!"
echo " Spawning a shell for you to attempt to fix this problem. If"
echo " you are able to find the correct device, mount it at"
# check again and stop if it's still not there
if [ ! -e /.tmpfs/.media/crux-media ]
then
- echo
echo -e " ${BOLD}${RED}*${NORM} The CRUX media still appears not to be"
echo " found and installation will not continue."
echo
tar -xpf /.tmpfs/.media/rootfs.tar.xz -C /newroot
checkReturn
echo -e -n " ${BOLD}${BLUE}*${NORM} Copying devices from rootfs... "
- cp -af /dev/* /newroot/dev
+ cp -af /dev/* /newroot/dev/
checkReturn
mkdir -p /newroot/dev/pts /newroot/media
/bin/busybox --install -s /bin
-#
# main script
-#
echo ""
echo -e "${BOLD}CRUX-ARM 2.7.1 - ${BLUE}http://crux-arm.nu/${NORM}"
echo -e -n " ${BOLD}${BLUE}*${NORM} Populating /dev via mdev... "
mdev -s
checkReturn
-
-echo -e -n " ${BOLD}${BLUE}*${NORM} Registering mdev as hotplug agent... "
+echo -e -n " ${BOLD}${BLUE}*${NORM} Registering mdev as hotplug agent... "
echo "/bin/mdev" > /proc/sys/kernel/hotplug
checkReturn
sleep $DEVTIMEOUT
# if root=/dev/XXX was specified on the command line, use that as the new root
-# instead of searching for the media and using it. if it fails, fall back to the media
+# instead of searching for the media and using it. if it fails, fall back to
+# the media
grep -q "root=/dev/*" /proc/cmdline
if [ $? -eq 0 ]
then
find_and_mount_media
fi
-echo -e "${BOLD}${BLUE}*${NORM} Switching root.\n"
+echo -e " ${BOLD}${BLUE}*${NORM} Switching root.\n"
echo "$PRINTK" > /proc/sys/kernel/printk
echo > /proc/sys/kernel/hotplug
umount /sys