lilo.conf not generated?
Chad Walstrom
chewie at wookimus.net
Thu Aug 22 17:42:42 CEST 2002
Chad Walstrom <chewie at wookimus.net> wrote:
> Now, we edited the scripts/BOOT file a bit. It's still not perfect, but
> it seems to work well. This alters how grub's menu.lst is installed
> with update-grub. Instead of placing it in the body of this msg, I
> attached it.
I had forgotten to attach it. I will do that now. ;-)
-------------- next part --------------
#! /bin/sh
#
# $Id: BOOT,v 1.7 2002/07/02 17:33:10 chad Exp $
# copyright Thomas Lange 2001, lange at debian.org
# this is the function: AppendIfNoSuchLine
egrep -q "^auto" $target/etc/modules 2>/dev/null || echo "auto" >> $target/etc/modules
# a list of modules, that are loaded at boot time
echo $moduleslist >> $target/etc/modules
ifclass LILO && {
# write lilo.conf and install lilo to disk
echo " Creating lilo.conf for /vmlinuz"
cat > $target/etc/lilo.conf <<-EOF
boot=$BOOT_DEVICE
root=$ROOT_PARTITION
install=/boot/boot.b
map=/boot/map
vga=normal
delay=50
#
image=/vmlinuz
label=linux
$liloappend
EOF
$target/sbin/lilo -r $target
}
ifclass GRUB && {
kernelname=/vmlinuz
echo "Installing grub and boot entry for $kernelname"
grub-install --root-directory=$target $BOOT_DEVICE
broot=`device2grub $BOOT_PARTITION`
cat > $target/boot/grub/menu.lst <<-EOF
# created by FAI
password bootsecret
timeout 10
default 1
hiddenmenu
color cyan/blue white/blue
# Skip over this.
title FAI Install
root $broot
kernel /$kernelimage root=/dev/nfs ip=::::::dhcp devfs=nomount
### 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
## e.g. kopt=root=/dev/hda1 ro
# kopt=root=$ROOT_PARTITION ro
## default grub root device
## e.g. groot=(hd0,0)
# groot=$broot
## 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=false
## 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
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all
## ## End Default Options ##
### END DEBIAN AUTOMAGIC KERNELS LIST
EOF
rdev $target/$kernelname $ROOT_PARTITION
$ROOTCMD update-grub
# Hack to compensate for update-grub's desire to add kernel paths with
# /boot in them
pushd $target/boot
ln -s . boot
popd
echo "Grub installed for $kernelimage $broot"
}
More information about the linux-fai
mailing list