[SOLVED] can't boot Lenovo ThinkPad X1 Yoga (20SA)

I can't boot FreeBSD UNIX 15 on Lenovo ThinkPad X1 Yoga (20SA), which GRUB 2 says 'error: not a directory'. That's from Slackware 15 so is from at most 2022, but I read maybe FreeBSD FFS/UFS slightly changed since then, like with journalling? Do I have to manually use an older type when making filesystem for installation (and how) so GRUB 2 can boot FreeBSD? It boots fine on one older and one newer model similar ThinkPad though those had FreeBSD 14 and older and were upgraded.
 
Please show us the Grub2 FreeBSD menu entry and the partition table FreeBSD is located on.

From a FreeBSD installer media: gpart show -p; or Linux: lsblk -f.
 
The following works on older & newer model similar ThinkPads.
Code:
#/etc/grub.d/40_custom

menuentry "FreeBSD UNIX" --class freebsd --class bsd --class os {
  set root=(hd0,msdos1)
  insmod ufs2
  kfreebsd /boot/loader
}

#...

Code:
NAME        FSTYPE     FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1                                                                        
├─nvme0n1p1 ufs        2           69078909c89ef868                            
├─nvme0n1p2 ext4       1.0         233343ab-b964-42a2-9b03-fb02af640f76   12.6G    63% /
├─nvme0n1p3 ntfs                   AAE41484E41454C3                       12.6G    69% /win
├─nvme0n1p4                                                                    
├─nvme0n1p5 ext4       1.0         80337ddf-c0df-4681-8657-1c49f7e0d63f     17G    51% /android
└─nvme0n1p6 zfs_member 5000  home  5294454950854441049

Now tried mounting first (FreeBSD) partition on /fbsd (with fstab: /dev/nvme0n1p1 /fbsd ufs auto,ro,ufstype=ufs2,nodev,nofail 0 0) and got the same error 'not a directory' so think something is wrong with filesystem; guess I should reinstall and learn how to setup correctly in case GRUB 2 from 2022 can't handle something? Or maybe it's just time to relearn a *BSD boot-loader; these days I use Slackware more except a couple weeks in Summer (when not number-crunching) but the boot-loader (other than Slackware-current, not used on laptops) might not be as good.
 
guess I should reinstall and learn how to setup correctly [] GRUB 2
After you have resolved this issue, those "p" in nvme0n1pX indicate a GPT partition scheme, which should be specified with "gpt" (instead of "msdos") in the Grub menu configuration, e.g. "gpt1". See GRUB Manual, 13.1 How to specify devices .

Example Grub2 FreeBSD menu entry:
Rich (BB code):
#/etc/grub.d/40_custom

menuentry "FreeBSD UNIX" --class freebsd --class bsd --class os {
  set root=(hd0,gpt1)
  insmod ufs2
  kfreebsd /boot/loader
}
 
I used 'lsblk -f' in which 'p' means partition; the laptop has MBR not GPT partition scheme (that's why fourth partition is nothing). Windows, Android/BlissOS boot from similar entries saying msdosn. I was told older GRUB 2 can't handle newer FFS/UFS journalling used in FreeBSD 15 not some older versions, and that there's a special/manual way to install old journalling system.
 
Soft updates are enabled by default on 15 FreeBSD series. This is maybe the problem.

You may try tunefs(8) to remove the soft updates, but you need to boot on a FreeBSD medium.
I don't know what will be the result. It may work or not. Perhaps it will damage the file system.

I was thinking, it could be time to change for gpt, UEFI and why not, ZFS on root. One day nothing will work anymore in such an installation.
 
I used 'lsblk -f' in which 'p' means partition; the laptop has MBR not GPT partition scheme
Understood. I don't have any system which uses MBR, only GPT. On FreeBSD the "p" indicates a GPT partition scheme, "s" (for "slice") a MBR:

GPT:
Code:
% gpart show -p
=>       40  500118112     nda0  GPT  (238G)
...
    4605952  209715200   nda0p3  freebsd-zfs  (100G)

MBR:
View attachment 25652
Note: Virtualbox doesn't boot BIOS systems from a NVMe storage controller, the disk is attached to a SATA controller, hence the "ada0" device name):

I've noticed in a vbox VM, a MBR installed FreeBSD (the above image, this time attached to a NVMe storage controller) "lsblk" shows two ufs "partitions.
View attachment 25654
"nvme0n1p1", size 8G (equivalent to "ada0s1" MBR, "freebsd" PARTITION TYPES gpart(8)) and nvme0n1p5, size 7.6 (equivalent to "ada0s1a" MBR, "freebsd-ufs" P. T.) the system root partition.

In your systems setup one ufs partition is missing. How exactly have you set up the FreeBSD MBR installation?
 
After you have resolved this issue, those "p" in nvme0n1pX indicate a GPT partition scheme, which should be specified with "gpt" (instead of "msdos") in the Grub menu configuration, e.g. "gpt1". See GRUB Manual, 13.1 How to specify devices .

Example Grub2 FreeBSD menu entry:
Rich (BB code):
#/etc/grub.d/40_custom

menuentry "FreeBSD UNIX" --class freebsd --class bsd --class os {
  set root=(hd0,gpt1)
  insmod ufs2
  kfreebsd /boot/loader
}
Must try this stuff again.
 
Back
Top