Did the command line update mess up my boot loader?

I have been struggling with this server for few days now. I have SLES 11 SP4 disk and I’m trying to upgrade/Repair the system. Originally I was running SP3, but I tried to update the distribution from the command line and that did not end up well. Right now, on boot, I get ELILO Boot message and then at initrd step, the system reboots automatically and stays in that loop.

With SP4 disk I’m able to see partitions, but every single attempt to install a boot loader has failed. Grub and ELILO alike. :

GRUB error:

The BIOS is set to “UEFI and Legacy”

I noticed that this location was empty???:

Here is some of the ELILO error, let me know if you want to see the whole thing please. I already posted too many pictures.

I cannot copy and paste error texts but I took several screenshots. It would be a blessing if someone could give me a hand.

Hi
Are you sure the system is booting in UEFI mode? Can you set the BIOS
to UEFI only. I’m guessing the disk is set to GPT, since it’s using an
EFI (type ef00) partition.

If you boot from the SP4 disk and boot to ‘rescue mode’ and mount sda1
(which should be mounted as /boot/efi on a booting system) is there a
directory called EFI and elilo files exist?


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.20.2|4.4.73-18.17-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

[QUOTE=malcolmlewis;38645]Hi
Are you sure the system is booting in UEFI mode? Can you set the BIOS
to UEFI only. I’m guessing the disk is set to GPT, since it’s using an
EFI (type ef00) partition.

If you boot from the SP4 disk and boot to ‘rescue mode’ and mount sda1
(which should be mounted as /boot/efi on a booting system) is there a
directory called EFI and elilo files exist?


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.20.2|4.4.73-18.17-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks![/QUOTE]

I do remember at some point (after trying multiple iso/upgrade/repairs) that there were 2 folders in the root. The one besides efi, was called LILO but I’m not 100% sure if fully remember.

Please let me know if you want to look at anything else while I try to force UEFI in the BIOS and update. I do have a boot folder under sda3 (root partition?)

Thank you!

Hi
So for UEFI (elilo) booting you have;
a) Disk type set to GPT (via gdisk)
b) A small FAT partition < 500MB for /boot/efi (mount point)
c) Small FAT partition set to type ef00

For legacy (grub) booting you have;
a) Disk type set to DOS (via fdisk)
b) A separate small ext(2/3) partiton ~ 500MB for /boot (optional)
c) A boot flag set wherever the bootloader installs (or MBR)

Since in GPT the mbr is set protective (more secure) you can’t install
grub (which you tried) since it’s too old to support efi (hence elilo).
It is possible, but some extra steps to do… stick with one type or
the other…

In rescue mode run the command fdisk and gdisk to see the state of the
disk…

fdisk -l /dev/sda
gdisk -l /dev/sda

The above should help to see what is what…


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.20.2|4.4.74-18.20-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

[QUOTE=malcolmlewis;38648]Hi
So for UEFI (elilo) booting you have;
a) Disk type set to GPT (via gdisk)
b) A small FAT partition < 500MB for /boot/efi (mount point)
c) Small FAT partition set to type ef00

For legacy (grub) booting you have;
a) Disk type set to DOS (via fdisk)
b) A separate small ext(2/3) partiton ~ 500MB for /boot (optional)
c) A boot flag set wherever the bootloader installs (or MBR)

Since in GPT the mbr is set protective (more secure) you can’t install
grub (which you tried) since it’s too old to support efi (hence elilo).
It is possible, but some extra steps to do… stick with one type or
the other…

In rescue mode run the command fdisk and gdisk to see the state of the
disk…

fdisk -l /dev/sda
gdisk -l /dev/sda

The above should help to see what is what…


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.20.2|4.4.74-18.20-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks![/QUOTE]

I didn’t find gdisk command in the SP4 rescue disk but I tried gparted. I’m not sure if this is what you wanted to see, please let me know while I try if SLES 12 has the command. In the meantime, I did force UEFI only in the BIOS, and the boot loop is still happening.

Thank you!

Hi
So when booting, can you select efi type booting (eg F12 or esc) and either select the install media, or the elilo efi file?

Seems to me it’s wanting to be UEFI, but set to legacy…

For example (this is SLES 12 SP2 though);

parted -l /dev/sda

Model: ATA TOSHIBA MQ01ABF0 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name              Flags
 1      1049kB  274MB  273MB   fat16           EFI System        boot
 2      274MB   108GB  107GB   btrfs           Linux filesystem
 3      108GB   116GB  8590MB  linux-swap(v1)  Linux swap
 4      116GB   180GB  63.8GB                  Linux filesystem
 5      180GB   234GB  53.7GB  xfs             Linux RAID        raid
 6      234GB   500GB  266GB   xfs             Linux RAID        raid

In rescue mode, is there any output from the following command;

efibootmgr -v

Bottomline, need to boot in UEFI mode…

[QUOTE=malcolmlewis;38650]Hi
So when booting, can you select efi type booting (eg F12 or esc) and either select the install media, or the elilo efi file?

Seems to me it’s wanting to be UEFI, but set to legacy…

For example (this is SLES 12 SP2 though);

parted -l /dev/sda

Model: ATA TOSHIBA MQ01ABF0 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name              Flags
 1      1049kB  274MB  273MB   fat16           EFI System        boot
 2      274MB   108GB  107GB   btrfs           Linux filesystem
 3      108GB   116GB  8590MB  linux-swap(v1)  Linux swap
 4      116GB   180GB  63.8GB                  Linux filesystem
 5      180GB   234GB  53.7GB  xfs             Linux RAID        raid
 6      234GB   500GB  266GB   xfs             Linux RAID        raid

In rescue mode, is there any output from the following command;

efibootmgr -v

Bottomline, need to boot in UEFI mode…[/QUOTE]
Hi,

I switched to SLES 12 rescue disk and gdisk command was in there!

Here is the output of efibootmgr -v

I just learned from here that I could interrupt the boot at “ELILO BOOT” prompt and tab to get options

https://docstore.mik.ua/manuals/hp-ux/en/5991-1247B/ch05s21.html

To understand this better, what is supposed to happen right after the two files get loaded in the ELILO boot?

Where should there be a reference to the kernel that needs to be loaded? I think SP3 won’t exist by now, and I should have at least 2 more instead.

I remember the last time I tried to upgrade to SLES 12, the summary of the steps that were about to happen mentioned SLES 12, 11 SP4 and an Open Suse (I’m assuming the latter got added accidentally after I added OpenSuse repositories and the system tried to update from SLES 11 SP3 to Open Suse back when it was working? ) The source of the original problem I guess?

Anyway, is there a way that I could reset /dev/sda1 to take account of the different kernels that I tried to install?

One thing I should also mention is that while I was desperately playing with upgrade/repair disks, I believe there was a mention that one of the partitions’ currupt bit was set, I could have sworn it was sda1. But I guess since vmlinuz and initrd are loading before the boot failure happens, that everything there is ok?

Hi
So boot from the SLES 11 SP4 install media and try an upgrade again, once you get to the partitioning, select expert mode and hit the rescan disk, select sda and use;

sda1, type ef mountpoint /boot/efi
sda2, type 82 mountpoint your swap
sda3, type 83 mountpoint /

At the final screen is the install summary, here check in the boot section, should be elilo and efi booting…

Else how important is the current/broken / data? Backup’s available?

[QUOTE=ammoun;38651]Hi,

I switched to SLES 12 rescue disk and gdisk command was in there!

Here is the output of efibootmgr -v

[/QUOTE]

[QUOTE=malcolmlewis;38654]Hi
So boot from the SLES 11 SP4 install media and try an upgrade again, once you get to the partitioning, select expert mode and hit the rescan disk, select sda and use;

sda1, type ef mountpoint /boot/efi
sda2, type 82 mountpoint your swap
sda3, type 83 mountpoint /

At the final screen is the install summary, here check in the boot section, should be elilo and efi booting…

Else how important is the current/broken / data? Backup’s available?[/QUOTE]
Hi,
I would rather if possible keep formatting as the very last resort. I can currently mount sda3 from rescue, ssh and copy files if I really have to…

Could I do what you suggested with SLES 12 instead? The problem with SP4 is that I couldn’t get past this screen, it keeps loading after I clicked Next.

So I got past that screen, and I got a warning that I was downgrading and might end up with issues but I accepted. The first package to install failed! And I’m glad it did as I aborted and got the option to boot from hard drive in SLES 12 and that worked!. So I guess the challenge left is to fix the EFI partition? Is it easier now that I have regular root access and ssh?

Hi
So your at SLES 12 SP2 now?

Is sda1 mounted as /boot/efi? if so is there a EFI/sles subdirectory
with efi files present? Also has the output from efibootmgr -v changed?


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.20.2|4.4.74-18.20-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

[QUOTE=malcolmlewis;38666]Hi
So your at SLES 12 SP2 now?

Is sda1 mounted as /boot/efi? if so is there a EFI/sles subdirectory
with efi files present? Also has the output from efibootmgr -v changed?


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.20.2|4.4.74-18.20-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks![/QUOTE]

Apparently yes! I’m running SLES 12 but I don’t think it’s SP2.

[QUOTE]Timeout: 10 seconds
BootOrder: 0005,0000,0003,0001,0002
Boot0000* CD/DVD Rom ACPI(a0341d0,0)PCI(1d,0)USB(0,0)USB(0,0)USB(2,0)0311050000
Boot0001* Hard Disk 0 ACPI(a0341d0,0)PCI(2,2)PCI(0,0)Controller(0)SCSI(0,0)HD(1,800,4e000,b1006802-14af-40ed-8e33-3a1508bf38b5)
Boot0002* PXE Network ACPI(a0341d0,0)PCI(3,2)PCI(0,0)MAC(90e2ba428eae,0)IPv4(0.0.0.0:0<->0.0.0.0:0,0, 0
Boot0003* Floppy Disk Vendor(0c588db8-6af4-11dd-a992-00197d890238,00)
Boot0005* SUSE Linux Enterprise Server 11 SP3 HD(1,800,4e000,b1006802-14af-40ed-8e33-3a1508bf38b5)File(\efi\SuSE\elilo.efi)[/QUOTE]

So apparently it didn’t change and I’m sure that as soon as I reboot I would be back in the loop. Here is my theory, please correct me. Since the last upgrade that I tried was SLES 12, and it went through and failed at the set up of the boot loader. The system got upgraded in sda3 but the boot partition didn’t! It is still at the 11 SP3 state. For some reason, no upgrade or repair could update the files there. Can I do it manually then?

Hi
So is sda1 mounted and is there a sles directory with efi files present? If so can you list, this will identify whether we can manually add via efibootmgr, or do a complete grub (yes grub for SLE 12) install via YaST.

[QUOTE=malcolmlewis;38671]Hi
So is sda1 mounted and is there a sles directory with efi files present? If so can you list, this will identify whether we can manually add via efibootmgr, or do a complete grub (yes grub for SLE 12) install via YaST.[/QUOTE]

Hi,

[CODE]fdisk -l /dev/sda

Disk /dev/sda: 1.9 TiB, 2092995444736 bytes, 4087881728 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: gpt
Disk identifier: 62F4B386-AE3F-4110-841B-A7470698A5A9

Device Start End Sectors Size Type
/dev/sda1 2048 321535 319488 156M EFI System
/dev/sda2 321536 4530175 4208640 2G Microsoft basic data
/dev/sda3 4530176 4087879679 4083349504 1.9T EFI System[/CODE]

[CODE]gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.8

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 4087881728 sectors, 1.9 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 62F4B386-AE3F-4110-841B-A7470698A5A9
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 4087881694
Partitions will be aligned on 2048-sector boundaries
Total free space is 4029 sectors (2.0 MiB)

Number Start (sector) End (sector) Size Code Name
1 2048 321535 156.0 MiB EF00 primary
2 321536 4530175 2.0 GiB 0700 primary
3 4530176 4087879679 1.9 TiB EF00 primary[/CODE]

mount /dev/sda1 /mnt mount: unknown filesystem type 'vfat'

cat /proc/mounts didn’t list /dev/sda1.

I guess things were better from the rescue disk when I used to be able to mount /dev/sda1.

Hi
OK, so from an ssh session as root user run the command;

yast bootloader

On the Boot Code Options tab, what is the ‘Boot Loader’ set to, can you select an option in the dropdown?

On the Bootloader options tab, is there a ‘Default Boot Selection’ can you select an option in the dropdown?

Also need to confirm what release your at via;

cat /etc/os-release

Else might need to wipe the efi and start again, but confirm above first.

yast disk

In here you need to select sda1 and edit to format to vfat, set type ef00 (for efi) and set the mount point to /boot/efi from the dropdown. When finished save and exit.

Hi
Also in gdisk, fix the partition types…

gdisk /dev/sda
t
2
8200
t
3
8300
w

The options I have are: Grub2, Grub2 EFI and Do not Install…

I have SLES12 under default boot section.

cat /etc/os-release NAME="SLES" VERSION="12" VERSION_ID="12" PRETTY_NAME="SUSE Linux Enterprise Server 12" ID="sles" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:suse:sles:12"

yast disk

Error &#9474; &#9474; The storage subsystem is locked by the application "y2base" (9475). &#9474; &#9474; You must quit that application before you can continue. &#9474; &#9474; &#9474; &#9474; [Continue] [Cancel]

Just finished your gdisk suggestions, thanks!

ps aux | grep y2base root 9475 0.1 0.1 376800 99596 pts/1 Tl 09:18 0:03 /usr/lib/YaST2/bin/y2base bootloader ncurses root 11512 0.0 0.0 9232 676 pts/1 D+ 09:45 0:00 grep --color=auto y2base‘’

Can I kill -9 9475?