]> git.sur5r.net Git - bacula/rescue/blob - rescue/linux/cdrom/makekernel
Initial revision
[bacula/rescue] / rescue / linux / cdrom / makekernel
1 #! /bin/sh
2
3 # This script updates the kernel and modules from your
4 #   current system. 
5 #
6
7 TOPDIR=`pwd`
8 KERNEL=`uname -r` 
9 KERNEL=2.6.10-1.770_FC3
10
11 rm -rf roottree/dev
12 tar xfz dev.tar.gz -C roottree
13 if [ $? != 0 ] ; then
14    echo "Update failed."
15    exit 1
16 fi
17
18 #
19 # Update modules in root RAM disk
20 #  Keep kernel directory structure
21 #
22 echo "Updating modules in root RAM disk"
23 rm -rf roottree/lib/modules
24 mkdir -p roottree/lib/modules
25 cp -af /lib/modules/$KERNEL/ roottree/lib/modules/
26
27 kernel="/boot/vmlinuz-$KERNEL"
28 echo "Coping $kernel to $TOPDIR/cdtree/boot/isolinux/vmlinuz"
29 cp -f $kernel $TOPDIR/cdtree/boot/isolinux/vmlinuz
30 if [ $? != 0 ] ; then
31    echo "Could not find kernel. Update failed."
32    exit 1
33 fi
34 if [ -e /boot/map ] ; then
35    cp -f /boot/map $TOPDIR/cdtree/boot/isolinux/map
36    if [ $? != 0 ] ; then
37       echo "Update failed."
38       exit 1
39    fi
40 fi