os-prober 探测不到 Archlinux,除非挂载 Arch 所在分区

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

os-prober 探测不到 Archlinux,除非挂载 Arch 所在分区

#1

帖子 vickycq » 2015-09-14 15:02

代码: 全选

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xa18470c7

Device     Boot    Start       End   Sectors   Size Id Type  Filesystem OS
/dev/sda1           2048  27650047  27648000  13.2G 83 Linux xfs        Archlinux
/dev/sda2       52600832  97656831  45056000  21.5G  7 NTFS  NTFS       Microsoft Windows
/dev/sda3       97656832 974725119 877068288 418.2G 83 Linux ext4       -
/dev/sda4  *    27650048  52600831  24950784  11.9G 83 Linux ext4       Debian GNU/Linux

代码: 全选

# os-prober 
/dev/sda2:Windows 7 (loader):Windows:chain
# mount /dev/sda1 /mnt
# os-prober 
/dev/sda1::Arch:linux
/dev/sda2:Windows 7 (loader):Windows:chain
探测不到 Arch 时 os-prober 的输出 http://paste.ubuntu.com/12406751/
能探测到 Arch 时 os-prober 的输出 http://paste.ubuntu.com/12406757/

安装时参考的这一篇:https://wiki.archlinux.org/index.php/Beginners%27_guide

怎样解决呢? :em20

参考:
http://askubuntu.com/questions/180882/o ... -partition
https://bugzilla.redhat.com/show_bug.cgi?id=995777
https://bbs.archlinux.org/viewtopic.php?id=165715
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
头像
susbarbatus
帖子: 2966
注册时间: 2010-04-10 16:14
系统: Arch Linux

Re: os-prober 探测不到 Archlinux,除非挂载 Arch 所在分区

#2

帖子 susbarbatus » 2015-09-14 16:22

第2个参考链接的说法很有意思,貌似不是因为没挂载所以探测不到,而是因为没做“some kind of recovery”,
可以试试看比如 fsck 一下这个分区再执行一次看看会不会探测到,如果会的话,那就
把 arch 分区写到 fstab 里面,可以加上 noauto 选项让它不自动挂载,fstab 的第六栏 fs_passno 设置成 2,这样开机的时候会 fsck 一次。
沉迷将棋中……
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: os-prober 探测不到 Archlinux,除非挂载 Arch 所在分区

#3

帖子 poloshiao » 2015-09-14 17:05

如果你在安裝的 archlinux 內執行 os-prober 結果不包含 archlinux 所在的分割區 應該是正常的

參見
http://www.unix.com/man-page/centos/1/os-prober/
os-prober -- Discover bootable partitions on the local system.
The os-prober utility will scan all disks available on the system for other operating systems. For each discovered OS, it will output a line of the form:
怎样解决呢?
也許 這一篇 可以給你一些亮點 (Tip)
https://bbs.archlinux.org/viewtopic.php?id=145875
Tip for using Grub2 in another operating system

補充
在 grub 2 分工設計 掃描 本作業系統 (archlinux) 分割區裡的所有可開機檔案 是 /etc/grub.d/10_linux 的功能
試試
sudo /etc/grub.d/10_linux
https://wiki.archlinux.org/index.php/GR ... mmended.29
/etc/grub.d/10_linux is set to automatically add menu items for Arch linux that work out of the box, to any generated configuration.
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: os-prober 探测不到 Archlinux,除非挂载 Arch 所在分区

#4

帖子 vickycq » 2015-09-14 18:26

susbarbatus 写了:第2个参考链接的说法很有意思,貌似不是因为没挂载所以探测不到,而是因为没做“some kind of recovery”,
可以试试看比如 fsck 一下这个分区再执行一次看看会不会探测到,如果会的话,那就
把 arch 分区写到 fstab 里面,可以加上 noauto 选项让它不自动挂载,fstab 的第六栏 fs_passno 设置成 2,这样开机的时候会 fsck 一次。
感谢回复,用 fsck.xfs (xfs_repair) 检测无异常。不过倾向于认为 os_prober 对 xfs 分区的检测有问题。
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: os-prober 探测不到 Archlinux,除非挂载 Arch 所在分区

#5

帖子 vickycq » 2015-09-14 18:28

poloshiao 写了: 如果你在安裝的 archlinux 內執行 os-prober 結果不包含 archlinux 所在的分割區 應該是正常的

恕删

也許 這一篇 可以給你一些亮點 (Tip)
https://bbs.archlinux.org/viewtopic.php?id=145875
Tip for using Grub2 in another operating system

補充
在 grub 2 分工設計 掃描 本作業系統 (archlinux) 分割區裡的所有可開機檔案 是 /etc/grub.d/10_linux 的功能
試試
感谢回复,os-prober 是在 debian 系统中执行的。arch 未安装 grub。

在 arch 中安装了 lsb-release 后依然无效。

目前倾向于认为:
1) xfs 文件系统和 os-prober 不对付
2) mkinitcpio 出了问题。(挂载arch所在分区后update-grub可以生成对应启动项,但开机grub界面选择后立刻重启。)
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: os-prober 探测不到 Archlinux,除非挂载 Arch 所在分区

#6

帖子 poloshiao » 2015-09-14 18:59

os-prober 是在 debian 系统中执行的
https://bugs.launchpad.net/ubuntu/+sour ... ug/1038093
Fedora17 and ArchLinux dont appear in GRUB menu

https://bugs.launchpad.net/ubuntu/+sour ... omments/19
This bug is fix

https://bugs.launchpad.net/ubuntu/+sour ... omments/20
os-prober detects arch without its partition being mounted.
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: os-prober 探测不到 Archlinux,除非挂载 Arch 所在分区

#7

帖子 vickycq » 2015-09-14 20:45

将 arch 所在分区重新格式化为 ext4,重装。在 debian 中 update-grub,执行到 /usr/lib/os-probes/50mounted-tests 一步时卡住。用 ^C 终止,再 update-grub,提示 failed to remove ‘/var/lib/os-prober/mount’: Device or resource busy 但成功检测到 arch。

重启进入 arch,安装 lsb-release,再进入 debian 执行 update-grub,成功检测到 arch,没有错误发生。
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
回复