MS-Windowsブートデータを見つけるためにos-proberを使用する方法は?

MS-Windowsブートデータを見つけるためにos-proberを使用する方法は?

私は見たデュアルブート - インストールされたアーチとWindowsのエントリがgrubから消えます。私も同じ/似たような問題があります。 Grubがあり、MS-WindowsではなくDebian設定のみが表示されます。私も成功せずに次のことを試しました。

[$] sudo grub-install /dev/sda
[sudo] password for shirish:
Installing for i386-pc platform.
Installation finished. No error reported.

それから -

[$] sudo grub-mkconfig -o /boot/grub/grub.cfg                                                                                       
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
D000001: cmpversions a='0:4.9.0-2-amd64' b='0:4.9.0-1-amd64' r=1
Found linux image: /boot/vmlinuz-4.9.0-2-amd64
Found initrd image: /boot/initrd.img-4.9.0-2-amd64
Found linux image: /boot/vmlinuz-4.9.0-1-amd64
Found initrd image: /boot/initrd.img-4.9.0-1-amd64
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
Found GRUB Invaders image: /boot/invaders.exec
done

MS-Windowsパーティションが見つからないというメッセージが表示されます。

parted -lこれは - の出力です。

l: ATA ST1000DM003-9YN1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      32.3kB  52.4GB  52.4GB  primary   ntfs
 2      52.4GB  1000GB  948GB   extended                  lba
 5      52.4GB  105GB   52.4GB  logical   ntfs
 6      105GB   305GB   200GB   logical   ext4            boot
 7      305GB   405GB   100GB   logical   ext4
 8      405GB   995GB   590GB   logical   ext4
 9      995GB   1000GB  5348MB  logical   linux-swap(v1)


Model: Seagate BUP Slim BK (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  2000GB  2000GB  primary  ntfs


and then lsblk output - 

[$] sudo lsblk -f                                                                                                                   
NAME   FSTYPE  LABEL               UUID                                 MOUNTPOINT
sda                                                                     
├─sda1 ntfs    WIN                 xxxxxxxxxxxxxxxxxxxx                     
├─sda2                                                                  
├─sda5 ntfs    Data                xxxxxxxxxxxxxxxxxxxx                     
├─sda6 ext4                        xxxxxxxxxxxxxxxxxxxx /
├─sda7 ext4                        xxxxxxxxxxxxxxxxxxxx /home
├─sda8 ext4                        xxxxxxxxxxxxxxxxxxxx/data
└─sda9 swap                        xxxxxxxxxxxxxxxxxxxx [SWAP]
sdb    iso9660 ISOIMAGE            2015-06-04-16-30-00-00               
└─sdb1 ntfs    Seagate-Slim-Backup xxxxxxxxxxxxxxxxxxxx                     /media/shirish/Seagate-Slim-Backup
sr0      

まだUUID情報を共有していません。セキュリティとプライバシーの理由から。

/boot/grub/grub.cfgMS-Windowsについては言及していません。

[$] cat 
[$]

MS-Windowsをメニューに再表示するにはどうすればよいですか?

私もosproberを試してみましたが、役に立たなかった:(

[$]猫/usr/share/doc/os-prober/README

私もos-proberreadmeを試してみました -

$ sudo cat /usr/share/doc/os-prober | grep 

$

私はReadme 0からReadmeを試しましたが、成功しませんでした。

Tests that require the partition to be mounted can be placed in
    30  /usr/lib/os-probes/mounted/. These tests are passed the following
    31  parameters: partition, mount point, filesystem.


 $ sudo mount /dev/sda1 /usr/lib/os-probes/mounted/

そして次のことを試しました -

[$] sudo os-prober partition /dev/sda1 /usr/lib/os-probes/mounted/
    [sudo] password for shirish: 
[$]

その後、os-proberをsudoとして実行しました。

[$] sudo os-prober

それから逃げた――

┌─[shirish@debian] - [/boot] - [10119]
└─[$] sudo grub-mkconfig -o /boot/grub/grub.cfg                                                                                       
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-4.9.0-2-amd64
Found initrd image: /boot/initrd.img-4.9.0-2-amd64
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
Found GRUB Invaders image: /boot/invaders.exec
done

ご覧のとおり、MS-Windowsパーティションが見つかりません。永遠に失われますか、それとも脱出口はありますか?

恥でそれを削除する必要がありました:(

[$] sudo umount /usr/lib/os-probes/mounted/
[$] 

まったく分からない。 Windowsブートローダがすべて完了したようです。それ以外の場合は、いくつかの出力が必要ですか?

/etc/grub.d/40_custom共有後のGAD3Rの様子は次のとおりです。

#!/bin/sh
    exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Windows" {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    chainloader +1
    }

GAD3Rを提案した後、以下の結果が得られた。

[$] cat /etc/default/grub | grep GRUB_DISABLE_OS_PROBER                                                                            
    11  GRUB_DISABLE_OS_PROBER=false

update-grub を実行すると、次のメッセージが表示されます。

[$] sudo update-grub                                                                                                               
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-4.9.0-2-amd64
Found initrd image: /boot/initrd.img-4.9.0-2-amd64
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
Found GRUB Invaders image: /boot/invaders.exec

変更がないので、まだ問題があります:(

ベストアンサー1

/etc/grub.d/40_custom次のように編集してください。

menuentry "Windows" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
chainloader +1
}

次の行を次の行に追加します/etc/default/grub

GRUB_DISABLE_OS_PROBER=false

ランニング:

update-grub

おすすめ記事