GRUB can't launch the OS after update suse 13.2 to open suse 42.1.

Dear all,
I updated open suse 13.2 to open suse 42.1. To do so I used the instructions from this webpage
https://www.unixmen.com/how-to-upgrade-to-opensuse-42-1-from-opensuse-13-2/
I followed all the steps with the exception that after


sudo zypper refresh
sudo zypper update

I restarted the PC. The next steps I run from the terminal, since after the restart I was not able to boot into graphical mode
(unable to find kdeinit4).
I updated the OS and decided to restart and boot into graphics mode again. To my surprise grub failed and the only thing I get
are the letters GRUB written in the upper left corner of my screen.
I have no idea how to fix this and there is not much I can do, since I can’t start the terminal and type commands.
I remember, that during the update I got the error message saying that grub can’t find some devices.
Before running the update, I was able to run a dual boot laptop with open suse 13.2 and windows 7.

I will appreciate your help.
Thank you

Post the output of

fdisk -l

and

parted -l

(Those are lowercase L, not numeral one)

Gives us a start. I am suspecting boot flag in different place from Grub install.

Also, where is Grub installed?

Hi,

thank you for your reply. Unfortunately I can’t access the command line. All I get is a frozen black screen with the letters GRUB written in the upper left corner.
I think that there was some method to run the OS from USB. But I have to research how to do that. I don’t have the live USB I used for suse 13.2.

Hi,

thank you for your reply. Unfortunately, I can’t access the command line. All I get is a frozen black screen with the letters GRUB written in the upper left corner.
I think that there was some method to run the OS from USB. But I have to research how to do that. I don’t have the live USB I used for suse 13.2.
I have only one physical drive on my system. I assume that GRUB is on /dev/sda

Hi,

I managed to run fdisk -l via a rescue USB. The boot flag is on /dev/sda3. To check whether grub is there, I run


sudo dd bs=512 count=1 if=/dev/sda3 2>/dev/null | strings
ZRr= 
`|f  
\|f1 
GRUB 
Geom
 Hard
 Disk
 Read
  Error

Which is a standard procedure to find grub. The output is also typical, according to google.

I run the same commands on /dev/sda[12] and got strange output boot manager is missing. Perhaps it tries to find grub there, not on /dev/sda3.
This would be strange, since /dev/sda3 has boot flag. That is actually the windows partition, it has an ID ‘f’, whatever that means.

Therefore, it seems that the boot flag is set to the proper partition. I tried to mount that partition, but got the error

mount: /dev/sda3 can't read superblock

I am not listing

So I can’t do much to see what the actual GRUB settings are. I am clueless.

I made a mistake in my previous post. /dev/sda3 is an extended partition. Please ignore it

The required output. **
fdisk -l **and parted -l were run from system rescue USB.
/dev/sdb1 is the rescue USB
/dev/sdc1 is another USB


fdisk -l
Disk /dev/loop0: 364.1 MiB, 381792256 bytes, 745688 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x42848e68

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1            2048    206847    204800   100M  7 HPFS/NTFS/exFAT
/dev/sda2          206848 245966847 245760000 117.2G  7 HPFS/NTFS/exFAT
/dev/sda3  *    245966848 625141759 379174912 180.8G  f W95 Ext'd (LBA)
/dev/sda5       245968896 340336639  94367744    45G 83 Linux
/dev/sda6       340338688 612960255 272621568   130G 83 Linux
/dev/sda7       612962304 625121279  12158976   5.8G 82 Linux swap / Solaris


Disk /dev/sdb: 3.9 GiB, 4194304000 bytes, 8192000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *      128 8191999 8191872  3.9G  b W95 FAT32


Disk /dev/sdc: 14.5 GiB, 15552479232 bytes, 30375936 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1  *     2048 30375935 30373888 14.5G  7 HPFS/NTFS/exFAT


parted -l
Model: ATA ST320LT007-9ZV14 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size    Type      File system     Flags
 1      1049kB  106MB  105MB   primary   ntfs
 2      106MB   126GB  126GB   primary   ntfs
 3      126GB   320GB  194GB   extended                  boot, lba
 5      126GB   174GB  48.3GB  logical   ext4
 6      174GB   314GB  140GB   logical   ext4
 7      314GB   320GB  6225MB  logical   linux-swap(v1)


Model: USB 2.0 Flash Disk (scsi)
Disk /dev/sdb: 4194MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      65.5kB  4194MB  4194MB  primary  fat32        boot


Model: SanDisk Ultra (scsi)
Disk /dev/sdc: 15.6GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  15.6GB  15.6GB  primary  ntfs         boot

This code tells me that there is GRUB on sda3.


sudo dd bs=512 count=1 if=/dev/sda3 2>/dev/null | strings
ZRr= 
`|f  
\|f1 
GRUB 
Geom
 Hard
 Disk
 Read
  Error

Okay, you will need to re-run Grub installer and install Grub to sda5 (That is your / directory, correct?).

You will then have to set the boot flag to sda5.

Either that, or you will have to install Grub to the MBR, but then you will be constantly arguing with Windows about that.

I will guide you with the first scenario:

First, boot with the install DVD or the Rescue. Note that it must be the same arch (64-bit), though in this case there is only a 64-bit Leap for most users. It also is a good idea to use the same version of Leap.

Get to the Rescue:~# prompt as root.

Do:

fdisk -l

just to make sure nothing has moved. (That is, still sda)

Assuming it is, do:

parted

You will now have a prompt
(parted)
Do:

select /dev/sda

This assumes the drive is still sda. If not, change the drive letter to the appropriate one.

You should get a confirmation message that the device is now selected.

Do:

set 5 boot

That is to set/reset the 5th partition’s boot flag.

It will prompt you with the line New state?

Do:

on

When it is confirmed, do:

quit

You will be back at the Rescue:~# prompt.

Now, we need to mount root. Do:

mount /dev/sda5 /mnt

Now, do:

chroot /mnt

Mount the other devices Next do:

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

Now, do:

grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sda5

It would not hurt at this point to also do:

mkintrd

Now, just

exit
reboot

If that does not work, let me know. The other option is to chose to install grub to MBR (sda with no number), but the boot flag should still be on sda5 as shown above. If you need to do it that way, you can then change your grub position once you are back up where you can use Yast Bootloader.

Good luck.

I did all the steps but once I reached the one above. I got an error message:


grub2-install: error: failed to get canonical path of `/dev/sda5`.

I tried when still the effect of chroot was on. Should I exit chroot before doing the above?
Unfortunately, more problems :’(

P.S.

After mounting /dev/sda5 on /mnt. I found a /boot folder with subfolders /grub and /grub2. The time stamp of those folders is from 22 Feb 2017. The day I run system update.

Hi,
I managed to install grub2. The problem was, that besides mounting /dev/sda5 to /mnt I needed to mount all other devices.

**mount --bind /dev /mnt/dev**

Subsequently I was able to do **chroot /mnt **and do the rest as you suggested.

The rest of the things worked.
Thank you for your help. :slight_smile: