# HG changeset patch # User Pascal Bellard # Date 1428916414 -7200 # Node ID aece1721c14f7eb0de573f105ed30229095f570d # Parent a12fb1874d30a9a8a1d1b1f414b0539677b6216b syslinux/taziso: install in Linux partition diff -r a12fb1874d30 -r aece1721c14f syslinux/stuff/iso2exe/taziso --- a/syslinux/stuff/iso2exe/taziso Sun Apr 12 14:55:37 2015 +0200 +++ b/syslinux/stuff/iso2exe/taziso Mon Apr 13 11:13:34 2015 +0200 @@ -115,7 +115,7 @@ umount /mnt/dos done fi -mount.posixovl -F \$mnt -- -oallow_other -odefault_permissions -osuid +$([ "$2" ] || echo '# ')mount.posixovl -F \$mnt -- -oallow_other -odefault_permissions -osuid mount --bind \$mnt /home umount /proc exec /sbin/init @@ -178,7 +178,7 @@ umount /mnt done fi -mount.posixovl -F /mnt/\$val -- -oallow_other -odefault_permissions -osuid +$([ "$3" ] || echo '# ')mount.posixovl -F /mnt/\$val -- -oallow_other -odefault_permissions -osuid mount --bind /mnt /mnt/\$val/mnt/dos mount -o size=0 -t tmpfs tmpfs /mnt/\$val/mnt/dos/\$val LDSO=\$(ls /mnt/\$val/lib/ld-* | sed q) @@ -199,7 +199,12 @@ doinstall() { + unset useposixovl + blkid | grep $(df /mnt | sed '$!d;s/ .*/:/') | \ + grep -qiE "(msdos|vfat|ntfs)" && useposixovl=YES + mkdir -p $mnt/slitaz/boot $mnt/slitaz/mnt/dos + [ "$useposixovl" ] && if ! mount.posixovl -F $mnt/slitaz -- \ -oallow_other -odefault_permissions -osuid; then echo "Can't install SliTaz. Abort." @@ -210,7 +215,7 @@ if [ "$1" ]; then ls_r /media/cdrom/boot/rootfs*gz | \ xargs cat > $mnt/slitaz/boot/rootfs.gz - tazusbinitfs $mnt/slitaz/boot/rootfs.gz + tazusbinitfs $mnt/slitaz/boot/rootfs.gz $useposixovl initrd=rootfs.gz extraargs="/home=$(getuuid)/slitaz rdinit=/init1" else @@ -226,7 +231,7 @@ done cp -a /etc/locale.conf $mnt/slitaz/etc 2> /dev/null cp -a /etc/keymap.conf $mnt/slitaz/etc 2> /dev/null - mkinitrd $mnt/slitaz/boot/initrd $mnt/slitaz + mkinitrd $mnt/slitaz/boot/initrd $mnt/slitaz $useposixovl initrd=initrd extraargs="mount=$(getuuid) subroot=slitaz" fi @@ -250,7 +255,8 @@ $mnt/slitaz/boot/README [ -d $mnt/slitaz/usr/sbin -a ! -x $mnt/slitaz/usr/sbin/mount.posixovl ] && cp $(which mount.posixovl) $mnt/slitaz/usr/sbin - if grep -qs " $mnt " /proc/mounts && [ ! -d $mnt/boot/grub ]; then + if "$useposixovl" && grep -qs " $mnt " /proc/mounts && + [ ! -d $mnt/boot/grub ]; then mkdir -p $mnt/boot/grub echo -en "\nInstall grub in /boot/grub..." cp -a /usr/lib/grub/*/* $mnt/boot/grub @@ -266,10 +272,6 @@ title Microsoft Windows chainloader +1 -title SliTaz GNU/Linux $(cat $mnt/slitaz/etc/slitaz-release) - kernel /slitaz/boot/bzimage rw root=/dev/null $extraargs autologin - initrd /slitaz/boot/$initrd - EOT dev=$(grep " $mnt " /proc/mounts | awk '{ print $1 }') base=${dev//[0-9]/} @@ -282,8 +284,18 @@ EOT grub-install --no-floppy --root-directory=$mnt $base fi + if [ -s $mnt/boot/grub/menu.lst ] && + ! grep -q /slitaz/boot/bzimage $mnt/boot/grub/menu.lst; then + echo -en "\nUpdate /boot/grub/menu/lst..." + cat >> $mnt/boot/grub/menu.lst < /tmp/dialog$$ </dev/null | \ - zcat 2>/dev/null + [ $(get 512 $ISO) -eq 35615 ] && n=1 || n=$((1+$(get 417 $ISO 1))) + dd if=$ISO bs=512 skip=$n count=20 2>/dev/null | zcat 2>/dev/null } hasflavinfo()