On Saturday 08 March 2003 08:29 pm, Harry Wert wrote:
What do I need to do to add an entry into grub to preserve my ability to mount an existing working kernel BEFORE I install a newer kernel. Under Lilo I knew how to do this, with grub as was installed when I upgraded to SuSE 8.1 I nearly lost my whole damn system when I recently tried upgrading my self compiled 2.4.20 kernel to a mantel 2.4.20-17. Yes, I know the risks of mantel kernels but I figured I was on safe ground since I could boot back into my previous working kernel if the mantel kernel did not operate as I expected. Well, I was wrong I did something wrong and my old kernel will not boot either. After expending much effort working in the restore mode and learning much more about kernels than I care to know I'm fully recovered.
Now my question: Can anyone explain to me what I must put into the grub menu.1st file to add such an entry to do what I have described above? What I did was added an entry to /boot/grub/menu.1st as follows:
You need to run mk_initrd after modifying menu.lst In menu.lst - declare both kernels the, SuSE default and the new kernel title SuSE kernel (hd0,5)/boot/vmlinuz root=/dev/hda7.... #note that by default SuSE places the kernel & initrd in /boot/vmlinuz initrd (hd0,5)/boot/initrd title kernel-2.4.20 kernel (hd0,5)/boot/vmlinuz-2.4.20 root=/dev/hda7..... initrd (hd0,5)/boot/initrd-2.4.20 Then run mk_initrd as follows: mk_initrd -k "vmlinuz vmlinuz-2.4.20" -i "initrd initrd-2.4.20" by default mk_initrd creates /boot/initrd & /boot/initrd.shipped - this is why you need to use the -k & -i options with the quotes. also make sure in YaST2 that hd(0,5) contains the MBR, This should work, however the new kernel may not boot depending on compile options, modules used, etc. Hope this helps, George
title oldkernel20 kernel (hd0,5)/vmlinuz.org-20 root=/dev/hda7 apm=on acpi=off vga=791 nosmp maxcpus=0 disableapic initrd (hd0,5)/initrd.org-20
The kernel line is NOT word wrapped, this email program did that.
vmlinuz.org-20 is a copy of my previous working kernel initrd.org-20 is a working copy of my previous working kernel
Upon boot, my added title is visible and selectable. The kernel starts loading and makes it all the way to attempting a "hotsync USB" line where it dies and will go no further and generates no error message. It takes a control-alt-del to reboot which of course was a catch 22 since the new kernel does not work either. As I sated, I fixed everything and I'm back in business.
Thank you for reading this far. Now to restate my question: How do you folks modify your working system to provide an escape route in case a newer kernel install bombs?
Thanks in advance...
Harry
-- Linux 2.4.20 i686 11:54pm up 99 days, 7:49, 5 users, load average: 0.16, 0.05, 0.01