dakanji / RefindPlus

A Boot Manager for Mac and PC
GNU General Public License v3.0
332 stars 66 forks source link

Linux partitions are not displayed #72

Closed MarioG-X closed 3 years ago

MarioG-X commented 3 years ago

Describe the Bug: RP only displays 4 out of the 9 bootable systems on its menu. See details below.

To Reproduce: Install RefindPlus Modify config to support APFS Boot machine

Expected Behaviour: All 9 bootable volumes should display.

Environment: RefindPlus Version : v0.13.2.AG Hardware Computer : Mac mini 2014, Macmini7,1 with internal an SSD and hard drive (originally fusion drive) Motherboard : Dual-Core Intel Core i7 GPU Model : Intel Iris Affected OS : All macOS, Opensuse Linux, Elementary OS Linux

Log Files I ran the debug version of RefindPlus and attached the RP log (level 3): 21r13t2138.log

Screenshots Here are the 4 macOS systems RP displays: IMG_1978

Here are the 9 systems Refind displays (requires 2 screen files since many Preboots take space): IMG_1976 IMG_1977

Additional Context:

See the two attached diskutil lists for locations and volume names of the 5 macOS systems: diskutil list.txt diskutil apfs list.txt

This system has 9 bootable systems that display in refind: Linux BTRFS partition Vsuse153bum Linux BTRFS partition Vsuse153bu Linux EXT4 partition Velementary Linux EXT4 partition Open1 APFS volume FX 10.15.7 APFS volume Monterey Beta APFS volume FS 10.14.6 APFS volume FS 10.15.7 APFS volume FS 11.5.

Additional information for the 4 Linux partitions:

  1. Elementary OS on disk1s6 (EXT4)
  2. Elementary OS on disk1s8 (EXT4)
  3. Opensuse on disk1s7 (BTRFS)
  4. Opensuse on disk1s9 (BTRFS)

The missing systems are all 4 linux and APFS volume FX 10.15.7. Note they are on the HD not SSD.

I noticed the log shows “Found MBR Partition Table” which is looks wrong since it’s GPT.

Here is the config: config.conf.txt

dakanji commented 3 years ago

Please amend your report to follow the issue template including providing debug logs at a level specified in the template. Also, since your issue needs quite a bit of explanation, provide screenshots annotated or commented.

In addition, please restructure to bear in mind that I do not know about your system and something like " Linux partitions on the HD disk1" have no meaning to someone that does not know your system.

What is "HD disk1"? Do you mean Linux Partitions on "HD disk2" show up or do non-Linux disks on "HD disk1" show up and only Linux Partitions do not?

Point is that do you need to mention "HD disk1" to convey the issue you have at all?

I have pasted the template back into your post so you can edit. Thanks

EDIT Thanks for the update. Will take a look and get back

MarioG-X commented 3 years ago

I would leave the title alone since the "APFS volume FX 10.15.7" is also missing. Not only Linux, I clarified. Was in the original post.

dakanji commented 3 years ago

The Mac OS display issues are down to the Multi Instance APFS Container item. This needs to focus on the Linux issue.

MarioG-X commented 3 years ago

That puzzles me since the missing FX 10.15.7 volume is in its own container all by itself. It's clear in the diskutil list. If it's related to what you say, why would that one be missing but not Monterey Beta which is also in it's own container? Hopefully your next improvements will get it all. Thanks!

dakanji commented 3 years ago

I see. Will take a closer look but let's still split the issues by OS type as most likely any relationships will be along those lines.

dakanji commented 3 years ago

BTW, simple test would be just to run with SyncAPFS disabled and see whether the Mac Items return.

MarioG-X commented 3 years ago

I commented syncapfs and your're right, the missing FX 10.15.7 volume did show up, but no Linux's. Unfortunately, so did all the Preboot partition which I had to boot from. Log attached in case it helps: 21r14c3647.log

dakanji commented 3 years ago

Please replace your current RP file with the attached (rename as needed) and share the log. X159-BOOTx64.efi.zip

Note that some config settings have been hardcoded in the file and things like volume badges disabled as they can clutter log files.

Also, please run the standard rEFind and share the log from that at Level 4.

Finally, use the exactly the same refind.conf file for both RP and rEFInd runs. You don't need to rename to config.conf (there will be a message in RP but it will go away). The required additional tokens for the test have been set in the efi so no need to add anything extra to the rEFInd config.

Thanks

MarioG-X commented 3 years ago

Here is the log from Refind boot, took a little longer but was normal. Loglevel 4 in refind.conf, I removed RP config for test: refind.log

Here is the log from the RP boot you sent. Unfortunately, RP displayed its title at the top but nothing else. After 4 minutes I had to power down/up. 21r14r4136.log

dakanji commented 3 years ago

Now looks like a variant of this issue: https://github.com/dakanji/RefindPlus/issues/45 Will have to go back over that.

MarioG-X commented 3 years ago

FYI, retested and left for 25 minutes, log stopped at same line.

dakanji commented 3 years ago

... left for 25 minutes

No need for that. If RP has not loaded within 25 seconds of the header showing, it's not going to be loading.

Anyway, please run the attached and share the log. Just contains additional debug prints to try to see where it is hanging (issue is a memory management issue related to the one linked earlier)

No need for a rEFInd run this time obviously.

X160-BOOTx64.efi.zip

MarioG-X commented 3 years ago

Here you go: 21r14x4908.log

dakanji commented 3 years ago

Thanks ... please repeat with X161. Added more prints.

X161-BOOTx64.efi.zip

MarioG-X commented 3 years ago

161 log, many more lines than 160: 21r15q4441.log

dakanji commented 3 years ago

Thanks ... unfortunately not yet enough to be definite but hopefully 162 would do X162-BOOTx64.efi.zip

stefws commented 3 years ago

Hoping, got the same issue here, only see my Catalina Drive and working with APFS, but not seeing my Linux boot manager(s)

MarioG-X commented 3 years ago

162 is MUCH bigger but there was an error trying to open the file. I copied it to another partition and it looks ok: 21r15s5737.log

dakanji commented 3 years ago

So I get what is basically happening, a memory addressing conflict in a part of the code dealing with certain Linux setups, but haven't yet gone through searching for this ... likely a typo somewhere.

Anyway, did some general tweaks which may impact on this in X163. If it solves it, great. Otherwise it will have to go to the dreaded line by line check.

X163-BOOTx64.efi.zip

MarioG-X commented 3 years ago

Progress! It did not freeze, it displayed a menu, However, there is a major and minor issue:

  1. Linux can be selected and boot started, but all 4 linux's fail quickly at the same place, too soon to create logs. Pic is attached. All macOSs boot fine. Strange but true: when I first tested I booted suse153bum and it booted, but only one time! After that it got the same error as the other three linux's. Power down/up made no difference. The attached log is for the failed suse153bu boot. All partitions boot using refind. 21r16q5701.log Note that all the failed linux logs look the same. Unfortunately, I don't have the log to the one boot that worked.

  2. Menu icon issue: The icons for the two Velementary and Open1 partitions are not correct. In refind, they display the correct icons named .VolumeIcon.icns and .VolumeIcon.png located in the root (/) partition. RP displays a generic penguin for Velementary and dimmed elementary icon for Open1. Refind displays the correct icon for both elementary os partitions, blue and white E, see previous post pics.

Here is where all the linux boots stop: IMG_1982

dakanji commented 3 years ago

Great. Should be possible to get across the line then.

  1. On Icons issue, I mentioned earlier that some things have been disabled in this test version ... https://github.com/dakanji/RefindPlus/issues/72#issuecomment-918924613
  2. Can you replace the image above with a clearer (readable) one?
MarioG-X commented 3 years ago

Three pics overlapped to fit entire screen. Booting opensuse, note the previous post pic was booting elementary (ubuntu) but both stop at the same place, here is the log to the pics: 21r16s4302.log

IMG_1985 IMG_1986 IMG_1987

dakanji commented 3 years ago

Looks like a secure boot issue. Can you try without this activated?

MarioG-X commented 3 years ago

This is a 2014 Mac mini, there is no secure boot. I ran the recovery/security option and it only offers firmware password, no secure boot options.

stefws commented 3 years ago

@MarioG-X isn't it as it states '... SUSE Linux Enterprise Secure Boot Signkey: ...'

Dunno about SUSE and secure boot feature, but seem like it might be, check here

Anyhow, been trying the X163 efi on my Macmini Late 2009, it seem to fail to find my extra drivers as they are located in EFI\refind\drivers_x64\ and not as where it seems to search in EFI\refind\drivers_x64\drivers[_x64]

Will attempt to relocate them there and get back...

Screenshot 2021-09-16 at 22 10 20

MarioG-X commented 3 years ago

This is not a SUSE issue, been booting fine for years with refind. Also booted elementary, fedora, etc. with refind in the past. BTW, my drivers are in EFI\refind\drivers_x64\ and RP finds them fine.

stefws commented 3 years ago

@MarioG-X Right I agree then it ought still to work one would assume...

Funny when booting from my internal ESP volume it finds the drivers from drivers_x64. The screen dump image was an attempt to boot of a REFIND MGR bootable USB Key. But even when finding my drivers incl. the iso9xxx.efi it doesn't find the bootable DVD in my optical drive :/

Also it fails me to make it create a second line entry various tools like shell_x64.efi etc.

dakanji commented 3 years ago

@stefws ... please create a separate item to deal with those issues.

@MarioG-X ... Are you still able to boot via rEFInd? Please check. If it goes well, then try X164. Doesn;t include fixes but additional fingerprinting around likely problem area X164-BOOTx64.efi.zip

MarioG-X commented 3 years ago

Original Refind boots all linux and macOS partitions fine. RP 164 is the same as 163, finds all partitions, macOS's boot but all linux's crash as in previous posts. Here is the log to 164: 21r16y2117.log

In case it helps, here is that same partition successfully booting from rEFInd: refind-suse.log

MarioG-X commented 3 years ago

Could it be related to RP passing null load options? It could be why linux can't find things. See this line towards end of RP log: Starting 'vmlinuz-5.3.18-59.19-default' ... Load Options:- '' <– Empty load options

Original rEFInd log shows the load options line as: Using load options 'ro root=LABEL=Vsuse153bum initrd=boot\initrd-5.3.18-59.19-default'

dakanji commented 3 years ago

Could it be related to RP passing null load options?

Yes It is. Spotted that in the last log but just got round to attempted fix in X165 X165-BOOTx64.efi.zip

MarioG-X commented 3 years ago

Unfortunately back to hanging displaying only title at top, no menu displayed. log: 21r17t5536.log

MarioG-X commented 3 years ago

BTW, I noticed that for the second disk in the RP log (disk0 in diskutil, SSD 128GB) shown in the log it has the line: Found MBR Partition Table on Volume Below But that is a GUID disk. Also: The volumes FS 10.15.7 and Monterey Beta are not on the second disk, they are on the first disk in the RP log (disk1 in diskutil HHD). Could be I am confused if the second disk for RP is emulated, I noticed it has all the macOS volumes no matter what physical disk they are on. If this sounds suspicious, look at the diskutil lists in the previous posts to match them up.

dakanji commented 3 years ago

Try X166 ... Will consider the MBR thing later. It's not critical.

X166-BOOTx64.efi.zip

MarioG-X commented 3 years ago

Sorry tp take long, had an errand, back now for the day. 166 still freezes, log: 21r17w1607.log

dakanji commented 3 years ago

The two previous might have essentially been the same file. Try X167 X167-BOOTx64.efi.zip

MarioG-X commented 3 years ago

167 same freeze same way: 21r17w4057.log

dakanji commented 3 years ago

Okay ... have some things to deal with. Will take a closer look tomorrow.

dakanji commented 3 years ago

Okay. The crash is at a very innocuous point and not with something that immediately jumps out as being a potential issue. Does point to memory management issues so I did some tidying up on the preceding lines in X168. X168-BOOTx64.efi.zip

MarioG-X commented 3 years ago

Hang again but a different ending line (looks earlier than 167) in the log: 21r18q3653.log

dakanji commented 3 years ago

OK. Looks like the actual issue is not actually in the function where the crash has been happening.

I have replaced the code with that from rEFInd verbatim in X169.

I expect that this will also crash in which case, I know I definitely need to look for the problem elsewhere. If it doesn't, that will actually be great as I know I just need to keep looking. I expect it will hang though. X169-BOOTx64.efi.zip

MarioG-X commented 3 years ago

169 hangs at different place: 21r18r4604.log

dakanji commented 3 years ago

Thanks ... As expected. Have to sift through to find the issue.

Please try X170 which would hopefully help with a start point X170-BOOTx64.efi.zip

MarioG-X commented 3 years ago

170 hang looks same place, log: 21r18s2150.log

dakanji commented 3 years ago

OK ... Just trying to narrow down potential point of interest.

Please give X171 a go X171-BOOTx64.efi.zip

MarioG-X commented 3 years ago

No problem I get it. I was an IBM mainframe systems programmer for 40 years coding assembly language. Had to do this with millions of lines of code. I am checking for your response every few minutes so you don't have to wait too long for the logs. 21r18s5322.log

dakanji commented 3 years ago

Cheers. Please try X172 X172-BOOTx64.efi.zip

MarioG-X commented 3 years ago

Major movement! I booted the first linux partition and Big Sur (from Preboot) successfully. Do you want me to test booting all other partitions? Only cosmetic issue is the icon for the elementary OS partitions. Here are logs: 21r18t5408.log 21r18t5553.log

dakanji commented 3 years ago

test other partitions?

Might as well to be sure.

MarioG-X commented 3 years ago

All 4 linux and 5 macOSs boot fine!