slitaz-tools rev 16

Add autocreation of CRUB menu.list in slitaz-installer.sh
author Christophe Lincoln <pankso@slitaz.org>
date Tue Dec 04 13:07:42 2007 +0100 (2007-12-04)
parents 37bd74f38d53
children 3495ca7075dc
files tinyutils/slitaz-installer.sh
line diff
     1.1 --- a/tinyutils/slitaz-installer.sh	Sun Dec 02 22:43:03 2007 +0100
     1.2 +++ b/tinyutils/slitaz-installer.sh	Tue Dec 04 13:07:42 2007 +0100
     1.3 @@ -107,8 +107,8 @@
     1.4  	cd /mnt/target
     1.5  	lzma d rootfs.lz rootfs.cpio
     1.6  	cpio -id < rootfs.cpio
     1.7 -	echo -n "Suppression des fichiers inutiles..."
     1.8 -	rm rootfs.cpio init
     1.9 +	echo -n "Suppression des fichiers copiés..."
    1.10 +	rm rootfs.cpio rootfs.lz init
    1.11  	status
    1.12  else
    1.13  	echo -n "Copie du système de fichier racine..."
    1.14 @@ -123,10 +123,32 @@
    1.15  	status
    1.16  fi
    1.17  
    1.18 +# Creat the target GRUB configuration.
    1.19 +#
    1.20  if [ ! -f /mnt/target/boot/grub/menu.lst ]; then
    1.21 +	echo "Creating default GRUB menu.lst..."
    1.22  	mkdir -p /mnt/target/boot/grub
    1.23 -	cp /boot/grub/menu.lst /mnt/target/boot/grub
    1.24 -fi
    1.25 +cat > /mnt/target/boot/grub/menu.lst << EOF
    1.26 +# /boot/grub/menu.lst: GRUB boot loader configuration.
    1.27 +#
    1.28 +
    1.29 +# By default, boot the first entry.
    1.30 +default 0
    1.31 +
    1.32 +# Boot automatically after 20 secs.
    1.33 +timeout 20
    1.34 +
    1.35 +# Change the colors.
    1.36 +color yellow/brown light-green/black
    1.37 +
    1.38 +# For booting SliTaz from : $TARGET_DEV
    1.39 +#
    1.40 +title 	SliTaz GNU/Linux (cooking) (Kernel $KERNEL)
    1.41 +		root(hd0,0)
    1.42 +		kernel /boot/$KERNEL root=$TARGET_DEV
    1.43 +
    1.44 +EOF
    1.45 +	fi
    1.46  
    1.47  # End info
    1.48  echo ""
    1.49 @@ -140,8 +162,11 @@
    1.50  
    1.51      # grub-install --root-directory=/mnt/target /dev/hda
    1.52  
    1.53 -Les lignes qui feront démarrer SliTaz via le fichier de configuration de GRUB
    1.54 -/boot/grub/menu.lst, en modifiant root(hd0,0) en fonction de votre système :
    1.55 +Les lignes suivantes on été ajoutées au fichier de configuration de GRUB
    1.56 +/boot/grub/menu.lst de la cible. Elles feront démarrer SliTaz en modifiant 
    1.57 +la valeure root(hd0,0) en fonction de votre système. Si vous n'installé pas
    1.58 +GRUB, vous pouvez utiliser ces même lignes dans un autre fichier menu.lst,
    1.59 +situé sur une autre partitions :
    1.60  
    1.61      title  SliTaz GNU/Linux (cooking) (Kernel $KERNEL)
    1.62             root(hd0,0)