tazlito rev 271

tazlito/writeiso: source kernel and boot files from loop mounted iso
author Richard Dunbar <mojo@slitaz.org>
date Wed Apr 04 00:25:23 2012 +0000 (2012-04-04)
parents dc371fa292f4
children 95ee294e4147
files tazlito
line diff
     1.1 --- a/tazlito	Sun Apr 01 16:43:17 2012 +0100
     1.2 +++ b/tazlito	Wed Apr 04 00:25:23 2012 +0000
     1.3 @@ -2289,17 +2289,21 @@
     1.4  		mv -f /rootfs.gz $ROOTCD/boot
     1.5  		
     1.6  		# Now we need the kernel and isolinux files.
     1.7 -		if mount /dev/cdrom /media/cdrom 2>/dev/null; then
     1.8 +		if  mount /dev/cdrom /media/cdrom 2>/dev/null; then
     1.9  			cp /media/cdrom/boot/bzImage $ROOTCD/boot
    1.10  			cp -a /media/cdrom/boot/isolinux $ROOTCD/boot
    1.11  			unmeta_boot $ROOTCD
    1.12  			umount /media/cdrom
    1.13 -		else
    1.14 +	      elif  mount |grep /media/cdrom; then
    1.15 +	                cp /media/cdrom/boot/bzImage $ROOTCD/boot
    1.16 +		        cp -a /media/cdrom/boot/isolinux $ROOTCD/boot
    1.17 +			unmeta_boot $ROOTCD
    1.18 +			umount /media/cdrom;
    1.19 +	      else
    1.20  			echo -e "
    1.21 -Unable to mount the cdrom to copy the Kernel and needed files. When SliTaz
    1.22 -is running in RAM the kernel and bootloader files are kept on the cdrom.
    1.23 -Please insert a LiveCD or unmount the current cdrom to let Tazlito handle 
    1.24 -the media.\n"
    1.25 +When SliTaz is running in RAM the kernel and bootloader files are kept 
    1.26 +on the cdrom. Please insert a LiveCD or loop mount the slitaz.iso to 
    1.27 +/media/cdrom to let Tazlito copy the files.\n"
    1.28  			echo -en "----\nENTER to continue..."; read i
    1.29  			exit 1
    1.30  		fi