[blfs-support] Anybody installing os-prober for grub?

Bruce Dubbs bruce.dubbs at gmail.com
Tue Jul 28 11:18:50 PDT 2015


Ken Moffat wrote:
> On Tue, Jul 28, 2015 at 09:06:41AM -0700, Paul Rogers wrote:
>> I've used 1.56 before, but it takes a lot of patching.  I'm looking at
>> upgrading 1.62 or 1.65, which will need some different patches.  I've
>> tried Google, no joy.  Anybody else tried this?

> yes, I used to use it.  I don't think that I actually _needed_ it,
> and probably I only used it "for real" once when I was setting up a
> box which had Windows 7 in its first partition.  I last updated my
> version in January, and I think that I did a test build when testing
> {,B}LFS-7.7 and *probably* ran it sending the output to stdout, but I
> cannot check that now because that box appears to have died.
>
> My script is using os-prober_1.65 (from debian) without any patches,
> using instructions which I based on Arch (but without the DESTDIR)

> set +e # something caused it to bail somewhere
> install -v -Dm755 linux-boot-prober /usr/bin/linux-boot-prober
> install -v -Dm755 os-prober /usr/bin/os-prober
> install -v -Dm755 newns /usr/lib/os-prober/newns
> install -v -Dm755 common.sh /usr/share/os-prober/common.sh
>
> for dir in os-probes os-probes/mounted os-probes/init \
>   linux-boot-probes linux-boot-probes/mounted;
>   do
>      install -v -dm755 "/usr/lib/$dir" || true
>      install -v -m755 -t "/usr/lib/$dir" "$dir"/common/* || true
>      [[ -d "$dir"/x86 ]] && install -v -m755 -t "/usr/lib/$dir""$dir"/x86/*
>   done
>
> install -v -Dm755 os-probes/mounted/powerpc/20macosx \
>   /usr/lib/os-probes/mounted/20macosx
>
> install -v -dm755 /var/lib/os-prober

I have never found os-prober to work properly.  At least when I install 
non-lfs systems, the grub.cfg is so totally screwed up that it is unusable.

As an exercise I installed Fedora 22, Fedora Server, Debian, Slackware, 
and Ubuntu on a system.  When I checked the boot.cfg there were, IIRC, 
47 entries.  Every kernel was set up to install on every partition, 
sometimes multiple times.  Fedora wants to use /boot/grub2/ and the 
others want to use /boot/grub/.  Of course all but Slackware had an 
initrd file.  To give an example, a 3.14 kernel might be set up to boot 
on /dev/sda4 that has no 3.14 modules.

What I found was that I needed to manually edit the grub.cfg file after 
every install after the first.  With the last install, the grub.cfg file 
was somewhere around 500 lines.  I removed all the cruft and set up the 
grub.cfg file properly and it was only about 35 lines.

My point is that if you don't know what OS is on each partition, then 
you shouldn't be doing LFS.  os-prober serves no useful purpose.

   -- Bruce




More information about the blfs-support mailing list