Hi,
rpm automatically place a new installed kernel as the first option. However, I want to move it as the last one - to end of the file.
Grub configuration file looks like this:
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.29.6-217.2.7.fc11.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.29.6-217.2.7.fc11.x86_64 ro root=/dev/mapper/main-root rhgb quiet
initrd /initrd-2.6.29.6-217.2.7.fc11.x86_64.img
title Fedora (2.6.29.6-217.2.3.fc11.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.29.6-217.2.3.fc11.x86_64 ro root=/dev/mapper/main-root rhgb quiet
initrd /initrd-2.6.29.6-217.2.3.fc11.x86_64.img
title Fedora (2.6.29.6-213.fc11.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.29.6-213.fc11.x86_64 ro root=/dev/mapper/main-root rhgb quiet
initrd /initrd-2.6.29.6-213.fc11.x86_64.img
My goal is to move first option (217.2.3) to end. Now I figure out how to delete it:
sed -e '/(2.6.29.6-217.2.7.fc11.x86_64)/,+3d' /boot/grub/menu.lst
p command only prints current line (not as in vim, where it means paste).
Do you have any ideas how to automatically move this part of file to its end?