You are not logged in.

#1 2023-07-26 12:25:55

screenfox
Member
Registered: 2023-05-13
Posts: 49

Grub disk confusion

Partially solved:
- never forget to re-check the fstab of a cloned system if you notice errors in your primary fstab
- grub-mkconfig pulls stuff out of your grub.cfg, so if there are weird UUIDs showing up, try deleting / renaming your grub.cfg before generating

Hi,

i have two disks, the second as a simple rsync backup of my root filesystem on the first. 

I tried to make the second disk bootable with grub and os-prober, which seemed to work since i got an entry with the correct device for disk2 in the name.

What actually happened though is that grub now claims to boot from the second disk, but wrote the uuid of the first into the /boot/grub/grub.cfg. Since i should not manually edit this file and /etc/defaults/grub does not contain anything that seems relevant, can someone please point me to where i can tell grub-mkconfig to use the uuid of the disk an os was found on instead of my first disk for everything? 

Side note: i understand that i need to adjust /etc/fstab after each backup from disk1->disk2, but that is not my current problem.

Last edited by screenfox (2023-08-03 16:15:37)

Offline

#2 2023-07-27 09:46:39

Ferdinand
Member
From: Norway
Registered: 2020-01-02
Posts: 334

Re: Grub disk confusion

You have two disks, the first disk has grub installed, and a root partition that you have copied to the second disk, and you have updated grub with os-prober, so now you can load linux from either disk, and you want the second disk to be default?

If I get you right, then you just need to change your default boot entry:
https://wiki.archlinux.org/title/GRUB/T … le_entries

If I get you wrong, then please explain what I misunderstand, and also the output from these commands will be helpful:

lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,UUID | curl -F 'file=@-' 0x0.st
journalctl -b  | curl -F 'file=@-' 0x0.st

Offline

#3 2023-07-27 16:24:48

screenfox
Member
Registered: 2023-05-13
Posts: 49

Re: Grub disk confusion

Ferdinand wrote:

You have two disks, the first disk has grub installed, and a root partition that you have copied to the second disk, and you have updated grub with os-prober, so now you can load linux from either disk, and you want the second disk to be default?

Sorry for the confusion, it is not about the default entry, it is about the mounted root filesystem. 

To clear things up, i should state my motivation: 
I had an unusable system after an update, and i want to make sure i have a usable system even if updating totally destroys my root filesystem (on the first disk). So i copied all the contents before updating and expected grub to produce two entries: one for the disk1 original and one for the disk2 copy (only to be booted as an emergency measure). 

The problem is that entry2 for disk2 is booting fine, but when i check, mount tells me that disk1 is mounted as root instead of disk2. This is reflected in grub-mkconfig producing a grub.cfg with identical uuids for the disks used in both entries. 

Now the question is: how do i get grub-mkconfig to do its job right? Or, if that is not possible, can i replace the wrong uuids in the second entry of grub.cfg with the correct disk2 uuid without risking grub failing completely?

Correct entry for disk1:

menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-97a4ac9c-8210-4450-99a0-69689024e6a9' {
[...]
        linux   /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw  loglevel=3 quiet
[...]

Wrong entry for disk2 which mounts disk1 instead:

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Arch Linux (on /dev/nvme1n1p3)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-40e633a0-18f5-4165-a478-5981753af7c9' {
[...]
        linux /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
        initrd /initramfs-linux.img
}

As you can see, the disk uuids for root are identical.

Offline

#4 2023-07-27 21:21:18

seth
Member
Registered: 2012-09-03
Posts: 51,739

Re: Grub disk confusion

From his inquiry, I'm pretty sure Ferdinand got you right.

As you can see, the disk uuids for root are identical.

That's normal when you clone a disk, they're indistinguishable this way.

You'd have to address it by the device node (/dev/sda2, /dev/nvme1n1p3… that kind of stuff) but that's not necessarily deterministic either.
You can also change the UUID of one FS, but that's FS dependent.

Offline

#5 2023-07-27 23:32:14

screenfox
Member
Registered: 2023-05-13
Posts: 49

Re: Grub disk confusion

seth wrote:

From his inquiry, I'm pretty sure Ferdinand got you right.

As you can see, the disk uuids for root are identical.

That's normal when you clone a disk, they're indistinguishable this way.

You'd have to address it by the device node (/dev/sda2, /dev/nvme1n1p3… that kind of stuff) but that's not necessarily deterministic either.
You can also change the UUID of one FS, but that's FS dependent.

Would that also apply if i created the partitions manually and rsync the data over? Because that's what i did.

Here to show i did not clone: 

NAME        FSTYPE   SIZE MOUNTPOINT     UUID
nvme1n1            931,5G                
├─nvme1n1p1            2G                
├─nvme1n1p2            2G                
├─nvme1n1p3 ext4     167G /mnt/nvme1n1p3 40e633a0-18f5-4165-a478-5981753af7c9
└─nvme1n1p4 ntfs   760,6G                5DD227F302DE3FEE
nvme0n1            931,5G                
├─nvme0n1p1 vfat       2G /boot          0343-750D
├─nvme0n1p2 swap       2G [SWAP]         43f2631d-08c8-4091-94b4-a488d6f0ed55
└─nvme0n1p3 ext4   927,5G /              97a4ac9c-8210-4450-99a0-69689024e6a9

The relevant partitions are nvme0n1p3 (disk1) and nvme1n1p3 (disk2). Yes, i am aware that i have less space on the second and might run into problems later.

Last edited by screenfox (2023-07-27 23:33:24)

Offline

#6 2023-07-28 02:21:20

kermit63
Member
Registered: 2018-07-04
Posts: 174

Re: Grub disk confusion

Are both installations using the same /boot ?

Offline

#7 2023-07-28 05:57:50

seth
Member
Registered: 2012-09-03
Posts: 51,739

Re: Grub disk confusion

Would that also apply if i created the partitions manually and rsync the data over? Because that's what i did.

No. So at least that's not a problem (and why Ferdinand asked for the lsblk output)

Post the entire grub.cfg and just fix the UUIDs and elaborate on

I tried to make the second disk bootable with grub and os-prober

- notably which system/partition was the root when you did that?
bn. that the order of "nvme1n1p3" is not necessarily deterministic, that's why you're using UUIDs

Offline

#8 2023-07-28 09:26:39

Ferdinand
Member
From: Norway
Registered: 2020-01-02
Posts: 334

Re: Grub disk confusion

Thank's for stepping in, Seth - I didn't have time to follow up yesterday tongue

Just to confirm - I asked for the lsblk and the journalctl, so I could see what disks (and UUIDs) there are, and see what was actually booted from.

If the rsync'ed disk was mounted when grub-mkconfig was run, then both disks should appear as options in the Grub menu - and work.
So, if they aren't then something is fishy - either the disks actually have the same UUID (which they don't, obviously), or - guessing - maybe a mixup when grub-mkconfig was run; that the booted root was also the root mounted - so the other root was never part of it? At any rate, a look at the grub.cfg would be good smile

@kermit63, yes - the EFI partition is mounted on /boot and is common for both installations (/etc/fstab is part of the rsynced root partition).

Last edited by Ferdinand (2023-07-28 09:42:52)

Offline

#9 2023-07-28 13:40:59

screenfox
Member
Registered: 2023-05-13
Posts: 49

Re: Grub disk confusion

kermit63 wrote:

Are both installations using the same /boot ?

At the moment i would guess so, but i did not check. 

I think i have an idea what you are getting at - if the copied /boot partition on disc2 has old entries then if it is used, it can only boot the old system, of course!

Offline

#10 2023-07-28 13:55:00

screenfox
Member
Registered: 2023-05-13
Posts: 49

Re: Grub disk confusion

Ferdinand wrote:

Thank's for stepping in, Seth - I didn't have time to follow up yesterday :p

Just to confirm - I asked for the lsblk and the journalctl, so I could see what disks (and UUIDs) there are, and see what was actually booted from.

If the rsync'ed disk was mounted when grub-mkconfig was run, then both disks should appear as options in the Grub menu - and work.
So, if they aren't then something is fishy - either the disks actually have the same UUID (which they don't, obviously), or - guessing - maybe a mixup when grub-mkconfig was run; that the booted root was also the root mounted - so the other root was never part of it? At any rate, a look at the grub.cfg would be good :)

@kermit63, yes - the EFI partition is mounted on /boot and is common for both installations (/etc/fstab is part of the rsynced root partition).

> the other root was never part of it 
Sorry, i don't understand what that means - the nvme1 partitions were not present when i installed arch on nvme0, if that is what you are asking.

Ok, i totally forgot about the second /boot partition. Checking, i see that lsblk does not give me a UUID for it, and i guess i should not be using it anyway. 
So now i see that the /boot is in the grub.cfg under "search [...] --set=root <UUID of /boot>" separately. Looks good to me, it's the same for both as it should be (since the copied /boot partition is outdated).

So i was booted to disk1 (nvme0) with both its /boot and root filesystem for grub-mkconfig, the initial setup. Disk2 (ext4 partition on nvme1) was mounted under /mnt/nvme1n1p3 when i ran grub-mkconfig. 

Here's the artwork grub-mkconfig produced:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 97a4ac9c-8210-4450-99a0-69689024e6a9
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=de_DE
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-97a4ac9c-8210-4450-99a0-69689024e6a9' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root 0343-750D
	echo	'Loading Linux linux ...'
	linux	/vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw  loglevel=3 quiet
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-97a4ac9c-8210-4450-99a0-69689024e6a9' {
	menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-97a4ac9c-8210-4450-99a0-69689024e6a9' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw  loglevel=3 quiet
		echo	'Loading initial ramdisk ...'
		initrd	/initramfs-linux.img
	}
	menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-97a4ac9c-8210-4450-99a0-69689024e6a9' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw  loglevel=3 quiet
		echo	'Loading initial ramdisk ...'
		initrd	/initramfs-linux-fallback.img
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Arch Linux (on /dev/nvme1n1p3)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-40e633a0-18f5-4165-a478-5981753af7c9' {
	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root 0343-750D
	linux /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
	initrd /initramfs-linux.img
}
submenu 'Advanced options for Arch Linux (on /dev/nvme1n1p3)' $menuentry_id_option 'osprober-gnulinux-advanced-40e633a0-18f5-4165-a478-5981753af7c9' {
	menuentry 'Arch Linux (on /dev/nvme1n1p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--40e633a0-18f5-4165-a478-5981753af7c9' {
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		linux /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
		initrd /initramfs-linux.img
	}
	menuentry 'Arch Linux, mit Linux linux (on /dev/nvme1n1p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--40e633a0-18f5-4165-a478-5981753af7c9' {
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		linux /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
		initrd /initramfs-linux.img
	}
	menuentry 'Arch Linux, with Linux linux (fallback initramfs) (on /dev/nvme1n1p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--40e633a0-18f5-4165-a478-5981753af7c9' {
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		linux /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
		initrd /initramfs-linux-fallback.img
	}
	menuentry 'Arch Linux (auf /dev/nvme1n1p3) (on /dev/nvme1n1p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--40e633a0-18f5-4165-a478-5981753af7c9' {
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		linux /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
		initrd /initramfs-linux.img
	}
	menuentry 'Arch Linux (auf /dev/nvme1n1p3) (on /dev/nvme1n1p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--40e633a0-18f5-4165-a478-5981753af7c9' {
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		linux /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
		initrd /initramfs-linux.img
	}
	menuentry 'Arch Linux, mit Linux linux (auf /dev/nvme1n1p3) (on /dev/nvme1n1p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--40e633a0-18f5-4165-a478-5981753af7c9' {
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		linux /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
		initrd /initramfs-linux.img
	}
	menuentry 'Arch Linux, with Linux linux (fallback initramfs) (auf /dev/nvme1n1p3) (on /dev/nvme1n1p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--40e633a0-18f5-4165-a478-5981753af7c9' {
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		linux /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
		initrd /initramfs-linux-fallback.img
	}
}

### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
	fwsetup --is-supported
	if [ "$?" = 0 ]; then
		menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
			fwsetup
		}
	fi
fi
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

Offline

#11 2023-07-28 14:21:48

seth
Member
Registered: 2012-09-03
Posts: 51,739

Re: Grub disk confusion

Every boot root is "0343-750D" which is ideally *only* on nvme0n1p1 (if you mount nvme1n1p1 somewhere, you'll see its UUID as well)

The weird part is that os-prober seems to generate a shitload of redundant entries and even weirder:

	menuentry 'Arch Linux (on /dev/nvme1n1p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--40e633a0-18f5-4165-a478-5981753af7c9' {
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		linux /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
		initrd /initramfs-linux.img
	}

labels them w/ the UUID of nvme1n1p3 but then sets the kernel root to nvme0n1p3

lsblk -f
os-prober

Offline

#12 2023-07-28 15:26:09

screenfox
Member
Registered: 2023-05-13
Posts: 49

Re: Grub disk confusion

seth wrote:

Every boot root is "0343-750D" which is ideally *only* on nvme0n1p1 (if you mount nvme1n1p1 somewhere, you'll see its UUID as well)

The weird part is that os-prober seems to generate a shitload of redundant entries and even weirder:

	menuentry 'Arch Linux (on /dev/nvme1n1p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--40e633a0-18f5-4165-a478-5981753af7c9' {
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		linux /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
		initrd /initramfs-linux.img
	}

labels them w/ the UUID of nvme1n1p3 but then sets the kernel root to nvme0n1p3

lsblk -f
os-prober

> labels them w/ the UUID of nvme1n1p3 but then sets the kernel root to nvme0n1p3
Exactly, this is my problem.

Output of lsblk in previous post, the 97... UUID is my nvme0 root partition.

Output of os-prober:

/dev/nvme1n1p3:Arch Linux:Arch:linux

Offline

#13 2023-07-28 15:39:15

seth
Member
Registered: 2012-09-03
Posts: 51,739

Re: Grub disk confusion

I wanted to ensure that ti's still the same (mountpoint-wise) because the context could have been important.
os-prober finds the foreign arch installation correctly.

Edit  /etc/grub.d/30_os-prober and put a "set -x" under the "set -e" and a "set +x" at the bottom, then run grub-mkconfig and post the output…

Offline

#14 2023-07-28 16:35:00

Ferdinand
Member
From: Norway
Registered: 2020-01-02
Posts: 334

Re: Grub disk confusion

I'm a little out of my depth here, but what I meant earlier was it's possible that it is, by mistake, actually nvme0n1p3 that is mounted under /mnt/nvme1n1p3 while booted on nvme0n1p3 and running grub-mkconfig?

I don't know where the name used in the label by os_prober comes from? Can it be from the mount point?

Offline

#15 2023-07-28 17:15:38

screenfox
Member
Registered: 2023-05-13
Posts: 49

Re: Grub disk confusion

seth wrote:

I wanted to ensure that ti's still the same (mountpoint-wise) because the context could have been important.
os-prober finds the foreign arch installation correctly.

Edit  /etc/grub.d/30_os-prober and put a "set -x" under the "set -e" and a "set +x" at the bottom, then run grub-mkconfig and post the output…

Ok, i did that, result of the edit:

#! /bin/sh
set -e
set -x

# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.

prefix="/usr"
exec_prefix="/usr"
datarootdir="/usr/share"

export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"

. "$pkgdatadir/grub-mkconfig_lib"

if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
  grub_warn "$(gettext_printf "os-prober will not be executed to detect other bootable partitions.\nSystems on them will not be added to the GRUB boot configuration.\nCheck GRUB_DISABLE_OS_PROBER documentation entry.")"
  exit 0
fi

if ! command -v os-prober > /dev/null || ! command -v linux-boot-prober > /dev/null ; then
  # missing os-prober and/or linux-boot-prober
  exit 0
fi

grub_warn "$(gettext_printf "os-prober will be executed to detect other bootable partitions.\nIts output will be used to detect bootable binaries on them and create new boot entries.")"

OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
if [ -z "${OSPROBED}" ] ; then
  # empty os-prober output, nothing doing
  exit 0
fi

osx_entry() {
    if [ x$2 = x32 ]; then
        # TRANSLATORS: it refers to kernel architecture (32-bit)
	bitstr="$(gettext "(32-bit)")"
    else
        # TRANSLATORS: it refers to kernel architecture (64-bit)
	bitstr="$(gettext "(64-bit)")"
    fi
    # TRANSLATORS: it refers on the OS residing on device %s
    onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
        cat << EOF
menuentry '$(echo "${LONGNAME} $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${DEVICE}")'  {
EOF
	save_default_entry | grub_add_tab
	prepare_grub_to_access_device ${DEVICE} | grub_add_tab
	cat << EOF
        load_video
        set do_resume=0
        if [ /var/vm/sleepimage -nt10 / ]; then
           if xnu_resume /var/vm/sleepimage; then
             set do_resume=1
           fi
        fi
        if [ \$do_resume = 0 ]; then
           xnu_uuid ${OSXUUID} uuid
           if [ -f /Extra/DSDT.aml ]; then
              acpi -e /Extra/DSDT.aml
           fi
           if [ /kernelcache -nt /System/Library/Extensions ]; then
              $1 /kernelcache boot-uuid=\${uuid} rd=*uuid
           elif [ -f /System/Library/Kernels/kernel ]; then
              $1 /System/Library/Kernels/kernel boot-uuid=\${uuid} rd=*uuid
              xnu_kextdir /System/Library/Extensions
           else
              $1 /mach_kernel boot-uuid=\${uuid} rd=*uuid
              if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
                xnu_mkext /System/Library/Extensions.mkext
              else
                xnu_kextdir /System/Library/Extensions
              fi
           fi
           if [ -f /Extra/Extensions.mkext ]; then
              xnu_mkext /Extra/Extensions.mkext
           fi
           if [ -d /Extra/Extensions ]; then
              xnu_kextdir /Extra/Extensions
           fi
           if [ -f /Extra/devprop.bin ]; then
              xnu_devprop_load /Extra/devprop.bin
           fi
           if [ -f /Extra/splash.jpg ]; then
              insmod jpeg
              xnu_splash /Extra/splash.jpg
           fi
           if [ -f /Extra/splash.png ]; then
              insmod png
              xnu_splash /Extra/splash.png
           fi
           if [ -f /Extra/splash.tga ]; then
              insmod tga
              xnu_splash /Extra/splash.tga
           fi
        fi
}
EOF
}

used_osprober_linux_ids=

if [ "x$GRUB_TOP_LEVEL_OS_PROBER" != x ]; then
  OSPROBED=$(grub_move_to_front "$GRUB_TOP_LEVEL_OS_PROBER" ${OSPROBED})
fi

for OS in ${OSPROBED} ; do
  DEVICE="`echo ${OS} | cut -d ':' -f 1`"
  LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`"
  LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`"
  BOOT="`echo ${OS} | cut -d ':' -f 4`"
  if UUID="`${grub_probe} --target=fs_uuid --device ${DEVICE%@*}`"; then
    EXPUUID="$UUID"

    if [ x"${DEVICE#*@}" != x ] ; then
      EXPUUID="${EXPUUID}@${DEVICE#*@}"
    fi

    if [ "x${GRUB_OS_PROBER_SKIP_LIST}" != "x" ] && [ "x`echo ${GRUB_OS_PROBER_SKIP_LIST} | grep -i -e '\b'${EXPUUID}'\b'`" != "x" ] ; then
      echo "Skipped ${LONGNAME} on ${DEVICE} by user request." >&2
      continue
    fi
  fi

  BTRFS="`echo ${OS} | cut -d ':' -f 5`"
  if [ "x$BTRFS" = "xbtrfs" ]; then
	BTRFSuuid="`echo ${OS} | cut -d ':' -f 6`"
	BTRFSsubvol="`echo ${OS} | cut -d ':' -f 7`"
  fi

  if [ -z "${LONGNAME}" ] ; then
    LONGNAME="${LABEL}"
  fi

  # os-prober returns text string followed by optional counter
  CLASS="--class $(echo "${LABEL}" | LC_ALL=C sed 's,[[:digit:]]*$,,' | cut -d' ' -f1 | tr 'A-Z' 'a-z' | LC_ALL=C sed 's,[^[:alnum:]_],_,g')"

  gettext_printf "Found %s on %s\n" "${LONGNAME}" "${DEVICE}" >&2

  case ${BOOT} in
    chain)

	  onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
      cat << EOF
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' $CLASS --class os \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
EOF
      save_default_entry | grub_add_tab
      prepare_grub_to_access_device ${DEVICE} | grub_add_tab

      if [ x"`${grub_probe} --device ${DEVICE} --target=partmap`" = xmsdos ]; then
	  cat << EOF
	parttool \${root} hidden-
EOF
      fi

      case ${LONGNAME} in
	Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*)
	;;
	*)
	  cat << EOF
	drivemap -s (hd0) \${root}
EOF
	;;
      esac

      cat <<EOF
	chainloader +1
}
EOF
    ;;
    efi)

	EFIPATH=${DEVICE#*@}
	DEVICE=${DEVICE%@*}
	onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
      cat << EOF
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' $CLASS --class os \$menuentry_id_option 'osprober-efi-$(grub_get_device_id "${DEVICE}")' {
EOF
      save_default_entry | sed -e "s/^/\t/"
      prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"

      cat <<EOF
	chainloader ${EFIPATH}
}
EOF
    ;;
    linux)
      if [ "x$BTRFS" = "xbtrfs" ]; then
         LINUXPROBED="`linux-boot-prober btrfs ${BTRFSuuid} ${BTRFSsubvol}  2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
      else
         LINUXPROBED="`linux-boot-prober ${DEVICE} 2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
      fi
      prepare_boot_cache=
      boot_device_id=
      is_top_level=true
      title_correction_code=
      OS="${LONGNAME}"

      for LINUX in ${LINUXPROBED} ; do
        LROOT="`echo ${LINUX} | cut -d ':' -f 1`"
        LBOOT="`echo ${LINUX} | cut -d ':' -f 2`"
        LLABEL="`echo ${LINUX} | cut -d ':' -f 3 | tr '^' ' '`"
        LKERNEL="`echo ${LINUX} | cut -d ':' -f 4`"
        LINITRD="`echo ${LINUX} | cut -d ':' -f 5 | tr '^' ' '`"
        LPARAMS="`echo ${LINUX} | cut -d ':' -f 6- | tr '^' ' '`"

        if [ -z "${LLABEL}" ] ; then
          LLABEL="${LONGNAME}"
        fi

	if [ "${LROOT}" != "${LBOOT}" ]; then
	  LKERNEL="${LKERNEL#/boot}"
	  LINITRD="${LINITRD#/boot}"
	fi

	onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
	recovery_params="$(echo "${LPARAMS}" | grep single)" || true
	counter=1
	while echo "$used_osprober_linux_ids" | grep 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id' > /dev/null; do
	    counter=$((counter+1));
	done
	if [ -z "$boot_device_id" ]; then
	    boot_device_id="$(grub_get_device_id "${DEVICE}")"
	fi
	used_osprober_linux_ids="$used_osprober_linux_ids 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id'"

	if [ -z "${prepare_boot_cache}" ]; then
	  prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | grub_add_tab)"
	fi

	# The GRUB_DISABLE_SUBMENU option used to be different than others since it was
	# mentioned in the documentation that has to be set to 'y' instead of 'true' to
	# enable it. This caused a lot of confusion to users that set the option to 'y',
	# 'yes' or 'true'. This was fixed but all of these values must be supported now.
	if [ "x${GRUB_DISABLE_SUBMENU}" = xyes ] || [ "x${GRUB_DISABLE_SUBMENU}" = xy ]; then
	    GRUB_DISABLE_SUBMENU="true"
	fi

	if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
            cat << EOF
menuentry '$(echo "$OS $onstr" | grub_quote)' $CLASS --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' {
EOF
	    save_default_entry | grub_add_tab
	    printf '%s\n' "${prepare_boot_cache}"
	    cat <<  EOF
	linux ${LKERNEL} ${LPARAMS}
EOF
            if [ -n "${LINITRD}" ] ; then
          cat << EOF
	initrd ${LINITRD}
EOF
            fi
        cat << EOF
}
EOF
	    echo "submenu '$(gettext_printf "Advanced options for %s" "${OS} $onstr" | grub_quote)' \$menuentry_id_option 'osprober-gnulinux-advanced-$boot_device_id' {"
	    is_top_level=false
	fi
	title="${LLABEL} $onstr"
        cat << EOF
	menuentry '$(echo "$title" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-$LKERNEL-${recovery_params}-$boot_device_id' {
EOF
	save_default_entry | sed -e "s/^/$grub_tab$grub_tab/"
	printf '%s\n' "${prepare_boot_cache}" | grub_add_tab
	cat <<  EOF
		linux ${LKERNEL} ${LPARAMS}
EOF
        if [ -n "${LINITRD}" ] ; then
            cat << EOF
		initrd ${LINITRD}
EOF
        fi
        cat << EOF
	}
EOF
	if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
	    replacement_title="$(echo "Advanced options for ${OS} $onstr" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
	    quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
	    title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
	    grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")"
	fi
      done
      if [ x"$is_top_level" != xtrue ]; then
	  echo '}'
      fi
      echo "$title_correction_code"
    ;;
    macosx)
      if [ "${UUID}" ]; then
	OSXUUID="${UUID}"
	osx_entry xnu_kernel 32
	osx_entry xnu_kernel64 64
      fi
    ;;
    hurd)
      onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
      cat << EOF
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class hurd --class gnu --class os \$menuentry_id_option 'osprober-gnuhurd-/boot/gnumach.gz-false-$(grub_get_device_id "${DEVICE}")' {
EOF
      save_default_entry | grub_add_tab
      prepare_grub_to_access_device ${DEVICE} | grub_add_tab
      grub_device="`${grub_probe} --device ${DEVICE} --target=drive`"
      mach_device="`echo "${grub_device}" | sed -e 's/(\(hd.*\),msdos\(.*\))/\1s\2/'`"
      grub_fs="`${grub_probe} --device ${DEVICE} --target=fs`"
      case "${grub_fs}" in
	*fs)	hurd_fs="${grub_fs}" ;;
	*)	hurd_fs="${grub_fs}fs" ;;
      esac
      cat << EOF
	multiboot /boot/gnumach.gz root=device:${mach_device}
	module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\
			--multiboot-command-line='\${kernel-command-line}' \\
			--host-priv-port='\${host-port}' \\
			--device-master-port='\${device-port}' \\
			--exec-server-task='\${exec-task}' -T typed '\${root}' \\
			'\$(task-create)' '\$(task-resume)'
	module /lib/ld.so.1 exec /hurd/exec '\$(exec-task=task-create)'
}
EOF
    ;;
    minix)
	  cat << EOF
menuentry "${LONGNAME} (on ${DEVICE}, Multiboot)" {
EOF
         save_default_entry | sed -e "s/^/\t/"
         prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
	 cat << EOF
	multiboot /boot/image_latest
}
EOF
    ;;
    *)
      # TRANSLATORS: %s is replaced by OS name.
      gettext_printf "%s is not yet supported by grub-mkconfig.\n" "  ${LONGNAME}" >&2
    ;;
  esac
done

set +x

Did i place the "set -/+ x" right?

Result of grub-mkconfig seems to be 4 less of the wrong submenu entries, but no correct ones (according to a quick diff) (also, it's partially german now ^^):

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 97a4ac9c-8210-4450-99a0-69689024e6a9
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=de_DE
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-97a4ac9c-8210-4450-99a0-69689024e6a9' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root 0343-750D
	echo	'Loading Linux linux ...'
	linux	/vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw  loglevel=3 quiet
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-97a4ac9c-8210-4450-99a0-69689024e6a9' {
	menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-97a4ac9c-8210-4450-99a0-69689024e6a9' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw  loglevel=3 quiet
		echo	'Loading initial ramdisk ...'
		initrd	/initramfs-linux.img
	}
	menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-97a4ac9c-8210-4450-99a0-69689024e6a9' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw  loglevel=3 quiet
		echo	'Loading initial ramdisk ...'
		initrd	/initramfs-linux-fallback.img
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Arch Linux (on /dev/nvme1n1p3)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-40e633a0-18f5-4165-a478-5981753af7c9' {
	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root 0343-750D
	linux /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
	initrd /initramfs-linux.img
}
submenu 'Advanced options for Arch Linux (on /dev/nvme1n1p3)' $menuentry_id_option 'osprober-gnulinux-advanced-40e633a0-18f5-4165-a478-5981753af7c9' {
	menuentry 'Arch Linux (on /dev/nvme1n1p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--40e633a0-18f5-4165-a478-5981753af7c9' {
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		linux /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
		initrd /initramfs-linux.img
	}
	menuentry 'Arch Linux, with Linux linux (on /dev/nvme1n1p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--40e633a0-18f5-4165-a478-5981753af7c9' {
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		linux /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
		initrd /initramfs-linux.img
	}
	menuentry 'Arch Linux, with Linux linux (fallback initramfs) (on /dev/nvme1n1p3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--40e633a0-18f5-4165-a478-5981753af7c9' {
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root 0343-750D
		linux /vmlinuz-linux root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
		initrd /initramfs-linux-fallback.img
	}
}

### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
	fwsetup --is-supported
	if [ "$?" = 0 ]; then
		menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
			fwsetup
		}
	fi
fi
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

Last edited by screenfox (2023-07-28 17:17:59)

Offline

#16 2023-07-28 17:18:55

screenfox
Member
Registered: 2023-05-13
Posts: 49

Re: Grub disk confusion

Ferdinand wrote:

I'm a little out of my depth here, but what I meant earlier was it's possible that it is, by mistake, actually nvme0n1p3 that is mounted under /mnt/nvme1n1p3 while booted on nvme0n1p3 and running grub-mkconfig?

I don't know where the name used in the label by os_prober comes from? Can it be from the mount point?

No, i'm certain that the partitions are mounted correctly in my original system where i run grub-mkconfig.

Offline

#17 2023-07-28 19:04:46

seth
Member
Registered: 2012-09-03
Posts: 51,739

Re: Grub disk confusion

"set -x" makes bash trace the script, the interesting part is the output of grub-mkconfig, not (so much) the result.
We want to knowhow it's ending up w/ different UUIDs for the label and the entry.

(There were btw. german tokens in the previous grub.cfg, but that's really the least concern here wink

Offline

#18 2023-07-28 21:01:48

screenfox
Member
Registered: 2023-05-13
Posts: 49

Re: Grub disk confusion

seth wrote:

"set -x" makes bash trace the script, the interesting part is the output of grub-mkconfig, not (so much) the result.
We want to knowhow it's ending up w/ different UUIDs for the label and the entry.

(There were btw. german tokens in the previous grub.cfg, but that's really the least concern here wink

Ok, the script doesn't take kindly to adding "> logfile.txt", how do i do this for scripts?

Here what i was able to select at once and looks relevant:

+ command -v os-prober                                                                                                                                                                          
+ command -v linux-boot-prober                                                                                                                                                                  
++ gettext_printf 'os-prober will be executed to detect other bootable partitions.\nIts output will be used to detect bootable binaries on them and create new boot                             entries.'                                                                                                                                                                                       
++ gettext_printf_format='os-prober will be executed to detect other bootable partitions.\nIts output will be used to detect bootable binaries on them and create ne                            w boot entries.'                                                                                                                                                                                
++ shift                                                                                                                                                                                        
+++ gettext 'os-prober will be executed to detect other bootable partitions.\nIts output will be used to detect bootable binaries on them and create new boot entrie                            s.'                                                                                                                                                                             
++ printf 'os-prober will be executed to detect other bootable partitions.\nIts output will be used to detect bootable binaries on them and create new boot entries.                            '                                                                                                                                                                       
+ grub_warn 'os-prober will be executed to detect other bootable partitions.                                                                                                                    
Its output will be used to detect bootable binaries on them and create new boot entries.'                                                                                                       
++ gettext Warning:                                                                                                                                                                             
+ echo Warning: 'os-prober will be executed to detect other bootable partitions.                                                                                                                
Its output will be used to detect bootable binaries on them and create new boot entries.'                                                                                                       
Warning: os-prober will be executed to detect other bootable partitions.                                                                                                                        
Its output will be used to detect bootable binaries on them and create new boot entries.                                                                                                        
++ os-prober                                                                                                                                                                                    
++ tr ' ' '^'                                                                                                                                                                                   
++ paste -s -d ' '                                                                                                                                                                              
+ OSPROBED='/dev/nvme1n1p3:Arch^Linux:Arch:linux'                                                                                                                                               
+ '[' -z '/dev/nvme1n1p3:Arch^Linux:Arch:linux' ']'                                                                                                                                             
+ used_osprober_linux_ids=                                                                                                                                                                      
+ '[' x '!=' x ']'                                                                                                                                                                              
+ for OS in ${OSPROBED}                                                                                                                                                                         
++ echo '/dev/nvme1n1p3:Arch^Linux:Arch:linux'                                                                                                                                                  
++ cut -d : -f 1                                                                                                                                                                                
+ DEVICE=/dev/nvme1n1p3                                                                                                                                                                         
++ echo '/dev/nvme1n1p3:Arch^Linux:Arch:linux'                                                                                                                                                  
++ cut -d : -f 2                                                                                                                                                                                
++ tr '^' ' '                                                                                                                                                                                   
+ LONGNAME='Arch Linux'                                                                                                                                                                         
++ echo '/dev/nvme1n1p3:Arch^Linux:Arch:linux'                                                                                                                                                  
++ cut -d : -f 3                                                                                                                                                                                
++ tr '^' ' '                                                                                                                                                                                   
+ LABEL=Arch                                                                                                                                                                                    
++ echo '/dev/nvme1n1p3:Arch^Linux:Arch:linux'                                                                                                                                                  
++ cut -d : -f 4                                                                                                                                                                                
+ BOOT=linux                                                                                                                                                                                    
++ /usr/bin/grub-probe --target=fs_uuid --device /dev/nvme1n1p3                                                                                                                                 
+ UUID=40e633a0-18f5-4165-a478-5981753af7c9                                                                                                                                                     
+ EXPUUID=40e633a0-18f5-4165-a478-5981753af7c9                                                                                                                                                  
+ '[' x/dev/nvme1n1p3 '!=' x ']'                                                                                                                                                                
+ EXPUUID=40e633a0-18f5-4165-a478-5981753af7c9@/dev/nvme1n1p3                                                                                                                                   
+ '[' x '!=' x ']'                                                                                                                                                                              
++ echo '/dev/nvme1n1p3:Arch^Linux:Arch:linux'                                                                                                                                                  
++ cut -d : -f 5                                                                                                                                                                                
+ BTRFS=                                                                                                                                                                                        
+ '[' x = xbtrfs ']'                                                                                                                                                                            
+ '[' -z 'Arch Linux' ']'                                                                                                                                                                       
++ echo Arch                                                                                                                                                                                    
++ LC_ALL=C                                                                                                                                                                                     
++ sed 's,[[:digit:]]*$,,'                                                                                                                                                                      
++ cut '-d ' -f1                                                                                                                                                                                
++ tr A-Z a-z                                                                                                                                                                                   
++ LC_ALL=C                                                                                                                                                                                     
++ sed 's,[^[:alnum:]_],_,g'                                                                                                                                                                    
+ CLASS='--class arch'                                                                                                                                                                          
+ gettext_printf 'Found %s on %s\n' 'Arch Linux' /dev/nvme1n1p3                                                                                                                                 
+ gettext_printf_format='Found %s on %s\n'                                                                                                                                                      
+ shift                                                                                                                                                                                         
++ gettext 'Found %s on %s\n'                                                                                                                                                                   
+ printf 'Found %s on %s\n' 'Arch Linux' /dev/nvme1n1p3                                                                                                                                         
Found Arch Linux on /dev/nvme1n1p3                                                                                                                                                              
+ case ${BOOT} in                                                                                                                                                                               
+ '[' x = xbtrfs ']'                                                                                                                                                                            
++ linux-boot-prober /dev/nvme1n1p3
++ tr ' ' '^'                                                                                                                                                                                   
++ paste -s -d ' '                                                                                                                                                                              
+ LINUXPROBED='/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^q                            uiet /dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^logl                            evel=3^quiet /dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux^(fallback^initramfs):/boot/vmlinuz-linux:/boot/initramfs-linux-fallback.img:root=UUID=97a4ac                            9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'                                                                                                                                             
+ prepare_boot_cache=                                                                                                                                                                           
+ boot_device_id=                                                                                                                                                                               
+ is_top_level=true                                                                                                                                                                             
+ title_correction_code=                                                                                                                                                                        
+ OS='Arch Linux'                                                                                                                                                                               
+ for LINUX in ${LINUXPROBED}                                                                                                                                                                   
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'                             
++ cut -d : -f 1                                                                                                                                                                                
+ LROOT=/dev/nvme1n1p3                                                                                                                                                                          
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'                             
++ cut -d : -f 2                                                                                                                                                                                
+ LBOOT=/dev/nvme0n1p1                                                                                                                                                                          
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'                             
++ cut -d : -f 3                                                                                                                                                                                
++ tr '^' ' '                                                                                                                                                                                   
+ LLABEL='Arch Linux'                                                                                                                                                                           
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'                             
++ cut -d : -f 4                                                                                                                                                                                
+ LKERNEL=/boot/vmlinuz-linux                                                                                                                                                                   
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'                             
++ cut -d : -f 5                                                                                                                                                                                
++ tr '^' ' '                                                                                                                                                                                   
+ LINITRD=/boot/initramfs-linux.img                                                                                                                                                             
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'                             
++ cut -d : -f 6-                                                                                                                                                                               
++ tr '^' ' '                                                                                                                                                                                   
+ LPARAMS='root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet'                                                                                                                  
+ '[' -z 'Arch Linux' ']'                                                                                                                                                                       
+ '[' /dev/nvme1n1p3 '!=' /dev/nvme0n1p1 ']'                                                                                                                                                    
+ LKERNEL=/vmlinuz-linux                                                                                                                                                                        
+ LINITRD=/initramfs-linux.img                                                                                                                                                                  
++ gettext_printf '(on %s)' /dev/nvme1n1p3                                                                                                                                                      
++ gettext_printf_format='(on %s)'                                                                                                                                                              
++ shift                                                                                                                                                                                        
+++ gettext '(on %s)'                                                                                                                                                                           
++ printf '(on %s)' /dev/nvme1n1p3                                                                                                                                                              
+ onstr='(on /dev/nvme1n1p3)'                                                                                                                                                                   
++ echo 'root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet'                                                                                                                    
++ grep single                                                                                                                                                                                  
+ recovery_params=                                                                                                                                                                              
+ true                                                                            

Offline

#19 2023-07-28 21:12:59

seth
Member
Registered: 2012-09-03
Posts: 51,739

Re: Grub disk confusion

grub-mkconfig 2>&1 | tee /tmp/mkconfig.log

Offline

#20 2023-07-29 08:14:40

screenfox
Member
Registered: 2023-05-13
Posts: 49

Re: Grub disk confusion

seth wrote:
grub-mkconfig 2>&1 | tee /tmp/mkconfig.log

Thx, and here is the complete output:

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  initramfs-linux-fallback.img
+ prefix=/usr
+ exec_prefix=/usr
+ datarootdir=/usr/share
+ export TEXTDOMAIN=grub
+ TEXTDOMAIN=grub
+ export TEXTDOMAINDIR=/usr/share/locale
+ TEXTDOMAINDIR=/usr/share/locale
+ . /usr/share/grub/grub-mkconfig_lib
++ prefix=/usr
++ exec_prefix=/usr
++ datarootdir=/usr/share
++ datadir=/usr/share
++ bindir=/usr/bin
++ sbindir=/usr/bin
++ '[' x/usr/share/grub = x ']'
++ test x = x
++ grub_probe=/usr/bin/grub-probe
++ test x = x
++ grub_file=/usr/bin/grub-file
++ test x = x
++ grub_mkrelpath=/usr/bin/grub-mkrelpath
++ command -v gettext
++ :
++ grub_tab='	'
+ '[' xfalse = xtrue ']'
+ command -v os-prober
+ command -v linux-boot-prober
++ gettext_printf 'os-prober will be executed to detect other bootable partitions.\nIts output will be used to detect bootable binaries on them and create new boot entries.'
++ gettext_printf_format='os-prober will be executed to detect other bootable partitions.\nIts output will be used to detect bootable binaries on them and create new boot entries.'
++ shift
+++ gettext 'os-prober will be executed to detect other bootable partitions.\nIts output will be used to detect bootable binaries on them and create new boot entries.'
++ printf 'os-prober will be executed to detect other bootable partitions.\nIts output will be used to detect bootable binaries on them and create new boot entries.'
+ grub_warn 'os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.'
++ gettext Warning:
+ echo Warning: 'os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.'
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
++ os-prober
++ tr ' ' '^'
++ paste -s -d ' '
+ OSPROBED='/dev/nvme1n1p3:Arch^Linux:Arch:linux'
+ '[' -z '/dev/nvme1n1p3:Arch^Linux:Arch:linux' ']'
+ used_osprober_linux_ids=
+ '[' x '!=' x ']'
+ for OS in ${OSPROBED}
++ echo '/dev/nvme1n1p3:Arch^Linux:Arch:linux'
++ cut -d : -f 1
+ DEVICE=/dev/nvme1n1p3
++ echo '/dev/nvme1n1p3:Arch^Linux:Arch:linux'
++ cut -d : -f 2
++ tr '^' ' '
+ LONGNAME='Arch Linux'
++ echo '/dev/nvme1n1p3:Arch^Linux:Arch:linux'
++ cut -d : -f 3
++ tr '^' ' '
+ LABEL=Arch
++ echo '/dev/nvme1n1p3:Arch^Linux:Arch:linux'
++ cut -d : -f 4
+ BOOT=linux
++ /usr/bin/grub-probe --target=fs_uuid --device /dev/nvme1n1p3
+ UUID=40e633a0-18f5-4165-a478-5981753af7c9
+ EXPUUID=40e633a0-18f5-4165-a478-5981753af7c9
+ '[' x/dev/nvme1n1p3 '!=' x ']'
+ EXPUUID=40e633a0-18f5-4165-a478-5981753af7c9@/dev/nvme1n1p3
+ '[' x '!=' x ']'
++ echo '/dev/nvme1n1p3:Arch^Linux:Arch:linux'
++ cut -d : -f 5
+ BTRFS=
+ '[' x = xbtrfs ']'
+ '[' -z 'Arch Linux' ']'
++ echo Arch
++ LC_ALL=C
++ sed 's,[[:digit:]]*$,,'
++ cut '-d ' -f1
++ tr A-Z a-z
++ LC_ALL=C
++ sed 's,[^[:alnum:]_],_,g'
+ CLASS='--class arch'
+ gettext_printf 'Found %s on %s\n' 'Arch Linux' /dev/nvme1n1p3
+ gettext_printf_format='Found %s on %s\n'
+ shift
++ gettext 'Found %s on %s\n'
+ printf 'Found %s on %s\n' 'Arch Linux' /dev/nvme1n1p3
Found Arch Linux on /dev/nvme1n1p3
+ case ${BOOT} in
+ '[' x = xbtrfs ']'
++ linux-boot-prober /dev/nvme1n1p3
++ tr ' ' '^'
++ paste -s -d ' '
+ LINUXPROBED='/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet /dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet /dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux^(fallback^initramfs):/boot/vmlinuz-linux:/boot/initramfs-linux-fallback.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
+ prepare_boot_cache=
+ boot_device_id=
+ is_top_level=true
+ title_correction_code=
+ OS='Arch Linux'
+ for LINUX in ${LINUXPROBED}
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 1
+ LROOT=/dev/nvme1n1p3
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 2
+ LBOOT=/dev/nvme0n1p1
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 3
++ tr '^' ' '
+ LLABEL='Arch Linux'
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 4
+ LKERNEL=/boot/vmlinuz-linux
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 5
++ tr '^' ' '
+ LINITRD=/boot/initramfs-linux.img
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 6-
++ tr '^' ' '
+ LPARAMS='root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet'
+ '[' -z 'Arch Linux' ']'
+ '[' /dev/nvme1n1p3 '!=' /dev/nvme0n1p1 ']'
+ LKERNEL=/vmlinuz-linux
+ LINITRD=/initramfs-linux.img
++ gettext_printf '(on %s)' /dev/nvme1n1p3
++ gettext_printf_format='(on %s)'
++ shift
+++ gettext '(on %s)'
++ printf '(on %s)' /dev/nvme1n1p3
+ onstr='(on /dev/nvme1n1p3)'
++ echo 'root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet'
++ grep single
+ recovery_params=
+ true
+ counter=1
+ echo ''
+ grep 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id'
+ '[' -z '' ']'
++ grub_get_device_id /dev/nvme1n1p3
++ old_ifs=' 	
'
++ IFS='
'
++ device=/dev/nvme1n1p3
++ '[' x '!=' xtrue ']'
+++ /usr/bin/grub-probe --device /dev/nvme1n1p3 --target=fs_uuid
++ fs_uuid=40e633a0-18f5-4165-a478-5981753af7c9
++ echo 40e633a0-18f5-4165-a478-5981753af7c9
++ IFS=' 	
'
+ boot_device_id=40e633a0-18f5-4165-a478-5981753af7c9
+ used_osprober_linux_ids=' '\''osprober-gnulinux-/vmlinuz-linux--1-40e633a0-18f5-4165-a478-5981753af7c9'\'''
+ '[' -z '' ']'
++ prepare_grub_to_access_device /dev/nvme0n1p1
++ old_ifs=' 	
'
++ IFS='
'
++ grub_add_tab
++ sed -e 's/^/	/'
+++ /usr/bin/grub-probe --device /dev/nvme0n1p1 --target=partmap
++ partmap=gpt
++ for module in ${partmap}
++ case "${module}" in
++ echo 'insmod part_gpt'
+++ /usr/bin/grub-probe --device /dev/nvme0n1p1 --target=abstraction
++ abstraction=
+++ /usr/bin/grub-probe --device /dev/nvme0n1p1 --target=fs
++ fs=fat
++ for module in ${fs}
++ echo 'insmod fat'
++ '[' x = xy ']'
+++ /usr/bin/grub-probe --device /dev/nvme0n1p1 --target=compatibility_hint
++ fs_hint=
++ '[' x '!=' x ']'
++ '[' x '!=' xtrue ']'
+++ /usr/bin/grub-probe --device /dev/nvme0n1p1 --target=fs_uuid
++ fs_uuid=0343-750D
+++ /usr/bin/grub-probe --device /dev/nvme0n1p1 --target=hints_string
++ hints=
++ '[' x '!=' x ']'
++ echo 'search --no-floppy --fs-uuid --set=root 0343-750D'
++ IFS=' 	
'
+ prepare_boot_cache='	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root 0343-750D'
+ '[' x = xyes ']'
+ '[' x = xy ']'
+ '[' xtrue = xtrue ']'
+ '[' x '!=' xtrue ']'
+ cat
++ echo 'Arch Linux (on /dev/nvme1n1p3)'
++ grub_quote
++ sed 's/'\''/'\''\\'\'''\''/g'
+ save_default_entry
+ '[' x = xtrue ']'
+ grub_add_tab
+ sed -e 's/^/	/'
+ printf '%s\n' '	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root 0343-750D'
+ cat
+ '[' -n /initramfs-linux.img ']'
+ cat
+ cat
++ gettext_printf 'Advanced options for %s' 'Arch Linux (on /dev/nvme1n1p3)'
++ gettext_printf_format='Advanced options for %s'
++ shift
++ grub_quote
++ sed 's/'\''/'\''\\'\'''\''/g'
+++ gettext 'Advanced options for %s'
++ printf 'Advanced options for %s' 'Arch Linux (on /dev/nvme1n1p3)'
+ echo 'submenu '\''Advanced options for Arch Linux (on /dev/nvme1n1p3)'\'' $menuentry_id_option '\''osprober-gnulinux-advanced-40e633a0-18f5-4165-a478-5981753af7c9'\'' {'
+ is_top_level=false
+ title='Arch Linux (on /dev/nvme1n1p3)'
+ cat
++ echo 'Arch Linux (on /dev/nvme1n1p3)'
++ grub_quote
++ sed 's/'\''/'\''\\'\'''\''/g'
+ save_default_entry
+ '[' x = xtrue ']'
+ sed -e 's/^/		/'
+ printf '%s\n' '	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root 0343-750D'
+ grub_add_tab
+ sed -e 's/^/	/'
+ cat
+ '[' -n /initramfs-linux.img ']'
+ cat
+ cat
+ '[' 'xArch Linux (on /dev/nvme1n1p3)' = x0 ']'
+ '[' 'xPrevious Linux versions>Arch Linux (on /dev/nvme1n1p3)' = x0 ']'
+ for LINUX in ${LINUXPROBED}
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 1
+ LROOT=/dev/nvme1n1p3
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 2
+ LBOOT=/dev/nvme0n1p1
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 3
++ tr '^' ' '
+ LLABEL='Arch Linux, with Linux linux'
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 4
+ LKERNEL=/boot/vmlinuz-linux
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 5
++ tr '^' ' '
+ LINITRD=/boot/initramfs-linux.img
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 6-
++ tr '^' ' '
+ LPARAMS='root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet'
+ '[' -z 'Arch Linux, with Linux linux' ']'
+ '[' /dev/nvme1n1p3 '!=' /dev/nvme0n1p1 ']'
+ LKERNEL=/vmlinuz-linux
+ LINITRD=/initramfs-linux.img
++ gettext_printf '(on %s)' /dev/nvme1n1p3
++ gettext_printf_format='(on %s)'
++ shift
+++ gettext '(on %s)'
++ printf '(on %s)' /dev/nvme1n1p3
+ onstr='(on /dev/nvme1n1p3)'
++ echo 'root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet'
++ grep single
+ recovery_params=
+ true
+ counter=1
+ echo ' '\''osprober-gnulinux-/vmlinuz-linux--1-40e633a0-18f5-4165-a478-5981753af7c9'\'''
+ grep 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id'
+ '[' -z 40e633a0-18f5-4165-a478-5981753af7c9 ']'
+ used_osprober_linux_ids=' '\''osprober-gnulinux-/vmlinuz-linux--1-40e633a0-18f5-4165-a478-5981753af7c9'\'' '\''osprober-gnulinux-/vmlinuz-linux--1-40e633a0-18f5-4165-a478-5981753af7c9'\'''
+ '[' -z '	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root 0343-750D' ']'
+ '[' x = xyes ']'
+ '[' x = xy ']'
+ '[' xfalse = xtrue ']'
+ title='Arch Linux, with Linux linux (on /dev/nvme1n1p3)'
+ cat
++ echo 'Arch Linux, with Linux linux (on /dev/nvme1n1p3)'
++ grub_quote
++ sed 's/'\''/'\''\\'\'''\''/g'
+ save_default_entry
+ '[' x = xtrue ']'
+ sed -e 's/^/		/'
+ printf '%s\n' '	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root 0343-750D'
+ grub_add_tab
+ sed -e 's/^/	/'
+ cat
+ '[' -n /initramfs-linux.img ']'
+ cat
+ cat
+ '[' 'xArch Linux, with Linux linux (on /dev/nvme1n1p3)' = x0 ']'
+ '[' 'xPrevious Linux versions>Arch Linux, with Linux linux (on /dev/nvme1n1p3)' = x0 ']'
+ for LINUX in ${LINUXPROBED}
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux^(fallback^initramfs):/boot/vmlinuz-linux:/boot/initramfs-linux-fallback.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 1
+ LROOT=/dev/nvme1n1p3
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux^(fallback^initramfs):/boot/vmlinuz-linux:/boot/initramfs-linux-fallback.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 2
+ LBOOT=/dev/nvme0n1p1
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux^(fallback^initramfs):/boot/vmlinuz-linux:/boot/initramfs-linux-fallback.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 3
++ tr '^' ' '
+ LLABEL='Arch Linux, with Linux linux (fallback initramfs)'
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux^(fallback^initramfs):/boot/vmlinuz-linux:/boot/initramfs-linux-fallback.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 4
+ LKERNEL=/boot/vmlinuz-linux
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux^(fallback^initramfs):/boot/vmlinuz-linux:/boot/initramfs-linux-fallback.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 5
++ tr '^' ' '
+ LINITRD=/boot/initramfs-linux-fallback.img
++ echo '/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux^(fallback^initramfs):/boot/vmlinuz-linux:/boot/initramfs-linux-fallback.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'
++ cut -d : -f 6-
++ tr '^' ' '
+ LPARAMS='root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet'
+ '[' -z 'Arch Linux, with Linux linux (fallback initramfs)' ']'
+ '[' /dev/nvme1n1p3 '!=' /dev/nvme0n1p1 ']'
+ LKERNEL=/vmlinuz-linux
+ LINITRD=/initramfs-linux-fallback.img
++ gettext_printf '(on %s)' /dev/nvme1n1p3
++ gettext_printf_format='(on %s)'
++ shift
+++ gettext '(on %s)'
++ printf '(on %s)' /dev/nvme1n1p3
+ onstr='(on /dev/nvme1n1p3)'
++ echo 'root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet'
++ grep single
+ recovery_params=
+ true
+ counter=1
+ echo ' '\''osprober-gnulinux-/vmlinuz-linux--1-40e633a0-18f5-4165-a478-5981753af7c9'\'' '\''osprober-gnulinux-/vmlinuz-linux--1-40e633a0-18f5-4165-a478-5981753af7c9'\'''
+ grep 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id'
+ '[' -z 40e633a0-18f5-4165-a478-5981753af7c9 ']'
+ used_osprober_linux_ids=' '\''osprober-gnulinux-/vmlinuz-linux--1-40e633a0-18f5-4165-a478-5981753af7c9'\'' '\''osprober-gnulinux-/vmlinuz-linux--1-40e633a0-18f5-4165-a478-5981753af7c9'\'' '\''osprober-gnulinux-/vmlinuz-linux--1-40e633a0-18f5-4165-a478-5981753af7c9'\'''
+ '[' -z '	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root 0343-750D' ']'
+ '[' x = xyes ']'
+ '[' x = xy ']'
+ '[' xfalse = xtrue ']'
+ title='Arch Linux, with Linux linux (fallback initramfs) (on /dev/nvme1n1p3)'
+ cat
++ echo 'Arch Linux, with Linux linux (fallback initramfs) (on /dev/nvme1n1p3)'
++ grub_quote
++ sed 's/'\''/'\''\\'\'''\''/g'
+ save_default_entry
+ '[' x = xtrue ']'
+ sed -e 's/^/		/'
+ printf '%s\n' '	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root 0343-750D'
+ grub_add_tab
+ sed -e 's/^/	/'
+ cat
+ '[' -n /initramfs-linux-fallback.img ']'
+ cat
+ cat
+ '[' 'xArch Linux, with Linux linux (fallback initramfs) (on /dev/nvme1n1p3)' = x0 ']'
+ '[' 'xPrevious Linux versions>Arch Linux, with Linux linux (fallback initramfs) (on /dev/nvme1n1p3)' = x0 ']'
+ '[' xfalse '!=' xtrue ']'
+ echo '}'
+ echo ''
+ set +x
Adding boot menu entry for UEFI Firmware Settings ...
done

And thank you very much for looking into this, i see the correct UUID, then the wrong one but i can't figure out where the disconnect happens.

(Also: haha, i typed man tee, like i missed an a in manatee)

Offline

#21 2023-07-29 12:00:06

seth
Member
Registered: 2012-09-03
Posts: 51,739

Re: Grub disk confusion

Things fall apart w/

+ LINUXPROBED='/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet /dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet /dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux^(fallback^initramfs):/boot/vmlinuz-linux:/boot/initramfs-linux-fallback.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'

Which is the result of "linux-boot-prober /dev/nvme1n1p3", which is nice because /usr/bin/linux-boot-prober is a much shorter script that'll be even easier to trace tongue
(remove the set -/+x lines from /etc/grub.d/30_os-prober, add them to /usr/bin/linux-boot-prober and run grub-mkconfig again)

Offline

#22 2023-07-30 09:44:07

screenfox
Member
Registered: 2023-05-13
Posts: 49

Re: Grub disk confusion

seth wrote:

Things fall apart w/

+ LINUXPROBED='/dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet /dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet /dev/nvme1n1p3:/dev/nvme0n1p1:Arch^Linux,^with^Linux^linux^(fallback^initramfs):/boot/vmlinuz-linux:/boot/initramfs-linux-fallback.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9^rw^loglevel=3^quiet'

Which is the result of "linux-boot-prober /dev/nvme1n1p3", which is nice because /usr/bin/linux-boot-prober is a much shorter script that'll be even easier to trace tongue
(remove the set -/+x lines from /etc/grub.d/30_os-prober, add them to /usr/bin/linux-boot-prober and run grub-mkconfig again)

I did so, running

linux-boot-prober 2>&1 | tee linux_boot_prober.log

produced

+ newns
+ '[' '' ']'
+ exec /usr/lib/os-prober/newns /usr/bin/linux-boot-prober
+ newns
+ '[' 1 ']'
+ require_tmpdir
+ '[' -z '' ']'
+ type mktemp
++ mktemp -d /tmp/os-prober.XXXXXX
+ export OS_PROBER_TMP=/tmp/os-prober.vqPk2q
+ OS_PROBER_TMP=/tmp/os-prober.vqPk2q
+ cleanup_tmpdir=:
+ trap cleanup EXIT HUP INT QUIT TERM
+ grep '^/dev/' /proc/mounts
+ parse_proc_mounts
+ read -r line
+ set -f
+ set -- /dev/nvme0n1p3 / ext4 rw,relatime 0 0
+ set +f
++ mapdevfs /dev/nvme0n1p3
++ readlink -f /dev/nvme0n1p3
+ printf '%s %s %s\n' /dev/nvme0n1p3 / ext4
+ read -r line
+ set -f
+ set -- /dev/nvme0n1p1 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 0
+ set +f
++ mapdevfs /dev/nvme0n1p1
++ readlink -f /dev/nvme0n1p1
+ printf '%s %s %s\n' /dev/nvme0n1p1 /boot vfat
+ read -r line
+ set -f
+ set -- /dev/nvme1n1p3 /mnt/nvme1n1p3 ext4 rw,relatime 0 0
+ set +f
++ mapdevfs /dev/nvme1n1p3
++ readlink -f /dev/nvme1n1p3
+ printf '%s %s %s\n' /dev/nvme1n1p3 /mnt/nvme1n1p3 ext4
+ read -r line
+ partition=
+ '[' -z '' ']'
+ echo 'usage: linux-boot-prober partition'
usage: linux-boot-prober partition
+ exit 1
+ cleanup
+ :
+ rm -rf /tmp/os-prober.vqPk2q

Running in the context of grub-mkconfig did not give me a trace log (just a tidy, short normal log), so if that was needed i need instructions as to how to produce that log.

Offline

#23 2023-07-30 13:50:19

seth
Member
Registered: 2012-09-03
Posts: 51,739

Re: Grub disk confusion

That's an error message telling you how to use the program.

linux-boot-prober /dev/nvme1n1p3 2>&1 | tee linux_boot_prober.log

Offline

#24 2023-07-30 14:09:54

screenfox
Member
Registered: 2023-05-13
Posts: 49

Re: Grub disk confusion

seth wrote:

That's an error message telling you how to use the program.

linux-boot-prober /dev/nvme1n1p3 2>&1 | tee linux_boot_prober.log

Haha, now i feel a bit silly, i overlooked that second to last line. 

+ newns /dev/nvme1n1p3
+ '[' '' ']'
+ exec /usr/lib/os-prober/newns /usr/bin/linux-boot-prober /dev/nvme1n1p3
+ newns /dev/nvme1n1p3
+ '[' 1 ']'
+ require_tmpdir
+ '[' -z '' ']'
+ type mktemp
++ mktemp -d /tmp/os-prober.XXXXXX
+ export OS_PROBER_TMP=/tmp/os-prober.cFhOQC
+ OS_PROBER_TMP=/tmp/os-prober.cFhOQC
+ cleanup_tmpdir=:
+ trap cleanup EXIT HUP INT QUIT TERM
+ grep '^/dev/' /proc/mounts
+ parse_proc_mounts
+ read -r line
+ set -f
+ set -- /dev/nvme0n1p3 / ext4 rw,relatime 0 0
+ set +f
++ mapdevfs /dev/nvme0n1p3
++ readlink -f /dev/nvme0n1p3
+ printf '%s %s %s\n' /dev/nvme0n1p3 / ext4
+ read -r line
+ set -f
+ set -- /dev/nvme0n1p1 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 0
+ set +f
++ mapdevfs /dev/nvme0n1p1
++ readlink -f /dev/nvme0n1p1
+ printf '%s %s %s\n' /dev/nvme0n1p1 /boot vfat
+ read -r line
+ set -f
+ set -- /dev/nvme1n1p3 /mnt/nvme1n1p3 ext4 rw,relatime 0 0
+ set +f
++ mapdevfs /dev/nvme1n1p3
++ readlink -f /dev/nvme1n1p3
+ printf '%s %s %s\n' /dev/nvme1n1p3 /mnt/nvme1n1p3 ext4
+ read -r line
+ partition=/dev/nvme1n1p3
+ '[' -z /dev/nvme1n1p3 ']'
++ mapdevfs /dev/nvme1n1p3
++ readlink -f /dev/nvme1n1p3
+ mapped=/dev/nvme1n1p3
+ grep -q '^/dev/nvme1n1p3 ' /tmp/os-prober.cFhOQC/mounted-map
++ grep '^/dev/nvme1n1p3 ' /tmp/os-prober.cFhOQC/mounted-map
++ head -n1
++ cut -d ' ' -f 2
+ mpoint=/mnt/nvme1n1p3
++ unescape_mount /mnt/nvme1n1p3
++ printf %s /mnt/nvme1n1p3
++ sed 's/\\011/	/g; s/\\012/\n/g; s/\\040/ /g; s/\\134/\\/g'
+ mpoint=/mnt/nvme1n1p3
+ '[' /mnt/nvme1n1p3 '!=' /target/boot ']'
+ '[' /mnt/nvme1n1p3 '!=' /target ']'
+ '[' /mnt/nvme1n1p3 '!=' / ']'
++ grep '^/dev/nvme1n1p3 ' /tmp/os-prober.cFhOQC/mounted-map
++ head -n1
++ cut -d ' ' -f 3
+ type=ext4
+ grep -q ' /mnt/nvme1n1p3/boot ' /tmp/os-prober.cFhOQC/mounted-map
+ linux_mount_boot /dev/nvme1n1p3 /mnt/nvme1n1p3
+ partition=/dev/nvme1n1p3
+ tmpmnt=/mnt/nvme1n1p3
+ bootpart=
+ mounted=
+ '[' -e /mnt/nvme1n1p3/etc/fstab ']'
++ parsefstab
++ read -r line
++ case "$line" in
++ :
++ read -r line
++ case "$line" in
++ :
++ read -r line
++ case "$line" in
++ set -f
++ set --
++ set +f
++ printf '%s %s %s\n' '' '' ''
++ read -r line
++ grep ' /boot '
++ case "$line" in
++ :
++ read -r line
++ case "$line" in
++ :
++ read -r line
++ case "$line" in
++ set -f
++ set -- UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 /mnt/nvme1n1p3 ext4 rw,relatime 0 1
++ set +f
++ printf '%s %s %s\n' UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 /mnt/nvme1n1p3 ext4
++ read -r line
++ case "$line" in
++ set -f
++ set --
++ set +f
++ printf '%s %s %s\n' '' '' ''
++ read -r line
++ case "$line" in
++ :
++ read -r line
++ case "$line" in
++ set -f
++ set -- UUID=0343-750D /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
++ set +f
++ printf '%s %s %s\n' UUID=0343-750D /boot vfat
++ read -r line
++ case "$line" in
++ set -f
++ set --
++ set +f
++ printf '%s %s %s\n' '' '' ''
++ read -r line
++ case "$line" in
++ :
++ read -r line
++ case "$line" in
++ set -f
++ set -- UUID=43f2631d-08c8-4091-94b4-a488d6f0ed55 none swap defaults 0 0
++ set +f
++ printf '%s %s %s\n' UUID=43f2631d-08c8-4091-94b4-a488d6f0ed55 none swap
++ read -r line
++ case "$line" in
++ set -f
++ set --
++ set +f
++ printf '%s %s %s\n' '' '' ''
++ read -r line
++ case "$line" in
++ :
++ read -r line
++ case "$line" in
++ set -f
++ set -- //fuchsnas/daten /mnt/daten cifs credentials=/home/voller/.smbcredentials,user
++ set +f
++ printf '%s %s %s\n' //fuchsnas/daten /mnt/daten cifs
++ read -r line
++ case "$line" in
++ set -f
++ set --
++ set +f
++ printf '%s %s %s\n' '' '' ''
++ read -r line
++ case "$line" in
++ set -f
++ set -- /dev/nvme1n1p3 / ext4
++ set +f
++ printf '%s %s %s\n' /dev/nvme1n1p3 / ext4
++ read -r line
+ bootmnt='UUID=0343-750D /boot vfat'
+ '[' -n 'UUID=0343-750D /boot vfat' ']'
+ set -f
+ set -- UUID=0343-750D /boot vfat
+ set +f
+ boottomnt=
+ tmppart=UUID=0343-750D
+ echo UUID=0343-750D
+ grep -q LABEL=
+ echo UUID=0343-750D
+ grep -q UUID=
++ echo UUID=0343-750D
++ cut -d = -f 2
+ uuid=0343-750D
++ find_uuid 0343-750D
++ local output
++ type blkid
+++ blkid -o device -t UUID=0343-750D
++ output=/dev/nvme0n1p1
++ echo /dev/nvme0n1p1
++ head -n1
+ tmppart=/dev/nvme0n1p1
+ debug 'mapped UUID=0343-750D to /dev/nvme0n1p1'
+ '[' -z '' ']'
+ log 'debug: mapped UUID=0343-750D to /dev/nvme0n1p1'
+ cache_progname
+ case $progname in
+ progname=linux-boot-prober
+ logger -t linux-boot-prober 'debug: mapped UUID=0343-750D to /dev/nvme0n1p1'
+ shift
++ mapdevfs /dev/nvme0n1p1
++ readlink -f /dev/nvme0n1p1
+ set -- /dev/nvme0n1p1 /boot vfat
+ grep -q '^/dev/nvme0n1p1 ' /tmp/os-prober.cFhOQC/mounted-map
++ grep '^/dev/nvme0n1p1 ' /tmp/os-prober.cFhOQC/mounted-map
++ head -n1
++ cut -d ' ' -f 2
+ bindfrom=/boot
++ unescape_mount /boot
++ printf %s /boot
++ sed 's/\\011/	/g; s/\\012/\n/g; s/\\040/ /g; s/\\134/\\/g'
+ bindfrom=/boot
+ '[' /boot '!=' /mnt/nvme1n1p3/boot ']'
+ mount --bind /boot /mnt/nvme1n1p3/boot
+ mounted=1
+ bootpart=/dev/nvme0n1p1
+ '[' 1 ']'
+ :
+ '[' '!' 1 ']'
+ '[' -z /dev/nvme0n1p1 ']'
+ '[' -z 1 ']'
+ mountboot='/dev/nvme0n1p1 1'
+ bootpart=/dev/nvme0n1p1
+ bootmounted=1
+ for test in /usr/lib/linux-boot-probes/mounted/*
+ '[' -f /usr/lib/linux-boot-probes/mounted/40grub ']'
+ '[' -x /usr/lib/linux-boot-probes/mounted/40grub ']'
+ debug 'running /usr/lib/linux-boot-probes/mounted/40grub on mounted /dev/nvme1n1p3'
+ '[' -z '' ']'
+ log 'debug: running /usr/lib/linux-boot-probes/mounted/40grub on mounted /dev/nvme1n1p3'
+ cache_progname
+ case $progname in
+ logger -t linux-boot-prober 'debug: running /usr/lib/linux-boot-probes/mounted/40grub on mounted /dev/nvme1n1p3'
+ /usr/lib/linux-boot-probes/mounted/40grub /dev/nvme1n1p3 /dev/nvme0n1p1 /mnt/nvme1n1p3 ext4
+ for test in /usr/lib/linux-boot-probes/mounted/*
+ '[' -f /usr/lib/linux-boot-probes/mounted/40grub2 ']'
+ '[' -x /usr/lib/linux-boot-probes/mounted/40grub2 ']'
+ debug 'running /usr/lib/linux-boot-probes/mounted/40grub2 on mounted /dev/nvme1n1p3'
+ '[' -z '' ']'
+ log 'debug: running /usr/lib/linux-boot-probes/mounted/40grub2 on mounted /dev/nvme1n1p3'
+ cache_progname
+ case $progname in
+ logger -t linux-boot-prober 'debug: running /usr/lib/linux-boot-probes/mounted/40grub2 on mounted /dev/nvme1n1p3'
+ /usr/lib/linux-boot-probes/mounted/40grub2 /dev/nvme1n1p3 /dev/nvme0n1p1 /mnt/nvme1n1p3 ext4
/dev/nvme1n1p3:/dev/nvme0n1p1:Arch Linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
/dev/nvme1n1p3:/dev/nvme0n1p1:Arch Linux, with Linux linux:/boot/vmlinuz-linux:/boot/initramfs-linux.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
/dev/nvme1n1p3:/dev/nvme0n1p1:Arch Linux, with Linux linux (fallback initramfs):/boot/vmlinuz-linux:/boot/initramfs-linux-fallback.img:root=UUID=97a4ac9c-8210-4450-99a0-69689024e6a9 rw loglevel=3 quiet
+ debug '/usr/lib/linux-boot-probes/mounted/40grub2 succeeded'
+ '[' -z '' ']'
+ log 'debug: /usr/lib/linux-boot-probes/mounted/40grub2 succeeded'
+ cache_progname
+ case $progname in
+ logger -t linux-boot-prober 'debug: /usr/lib/linux-boot-probes/mounted/40grub2 succeeded'
+ break
+ '[' 1 = 1 ']'
+ umount /mnt/nvme1n1p3/boot
+ set +x

Offline

#25 2023-07-30 14:21:51

seth
Member
Registered: 2012-09-03
Posts: 51,739

Re: Grub disk confusion

Seems to get that from the /etc/fstab on nvme1n1p3 ?

Offline

Board footer

Powered by FluxBB