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
cleanup-cruft
Chris Gianelloni 19 years ago
parent c9111d1f3a
commit 3ec1fddd2e

@ -72,21 +72,14 @@ findcdmount() {
if [ -b "${x}" ] if [ -b "${x}" ]
then then
good_msg "Attempting to mount media:- ${x}" good_msg "Attempting to mount media:- ${x}"
mount -r -t iso9660 ${x} ${NEW_ROOT}/mnt/cdrom \ if [ -n "${CDROOT_DEV}" ]
> /dev/null 2>&1
if [ "$?" = '0' ]
then 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
fi
mount -r -t auto ${x} ${NEW_ROOT}/mnt/cdrom \ mount -r -t auto ${x} ${NEW_ROOT}/mnt/cdrom \
> /dev/null 2>&1 > /dev/null 2>&1
else
mount -r -t iso9660 ${x} ${NEW_ROOT}/mnt/cdrom \
> /dev/null 2>&1
fi
if [ "$?" = '0' ] if [ "$?" = '0' ]
then then
# Check for a LiveCD # Check for a LiveCD
@ -98,6 +91,7 @@ findcdmount() {
umount ${NEW_ROOT}/mnt/cdrom umount ${NEW_ROOT}/mnt/cdrom
fi fi
fi fi
fi
done done
if [ "${REAL_ROOT}" != '' ] if [ "${REAL_ROOT}" != '' ]
then then
@ -341,14 +335,19 @@ start_dev_mgr() {
bootstrapCD() { bootstrapCD() {
# Locate the cdrom device with our media on it. # Locate the cdrom device with our media on it.
[ -n "${CDROOT_DEV}" ] && DEVICES="$DEVICES ${CDROOT_DEV}" # Device specified on the command line # CDROM DEVICES
DEVICES="$DEVICES /dev/cdroms/*" # CDROM DEVICES DEVICES="/dev/cdroms/* /dev/ide/cd/* /dev/sr*"
DEVICES="$DEVICES /dev/ide/cd/*" # CDROM DEVICES # USB Keychain/Storage
DEVICES="$DEVICES /dev/sr*" # UML DEVICES DEVICES="$DEVICES /dev/sd*"
DEVICES="$DEVICES /dev/sd*" # USB Keychain # IDE devices
DEVICES="$DEVICES /dev/hd*" # IDE devices DEVICES="$DEVICES /dev/hd*"
DEVICES="$DEVICES /dev/ubd* /dev/ubd/*" # UML DEVICES # USB using the USB Block Driver
DEVICES="$DEVICES /dev/iseries/vcd*" # iSeries Devices 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 findcdmount $DEVICES
} }

Loading…
Cancel
Save