From: Chris Gianelloni Date: Thu, 14 Sep 2006 18:41:07 +0000 (+0000) Subject: This change makes it so we only try to mount 'auto' when cdroot is specified. This... X-Git-Tag: v3.4.10.902~310 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3ec1fddd2e04469905c7fdddfe2cb222fccee041;p=genkernel.git This change makes it so we only try to mount 'auto' when cdroot is specified. This should fix all of our mounting issues, as well as allow for not only USB keys to use these kernels with a LiveCD kernel/config, but allow it to boot from any media which the kernel has support. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@442 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- diff --git a/generic/initrd.scripts b/generic/initrd.scripts index bd22ad4..7715708 100644 --- a/generic/initrd.scripts +++ b/generic/initrd.scripts @@ -72,21 +72,14 @@ findcdmount() { if [ -b "${x}" ] then good_msg "Attempting to mount media:- ${x}" - mount -r -t iso9660 ${x} ${NEW_ROOT}/mnt/cdrom \ - > /dev/null 2>&1 - if [ "$?" = '0' ] + if [ -n "${CDROOT_DEV}" ] then - # Check for a LiveCD - if [ -e ${NEW_ROOT}/mnt/cdrom/${SUBDIR}/livecd ] - then - REAL_ROOT="${x}" - break - else - umount ${NEW_ROOT}/mnt/cdrom - fi + mount -r -t auto ${x} ${NEW_ROOT}/mnt/cdrom \ + > /dev/null 2>&1 + else + mount -r -t iso9660 ${x} ${NEW_ROOT}/mnt/cdrom \ + > /dev/null 2>&1 fi - mount -r -t auto ${x} ${NEW_ROOT}/mnt/cdrom \ - > /dev/null 2>&1 if [ "$?" = '0' ] then # Check for a LiveCD @@ -97,6 +90,7 @@ findcdmount() { else umount ${NEW_ROOT}/mnt/cdrom fi + fi fi done if [ "${REAL_ROOT}" != '' ] @@ -341,14 +335,19 @@ start_dev_mgr() { bootstrapCD() { # Locate the cdrom device with our media on it. - [ -n "${CDROOT_DEV}" ] && DEVICES="$DEVICES ${CDROOT_DEV}" # Device specified on the command line - DEVICES="$DEVICES /dev/cdroms/*" # CDROM DEVICES - DEVICES="$DEVICES /dev/ide/cd/*" # CDROM DEVICES - DEVICES="$DEVICES /dev/sr*" # UML DEVICES - DEVICES="$DEVICES /dev/sd*" # USB Keychain - DEVICES="$DEVICES /dev/hd*" # IDE devices - DEVICES="$DEVICES /dev/ubd* /dev/ubd/*" # UML DEVICES - DEVICES="$DEVICES /dev/iseries/vcd*" # iSeries Devices + # CDROM DEVICES + DEVICES="/dev/cdroms/* /dev/ide/cd/* /dev/sr*" + # USB Keychain/Storage + DEVICES="$DEVICES /dev/sd*" + # IDE devices + DEVICES="$DEVICES /dev/hd*" + # USB using the USB Block Driver + DEVICES="$DEVICES /dev/ubd* /dev/ubd/*" + # iSeries devices + DEVICES="$DEVICES /dev/iseries/vcd*" + # The device was specified on the command line. Shold we even be doing a + # scan at this point? I think not. + [ -n "${CDROOT_DEV}" ] && DEVICES="$DEVICES ${CDROOT_DEV}" findcdmount $DEVICES }