tazlito rev 463

tazlito: remove /boot/grub on cdrom
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Sep 27 09:22:53 2017 +0200 (20 months ago)
parents 5b155e5b82a0
children 9996bbbfb039
files tazlito
line diff
     1.1 --- a/tazlito	Fri Sep 08 15:38:48 2017 +0300
     1.2 +++ b/tazlito	Wed Sep 27 09:22:53 2017 +0200
     1.3 @@ -1105,9 +1105,8 @@
     1.4  	mount -o loop,ro -t squashfs /dev/loop\$lp /mnt/.\$fs
     1.5  	lp=\$((\$lp+1))
     1.6  done
     1.7 -else
     1.8 +fi
     1.9  mkdir -p /mnt/.rw/mnt/.httpfs
    1.10 -fi
    1.11  while read type opt; do
    1.12  	insmod /lib/modules/\$type.ko && mount -t \$type -o \$opt none /mnt && break
    1.13  done <<EOT
    1.14 @@ -1172,7 +1171,7 @@
    1.15  		sed -i '/ifmem/{NNNNNNNNd};/^LABEL/{N;/LABEL SliTaz [^L]/{NNNd}}' \
    1.16  			$root/boot/isolinux/isolinux.cfg
    1.17  		[ -n "$3" ] || set -- $(grep 'append [0-9]' $root/boot/isolinux/common.cfg)
    1.18 -		sed -i "s/label $3\$/label slitaz/;s|=/boot/rootfs\(.*\).gz |=/boot/rootfs.gz |" \
    1.19 +		sed -i "s/label $3\$/label slitaz/;s|=\(.*\)/rootfs\(.*\).gz |=\1/rootfs.gz |" \
    1.20  			$root/boot/isolinux/*.cfg
    1.21  	fi
    1.22  }
    1.23 @@ -1247,7 +1246,7 @@
    1.24  		done
    1.25  		sed -i -e "/append [0-9]/s/append .*/append$new $1/" -e \
    1.26  			"/append ifmem [0-9]/s/append .*/append ifmem$new $1/" $cfg
    1.27 -		sed -i 's|\(initrd=\)\(/boot/rootfs.\.gz\)|\1/boot/rootfs.gz,\2|' $cfg
    1.28 +		sed -i 's|\(initrd=\)\(.[^/]*\)\(/rootfs.\.gz\)|\1\2/rootfs.gz,\3|' $cfg
    1.29  		sed -i '/LABEL base/{NNNNp;s|base .ive|cdrom|;s|base|cdrom|;s|,[^ ]*||}' $cfg
    1.30  		sed -i '/LABEL cdrom/{NNNNp;s|z cdrom|& text|;s|L cdrom|&text|;s|root=|screen=text &|;s|,[^ ]*||}' $cfg
    1.31  	done
    1.32 @@ -2365,6 +2364,7 @@
    1.33  			action 'Moving the boot directory...'
    1.34  			mv $ROOTFS/boot $ROOTCD
    1.35  			cd $ROOTCD/boot
    1.36 +			rm -rf grub*
    1.37  			make_bzImage_hardlink
    1.38  			status
    1.39  		fi