Author Topic: Grub problem - Lilo to the rescue!  (Read 524 times)

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3798
Grub problem - Lilo to the rescue!
« on: January 02, 2013, 01:07:44 AM »
I have a brand new install of 64-bit test 5 with kde and lxde desktops installed. I added a new kernel and edited grub in pcc and now grub won't install. There are two partitions on this machine, but this one was the last to update the mbr. So, I am stuck with boot from a liveusb. But, I noticed PCC had to option to boot with lilo, and it actually still works. (Don't try it unless you visual reminders of the early '90's. ;))

Whether I edit it in pcc or with a text editor it grub complains that it can't execute a binary file on line 1. I googled and can't figure out what it is complaining about. Any ideas?

Galen

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3798
Re: Grub problem - Lilo to the rescue!
« Reply #1 on: January 02, 2013, 01:20:55 AM »
That was fast. Some times you really do get lucky. :o ;)

The first line of /boot/grub/install.sh ends with <<EOF, and it needed to be quoted as <<"EOF". I don't know exactly how I knew to try this, must have been a faint memory of one of Old-Polack's old posts. ;D Anyway, it worked without a hitch. Let's hope that it stays fine. By the way, I did not edit install.sh before, so it appears to be a bug that hasn't surfaced until now.  :-\

Galen



Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10667
  • MLUs Forever!
Re: Grub problem - Lilo to the rescue!
« Reply #2 on: January 02, 2013, 03:55:45 AM »
Maybe you should post the contents of install.sh

I suspect there is some other corruption in the file as I have never heard of quoting that EOF previously.
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3798
Re: Grub problem - Lilo to the rescue!
« Reply #3 on: January 02, 2013, 09:30:29 PM »
Here is /boot/grub/install.sh
Code: [Select]
grub --device-map=/boot/grub/device.map --batch <<EOF
root (hd0,5)
setup --stage2=/boot/grub/stage2 (hd0)
quit
EOF

Code: [Select]
timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,5)/boot/gfxmenu
default 0

title linux
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=6ec0b308-6734-4f24-83be-9ff1bd1201b8 quiet vmalloc=256M acpi=on resume=/dev/sda6 splash=silent init=/sbin/e4rat-preload vga=791
initrd (hd0,5)/boot/initrd.img

title linux-nonfb
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=6ec0b308-6734-4f24-83be-9ff1bd1201b8 quiet vmalloc=256M acpi=on resume=UUID=9966d5dd-5b86-4dc8-a71e-6bfa8e40c702
initrd (hd0,5)/boot/initrd.img

title 3.2.18-pclos2.bfs
kernel (hd0,5)/boot/vmlinuz-3.2.18-pclos2.bfs BOOT_IMAGE=3.2.18-pclos2.bfs root=UUID=6ec0b308-6734-4f24-83be-9ff1bd1201b8 quiet vmalloc=256M acpi=on resume=UUID=9966d5dd-5b86-4dc8-a71e-6bfa8e40c702 splash=silent init=/usr/sbin/e4rat-preload vga=791
initrd (hd0,5)/boot/initrd-3.2.18-pclos2.bfs.img

title failsafe
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=6ec0b308-6734-4f24-83be-9ff1bd1201b8 quiet failsafe vmalloc=256M acpi=on
initrd (hd0,5)/boot/initrd.img

title PCLinuxOS 32 (/dev/sda1)
root (hd0,0)
configfile /boot/grub/menu.lst

I added "init=/usr/sbin/e4rat-preload" to the first boot option. This has worked without fault before. But to trouble shoot, I remove the line and it still caused an error. Eventually I move /boot/grub to /boot/grub2 and reinstalled grub. Still didn't work. I added the quotes and it worked and e4rat-preload also ran. But, somehow, the quotes are not there anymore, but booting works. Strange ???

Galen

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3798
Re: Grub problem - Lilo to the rescue!
« Reply #4 on: January 02, 2013, 09:39:56 PM »
grub must have recreated device.map and install.sh. I try to be very careful so that I can re-trace my steps to reproduce a problem and a fix, but I am confused by this one. I am assuming PCC calls grub-install and grub-install calls install.sh which opens device map. But what would overwrite my edit to install.sh? This is solved, but I hope to understand this better.

Galen

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10667
  • MLUs Forever!
Re: Grub problem - Lilo to the rescue!
« Reply #5 on: January 03, 2013, 03:56:11 AM »
grub must have recreated device.map and install.sh. I try to be very careful so that I can re-trace my steps to reproduce a problem and a fix, but I am confused by this one. I am assuming PCC calls grub-install and grub-install calls install.sh which opens device map. But what would overwrite my edit to install.sh? This is solved, but I hope to understand this better.

Galen


I don't know what writes this file.
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT