Update of /cvsroot/devil-linux/build/config/etc/initrd
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23720/config/etc/initrd
Modified Files:
mount_cdrom
Log Message:
swiched from compressed iso to squashfs with lz4-hc compression
this reduced the image size signficantly and increased performance
Index: mount_cdrom
===================================================================
RCS file: /cvsroot/devil-linux/build/config/etc/initrd/mount_cdrom,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- mount_cdrom 4 Jan 2012 13:17:52 -0000 1.57
+++ mount_cdrom 26 Dec 2015 23:54:06 -0000 1.58
@@ -328,30 +328,37 @@
for disk in $CDROMS
do
- echo -n "checking $disk "
+ echo -n " checking $disk "
if /sbin/mount -n -t iso9660 -o ro $disk ${mountpoint} 2> /dev/null; then
if [ -e ${mountpoint}/DEVIL-LINUX ] ; then
MYVER=$(cat VERSION)
MEDIAVER=$(cat ${mountpoint}/DEVIL-LINUX)
- if [ "${MYVER}" == "${MEDIAVER}" ]; then
- if [ ! $silent ]; then
- $GREEN
- echo -e "Found Devil-Linux v${MEDIAVER}"
- $NORMAL
- fi
- echo $disk > /shm/DL_DEVICE
+ if [ -e ${mountpoint}/bootcd.squash ]; then
+ $BLUE
+ echo "Found embedded squashfs (${MEDIAVER}) - deferring"
+ $NORMAL
+ /sbin/umount ${mountpoint}
+ else
+ if [ "${MYVER}" == "${MEDIAVER}" ]; then
+ if [ ! $silent ]; then
+ $GREEN
+ echo -e "Found Devil-Linux v${MEDIAVER}"
+ $NORMAL
+ fi
+ echo $disk > /shm/DL_DEVICE
- # run from ram if correct variable is set
- IMAGE="bootcd.iso"
- IMAGEFS="iso9660"
- run_from_ram --cdrom
+ # run from ram if correct variable is set
+ IMAGE="bootcd.iso"
+ IMAGEFS="iso9660"
+ run_from_ram --cdrom
- exit 0
- else
- $RED
- echo "Wrong version (${MEDIAVER})"
- $NORMAL
- /sbin/umount ${mountpoint}
+ exit 0
+ else
+ $RED
+ echo "Wrong version (${MEDIAVER})"
+ $NORMAL
+ /sbin/umount ${mountpoint}
+ fi
fi
else
$YELLOW
@@ -366,13 +373,27 @@
fi
done
-# ok let's check all partitions if we find the bootcd.iso & the file DEVIL-LINUX
+if [ ! $silent ]; then
+ $GREEN
+ echo "Searching for Devil-Linux Images"
+ $NORMAL
+fi
+
+# ok let's check all partitions if we find the bootcd.iso or bootcd.squashfs & the file DEVIL-LINUX
+CDROM_IDE=`find /dev -name "hd?" 2> /dev/null`
DEVICES_IDE=`find /dev -name "hd??" 2> /dev/null`
+CDROM_SCSI=`find /dev -name "sr?" 2> /dev/null`
DISCS_SCSI=`find /dev -name "sd??" 2> /dev/null`
DEVICES_VIRTIO=`find /dev -name "vd??" 2> /dev/null`
-DISCS="$DEVICES_VIRTIO $DEVICES_IDE $DISCS_SCSI"
+DISCS="$DEVICES_VIRTIO $DEVICES_IDE $CDROM_IDE $CDROM_SCSI $DISCS_SCSI"
FILEMOUNT="/cd"
+if [ ! $silent ]; then
+ $GREEN
+ echo "Search list: $DISCS"
+ $NORMAL
+fi
+
if [ "$DEVICE_USER_ONLY" != "0" ]; then
$RED
echo "Disabling automatic scanning for Devil-Linux iso image! Good Luck."
@@ -382,7 +403,7 @@
for disk in $DISCS
do
- echo -n " checking $disk ... "
+ echo -n "checking $disk ... "
umount ${FILEMOUNT} 2> /dev/null
if /sbin/mount -n -t auto -o rw,noatime $disk ${FILEMOUNT} 2> /dev/null; then
MYVER=$(cat VERSION)
@@ -481,8 +502,15 @@
IMAGE="bootcd.squash"
IMAGEFS="squashfs"
elif [ -e ${FILEMOUNT}/bootcd.iso ] ; then
- IMAGE="bootcd.iso"
- IMAGEFS="iso9660"
+ #IMAGE="bootcd.iso"
+ #IMAGEFS="iso9660"
+ $RED
+ echo "ERROR: Booting ISO images is no longer supported!"
+ echo "Please start using the bootcd.squash that's embedded in the ISO"
+ echo
+ $NORMAL
+ sleep 10
+ exit 1
else
$RED
echo "ERROR: image file not found!"
@@ -534,6 +562,7 @@
if [ ! $silent ]; then
$RED
+ echo
echo "!!! Devil-Linux CD-ROM not found !!!"
$NORMAL
fi
|