You are not logged in.

#26 2023-07-30 14:35:37

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

Re: Grub disk confusion

seth wrote:

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

Quoting the relevant part (so all minus network drives):

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p3
UUID=97a4ac9c-8210-4450-99a0-69689024e6a9       /               ext4            rw,relatime     0 1

# /dev/nvme0n1p1
UUID=0343-750D          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro   0 2

# /dev/nvme0n1p2
UUID=43f2631d-08c8-4091-94b4-a488d6f0ed55       none            swap            defaults        0 0

/dev/nvme1n1p3          /mnt/nvme1n1p3          ext4

So since this seems to be the problem, i switched out the /dev mount for an UUID= one:

UUID=40e633a0-18f5-4165-a478-5981753af7c9               /mnt/nvme1n1p3          ext4

. After

systemctl daemon-reload
umount /mnt/nvme1n1p3
mount /mnt/nvme1n1p3

, the output is now:

+ 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.TCkM7l
+ OS_PROBER_TMP=/tmp/os-prober.TCkM7l
+ 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.TCkM7l/mounted-map
++ grep '^/dev/nvme1n1p3 ' /tmp/os-prober.TCkM7l/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.TCkM7l/mounted-map
++ head -n1
++ cut -d ' ' -f 3
+ type=ext4
+ grep -q ' /mnt/nvme1n1p3/boot ' /tmp/os-prober.TCkM7l/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
++ grep ' /boot '
++ 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
++ 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.TCkM7l/mounted-map
++ grep '^/dev/nvme0n1p1 ' /tmp/os-prober.TCkM7l/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

Looks like it is still wrong, correct?

Offline

#27 2023-07-30 15:09:21

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

Re: Grub disk confusion

The problem is

UUID=97a4ac9c-8210-4450-99a0-69689024e6a9       /               ext4            rw,relatime     0 1

which should be

UUID=40e633a0-18f5-4165-a478-5981753af7c9       /               ext4            rw,relatime     0 1

on the /etc/fstab on the partition w/ that UUID

Online

#28 2023-07-30 15:35:51

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

Re: Grub disk confusion

seth wrote:

The problem is

UUID=97a4ac9c-8210-4450-99a0-69689024e6a9       /               ext4            rw,relatime     0 1

which should be

UUID=40e633a0-18f5-4165-a478-5981753af7c9       /               ext4            rw,relatime     0 1

on the /etc/fstab on the partition w/ that UUID

Wait, you mean i must put the extra partition on nvme1 as root while the program runs?
That makes no sense, then my original nvme0 partition would not be there, and the main boot from nvme0n1p3 (UUID 97a...) would be changed as well?
Really confused why my main system on nvme0 should be replaced with a wrong entry for nvme1 as root.

nvme0: all necessary partitions for my linux, the original installation, which shall remain untouched (except for an extra boot menu entry)
nvme1: the nvme1n1p3 is a backup of nvme0n1p3 that i would like bootable (with /boot and swap from nvme0 or nvme1, don't care much, should just be practical)

Offline

#29 2023-07-30 15:38:30

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

Re: Grub disk confusion

/etc/fstab on nvme1n0p3 and nvme1n1p3 can NOT be the same, it must reference the relevant partitions
The fstab on nvme1n1p3 has to reference nvme1n1p3, not nvme0n1p3

Online

#30 2023-07-30 15:49:21

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

Re: Grub disk confusion

Aw, maybe should have caught that one earlier, but it was tricky - and quite fun to follow from the sideline wink

/etc/fstab is part of the rsynced root partition

Seth, rules! smile

Offline

#31 2023-07-30 15:51:32

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

Re: Grub disk confusion

seth wrote:

/etc/fstab on nvme1n0p3 and nvme1n1p3 can NOT be the same, it must reference the relevant partitions
The fstab on nvme1n1p3 has to reference nvme1n1p3, not nvme0n1p3

Oh, you were talking about the one on nvme1! I totally forgot that while i changed that, i did not change it with UUID, just device names.

Now i'll test how this works with UUID based fstab on nvme1, which i so shamefully forgot until now.

I should probably make a backup script that switches in a modified fstab automatically... done.

I'll report back when i did all the testing.

Offline

#32 2023-07-31 09:53:14

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

Re: Grub disk confusion

seth wrote:

/etc/fstab on nvme1n0p3 and nvme1n1p3 can NOT be the same, it must reference the relevant partitions
The fstab on nvme1n1p3 has to reference nvme1n1p3, not nvme0n1p3

Hmm, it seems to still not work.
With

/mnt/nvme1n1p3/etc/fstab

containing

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme1n1p3
UUID=40e633a0-18f5-4165-a478-5981753af7c9       /               ext4            rw,relatime     0 1

# /dev/nvme0n1p1
UUID=0343-750D          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro   0 2

# /dev/nvme0n1p2
UUID=43f2631d-08c8-4091-94b4-a488d6f0ed55       none            swap            defaults        0 0

I get

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

to output

+ 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.HCJSNm
+ OS_PROBER_TMP=/tmp/os-prober.HCJSNm
+ 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/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
+ 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
+ partition=/dev/nvme1n1p3
+ '[' -z /dev/nvme1n1p3 ']'
++ mapdevfs /dev/nvme1n1p3
++ readlink -f /dev/nvme1n1p3
+ mapped=/dev/nvme1n1p3
+ grep -q '^/dev/nvme1n1p3 ' /tmp/os-prober.HCJSNm/mounted-map
++ grep '^/dev/nvme1n1p3 ' /tmp/os-prober.HCJSNm/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.HCJSNm/mounted-map
++ head -n1
++ cut -d ' ' -f 3
+ type=ext4
+ grep -q ' /mnt/nvme1n1p3/boot ' /tmp/os-prober.HCJSNm/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
++ grep ' /boot '
++ :
++ 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
++ :
++ read -r line
++ case "$line" in
++ set -f
++ set -- UUID=40e633a0-18f5-4165-a478-5981753af7c9 / ext4 rw,relatime 0 1
++ set +f
++ printf '%s %s %s\n' UUID=40e633a0-18f5-4165-a478-5981753af7c9 / 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
++ :
++ read -r line
++ case "$line" in
++ :
++ 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.HCJSNm/mounted-map
++ grep '^/dev/nvme0n1p1 ' /tmp/os-prober.HCJSNm/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

Might i have to change something else than the fstab?

I double checked grub-mkconfig, and still get

### 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
}

Please note the correct UUID in the $menuentry_id_option (which has been there from the start!).

Last edited by screenfox (2023-07-31 09:55:20)

Offline

#33 2023-07-31 11:46:56

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

Re: Grub disk confusion

It's getting that from /usr/lib/linux-boot-probes/mounted/40grub2 what seems to parse the existing grub.cfg on /dev/nvme0n1p1 (your regular boot partition)
=> Remove the existing /boot/grub/grub.cfg and rebuild it.

Online

#34 2023-08-01 10:02:12

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

Re: Grub disk confusion

seth wrote:

It's getting that from /usr/lib/linux-boot-probes/mounted/40grub2 what seems to parse the existing grub.cfg on /dev/nvme0n1p1 (your regular boot partition)
=> Remove the existing /boot/grub/grub.cfg and rebuild it.

This (grub_mkconfig without grub.cfg present) yielded the following entry, i'll spare you the rest of the file as diff shows no other differences: 

### 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=/dev/nvme1n1p3
        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=/dev/nvme1n1p3
		initrd /initramfs-linux.img
	}
}

I rechecked both fstab files (nvme0n1p3 and nvme1n1p3), they do _not_ contain

/dev/nvme1n1p3

but the correct UUID. If booting the backup system works, it'll be fine for me.

Offline

#35 2023-08-01 10:42:24

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

Re: Grub disk confusion

seth wrote:

It's getting that from /usr/lib/linux-boot-probes/mounted/40grub2 what seems to parse the existing grub.cfg on /dev/nvme0n1p1 (your regular boot partition)
=> Remove the existing /boot/grub/grub.cfg and rebuild it.

Ok, i tried booting with the /dev/nvme1n1p3 and the UUID= (inserted manually). It just gives me something like

amd_gpio invalid config param
running early hook [udev]
starting systemd_udevd version 253.7-1-arch

My primary system on nvme0 does not output any of those messages, just "loading linux linux" and then straight to xdm.

So, to recap, i can get a grub.cfg with root=/dev/... if i delete the old grub.cfg first, but neither this nor a manually edited UUID= entry actually boot the system.
As far as i understand "bootable flag" is no longer a thing with gpt partitioning, and i cannot find any usable log on the nvme1n1p3 /var/log directory:

ls /mnt/nvme1n1p3/var/log/
audit  clonezilla.log    clonezilla.log.1  journal  libvirt  pacman.log     partimage-debug.log         private  wtmp     xmms2d.log  Xorg.0.log.old
btmp   clonezilla.log.0  glusterfs         lastlog  old      partclone.log  partimage-debug.log_latest  swtpm    xdm.log  Xorg.0.log

(lastlog just contains some garbage characters, no log)

So i am one step further, but still clueless on what to do next. (Thank you for staying with me on this)

Last edited by screenfox (2023-08-01 10:48:59)

Offline

#36 2023-08-01 13:52:04

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

Re: Grub disk confusion

Ok, i tried booting with the /dev/nvme1n1p3 and the UUID= (inserted manually). It just gives me something likeOk, i tried booting with the /dev/nvme1n1p3 and the UUID= (inserted manually). It just gives me something like

Errr… what does the file look like right now and did the the grub.cfg that only had the (correct, but instable) /dev/nvme1n1p3 work?

Online

#37 2023-08-01 14:27:25

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

Re: Grub disk confusion

seth wrote:

Ok, i tried booting with the /dev/nvme1n1p3 and the UUID= (inserted manually). It just gives me something likeOk, i tried booting with the /dev/nvme1n1p3 and the UUID= (inserted manually). It just gives me something like

Errr… what does the file look like right now and did the the grub.cfg that only had the (correct, but instable) /dev/nvme1n1p3 work?

Sorry if i have not been clear, the first answer contains the changed part of grub.cfg that i got with your instructions (as per file diff, nothing but what i posted changed).

I then tried this file, it did not boot (see second answer for what i got on screen after selecting the nvme1n1p3 option). 

I also tried to manually edit the UUID= syntax into grub.cfg, same result.

Offline

#38 2023-08-01 14:40:54

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

Re: Grub disk confusion

My primary system on nvme0 does not output any of those messages, just "loading linux linux" and then straight to xdm.

Because of the "quiet" parameter. Don't add that, though, but "rw loglevel=3"

There's quite possibly an issue if the two partitions fell out of sync because you're using the same boot partition (and kernel) so if you updated the OS on nvme0n1p3 (and the kernel on nvme0n1p1) but not the one on nvme1n1p3, the latter will no longer work properly w/ the updated kernel (notably not the graphical.target, you can quite likely still boot the multi-user or rescue targets, 2nd link below)

This is unrelated to the "os-prober finds junk" situation.

Online

Board footer

Powered by FluxBB