Bug 1214130 - grub2 won't boot LEAP from logical
Summary: grub2 won't boot LEAP from logical
Status: NEW
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Bootloader (show other bugs)
Version: Leap 15.5
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Bootloader Maintainers
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-09 19:44 UTC by Seymour Metz
Modified: 2023-08-18 19:12 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
boot options menu (68.88 KB, image/png)
2023-08-09 19:44 UTC, Seymour Metz
Details
bootloader options (61.89 KB, image/png)
2023-08-09 19:47 UTC, Seymour Metz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Seymour Metz 2023-08-09 19:44:37 UTC
Created attachment 868724 [details]
boot options menu

grub2 displays grub with no menu and reboots. Partition layout is.

localhost:~ # lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 232.9G  0 disk 
├─sda1   8:1    0  39.2M  0 part 
├─sda2   8:2    0  14.6G  0 part 
├─sda3   8:3    0 123.6G  0 part 
├─sda4   8:4    0     1K  0 part 
├─sda5   8:5    0     2G  0 part [SWAP]
├─sda6   8:6    0    50G  0 part /home
└─sda7   8:7    0  42.6G  0 part /
sr0     11:0    1   4.4G  0 rom
Comment 1 Seymour Metz 2023-08-09 19:47:14 UTC
Created attachment 868725 [details]
bootloader options

Third tab of bootloader configuration window.
Comment 2 Neil Rickert 2023-08-12 00:41:13 UTC
To boot a logical partition, you need:

(1) suitable boot code, usually in the MBR.

The Microsoft boot code (supplied with Windows) cannot do it.  The "generic boot code" that Yast puts there can do it.  That's the "syslinux" boot code.

(2) your BIOS must be able to see that far into the disk.

I have an older computer, purchased in 2010, which cannot boot one of my systems.

sda             8:0    0 698.6G  0 disk  
├─sda1          8:1    0   500M  0 part  
├─sda2          8:2    0   256M  0 part  
├─sda3          8:3    0  59.8G  0 part  
├─sda4          8:4    0     1K  0 part  
├─sda5          8:5    0     2G  0 part  
├─sda6          8:6    0   512M  0 part  
├─sda7          8:7    0   150G  0 part  
├─sda8          8:8    0    40G  0 part  
└─sda9          8:9    0 445.7G  0 part  
  └─cr-shared 254:3    0 445.7G  0 crypt /shared

Currently that's an internal disk on my newest desktop.  But I previously had that disk mounted in an external enclosure (as a USB external drive).  And I had a Solus system on "/dev/sda8".  One of my computers (the one purchased in 2010) could not boot that, but another newer system could boot it without any problem.
Comment 3 Seymour Metz 2023-08-15 14:37:12 UTC
I also tried writing to the PBR of /sda4, the extended partition, but that also failed. This is a Dell vostro 1720, which is very old.

Should I ignore the space message and write to the MBR?
Comment 4 Neil Rickert 2023-08-15 20:12:13 UTC
>Should I ignore the space message

You have not previously mention a "space" issue.

I have not had problems booting from a partition.  However, if your root file system uses "btrfs", then that probably won't work unless the partition you are booting from is the root partition.  That's a limitation of "btrfs".

In a typical newer computer with MSDOS partitioning, there is a gap of 1023 sectors between the MBR and the first partition.  And grub2 uses that gap.

In older computers, there is only a 62 or 63 sector gap.  And that gap is too small for booting "btrfs".

If your older BIOS cannot access your root partition, then you might need a separate "/boot" partition nearer to the beginning of the disk.  Or use the install media option to boot an installed linux system.
Comment 5 Seymour Metz 2023-08-15 20:46:10 UTC
I use Yast for partitioning and normally get a warning about not enough space after the MBR. I use ext4. Should I ignore the warning and use the MBR?

Would the answer change if i had an ext4 /boot and a btrfs root?
Comment 6 Neil Rickert 2023-08-16 01:24:12 UTC
If you are using "ext4", then booting from a partition should work unless there is a BIOS limitation.  And if your problem is due to a BIOS limitation, then booting from the MBR won't solve that.

For booting, grub makes BIOS calls to load the kernel and the "initrd".  If the BIOS cannot read that far into the drive, it won't work.

If your system supports boot from a USB device, then you could try putting "/boot" onto a USB drive -- either "ext2" or even "FAT" should be okay for that.  You could just copy your existing "/boot", and then install booting to boot from that USB.  You would need to update the USB whenever there is a kernel update or a grub2 update.

If your computer is old enough to not boot from a USB, maybe it has a floppy drive you could use.  Or boot the install DVD, but choose the menu option to boot an installed linux.
Comment 7 Seymour Metz 2023-08-16 10:34:37 UTC
I had previously installed LEAP (15.3?) on this machine, so this is more than a BIOS issue, although BIOS might be one of the factors.
Comment 8 Neil Rickert 2023-08-16 18:56:16 UTC
>I had previously installed LEAP (15.3?) on this machine ...

Are you reusing the same partitioning?  Or is the partitioning different?
Comment 9 Seymour Metz 2023-08-16 19:44:30 UTC
Same partitioning. Reformatted sda7 as ext4 (was btrfs).
Comment 10 Neil Rickert 2023-08-17 00:34:19 UTC
>Same partitioning. Reformatted sda7 as ext4 (was btrfs).

That makes it less likely that this is a BIOS limitation.  And that leaves us wondering what is the problem.

If this is not a BIOS limitation, then booting from the MBR should work.  Any message about small space in the MBR gap should not matter for an "ext4" root partition.
Comment 11 Seymour Metz 2023-08-18 17:43:54 UTC
Writing to MBR works.

Does the bootloader require the extra space if root is btrfs bot /boot is ext4?
Comment 12 Neil Rickert 2023-08-18 18:32:52 UTC
I'm glad to hear it is now working.

There should not be a problem with "ext4" for "/boot".  However, you lose some of the benefits of "btrfs" if you have a separate "/boot".  In particular, this interferes with the ability to rollback.
Comment 13 Seymour Metz 2023-08-18 18:59:49 UTC
I'm waiting for a GUI tool similar to yast before I try btrfs, so thar's not a problem for me. It probably makes a fix more urgent, but I have no idea how much.

Does the issue also exist with UEFI and GPT?If not, it may be less urgent.
Comment 14 Neil Rickert 2023-08-18 19:12:39 UTC
There should not be any problems with UEFI booting.

Well, some of the earlier UEFI implementations were buggy.  By now, that's mostly corrected.