On 20/08/12 21:36, Linda Walsh wrote:
Sid Boyce wrote:
#!/bin/sh cp arch/x86/boot/bzImage /boot/vmlinuz-$1;cp System.map /boot/System.map-$1 rm /boot/System.map;ln -s /boot/System.map-$1 /boot/System.map cp .config /boot/config-$1 cd /boot; mkinitrd -k vmlinuz-$1 -i initrd-$1 -M /boot/System.map -d /dev/disk/by-id/ata-WDC_WD20EARS-07MVWB0_WD-WCAZA4270277-part1 grub2-mkconfig -o /boot/grub2/grub.cfg ------------------------------------- Cut
---Same here... cept I'm lazier.. I don't type in the version -- just 'm' or no 'm' to install modules as well as kernel...
----------------------- #!/bin/sh -xe # v6 - allow for alphabetics in extra version (2011/08) # v5 - convert to 2.6.XX/3.X.x (2nd) name-forming convention (2008/12; RCS'ed) # v4 - convert to 2.6 name-forming convention # v3 - add parameter check to run modules_install export arch="${ARCH:-""}" if [ -z "${arch:-""}" ] ; then arch="$(/bin/uname -i)" ; fi shopt -s expand_aliases alias sed="sed -r" maj=$(grep "^VERSION = " Makefile|sed 's/.*[ ]([0-9]+)/\1/ ') min=$(grep "^PATCHLEVEL = " Makefile|sed 's/.*[ ]([0-9]+)/\1/ ') dot=$(grep "^SUBLEVEL = " Makefile|sed 's/.*[ ]([0-9]+)/\1/ ') patch=$(grep "^EXTRAVERSION = " Makefile|sed 's/.*[ ]([-\.0-9a-zA-Z]+)/\1/ ') if [ -e .config ]; then local=$(grep "CONFIG_LOCALVERSION=" .config |sed 's/^[A-Z_]+="(.*)"/\1/ ') fi KERN="$maj.$min.$dot$patch$local" echo "Kernel = $KERN" set -x cp ./arch/$arch/boot/bzImage /boot/vmlinuz-$KERN cp System.map /boot/System.map-$KERN test -e /boot/System.map && rm /boot/System.map # a fail ends script due to -e ln -s /boot/System.map-$KERN /boot/System.map unset ROOT /sbin/lilo if [ "$1" == "" ]; then echo Modules not installed else echo installing modules... make modules_install fi OK, another way to skin the cat. I use a different script to take care of building the kernel and installing modules. When the build completes successfully, this script takes care of setting everything up for a reboot. Regards Sid.
-- Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support Senior Staff Specialist, Cricket Coach Microsoft Windows Free Zone - Linux used for all Computing Tasks -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org