[clug] How to Auto-detect architecture and boot 64-bit kernel if possible?

steve jenkin sjenkin at canb.auug.org.au
Wed Aug 18 02:15:08 MDT 2010


My Google Fu is at a low ebb :-(

Can anyone help me with a recipe to either:
 - tweak initrd to act as a bootloader and execute a new (64-bit) kernel
 - or at the start of the boot, detect 64-bit and twiddle grub menu &
reboot.

Target system is Debian...
But if techniques exist in other environment, I could adapt them.

'grub2' (or grub_pc) under Solaris (IIRC) has an 'if 64-bit' mode.
I don't want to hack any code for this...
If this were in the Debian (even testing) stream, it'd do me.

I'd prefer to keep using 'grub' (legacy) with it's simple "menu.lst".

If all else fails, I can write an /etc/init.d script (or off
/etc/inittab) to lookup /proc/cpuinfo and either flick a new menu.lst
into place or do an in-place edit to select a different default kernel.

I want to produce a VirtualBox VM image of Debian that will, without
modification, boot into 64-bit if it can.
Which means booting a 32-bit kernel and then testing

This is really a job for the bootloader, but I lost track of LILO a long
time ago (no idea of current capability) and still prefer 'grub legacy'
for servers.

Suggestions or war stories??

Thanks in Advance

steve

-- 
Steve Jenkin, Info Tech, Systems and Design Specialist.
0412 786 915 (+61 412 786 915)
PO Box 48, Kippax ACT 2615, AUSTRALIA

sjenkin at canb.auug.org.au http://members.tip.net.au/~sjenkin


More information about the linux mailing list