savara - kernel 4.2.0
[anomen-kernel-config.git] / savara / 3.0.17-tuxonice-r1-s2 / kernel_install.sh
blobac814dc5dae6d2ab6254d6356ae81d0f3eacd899
1 #!/bin/sh
3 # kernell install script
5 # $Id$
7 # System settings:
8 ROOT=/dev/sda2
10 echo make prepare
11 make prepare || exit 5
13 # extract verions
14 KERVER=`make kernelrelease`
16 echo "Root: $ROOT"
18 echo -n Build '&' install kernel "$KERVER" ' ?'
19 read
21 echo chown portage...
22 chown portage . -R || exit 4
24 echo make clean...
25 su portage -c "make clean" || exit 6
27 echo make prepare...
28 su portage -c "make prepare" || exit 7
30 echo make all...
31 su portage -c "make all" || exit 8
33 echo make modules_install...
34 make modules_install || exit 10
36 echo make firmware_install...
37 make firmware_install || exit 11
40 echo mount /boot with rw
41 mount /boot -o remount,rw
43 cp -v ./arch/x86/boot/bzImage "/boot/kernel-$KERVER" || exit 1
44 cp -v ./System.map "/boot/System.map-$KERVER" || exit 2
45 cp -v ./.config "/boot/Config-$KERVER" || exit 3
48 echo "" >> /boot/grub/grub.conf
49 echo "# ? & ?" >> /boot/grub/grub.conf
50 echo "title=Linux $KERVER" >> /boot/grub/grub.conf
51 echo "kernel" "/boot/kernel-$KERVER" "root=$ROOT" "ro" >> /boot/grub/grub.conf
52 echo "title=Linux $KERVER noresume" >> /boot/grub/grub.conf
53 echo "kernel" "/boot/kernel-$KERVER" "root=$ROOT" "ro" "noresume" "nox" >> /boot/grub/grub.conf
55 echo "* INFO *"
56 echo grub.conf was updated, but manual check is recomended.
57 echo ""
58 echo Finished.