os-prober takes forever if Arch is installed on other partition
-
- Posts: 23
- Joined: 2015-10-03 16:56
- Has thanked: 7 times
os-prober takes forever if Arch is installed on other partition
I have a situation where os-prober when mounting an ext4 partition takes up CPU 100% and does not come out.
1) Partitions [ EFI ] [ WIn Reserved ] [Win ] [ empty ] [swap ] [arch] [ ntfs ]
2) Arch is already installed in 'sda6'
3) Arch partition is NOT mounted <- important
4) os-prober is enabled
5) fstab does not have an entry for sda6
Each time I run 'grub-mkconfig', the process grub-mount /dev/sda6' - which is arch partition - gets stuck. It happens each time.
Workaround I've found is to mount sda6 manually somewhere. In this case grub-mount identifies arch and comes out immediately.
**update** : ran os-prober standalone. Once while arch's partition is mounted, and once when it isn't. When mounted, os-prober detects and comes out immediately. When not mounted, grub-mount /dev/sda6 waits forever - taking almost 100% cpu
Any idea what might be happening? TIA
1) Partitions [ EFI ] [ WIn Reserved ] [Win ] [ empty ] [swap ] [arch] [ ntfs ]
2) Arch is already installed in 'sda6'
3) Arch partition is NOT mounted <- important
4) os-prober is enabled
5) fstab does not have an entry for sda6
Each time I run 'grub-mkconfig', the process grub-mount /dev/sda6' - which is arch partition - gets stuck. It happens each time.
Workaround I've found is to mount sda6 manually somewhere. In this case grub-mount identifies arch and comes out immediately.
**update** : ran os-prober standalone. Once while arch's partition is mounted, and once when it isn't. When mounted, os-prober detects and comes out immediately. When not mounted, grub-mount /dev/sda6 waits forever - taking almost 100% cpu
Any idea what might be happening? TIA
-
- Posts: 23
- Joined: 2015-10-03 16:56
- Has thanked: 7 times
Re: os-prober takes forever if Arch is installed on other partition
Yes, Win 11 and Arch are only OSes. Debian is bookworm, updated. os-prober is 1.81
This issue manifests on more than one machine.
I ran os-prober in Arch, and it detects immediately even when Debian partition is not mounted.
I have a similar thread : viewtopic.php?t=160550
- sunrat
- Site admin
- Posts: 7364
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 133 times
- Been thanked: 649 times
Re: os-prober takes forever if Arch is installed on other partition
This appears to be the same issue. Can you explain why it needs a new topic? Splitting it may reduce the chance of an answer.
Are you sure Arch is on a ext4 partition? I installed Garuda, an Arch derivative, a while back and Debian GRUB didn't seem to detect it at all although I didn't wait 10 minutes. It was btrfs by default. I ended up just chainloading the UEFI stub in Debian GRUB.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Re: os-prober takes forever if Arch is installed on other partition
Run os-prober standalone without Arch filesystem mounted, then after the timeout expires, visit the journal. If "forever" is literal, open journalctl -f first, in a separate xterm, then run os-prober while watching the journal.
-
- Posts: 23
- Joined: 2015-10-03 16:56
- Has thanked: 7 times
Re: os-prober takes forever if Arch is installed on other partition
That was slightly old issue, and there wasn't any 'resolution' to it, even if marked 'solved'. The new attempt, imo, had some new info
Yes, it is an ext4.
Thanks. It doesn't take 'forever' literally. In the journal extries below, Arch detection takes 3-4 minutes which imo is quite long. I can't pinpoint which part of os-prober that takes so long.
Code: Select all
Nov 11 09:02:19 debian 50mounted-tests[4350]: debug: running subtest /usr/lib/os-probes/mounted/90linux-distro
Nov 11 09:05:41 debian 90linux-distro[4389]: result: /dev/sda6:Arch Linux:Arch:linux
Nov 11 09:05:41 debian 50mounted-tests[4390]: debug: os found by subtest /usr/lib/os-probes/mounted/90linux-distro
Nov 11 09:05:41 debian systemd[1]: var-lib-os\x2dprober-mount.mount: Deactivated successfully.
Nov 11 09:05:41 debian os-prober[4393]: debug: os detected by /usr/lib/os-probes/50mounted-tests
-
- Posts: 23
- Joined: 2015-10-03 16:56
- Has thanked: 7 times
Re: os-prober takes forever if Arch is installed on other partition
Mounting the partition with 'grub-mount /dev/sda6 /var/lib/os-prober/mount' should be a rather quick operation not needed more than a few seconds. But htop shows it running for 3+ minutes, which makes me wonder if it has difficulty mounting the partition.
Arch is installed in a standard ext4 partition. Nothing unusual done to that partition. (attached is os-prober log)
Arch is installed in a standard ext4 partition. Nothing unusual done to that partition. (attached is os-prober log)
- Attachments
-
- os-prober.log
- (8.71 KiB) Downloaded 6 times
-
- Posts: 343
- Joined: 2015-06-07 14:38
- Has thanked: 15 times
- Been thanked: 49 times
Re: os-prober takes forever if Arch is installed on other partition
forgive the slight derail. this is wonderful and i am quite grateful. never figured out how to track it as it runs. Thank you again.Run os-prober standalone without Arch filesystem mounted, then after the timeout expires, visit the journal. If "forever" is literal, open journalctl -f first, in a separate xterm, then run os-prober while watching the journal.
-
- Posts: 23
- Joined: 2015-10-03 16:56
- Has thanked: 7 times
Re: os-prober takes forever if Arch is installed on other partition
So far, my understanding of how os-prober works is that the delay occurs because of how grub-mount handles file system detection and mounting when the partition isn't already mounted. It needs to probe file system types, attempt various drivers, perform thorough checks and verification which eventually slow things down. Arch's os-prober, on the other hand may not be as strict as debian's.
I have attached strace of 'strace -f grub-mount /dev/sda6 /var/lib/os-prober/mount' if anyone understands various calls made to kernel. I don't understand those myself (yet)
I have attached strace of 'strace -f grub-mount /dev/sda6 /var/lib/os-prober/mount' if anyone understands various calls made to kernel. I don't understand those myself (yet)
- Attachments
-
- strace-os-prober.txt
- (58.04 KiB) Downloaded 8 times
- pbear
- Posts: 509
- Joined: 2023-08-27 15:05
- Location: San Francisco
- Has thanked: 2 times
- Been thanked: 81 times
Re: os-prober takes forever if Arch is installed on other partition
The simple solution is something sunrat mentioned earlier. Rather than os-prober, use a custom.cfg file to chainload-boot Arch.