Grub messed up after upgrading 12.3 to 13.1

So I had openSUSE 12.3 dual-booting fine-and-dandy with Windows 7 andyesterday, I decided to do an in-place upgrade from 12.3 to 13.1.
When the system restarted after the upgrade, I got…
Grub loading.
Welcome to GRUB!
error: symbol‘grub_term_highlight_color’ not found.
Entering rescue mode…
grub rescue>

I tried to do a grub repair using a 12.3Rescue Disk (as I had successfully done after installing Windows 7) using thefollowing commands (as root)…
linux:/home/linux/Desktop # mount /dev/sda6 /mnt
linux:/home/linux/Desktop # mount --bind /dev /mnt/dev
linux:/home/linux/Desktop # chroot /mnt
linux:/> mount /proc
linux:/> mount /sys
linux:/> grub2-mkconfig -o /boot/grub2/grub.cfg

But when I tried to mount /proc and/sys, I got…
linux:/>mount /proc
mount: /proc: mount failed: No such file or directory
linux:/>mount /sys
mount: /sys: mount failed: No such file or directory

Looking at the system before the chroot and /proc and /sys did exist, soon that basis, I decided to run the grub2-mkconfig command without the chroot. Thisdidn’t work either.
I found something on the internet called Boot Repair Disk, which I ran.
Now when Itry to boot the system, I get…
GNU GRUB version 0.97 (582K lower/ 523264 upper memory)
Minimal BASK-like line editingis supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub>

I suspect the following might be useful information…
linux:/home/linux # fdisk -l
[FONT=Times New Roman] [/FONT]
Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x047573c6
Device Boot Start End Blocks Id System
/dev/sda1 63 80324 40131 de Dell Utility
Partition 1 does not start on physical sector boundary.
/dev/sda2 81920 1617919 768000 7 HPFS/NTFS/exFAT
/dev/sda3 1617920 1260345343 629363712 7 HPFS/NTFS/exFAT
/dev/sda4 * 1260345344 1465147391 102401024 f W95 Ext’d (LBA)
/dev/sda5 1260347392 1264556031 2104320 82 Linux swap / Solaris
/dev/sda6 1264558080 1306503167 20972544 83 Linux
/dev/sda7 1306505216 1465128959 79311872 83 Linux
linux:/home/linux

Any help would be most gratefully received.

Many thanks,

Gary

On 2014-01-07 13:56, dn312sr wrote:
>
> So I had openSUSE 12.3 dual-booting fine-and-dandy with
> Windows 7 andyesterday, I decided to do an in-place upgrade from 12.3 to
> 13.1.
> When the system restarted after the upgrade, I got…
> Grub loading.
> Welcome to GRUB!
> error: symbol‘grub_term_highlight_color’ not found.

There is another post here with the same error.

> Entering rescue mode…
> grub rescue>

Please use code tags for pasting commands in here. It is the ‘#’ button
in the forum editor.

I’ll try to change some.

Ah, please add no formatting at all inside that code block.

>
> I tried to do a grub repair using a 12.3Rescue
> Disk (as I had successfully done after installing Windows 7) using
> thefollowing commands (as root)…


> linux:/home/linux/Desktop # *mount /dev/sda6 /mnt*
> linux:/home/linux/Desktop # *mount --bind /dev /mnt/dev*
> linux:/home/linux/Desktop # *chroot /mnt*
> linux:/> *mount /proc*
> linux:/> *mount /sys*
> linux:/> *grub2-mkconfig -o /boot/grub2/grub.cfg*

You should bind mount proc and sys before the chroot, same as you did
dev. After you do the chroot they are not accessible.

> linux:/home/linux # fdisk -l

This part is unreadable. Please repeat inside a code block.

>
> Disk /dev/sda: 750.2 GB, 750156374016
> bytes
> 255 heads, 63 sectors/track, 91201 cylinders,
> total 1465149168sectors
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 4096
> bytes


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

This cannot work on 13.1 because /proc and /sys are no longer in the fstab.
Use this instead:

mount -t proc proc /proc
mount -t sysfs sysfs /sys

Btw, your original issue seems to be reported here already:
https://bugzilla.novell.com/show_bug.cgi?id=846317

Which effectively means - all those HOWTOs about “fixing” grub installation are actually quite dangerous because they ignore openSUSE-specific configuration. They may appear to work first, but will lead to such problems later.

The right way to fix bootloader installation on openSUSE is to use update-bootloader. If it fails, one should never “fix” it by using grub-install directly but rather investigate root cause and fix it.

But so many articles in Internet merrily recommending grub-install as ultimate solution to every problem :frowning:

Sorry about the formatting, but I’m pretty new to this forum.

OK, so I did as Wolfi suggested (many thanks) before the chroot…


mount -t proc proc /proc
mount -t sysfs sysfs /sys

I did get a number of errors, but I did previously (when I first installed Windows 7) and it seemed to work ok…


linux:/> grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-3.11.6-4-desktop
Found initrd image: /boot/initrd-3.11.6-4-desktop
Found linux image: /boot/vmlinuz-3.7.10-1.16-desktop
Found initrd image: /boot/initrd-3.7.10-1.16-desktop
ERROR: opening path /mnt/sys/block
ERROR: failed to discover devices
ERROR: opening path /mnt/sys/block
ERROR: failed to discover devices
ERROR: opening path /mnt/sys/block
ERROR: failed to discover devices
ERROR: opening path /mnt/sys/block
ERROR: failed to discover devices
ERROR: opening path /mnt/sys/block
ERROR: failed to discover devices
ERROR: opening path /mnt/sys/block
ERROR: failed to discover devices
ERROR: opening path /mnt/sys/block
ERROR: failed to discover devices
No volume groups found
Found Windows 7 (loader) on /dev/sda2
Found Windows 7 (loader) on /dev/sda3
done
linux:/> grub2-install /dev/sda
Installation finished. No error reported.
linux:/>

And that seems to have done the trick with grub (except that I’ve now got 2 listings for my Windows 7 system, sda2 and sda3) and it boots up to the login screen OK.

However, when I try to log on (either as root or my own user id), the login dialogue box disappears and just left with a green chemelion grinning at me inanely, then nothing.

Any ideas?

Many thanks again.

Gary

On 2014-01-07 14:46, wolfi323 wrote:

> This cannot work on 13.1 because /proc and /sys are no longer in the
> fstab.

This works fine on 13.1, I used it yesterday:


mount bind /proc /mnt/proc


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

OK, so the graphical interface just hangs when I’m logging in, but if I do a Ctrl-Alt-F1, I can log in fine using the TUI.

Do you think I should start this as a new thread?

Cheers,

Gary

On 2014-01-07 16:16, dn312sr wrote:
>
> OK, so the graphical interface just hangs when I’m logging in, but if I
> do a Ctrl-Alt-F1, I can log in fine using the TUI.
>
> Do you think I should start this as a new thread?

Yes, please :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Of course.
I did not reply to you. (in fact your post was not yet here on the web forum when I replied)

The OP ran “mount /proc” and that does not work when /proc is not in the fstab, i.e. after the chroot.