LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-26-2024, 10:55 PM   #1
inukaze
Member
 
Registered: Feb 2011
Location: Venezuela - Caracas
Distribution: Slackware64 14.2, Slackware 14.2, Gentoo, Devuan, gNewSense, GoboLinux, Leeenux, Porteus
Posts: 290

Rep: Reputation: 26
Question GRUB2 - Menu Entry for Windows 10


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.
 
Old 02-27-2024, 03:46 AM   #2
viel
Member
 
Registered: Jul 2021
Location: Arcadia
Distribution: Slackware
Posts: 50

Rep: Reputation: Disabled
Hi,

Uncomment GRUB_DISABLE_OS_PROBER on /etc/default/grub or
Code:
GRUB_DISABLE_OS_PROBER=false
Then for me grub detect window partitions.

If not, try to run os-prover alone to test it.

Code:
[root@arcadia tmp]# 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
grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/sdc,gpt2,bsd1).
grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/sdc,gpt2,bsd10).
grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/sdc,gpt2,bsd11).
grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/sdc,gpt2,bsd12).
--skipped--
3rt option try to add it manually.

Edit /etc/grub.d/40_custom

U Need to set root partition to find the bootloader.
U need to know the file system type of the boot partition.
Code:
[root@arcadia tmp]# lsblk -f /dev/sda1
NAME FSTYPE FSVER LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda1 vfat   FAT16 EFI-BOOT 2AD0-095B
Grub have modules to load some filesystem types. Put the correct filesystem.
For vfat --> insmod fat.
Code:
  insmod part_gpt
  insmod fat
Check if u have GPT or MBR. NOTE: Load the correct module too. insmod part_gpt
Use hd1,1 for MBR.
Code:
   set root=(hd1,1)
For GPT u can try to change sdb1 to your sda1 from mi config below.
Code:
   set root='hd1,gpt1'
Or try to find root partition with UUID, use blkid.
Code:
search --no-floppy --fs-uuid --set  45645239-e460-42bd-a5ec-52656177d907
Or whit LABEL
Code:
search --no-floppy --label --set=root --label SLACKWARE
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.

Last edited by viel; 02-27-2024 at 03:57 AM.
 
Old 02-27-2024, 06:27 AM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,573

Rep: Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499
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.

Quote:
menuentry "Windows 10" {
insmod part_msdos
insmod ntfs
set root='(hd0,1)'
chainloader +1
}
The output of the command parted -l (run as root) will show the partition table type which should be dos based on your information.

Last edited by yancek; 02-28-2024 at 06:46 AM.
 
Old 02-27-2024, 11:11 AM   #4
inukaze
Member
 
Registered: Feb 2011
Location: Venezuela - Caracas
Distribution: Slackware64 14.2, Slackware 14.2, Gentoo, Devuan, gNewSense, GoboLinux, Leeenux, Porteus
Posts: 290

Original Poster
Rep: Reputation: 26
Thumbs up

Quote:
Originally Posted by viel View Post
Hi,

Uncomment GRUB_DISABLE_OS_PROBER on /etc/default/grub or
Code:
GRUB_DISABLE_OS_PROBER=false
Then for me grub detect window partitions.

If not, try to run os-prover alone to test it.

Code:
[root@arcadia tmp]# 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
grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/sdc,gpt2,bsd1).
grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/sdc,gpt2,bsd10).
grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/sdc,gpt2,bsd11).
grub-probe: warning: Discarding improperly nested partition (hostdisk//dev/sdc,gpt2,bsd12).
--skipped--
3rt option try to add it manually.

Edit /etc/grub.d/40_custom

U Need to set root partition to find the bootloader.
U need to know the file system type of the boot partition.
Code:
[root@arcadia tmp]# lsblk -f /dev/sda1
NAME FSTYPE FSVER LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda1 vfat   FAT16 EFI-BOOT 2AD0-095B
Grub have modules to load some filesystem types. Put the correct filesystem.
For vfat --> insmod fat.
Code:
  insmod part_gpt
  insmod fat
Check if u have GPT or MBR. NOTE: Load the correct module too. insmod part_gpt
Use hd1,1 for MBR.
Code:
   set root=(hd1,1)
For GPT u can try to change sdb1 to your sda1 from mi config below.
Code:
   set root='hd1,gpt1'
Or try to find root partition with UUID, use blkid.
Code:
search --no-floppy --fs-uuid --set  45645239-e460-42bd-a5ec-52656177d907
Or whit LABEL
Code:
search --no-floppy --label --set=root --label SLACKWARE
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.
 
Old 02-27-2024, 11:14 AM   #5
inukaze
Member
 
Registered: Feb 2011
Location: Venezuela - Caracas
Distribution: Slackware64 14.2, Slackware 14.2, Gentoo, Devuan, gNewSense, GoboLinux, Leeenux, Porteus
Posts: 290

Original Poster
Rep: Reputation: 26
Quote:
Originally Posted by yancek View Post
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.


Code:
joe /etc/grub.d/40_custom
Quote:
menuentry "Windows 10" {
insmod part_msdos
insmod ntfs
set root='(hd0,1)'
chainloader +1
}
Save the changes, and exit from text editor.

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 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.

Last edited by inukaze; 02-27-2024 at 11:19 AM.
 
Old 02-27-2024, 12:26 PM   #6
viel
Member
 
Registered: Jul 2021
Location: Arcadia
Distribution: Slackware
Posts: 50

Rep: Reputation: Disabled
Hi again,

Sorry for my transversal reading.

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.

Try to check MBR

Code:
dd if=/dev/sda  bs=512 count=1 2>/dev/null | hexdump -C
Try to read grub too..


The MBR is 512 bytes, so a quick way to see if GRUB is there...

Code:
dd if=/dev/sda bs=512 count=1 | xxd
That dumps the MBR, I see "GRUB" in mine at byte 0x17F = 383.
Code:
dd if=/dev/sda bs=1 count=4 skip=383
When you do that, u can see 'GRUB' followed by the dd output.


So maybe the windows boot has been overwritten?

I hope it helps you and doesn't confuse you anymore xd.

Eddited:
Can u find the VBR (Volume Boot Record) ? or BCD (Boot Configuration Data) ? etc...

Last edited by viel; 02-27-2024 at 01:44 PM.
 
Old 02-27-2024, 03:03 PM   #7
inukaze
Member
 
Registered: Feb 2011
Location: Venezuela - Caracas
Distribution: Slackware64 14.2, Slackware 14.2, Gentoo, Devuan, gNewSense, GoboLinux, Leeenux, Porteus
Posts: 290

Original Poster
Rep: Reputation: 26
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.

Last edited by inukaze; 02-27-2024 at 03:08 PM.
 
Old 02-27-2024, 03:13 PM   #8
inukaze
Member
 
Registered: Feb 2011
Location: Venezuela - Caracas
Distribution: Slackware64 14.2, Slackware 14.2, Gentoo, Devuan, gNewSense, GoboLinux, Leeenux, Porteus
Posts: 290

Original Poster
Rep: Reputation: 26
Quote:
Originally Posted by viel View Post
Hi again,

Sorry for my transversal reading.

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.

Try to check MBR

Code:
dd if=/dev/sda  bs=512 count=1 2>/dev/null | hexdump -C
Try to read grub too..


The MBR is 512 bytes, so a quick way to see if GRUB is there...

Code:
dd if=/dev/sda bs=512 count=1 | xxd
That dumps the MBR, I see "GRUB" in mine at byte 0x17F = 383.
Code:
dd if=/dev/sda bs=1 count=4 skip=383
When you do that, u can see 'GRUB' followed by the dd output.


So maybe the windows boot has been overwritten?

I hope it helps you and doesn't confuse you anymore xd.

Eddited:
Can u find the VBR (Volume Boot Record) ? or BCD (Boot Configuration Data) ? etc...
Code:
dd if=/dev/sda  bs=512 count=1 2>/dev/null | hexdump -C
Quote:
00000000 eb 63 90 01 b4 01 4c 49 4c 4f 18 02 93 cd db 65 |.c....LILO.....e|
00000010 00 00 00 00 93 cd db 65 29 08 29 08 01 00 80 60 |.......e).)....`|
00000020 20 d5 a6 1c b8 c0 07 8e d0 bc 00 08 fb 52 53 06 | ............RS.|
00000030 56 fc 8e d8 31 ed 60 b8 00 12 b3 36 cd 10 61 b0 |V...1.`....6..a.|
00000040 0d e8 66 01 b0 0a e8 61 01 b0 4c e8 5c 01 60 1e |..f....a..L.\.`.|
00000050 07 80 fa fe 75 02 88 f2 bb 00 00 80 01 00 00 00 |....u...........|
00000060 00 00 00 00 ff fa 90 90 f6 c2 80 74 05 f6 c2 70 |...........t...p|
00000070 74 02 b2 80 ea 79 7c 00 00 31 c0 8e d8 8e d0 bc |t....y|..1......|
00000080 00 20 fb a0 64 7c 3c ff 74 02 88 c2 52 be 80 7d |. ..d|<.t...R..}|
00000090 e8 17 01 be 05 7c b4 41 bb aa 55 cd 13 5a 52 72 |.....|.A..U..ZRr|
000000a0 3d 81 fb 55 aa 75 37 83 e1 01 74 32 31 c0 89 44 |=..U.u7...t21..D|
000000b0 04 40 88 44 ff 89 44 02 c7 04 10 00 66 8b 1e 5c |.@.D..D.....f..\|
000000c0 7c 66 89 5c 08 66 8b 1e 60 7c 66 89 5c 0c c7 44 ||f.\.f..`|f.\..D|
000000d0 06 00 70 b4 42 cd 13 72 05 bb 00 70 eb 76 b4 08 |..p.B..r...p.v..|
000000e0 cd 13 73 0d 5a 84 d2 0f 83 d8 00 be 8b 7d e9 82 |..s.Z........}..|
000000f0 00 66 0f b6 c6 88 64 ff 40 66 89 44 04 0f b6 d1 |.f....d.@f.D....|
00000100 c1 e2 02 88 e8 88 f4 40 89 44 08 0f b6 c2 c0 e8 |.......@.D......|
00000110 02 66 89 04 66 a1 60 7c 66 09 c0 75 4e 66 a1 5c |.f..f.`|f..uNf.\|
00000120 7c 66 31 d2 66 f7 34 88 d1 31 d2 66 f7 74 04 3b ||f1.f.4..1.f.t.;|
00000130 44 08 7d 37 fe c1 88 c5 30 c0 c1 e8 02 08 c1 88 |D.}7....0.......|
00000140 d0 5a 88 c6 bb 00 70 8e c3 31 db b8 01 02 cd 13 |.Z....p..1......|
00000150 72 1e 8c c3 60 1e b9 00 01 8e db 31 f6 bf 00 80 |r...`......1....|
00000160 8e c6 fc f3 a5 1f 61 ff 26 5a 7c be 86 7d eb 03 |......a.&Z|..}..|
00000170 be 95 7d e8 34 00 be 9a 7d e8 2e 00 cd 18 eb fe |..}.4...}.......|
00000180 47 52 55 42 20 00 47 65 6f 6d 00 48 61 72 64 20 |GRUB .Geom.Hard |
00000190 44 69 73 6b 00 52 65 61 64 00 20 45 72 72 6f 72 |Disk.Read. Error|
000001a0 0d 0a 00 bb 01 00 b4 0e cd 10 ac 3c 00 75 f4 c3 |...........<.u..|
000001b0 00 00 00 00 00 00 00 00 29 08 29 08 00 00 80 01 |........).).....|
000001c0 01 00 07 fe ff ff 3f 00 00 00 41 39 40 06 00 fe |......?...A9@...|
000001d0 ff ff 07 fe ff ff 00 40 40 06 00 20 a0 0c 00 fe |.......@@.. ....|
000001e0 ff ff 83 fe ff ff 00 60 e0 12 00 20 20 00 00 fe |.......`... ...|
000001f0 ff ff 05 fe ff ff 00 80 00 13 00 68 42 12 55 aa |...........hB.U.|
00000200
Code:
dd if=/dev/sda bs=512 count=1 | xxd
Quote:
1+0 registros leídos
1+0 registros escritos
512 bytes copied, 6,736e-05 s, 7,6 MB/s
00000000: eb63 9001 b401 4c49 4c4f 1802 93cd db65 .c....LILO.....e
00000010: 0000 0000 93cd db65 2908 2908 0100 8060 .......e).)....`
00000020: 20d5 a61c b8c0 078e d0bc 0008 fb52 5306 ............RS.
00000030: 56fc 8ed8 31ed 60b8 0012 b336 cd10 61b0 V...1.`....6..a.
00000040: 0de8 6601 b00a e861 01b0 4ce8 5c01 601e ..f....a..L.\.`.
00000050: 0780 fafe 7502 88f2 bb00 0080 0100 0000 ....u...........
00000060: 0000 0000 fffa 9090 f6c2 8074 05f6 c270 ...........t...p
00000070: 7402 b280 ea79 7c00 0031 c08e d88e d0bc t....y|..1......
00000080: 0020 fba0 647c 3cff 7402 88c2 52be 807d . ..d|<.t...R..}
00000090: e817 01be 057c b441 bbaa 55cd 135a 5272 .....|.A..U..ZRr
000000a0: 3d81 fb55 aa75 3783 e101 7432 31c0 8944 =..U.u7...t21..D
000000b0: 0440 8844 ff89 4402 c704 1000 668b 1e5c .@.D..D.....f..\
000000c0: 7c66 895c 0866 8b1e 607c 6689 5c0c c744 |f.\.f..`|f.\..D
000000d0: 0600 70b4 42cd 1372 05bb 0070 eb76 b408 ..p.B..r...p.v..
000000e0: cd13 730d 5a84 d20f 83d8 00be 8b7d e982 ..s.Z........}..
000000f0: 0066 0fb6 c688 64ff 4066 8944 040f b6d1 .f....d.@f.D....
00000100: c1e2 0288 e888 f440 8944 080f b6c2 c0e8 .......@.D......
00000110: 0266 8904 66a1 607c 6609 c075 4e66 a15c .f..f.`|f..uNf.\
00000120: 7c66 31d2 66f7 3488 d131 d266 f774 043b |f1.f.4..1.f.t.;
00000130: 4408 7d37 fec1 88c5 30c0 c1e8 0208 c188 D.}7....0.......
00000140: d05a 88c6 bb00 708e c331 dbb8 0102 cd13 .Z....p..1......
00000150: 721e 8cc3 601e b900 018e db31 f6bf 0080 r...`......1....
00000160: 8ec6 fcf3 a51f 61ff 265a 7cbe 867d eb03 ......a.&Z|..}..
00000170: be95 7de8 3400 be9a 7de8 2e00 cd18 ebfe ..}.4...}.......
00000180: 4752 5542 2000 4765 6f6d 0048 6172 6420 GRUB .Geom.Hard
00000190: 4469 736b 0052 6561 6400 2045 7272 6f72 Disk.Read. Error
000001a0: 0d0a 00bb 0100 b40e cd10 ac3c 0075 f4c3 ...........<.u..
000001b0: 0000 0000 0000 0000 2908 2908 0000 8001 ........).).....
000001c0: 0100 07fe ffff 3f00 0000 4139 4006 00fe ......?...A9@...
000001d0: ffff 07fe ffff 0040 4006 0020 a00c 00fe .......@@.. ....
000001e0: ffff 83fe ffff 0060 e012 0020 2000 00fe .......`... ...
000001f0: ffff 05fe ffff 0080 0013 0068 4212 55aa ...........hB.U.
Code:
dd if=/dev/sda bs=1 count=4 skip=383
Quote:
�GRU4+0 registros leídos
4+0 registros escritos
4 bytes copied, 7,608e-05 s, 52,6 kB/s
Well i notice that "Read Error" on the two outputs. i dont know is a hdd sector fail or just something i need rebuild/remake.

Well better i reinstall grub.
Code:
grub-install --recheck --boot-directory=/boot /dev/sda
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
Code:
slpkg -s slack --reinstall os-prober
Quote:
Reading package lists... Done
Resolving dependencies... Done

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

2024-02-27 17:29:22 (165 MB/s) - «/tmp/slpkg/packages/os-prober-1.79-x86_64-1.txz» guardado [16948/16948]


+==============================================================================
| 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
+==============================================================================
The result still the same of grub-mkconfig

Last edited by inukaze; 02-27-2024 at 03:31 PM.
 
Old 02-27-2024, 05:22 PM   #9
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,811

Rep: Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447
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.
 
Old 02-27-2024, 06:41 PM   #10
inukaze
Member
 
Registered: Feb 2011
Location: Venezuela - Caracas
Distribution: Slackware64 14.2, Slackware 14.2, Gentoo, Devuan, gNewSense, GoboLinux, Leeenux, Porteus
Posts: 290

Original Poster
Rep: Reputation: 26
Quote:
Originally Posted by enorbet View Post
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.
 
Old 02-28-2024, 12:03 AM   #11
breaker
Member
 
Registered: Mar 2022
Distribution: Slackware 15.0
Posts: 87

Rep: Reputation: 29
Hi, don't worry about those "Hard Disk Read Error" strings. That is only part of the GRUB code in case it needs to display an error to the user on boot. https://thestarman.pcministry.com/asm/mbr/GRUB.htm More info on MBR - https://thestarman.pcministry.com/as...artTables3.htm

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.
 
Old 02-28-2024, 03:30 AM   #12
viel
Member
 
Registered: Jul 2021
Location: Arcadia
Distribution: Slackware
Posts: 50

Rep: Reputation: Disabled
Hi,

As Breaker said,

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 View Post
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.

Hope have all rigth.

Viel.

Last edited by viel; 02-28-2024 at 03:34 AM.
 
Old 02-28-2024, 05:08 AM   #13
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,396

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Disable os-prober in /etc/default/grub and run grub-mkconfig, If it still hangs there is most likey an issue with /etc/grub.d/40_custom.

Last edited by colorpurple21859; 02-28-2024 at 05:09 AM.
 
Old 02-28-2024, 08:28 AM   #14
breaker
Member
 
Registered: Mar 2022
Distribution: Slackware 15.0
Posts: 87

Rep: Reputation: 29
Yes, as above. Be aware your disk order in Linux does not necessarily match your BIOS boot order. https://www.gnu.org/software/grub/ma...evice-map.html

For custom entry search UUID or a disk label you set.
See our discussion here:
https://forums.linuxmint.com/viewtopic.php?t=38599
 
Old 02-28-2024, 10:40 PM   #15
inukaze
Member
 
Registered: Feb 2011
Location: Venezuela - Caracas
Distribution: Slackware64 14.2, Slackware 14.2, Gentoo, Devuan, gNewSense, GoboLinux, Leeenux, Porteus
Posts: 290

Original Poster
Rep: Reputation: 26
Quote:
Originally Posted by viel View Post
Hi,

As Breaker said,

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
Porteus does not have os-prober.

Last edited by inukaze; 02-29-2024 at 07:18 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] GRUB2.02 hide a single menu entry. ezaluzec Linux - Software 3 06-13-2017 02:01 PM
[SOLVED] GRUB2 New menu entry pointing to USB drive id2205 Linux - Software 13 06-21-2016 12:52 PM
LXer: Windows entry disappeared in Grub2 menu LXer Syndicated Linux News 0 10-19-2011 01:01 AM
GRUB2 - FreeBSD-8.0 does not show up in triple boot menu, dual boot menu it does.. wiliweld *BSD 7 05-03-2010 01:05 PM
Adding a menu entry to grub2 Jeff91 Linux - General 1 08-28-2009 06:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration