We had a troublesome upgrade of our Gentoo Sparc64 box. After emerge world the system wouldn’t boot because the boot files were changed without re-running SILO. We fixed this in this article. Anyway, even though we went through this trouble, it appears that the emerge downloaded the 2.4.31 sources, messed with our boot files, but we were still running on 2.4.27:
srv-1 linux # uname -a Linux srv-1 2.4.27-sparc #1 SMP Fri Dec 31 08:43:34 PST 2004 sparc64 sun4u TI UltraSparc II (BlackBird) GNU/Linux srv-1 linux # |
We decided to recompile the kernel and call it something different. We’ll see if emerge will mess with that next time around. Here is how we upgraded our kernel:
srv-1 src # ls linux linux-2.4.27-sparc linux srv-1 src # rm linux srv-1 src # ln -s linux linux srv-1 src # cd linux |
Note that the whole linking of linux to the kernel source tree is dated and not used, supposedly, but we didn’t do this originally, it was part of the Gentoo install. Perhaps it still isn’t needed, but we aren’t willing to change something that mostly works. Let’s continue on with copying the old .config file:
srv-1 linux # cp ../linux-2.4.27-sparc/.config ./ srv-1 linux # make oldconfig rm -f include/asm ( cd include ; ln -sf asm-sparc64 asm) /bin/sh scripts/Configure -d arch/sparc64/config.in # # Using defaults found in .config . . . * Grsecurity * Grsecurity (CONFIG_GRKERNSEC) [N/y/?] *** End of Linux kernel configuration. *** Check the top-level Makefile for additional configuration. *** Next, you must run 'make dep'. |
Time to compile:
srv-1 linux # make dep && make clean vmlinux image modules modules_install . . . make[1]: Leaving directory `/usr/src/linux-2.4.31-sparc/arch/sparc64/math-emu' cd /lib/modules/2.4.31-sparc; \ mkdir -p pcmcia; \ find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.4.31-sparc; fi srv-1 linux-2.4.31-sparc # |
Let’s install the kernel and reboot:
srv-1 linux-2.4.31-sparc # cp arch/sparc64/boot/image /boot/sparckernel-2.4.31 srv-1 linux-2.4.31-sparc # cp System.map /boot srv-1 linux-2.4.31-sparc # vi /etc/silo.conf srv-1 linux-2.4.31-sparc # silo /etc/silo.conf appears to be valid srv-1 linux-2.4.31-sparc # Let's reboot. [screen gets wavy... flash forward]: srv-1 ~ # uname -a Linux srv-1 2.4.31-sparc #1 SMP Sun Sep 4 06:05:28 PDT 2005 sparc64 sun4u TI UltraSparc II (BlackBird) GNU/Linux srv-1 ~ # srv-1 ~ # cat /etc/silo.conf partition = 1 timeout = 150 default=Gentoo root = /dev/sda1 image = /boot/sparckernel-2.4.31 label = Gentoo root = /dev/sda1 read-only other = /sbus@1f,0/SUNW,fas@e,8800000/sd@9,0;1 label = solaris |
All is good.