Question: I don't understand my system boot

As the title hopefully states clearly, there is no problem to solve other than my understanding.

I wanted to tinker with my installation and install a second OS on my system. In preparation i wanted to locate my bootloader and check the configuration.

I expected to find a partition called /efi or /boot or maybe even /grub on my disk… or any of my disks.

mount -l
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=16338956k,nr_inodes=4084739,mode=755,inode64)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
/dev/nvme0n1p1 on / type ext4 (rw,noatime) [Manjaro HyprKDE]
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=36,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=3885)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,nosuid,nodev,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,noatime,inode64)
/dev/nvme1n1p1 on /home/sgr/Games type ext4 (rw,noatime) [Games]
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=3273732k,nr_inodes=818433,mode=700,uid=1000,gid=1000,inode64)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
fdisk -l
Disk /dev/sda: 119,24 GiB, 128035676160 bytes, 250069680 sectors
Disk model: SanDisk SD9SB8W-
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: 0xaaaa501a

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda2       231612852 250067789  18454938   8,8G 82 Linux swap / Solaris
/dev/sda3  *         2048 231612415 231610368 110,4G 83 Linux

Partition 2 does not start on physical sector boundary.
Partition table entries are not in disk order.


Disk /dev/sdb: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EZEX-60W
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: gpt
Disk identifier: AF692F6B-7FED-420F-89BA-917E604C5953

Device     Start        End    Sectors   Size Type
/dev/sdb1   2048 1953521663 1953519616 931,5G Microsoft basic data


Disk /dev/nvme1n1: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: KINGSTON SA2000M81000G                  
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: ABC25D73-596F-482E-877C-7D05BA90CDA3

Device         Start        End    Sectors   Size Type
/dev/nvme1n1p1    34 1953124351 1953124318 931,3G Linux filesystem


Disk /dev/nvme0n1: 238,47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: WDC PC SN730 SDBQNTY-256G-1001          
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: 0x53ad8093

Device         Boot Start       End   Sectors   Size Id Type
/dev/nvme0n1p1 *     2048 500103449 500101402 238,5G 83 Linux

It seems I got two partitions marked as bootalble. On SanDisk SD9SB8W with /dev/sda3 and on WDC PC SN730 SDBQNTY-256G-1001 with /dev/nvme0n1p1.

So I’am more familiar with a seperate boot partition with a bootloader, but at least from what i can see this is not how my system is set up.
As far as i can see the booloader is build in in my installation partitions which would be mounted as root. And which system would get mounted is decided by device priority in the UEFI.

Is this correct?

How would this work if i was to install a grub bootloader? would he call the installation and just ignore the integrated bootloader? or would he call that bootloader and they would just pass in sequence?

Looks to me that you chose a BIOS/CSM/Legacy Installation which emulates a BIOS on a UEFI for compatibility reasons. In that case there can live only one bootloader per disk, that is a limitation. The MBR is written at the very beginning of the disk, which point to the boot partition. So if you install a second OS on the same disk, then the MBR would be overwritten und point to a new bootloader, which could also boot another OS, if discovered.

4 Likes

check first with parted and boot flag

inxi -Fza
test -d /sys/firmware/efi && echo efi || echo bios
sudo efibootmgr -v
sudo parted -l 

check status for each point in your Motherboard

  • SecureBoot on/off
  • Fast Boot on/off
  • CSM on/off
  • Legacy on /off
  • disks in AHCI or Raid
1 Like

You might also use lsblk for another perspective on your devices:

lsblk -a
2 Likes

Thx for all the answers.

The lsblk -a command is nice to see the structure of your devices. But that wasn’t the issue and I could not see any info on the boot locations.

To my surprise @megavolt was correct, as I was sure to have my system set in GTP mode, but mistaken.

For the new install, i changed my settings and forced GTP install setting /boot/efi up myself. It was meant to replace the old installation anyway and I just had to make an extra backup of my configuration and data to ensure redundancy.

Just hate that my UEFI needed a setting called Windows 10 mode set to UEFI to enforce not running in legacy mode.

Using lsblk -a would have revealed the mount point (usually /boot/efi) on the first partition, if indeed your installation was performed correctly for UEFI.

Cheers.

Just a few points…

GPT

Just a warning. I dont think it will break anything right now, but /boot/efi is the old and discouraged mount point. /efi is suggested these days.

https://wiki.archlinux.org/title/ESP

Companies do crazy things with their BIOS.
Names are arguably some of the more tame.
In order for me to access certain settings I need to put mine in Chinese language and then quickly hit
1QAZ2WSX3EDC4RFV5TGB6YHN :face_with_spiral_eyes:

Then, let’s give @megavolt some well deserved credit.

2 Likes

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.