SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi there, i had install this week
Windows 10 on partition /dev/sda1
Boot for Slackware64 15.0 on partition /dev/sda3
Swap for Slackwares
Slackware64 15.0 on partition /dev/sda6
Slackware32 15.0 on partition /dev/sda7
os-prober does not detect windows 10 partition
Aviso: os-prober will not be executed to detect other bootable partitions.
Code:
grub-mkconfig -o /boot/grub/grub.cfg
Quote:
Generando un fichero de configuración de grub...
Encontrada imagen de linux: /boot/vmlinuz-huge-5.15.19
Encontrada imagen de memoria inicial: /boot/initrd.gz
Encontrada imagen de linux: /boot/vmlinuz-huge
Encontrada imagen de memoria inicial: /boot/initrd.gz
Encontrada imagen de linux: /boot/vmlinuz-generic-5.15.19
Encontrada imagen de memoria inicial: /boot/initrd.gz
Encontrada imagen de linux: /boot/vmlinuz-generic
Encontrada imagen de memoria inicial: /boot/initrd.gz
Aviso: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
hecho
Code:
nano /etc/default/grub
i had add the follow line
Quote:
GRUB_DISABLE_OS_PROBER=false
Code:
os-prober
Quote:
/dev/sda7:Slackware 15.0 i586:Slackware:linux
How i can fix the autodetection and autogenerate menuentry for Windows 10 on GRUB2 or which lines i need to make it manually. my pc does not use UEFI.
Filnaly check where u have the windows Microsoft/Boot/bootmgfw.efi and add the correct path.
Code:
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
EDITED: The chainloader path is from the boot partition, not the path if it is mounted on a filesystem.
Mounted partition boot on /boot/efi --> /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
Code:
menuentry 'Windows Boot Manager (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-efi-2AD0-095B' {
insmod part_gpt
insmod fat
set root='hd1,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 2AD0-095B
else
search --no-floppy --fs-uuid --set=root 2AD0-095B
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
Or u can try to check why os-prover dont detect your windows partition. Maybe bootmgfw.efi not found.
It is unusual for windows 10 to use only one partition and not to be EFI so I expect you installed it yourself. If the drive partition table is msdos type and windows is actually on sda1, the entry below in the grub.cfg file should work. I would put the entry there then save the change, reboot to test and if it boots, copy the entry to the 40_custom file in /etc/grub.d, save the change and run grub-mkconfig again.
Filnaly check where u have the windows Microsoft/Boot/bootmgfw.efi and add the correct path.
Code:
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
EDITED: The chainloader path is from the boot partition, not the path if it is mounted on a filesystem.
Mounted partition boot on /boot/efi --> /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
Code:
menuentry 'Windows Boot Manager (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-efi-2AD0-095B' {
insmod part_gpt
insmod fat
set root='hd1,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1 2AD0-095B
else
search --no-floppy --fs-uuid --set=root 2AD0-095B
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
Or u can try to check why os-prover dont detect your windows partition. Maybe bootmgfw.efi not found.
Hope that help u.
Viel.
Hi there, if you notice, i say, i had add the line manually, because does not exist, and i add without comment, and i test os-prober command alone and not detect the windows 10 installation, and i say too i not have UEFI/EFI. i am using the old partition type msdos, and write grub on MBR. all this are manual instalations.
Thanks for the help anyway, i hope that can be useful for another person with UEFI/EFI.
It is unusual for windows 10 to use only one partition and not to be EFI so I expect you installed it yourself. If the drive partition table is msdos type and windows is actually on sda1, the entry below in the grub.cfg file should work. I would put the entry there then save the change, reboot to test and if it boots, copy the entry to the 40_custom file in /etc/grub.d, save the change and run grub-mkconfig again.
The output of the command parted -l (sun as root) will show the partition table type which should be dos based on your information.
i know that is some strange, but my pc is from 2004-2005, and yes all operating system i had install manually each, yes the partition table is msdos, and windows 10 is in sda1. i try with this method, its the same of ever from Windows entry, i just wait this work, let me try. i edit this if work or not.
Generando un fichero de configuración de grub...
Encontrada imagen de linux: /boot/vmlinuz-huge-5.15.19
Encontrada imagen de memoria inicial: /boot/initrd.gz
Encontrada imagen de linux: /boot/vmlinuz-huge
Encontrada imagen de memoria inicial: /boot/initrd.gz
Encontrada imagen de linux: /boot/vmlinuz-generic-5.15.19
Encontrada imagen de memoria inicial: /boot/initrd.gz
Encontrada imagen de linux: /boot/vmlinuz-generic
Encontrada imagen de memoria inicial: /boot/initrd.gz
Aviso: 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.
Something strange its happening, the generation of file are stuck trying run "os-prober", well let me restart and try again.
It's been a long time since I've fought with bios but I seem to remember that grub overwrite some on MBR. And not in GPT. Some correct me if i wrong.
From:
Master Boot Record (MBR) specific instructions
Usually the post-MBR gap (after the 512 byte MBR region and before the start of the first partition) in many MBR partitioned systems is 31 KiB when DOS compatibility cylinder alignment issues are satisfied in the partition table. However a post-MBR gap of about 1 to 2 MiB is recommended to provide sufficient room for embedding GRUB's core.img (FS#24103). It is advisable to use a partitioning tool that supports 1 MiB partition alignment to obtain this space as well as to satisfy other non-512-byte-sector issues (which are unrelated to embedding of core.img).
Seems that if os-prober don't found windows boot, there is some that is not ok on the windows boot partition. Whether it is sda1 or somewhere else.
When is solved but some things does not works in the first try
after the stuck on the "grub-mkconfig -o /boot/grub/grub.cfg" i restart the pc. but the strange was when reach GRUB2 menu, the pc enter in a loop of restart every time reach GRUB2.
after i use a USB Pendrive with some distros i had. and i use "Porteus 5.01" for use fsck to fix GNU/Linux partitions and ntfsfix -b -d /dev/sda2 ; ntfsfix -b -d /dev/sda1
after of that i mount GNU/Linux
Code:
root@porteus:/home/guest# blkid | grep sda
/dev/sda2: LABEL="Compartido" BLOCK_SIZE="512" UUID="24045D0035428EFF" TYPE="ntfs" PARTUUID="08290829-02"
/dev/sda7: LABEL="Slack32" UUID="45f7bc61-14c3-4118-81a5-034d35ebc6b9" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="08290829-07"
/dev/sda5: UUID="8bfb2d02-7390-42dd-9a72-7d7b750a63f8" TYPE="swap" PARTUUID="08290829-05"
/dev/sda3: LABEL="Slack64-Inicio" UUID="7e1ea804-82bd-486a-a01d-6798ab9adf43" BLOCK_SIZE="4096" TYPE="ext2" PARTUUID="08290829-03"
/dev/sda1: LABEL="Inu-Win10" BLOCK_SIZE="512" UUID="90D06FC4D06FAEE2" TYPE="ntfs" PARTUUID="08290829-01"
/dev/sda6: LABEL="Slack64" UUID="674d8a56-4cb2-43a0-bdca-6ae5bd01828b" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="08290829-06"
root@porteus:/home/guest# umount /dev/sda3
root@porteus:/home/guest# mount /dev/sda3 /mnt/sda6/boot
root@porteus:/home/guest# mount --rbind /dev /mnt/sda6/dev
root@porteus:/home/guest# mount --rbind /proc /mnt/sda6/proc
root@porteus:/home/guest# mount --rbind /sys /mnt/sda6/sys
root@porteus:/home/guest# chroot /mnt/sda6
bash-5.1# mount /dev/sda3 /boot
mount: /boot: /dev/sda3 ya está montado en /boot.
bash-5.1# grub-mkconfig -o /boot/grub/grub.cfg
Generando un fichero de configuración de grub...
Encontrada imagen de linux: /boot/vmlinuz-huge-5.15.19
Encontrada imagen de memoria inicial: /boot/initrd.gz
Encontrada imagen de linux: /boot/vmlinuz-huge
Encontrada imagen de memoria inicial: /boot/initrd.gz
Encontrada imagen de linux: /boot/vmlinuz-generic-5.15.19
Encontrada imagen de memoria inicial: /boot/initrd.gz
Encontrada imagen de linux: /boot/vmlinuz-generic
Encontrada imagen de memoria inicial: /boot/initrd.gz
Aviso: 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.
Encontrado Windows 10 en /dev/sda1
Encontrado Slackware 15.0 i586 en /dev/sda7
hecho
Right now i enter on my Slackware64 15.0 and open Konsole, and use
Code:
grub-mkconfig -o /boot/grub/grub.cfg
Generando un fichero de configuración de grub...
Encontrada imagen de linux: /boot/vmlinuz-huge-5.15.19
Encontrada imagen de memoria inicial: /boot/initrd.gz
Encontrada imagen de linux: /boot/vmlinuz-huge
Encontrada imagen de memoria inicial: /boot/initrd.gz
Encontrada imagen de linux: /boot/vmlinuz-generic-5.15.19
Encontrada imagen de memoria inicial: /boot/initrd.gz
Encontrada imagen de linux: /boot/vmlinuz-generic
Encontrada imagen de memoria inicial: /boot/initrd.gz
Aviso: 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.
Encontrado Slackware 15.0 i586 en /dev/sda7
hecho
From Slackware64 15.0 does not make the Windows 10 Entry, but if i make from chroot using Porteus 5.01 Live USB, is autogenerated that entry, i does not understand why.
It's been a long time since I've fought with bios but I seem to remember that grub overwrite some on MBR. And not in GPT. Some correct me if i wrong.
From:
Master Boot Record (MBR) specific instructions
Usually the post-MBR gap (after the 512 byte MBR region and before the start of the first partition) in many MBR partitioned systems is 31 KiB when DOS compatibility cylinder alignment issues are satisfied in the partition table. However a post-MBR gap of about 1 to 2 MiB is recommended to provide sufficient room for embedding GRUB's core.img (FS#24103). It is advisable to use a partitioning tool that supports 1 MiB partition alignment to obtain this space as well as to satisfy other non-512-byte-sector issues (which are unrelated to embedding of core.img).
Seems that if os-prober don't found windows boot, there is some that is not ok on the windows boot partition. Whether it is sda1 or somewhere else.
i had restart and try again, but the result is the same
Code:
$ sudo su
Contraseña:
root@darkstar:/home/inukaze# grub-mkconfig -o /boot/grub/grub.cfg
Generando un fichero de configuración de grub...
Encontrada imagen de linux: /boot/vmlinuz-huge-5.15.19
Encontrada imagen de memoria inicial: /boot/initrd.gz
Encontrada imagen de linux: /boot/vmlinuz-huge
Encontrada imagen de memoria inicial: /boot/initrd.gz
Encontrada imagen de linux: /boot/vmlinuz-generic-5.15.19
Encontrada imagen de memoria inicial: /boot/initrd.gz
Encontrada imagen de linux: /boot/vmlinuz-generic
Encontrada imagen de memoria inicial: /boot/initrd.gz
Aviso: 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.
Encontrado Slackware 15.0 i586 en /dev/sda7
hecho
The following packages will be automatically installed or upgraded
with new version:
+==============================================================================
| Package New Version Arch Build Repos Size
+==============================================================================
Installing:
os-prober-1.79 1.79 x86_64 1 slack 20 K
Installing summary
===============================================================================
Total 1 package.
0 package will be installed, 0 will be upgraded and 1 will be reinstalled.
Need to get 20 Kb of archives.
After this process, 120 Kb of additional disk space will be used.
Would you like to continue [y/N]? y
[1/1][ Download ] --> os-prober-1.79-x86_64-1.txz
URL transformed to HTTPS due to an HSTS policy
--2024-02-27 17:29:21-- https://mirrors.slackware.com/slackw...9-x86_64-1.txz
Resolviendo mirrors.slackware.com (mirrors.slackware.com)... 207.223.116.213
Conectando con mirrors.slackware.com (mirrors.slackware.com)[207.223.116.213]:443... conectado.
Petición HTTP enviada, esperando respuesta... 302 Found
Localización: https://mirror.cedia.org.ec/slackwar...9-x86_64-1.txz [siguiendo]
--2024-02-27 17:29:21-- https://mirror.cedia.org.ec/slackwar...9-x86_64-1.txz
Resolviendo mirror.cedia.org.ec (mirror.cedia.org.ec)... 201.159.221.67, 2800:68:0:bebe::3
Conectando con mirror.cedia.org.ec (mirror.cedia.org.ec)[201.159.221.67]:443... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 16948 (17K) [application/octet-stream]
Grabando a: «/tmp/slpkg/packages/os-prober-1.79-x86_64-1.txz»
os-prober-1.79-x86_64-1.txz 100%[================================================================>] 16,55K --.-KB/s en 0s
+==============================================================================
| MD5SUM check for os-prober-1.79-x86_64-1.txz [ PASSED ]
+==============================================================================
[ upgrading ] --> os-prober-1.79-x86_64-1.txz
+==============================================================================
| Upgrading os-prober-1.79-x86_64-1 package using /tmp/slpkg/packages/os-prober-1.79-x86_64-1.txz
+==============================================================================
Pre-installing package os-prober-1.79-x86_64-1...
Removing package: os-prober-1.79-x86_64-1-upgraded-2024-02-27,17:29:23
Verifying package os-prober-1.79-x86_64-1.txz.
Installing package os-prober-1.79-x86_64-1.txz:
PACKAGE DESCRIPTION:
# os-prober (an OS detector)
#
# os-prober detects OSes on other partitions than the current system
# partition, and outputs the results in a generic machine-readable
# format. This information can be used to add other OSes to the boot
# loader.
#
# Homepage: http://packages.debian.org/unstable/utils/os-prober
#
Executing install script for os-prober-1.79-x86_64-1.txz.
Package os-prober-1.79-x86_64-1.txz installed.
Package os-prober-1.79-x86_64-1 upgraded with new package /tmp/slpkg/packages/os-prober-1.79-x86_64-1.txz.
Completed!
+==============================================================================
| Total 0 package installed and 1 package upgraded
+==============================================================================
| Package os-prober-1.79 upgraded successfully
+==============================================================================
I have a couple questions and possible solutions -
1) Has Win10 ever successfully booted?
2) Why use Grub on manually installed MBR system?
If Win10 never booted I suggest using any of the live bootloader systems commonly available for floppy, CD/DVD, USB thumbndrive to insure it will boot by any means. Live systems like Hirens Live CD and EasyBCD can install expansions to BCD which can hand-off/chainload to GRUB as well as boot Win10 directly.
On a manually installed MBR system, just using LILO would be manual and much more simple and direct than GRUB. Once you have verified Win10 will boot, it's trivial to chainload Windows on LILO with just 2 lines, one for location and one for label.
I have a couple questions and possible solutions -
1) Has Win10 ever successfully booted?
2) Why use Grub on manually installed MBR system?
If Win10 never booted I suggest using any of the live bootloader systems commonly available for floppy, CD/DVD, USB thumbndrive to insure it will boot by any means. Live systems like Hirens Live CD and EasyBCD can install expansions to BCD which can hand-off/chainload to GRUB as well as boot Win10 directly.
On a manually installed MBR system, just using LILO would be manual and much more simple and direct than GRUB. Once you have verified Win10 will boot, it's trivial to chainload Windows on LILO with just 2 lines, one for location and one for label.
1 -> Yes, i had enter multiples times, one hour ago, i configure autologin to my user after i do the same inside Plasma Desktop
2 -> Because i had three o.s, Slackware64 15.0, Slackware32 15.0, Windows 10. Lilo automatically just configure the latest Slackware installed, and Windows, and put windows like the first option, and some features of grub i know better, and lilo is more limited.
if i reach grub> i know which commands i can use to access to the operating system, but with lilo, i dont know if possible use modules like "normal" for example.
If you can reach the grub shell and boot from that, write down the commands you used to boot Windows 10, then make your manual entry based on that.
If you use 40_custom you don't need osprober, so comment it out again and re-run, or...
despite what some may say, you can just manually edit grub.cfg and be done with it, no need to use grub-mkconfig, but perhaps blacklist that Slack Package.
Yes, dont worry about the |Disk.Read. Error| this are strings, recorded inside the disk, that the programs uses to print on screen if needed, with that commands "( dd if=sdx bs=512 count=1 )" we read all sectors from the disk, like raw mode.
Quote:
Originally Posted by inukaze
From Slackware64 15.0 does not make the Windows 10 Entry, but if i make from chroot using Porteus 5.01 Live USB, is autogenerated that entry, i does not understand why.
So if u can boot inside windows from Live USB u have not overwritten the entry.
If u want to use grub.
Try to copy the grub entry from Porteus and use it on 40_custom Slack. Or edit manually like Breaker said.
From lilo i don't know to much. Hope others can help u.
If u are curious about diff os-prober Slackware Porteus, this can be hard work. U know, on slackware U have the sources, u can rebuild it. Etc.
Code:
[root@arcadia v]# bash -x os-prober
+ set -e
+ . /usr/share/os-prober/common.sh
++ cleanup_tmpdir=false
++ progname=
++ type mapdevfs
+ newns
+ '[' '' ']'
+ exec /usr/lib64/os-prober/newns os-prober
/dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
/dev/sda2:Slackware 15.0 x86_64:Slackware:linux
/dev/sdb1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows1:efi
--squipped--
[root@arcadia os-prober-1.79]# ls -la
total 36
drwxr-xr-x 5 root root 240 Jun 28 2021 .
drwxr-xr-x 3 root root 80 Feb 28 10:01 ..
-rw-r--r-- 1 root root 109 Aug 31 2014 Makefile
-rw-r--r-- 1 root root 3443 Jan 19 2017 README
-rw-r--r-- 1 root root 858 Jan 18 2011 TODO
-rw-rw-r-- 1 root root 6706 Oct 29 2018 common.sh
drwxr-xr-x 3 root root 280 Jun 28 2021 debian
-rwxr-xr-x 1 root root 1577 Mar 27 2012 linux-boot-prober
drwxr-xr-x 4 root root 80 Jan 18 2011 linux-boot-probes
-rw-r--r-- 1 root root 680 Jan 18 2011 newns.c
-rwxr-xr-x 1 root root 4551 Jan 19 2017 os-prober
drwxr-xr-x 5 root root 100 Jan 18 2011 os-probes
[root@arcadia os-prober-1.79]# less newns.c
Edited:
Copy the os-prober from porteus or others and compare ...
NOTE: Dunno if porteus use os-probe or like puppy or knoppix use other detection method.
Yes, dont worry about the |Disk.Read. Error| this are strings, recorded inside the disk, that the programs uses to print on screen if needed, with that commands "( dd if=sdx bs=512 count=1 )" we read all sectors from the disk, like raw mode.
So if u can boot inside windows from Live USB u have not overwritten the entry.
If u want to use grub.
Try to copy the grub entry from Porteus and use it on 40_custom Slack. Or edit manually like Breaker said.
From lilo i don't know to much. Hope others can help u.
If u are curious about diff os-prober Slackware Porteus, this can be hard work. U know, on slackware U have the sources, u can rebuild it. Etc.
Code:
[root@arcadia v]# bash -x os-prober
+ set -e
+ . /usr/share/os-prober/common.sh
++ cleanup_tmpdir=false
++ progname=
++ type mapdevfs
+ newns
+ '[' '' ']'
+ exec /usr/lib64/os-prober/newns os-prober
/dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
/dev/sda2:Slackware 15.0 x86_64:Slackware:linux
/dev/sdb1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows1:efi
--squipped--
[root@arcadia os-prober-1.79]# ls -la
total 36
drwxr-xr-x 5 root root 240 Jun 28 2021 .
drwxr-xr-x 3 root root 80 Feb 28 10:01 ..
-rw-r--r-- 1 root root 109 Aug 31 2014 Makefile
-rw-r--r-- 1 root root 3443 Jan 19 2017 README
-rw-r--r-- 1 root root 858 Jan 18 2011 TODO
-rw-rw-r-- 1 root root 6706 Oct 29 2018 common.sh
drwxr-xr-x 3 root root 280 Jun 28 2021 debian
-rwxr-xr-x 1 root root 1577 Mar 27 2012 linux-boot-prober
drwxr-xr-x 4 root root 80 Jan 18 2011 linux-boot-probes
-rw-r--r-- 1 root root 680 Jan 18 2011 newns.c
-rwxr-xr-x 1 root root 4551 Jan 19 2017 os-prober
drwxr-xr-x 5 root root 100 Jan 18 2011 os-probes
[root@arcadia os-prober-1.79]# less newns.c
Edited:
Copy the os-prober from porteus or others and compare ...
NOTE: Dunno if porteus use os-probe or like puppy or knoppix use other detection method.
Hope have all rigth.
Viel.
Well inside Slackware64 15.0
Code:
root@darkstar:/home/inukaze# bash -x /usr/bin/os-prober
+ set -e
+ . /usr/share/os-prober/common.sh
++ cleanup_tmpdir=false
++ progname=
++ type mapdevfs
+ newns
+ '[' '' ']'
+ exec /usr/lib64/os-prober/newns /usr/bin/os-prober
/dev/sda7:Slackware 15.0 i586:Slackware:linux
root@darkstar:/home/inukaze# cat /usr/bin/os-prober
#!/bin/sh
set -e
. /usr/share/os-prober/common.sh
newns "$@"
require_tmpdir
log_output () {
if type log-output >/dev/null 2>&1; then
log-output -t os-prober --pass-stdout $@
else
$@
fi
}
: >"$OS_PROBER_TMP/dmraid-map"
DMRAID=$(type dmraid >/dev/null 2>&1 || true)
if [ "$DMRAID" ]; then
dmraid -r -c >"$OS_PROBER_TMP/dmraid-map"
fi
on_sataraid () {
local parent="${1%/*}"
local device="/dev/${parent##*/}"
if grep -q "$device" "$OS_PROBER_TMP/dmraid-map"; then
return 0
fi
return 1
}
partitions () {
os_name="$(uname -s)"
# Exclude partitions that have whole_disk sysfs attribute set.
if [ -d /sys/block ]; then
# Exclude partitions on physical disks that are part of a
# Serial ATA RAID disk.
for part in /sys/block/*/*[0-9]; do
if [ -f "$part/start" ] && \
[ ! -f "$part/whole_disk" ] && ! on_sataraid $part; then
name="$(echo "${part##*/}" | sed 's,[!.],/,g')"
if [ -e "/dev/$name" ]; then
echo "/dev/$name"
fi
fi
done
# Add Serial ATA RAID devices
if type dmraid >/dev/null 2>&1 && \
dmraid -s -c >/dev/null 2>&1; then
for raidset in $(dmraid -sa -c); do
for part in /dev/mapper/"$raidset"*[0-9]; do
echo "$part"
done
done
fi
elif [ "$os_name" = Linux ]; then
echo "Cannot find list of partitions! (Try mounting /sys.)" >&2
exit 1
elif [ "$os_name" = GNU ]; then
for part in /dev/hd*s*[0-9] /dev/sd*s*[0-9]; do
if [ -s "$part" ]; then
echo "$part"
fi
done
else
# We don't know how to probe OSes on non-Linux and non-GNU kernels.
# For now, just don't get in the way.
exit 0
fi
# Also detect OSes on LVM volumes (assumes LVM is active)
if type lvs >/dev/null 2>&1; then
echo "$(LVM_SUPPRESS_FD_WARNINGS=1 log_output lvs --noheadings --separator : -o vg_name,lv_name |
sed "s|-|--|g;s|^[[:space:]]*\(.*\):\(.*\)$|/dev/mapper/\1-\2|")"
fi
}
parse_proc_swaps () {
while read line; do
set -f
set -- $line
set +f
echo "$(mapdevfs $1) swap"
done
}
parse_proc_mdstat () {
if type udevadm >/dev/null 2>&1; then
udevinfo () {
udevadm info "$@"
}
fi
while read line; do
for word in $line; do
dev="${word%%\[*}"
# TODO: factor this out to something in di-utils if
# it's needed elsewhere
if [ -d /sys/block ] && type udevinfo >/dev/null 2>&1; then
if ! udevinfo -q path -n "/dev/$dev" 2>/dev/null | \
grep -q '/.*/.*/'; then
continue
fi
elif ! echo "$dev" | grep -q "/part"; then
continue
fi
raidpart="/dev/$dev"
echo "$(mapdevfs "$raidpart")"
done
done
}
# Needed for idempotency
rm -f /var/lib/os-prober/labels
for prog in /usr/lib64/os-probes/init/*; do
if [ -x "$prog" ] && [ -f "$prog" ]; then
"$prog" || true
fi
done
# We need to properly canonicalize partitions with mount points and partitions
# used in RAID
grep "^/dev/" /proc/mounts | parse_proc_mounts >"$OS_PROBER_TMP/mounted-map" || true
: >"$OS_PROBER_TMP/swaps-map"
if [ -f /proc/swaps ]; then
grep "^/dev/" /proc/swaps | parse_proc_swaps >"$OS_PROBER_TMP/swaps-map" || true
fi
: >"$OS_PROBER_TMP/raided-map"
if [ -f /proc/mdstat ] ; then
grep "^md" /proc/mdstat | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true
fi
for partition in $(partitions); do
if ! mapped="$(mapdevfs "$partition")"; then
log "Device '$partition' does not exist; skipping"
continue
fi
# Skip partitions used in software RAID arrays
if grep -q "^$mapped" "$OS_PROBER_TMP/raided-map" ; then
debug "$partition: part of software raid array"
continue
fi
# Skip partitions used as active swap
if grep -q "^$mapped " "$OS_PROBER_TMP/swaps-map" ; then
debug "$partition: is active swap"
continue
fi
if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map" ; then
for test in /usr/lib64/os-probes/*; do
if [ -f "$test" ] && [ -x "$test" ]; then
debug "running $test on $partition"
if "$test" "$partition"; then
debug "os detected by $test"
break
fi
fi
done
else
mpoint=$(grep "^$mapped " "$OS_PROBER_TMP/mounted-map" | head -n1 | cut -d " " -f 2)
mpoint="$(unescape_mount "$mpoint")"
if [ "$mpoint" != "/target/boot" ] && [ "$mpoint" != "/target" ] && [ "$mpoint" != "/" ]; then
type=$(grep "^$mapped " "$OS_PROBER_TMP/mounted-map" | head -n1 | cut -d " " -f 3)
for test in /usr/lib64/os-probes/mounted/*; do
if [ -f "$test" ] && [ -x "$test" ]; then
debug "running $test on mounted $partition"
if "$test" "$partition" "$mpoint" "$type"; then
debug "os detected by $test"
break
fi
fi
done
fi
fi
done
i sorry for the time took for answer, i go to the job and when back to home, i distract trying to run Steam native, but requieres a lot of 32 Bits libs, and one its not on the multilib, and after all effort steam still have a segmentation fault when try to run, with/out steam runtime, the result is the exact the same but both finish on segmentation fault, i suppose i need some 32 bits libs on compat32 mode, the steam does not specify directly, because on my job, i use the oposite way and use the "quick 'n dirty" method for compat32, and there run correctly. but that theme for another thread.
From Porteus 5.01 Live USB :
Code:
guest@porteus:~$ sudo su
Contraseña:
root@porteus:/home/guest# umount /dev/sda3
root@porteus:/home/guest# mount /dev/sda3 /mnt/sda6/boot
root@porteus:/home/guest# mount --rbind /dev /mnt/sda6/dev
root@porteus:/home/guest# mount --rbind /proc /mnt/sda6/proc
root@porteus:/home/guest# mount --rbind /sys /mnt/sda6/sys
root@porteus:/home/guest# whereis os-prober
os-prober:
root@porteus:/home/guest# cat /usr/bin/os-prober
cat: /usr/bin/os-prober: No existe el fichero o el directorio
root@porteus:/home/guest# chroot /mnt/sda6
bash-5.1# bash -x /usr/bin/os-prober
+ set -e
+ . /usr/share/os-prober/common.sh
++ cleanup_tmpdir=false
++ progname=
++ type mapdevfs
+ newns
+ '[' '' ']'
+ exec /usr/lib64/os-prober/newns /usr/bin/os-prober
/dev/sda1:Windows 10:Windows:chain
/dev/sda7:Slackware 15.0 i586:Slackware:linux
Code:
bash-5.1# cat /usr/bin/os-prober
#!/bin/sh
set -e
. /usr/share/os-prober/common.sh
newns "$@"
require_tmpdir
log_output () {
if type log-output >/dev/null 2>&1; then
log-output -t os-prober --pass-stdout $@
else
$@
fi
}
: >"$OS_PROBER_TMP/dmraid-map"
DMRAID=$(type dmraid >/dev/null 2>&1 || true)
if [ "$DMRAID" ]; then
dmraid -r -c >"$OS_PROBER_TMP/dmraid-map"
fi
on_sataraid () {
local parent="${1%/*}"
local device="/dev/${parent##*/}"
if grep -q "$device" "$OS_PROBER_TMP/dmraid-map"; then
return 0
fi
return 1
}
partitions () {
os_name="$(uname -s)"
# Exclude partitions that have whole_disk sysfs attribute set.
if [ -d /sys/block ]; then
# Exclude partitions on physical disks that are part of a
# Serial ATA RAID disk.
for part in /sys/block/*/*[0-9]; do
if [ -f "$part/start" ] && \
[ ! -f "$part/whole_disk" ] && ! on_sataraid $part; then
name="$(echo "${part##*/}" | sed 's,[!.],/,g')"
if [ -e "/dev/$name" ]; then
echo "/dev/$name"
fi
fi
done
# Add Serial ATA RAID devices
if type dmraid >/dev/null 2>&1 && \
dmraid -s -c >/dev/null 2>&1; then
for raidset in $(dmraid -sa -c); do
for part in /dev/mapper/"$raidset"*[0-9]; do
echo "$part"
done
done
fi
elif [ "$os_name" = Linux ]; then
echo "Cannot find list of partitions! (Try mounting /sys.)" >&2
exit 1
elif [ "$os_name" = GNU ]; then
for part in /dev/hd*s*[0-9] /dev/sd*s*[0-9]; do
if [ -s "$part" ]; then
echo "$part"
fi
done
else
# We don't know how to probe OSes on non-Linux and non-GNU kernels.
# For now, just don't get in the way.
exit 0
fi
# Also detect OSes on LVM volumes (assumes LVM is active)
if type lvs >/dev/null 2>&1; then
echo "$(LVM_SUPPRESS_FD_WARNINGS=1 log_output lvs --noheadings --separator : -o vg_name,lv_name |
sed "s|-|--|g;s|^[[:space:]]*\(.*\):\(.*\)$|/dev/mapper/\1-\2|")"
fi
}
parse_proc_swaps () {
while read line; do
set -f
set -- $line
set +f
echo "$(mapdevfs $1) swap"
done
}
parse_proc_mdstat () {
if type udevadm >/dev/null 2>&1; then
udevinfo () {
udevadm info "$@"
}
fi
while read line; do
for word in $line; do
dev="${word%%\[*}"
# TODO: factor this out to something in di-utils if
# it's needed elsewhere
if [ -d /sys/block ] && type udevinfo >/dev/null 2>&1; then
if ! udevinfo -q path -n "/dev/$dev" 2>/dev/null | \
grep -q '/.*/.*/'; then
continue
fi
elif ! echo "$dev" | grep -q "/part"; then
continue
fi
raidpart="/dev/$dev"
echo "$(mapdevfs "$raidpart")"
done
done
}
# Needed for idempotency
rm -f /var/lib/os-prober/labels
for prog in /usr/lib64/os-probes/init/*; do
if [ -x "$prog" ] && [ -f "$prog" ]; then
"$prog" || true
fi
done
# We need to properly canonicalize partitions with mount points and partitions
# used in RAID
grep "^/dev/" /proc/mounts | parse_proc_mounts >"$OS_PROBER_TMP/mounted-map" || true
: >"$OS_PROBER_TMP/swaps-map"
if [ -f /proc/swaps ]; then
grep "^/dev/" /proc/swaps | parse_proc_swaps >"$OS_PROBER_TMP/swaps-map" || true
fi
: >"$OS_PROBER_TMP/raided-map"
if [ -f /proc/mdstat ] ; then
grep "^md" /proc/mdstat | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true
fi
for partition in $(partitions); do
if ! mapped="$(mapdevfs "$partition")"; then
log "Device '$partition' does not exist; skipping"
continue
fi
# Skip partitions used in software RAID arrays
if grep -q "^$mapped" "$OS_PROBER_TMP/raided-map" ; then
debug "$partition: part of software raid array"
continue
fi
# Skip partitions used as active swap
if grep -q "^$mapped " "$OS_PROBER_TMP/swaps-map" ; then
debug "$partition: is active swap"
continue
fi
if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map" ; then
for test in /usr/lib64/os-probes/*; do
if [ -f "$test" ] && [ -x "$test" ]; then
debug "running $test on $partition"
if "$test" "$partition"; then
debug "os detected by $test"
break
fi
fi
done
else
mpoint=$(grep "^$mapped " "$OS_PROBER_TMP/mounted-map" | head -n1 | cut -d " " -f 2)
mpoint="$(unescape_mount "$mpoint")"
if [ "$mpoint" != "/target/boot" ] && [ "$mpoint" != "/target" ] && [ "$mpoint" != "/" ]; then
type=$(grep "^$mapped " "$OS_PROBER_TMP/mounted-map" | head -n1 | cut -d " " -f 3)
for test in /usr/lib64/os-probes/mounted/*; do
if [ -f "$test" ] && [ -x "$test" ]; then
debug "running $test on mounted $partition"
if "$test" "$partition" "$mpoint" "$type"; then
debug "os detected by $test"
break
fi
fi
done
fi
fi
done
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.