several kernels?
Henning Glawe
glaweh at physik.fu-berlin.de
Wed Sep 18 09:27:37 CEST 2002
On Tue, Sep 17, 2002 at 06:35:33PM +0200, Michael Renner wrote:
> I need to have several kernels on my maschines, the users may have the
> possibility to choose one of them.
1) just install the kernel package via $FAI/packages_install/*
2) use grub
3) i attached our $FAI/files/boot/grub/menu.lst/ and
$FAI/files/etc/kernel-img.conf/ ; for the first one you have to hack
some other mechanism to set the grub password
--
c u
henning
-------------- next part --------------
# $Id: GRUB,v 1.3 2002/01/18 19:08:40 tburnus Exp $
#
timeout 5
default 0
color cyan/blue white/blue
password --md5 #FAI_GRUB_PW_MD5#
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default optons below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
# kopt=root=#ROOT_PARTITION# ro
## default grub root device
## e.g. groot=(hd0,0)
# groot=#GROOT#
## should update-grub create alternative boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## should update-grub lock alternative boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=true
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery mode) single
# altoptions=(recovery mode) single
## ## End Default Options ##
### END DEBIAN AUTOMAGIC KERNELS LIST
-------------- next part --------------
root root 0640
-------------- next part --------------
#! /bin/bash
# $Id: postinst,v 1.13 2002/08/01 10:50:07 glaweh Exp $
set -a
[ -r $target/etc/config/pass ] && . $target/etc/config/pass
[ -r $target/etc/config/disk ] && . $target/etc/config/disk
[ -r "$LOGDIR/disk_var.sh" ] && . "$LOGDIR/disk_var.sh"
echo $(pwd)/$(basename $0)
echo "BOOT_DEVICE...:" $BOOT_DEVICE
echo "ROOT_PARTITION:" $ROOT_PARTITION
case "$1" in
GRUB|DUALBOOT1|gap8)
echo "Installing grub and boot entry"
grub-install --root-directory=$target $BOOT_DEVICE
groot=`device2grub $ROOT_PARTITION`
perl -pi -e 's/#GROOT#/$ENV{groot}/g ;' \
-e 's/#ROOT_PARTITION#/$ENV{ROOT_PARTITION}/g ;' \
-e 's/#FAI_GRUB_PW_MD5#/$ENV{GRUB_PW_MD5}/g ;' $2
$ROOTCMD /usr/sbin/update-fai-kernel
echo "Grub installed for $groot"
;;
*)
echo "Warning: nothing to do for class $1"
;;
esac
exit 0
-------------- next part --------------
# $Id: GRUB,v 1.3 2002/06/19 20:32:48 glaweh Exp $
postinst_hook=/usr/sbin/update-fai-kernel
postrm_hook=/usr/sbin/update-fai-kernel
silent_modules=yes
do_symlinks=no
clobber_modules=yes
do_boot_enable=no
-------------- next part --------------
root root 0644
More information about the linux-fai
mailing list