Os prober �� ����� linux

Os prober �� ����� linux

os-prober is a spinoff of debian-installer. One of the installer’s features is that it can probe disks on the system for other operating systems, and add them to the boot loader, so that installing Debian doesn’t make your other installed OS hard to boot.

To do this it needs to both be able to find out what version of what OS lives in a given partition (linux, windows, dos, macos, the hurd, solaris, qnx, minix). It also needs to work out how to boot existing installed linux systems, and has to be able to detect what distribution is installed, to add a better menu entry to grub than just «linux».

The program Josh Kwan and I developed for d-i to do this is quite flexible, new OSes and linux distros can be added by just dropping in a test file to check for them. It’s fairly good at probing all the info needed to boot some installation of linux (the root, and /boot partitions, a kernel, an initrd, and kernel parameters). Since every version of linux does things slightly differently, this is no mean feat, techniques used include parsing /etc/fstab, rummaging around in /boot, parsing grub menu.lst files, etc.

os-prober can also be installed and used on a regular Debian system, and one of my goals is to find uses for it outside of d-i, and hopefully grow the number of contributors to it, so that it becomes able to detect even more OSes and linux variants. Some possible other uses include:

  • Use by other installers than d-i.
    • I’ve been told that Frugalware 0.5 will use it.
  • Using os-prober to eg, generate a grub menu.lst file for a running system.
  • Use on a live CD or rescue disk to enumerate OSes

Questions or bug reports should be directed to the debian-installer team, not me personally.

Источник

Dual boot Arch Linux with another Linux (os-prober)

To dual boot Arch Linux with another Linux system, you need to install another Linux without a bootloader, install os-prober and update the bootloader of Arch Linux to be able to boot the new OS.

Note: I use GRUB as a bootloader because it is the most popular Linux bootloader. If you use any other bootloader, you can get the overview of the process here, but you would need to research yourself the command to update your bootloader.

Video Tutorial

Install the second Linux without a bootloader

First, you need to install the second Linux system and you need to install it without a bootloader. For example, if your second OS is Ubuntu or Ubuntu derivative (Linux Mint, KDE Neon, elementaryOS etc.), run the ubiquity installer from a command line with the option -b:

This will install Ubuntu without the GRUB bootloader. I have explained this process in more details here.

Mount the partition with the new system

Next, you need to mount the partition with the new system. If it is not mounted, your Arch Linux simply is not able to see that there is another Linux installed on your computer.

To find out the name of the partition with the second OS, list the partitions on your system:

And based on their size identify the partition where you installed your second system. For example, on the picture below I installed Linux Mint on sda2. I know that because it is a smaller partition.

Читайте также:  Что означает windows failed

When you know the name of the partition with your second Linux system, mount it somewhere on your system, for example to /mnt or /media:

sudo mount /dev/sda2 /mnt

Install os-prober

GRUB bootloader cannot identify other OS itself, it is done with os-prober, which is an Arch Linux program that detects other OSes installed on your computer. Install it:

sudo pacman -S os-prober

Update GRUB

When your new system is mounted and os-prober is installed, run this command to update GRUB:

sudo grub-mkconfig -o /boot/grub/grub.cfg

You should see that GRUB has found your second Linux system, Linux Mint in the example below.

If not, go back and make sure that you mounted the right partition.

If your GRUB is updated without any error and the new system is recognized, reboot your Arch Linux and try to boot into the second system.

If you configured your Arch Linux to skip GRUB menu and boot as fast as possible, you need to press ESC or SHIFT key during the boot to enter the GRUB menu. If you have not touched your GRUB, you should see the GRUB menu automatically.

And as you can see on the screenshot above, there is a choice to boot either Arch Linux or Linux Mint, which is my second system in this case.

Boot into your second Linux system and make sure it works.

Multi-boot Arch Linux

Although I talk here about Arch Linux as the first OS and the other Linux OS as the second OS, there is no limit of the number of systems you can install and multi-boot. But you need to mount the partition with a new OS and update GRUB every time you install addition Linux OS on your computer.

I installed Linux Mint, Fedora and KDE Neon along with my Arch Linux system, I updated GRUB this way and now I can boot into any of these systems if I want. You can see the screenshot of my GRUB below.

If you update your kernel

Unfortunately, the setup of several Linux systems with one bootloader requires that you need to mount all the secondary systems and update GRUB manually every time you update your kernel. If your secondary systems are mounted during the update of Arch Linux, then the manual update is not necessary. Also, if you cannot find your secondary system in the GRUB menu after updating, this means that you forget to manually update GRUB. Boot in your Arch Linux, mount the second system and update GRUB.

Please consider supporting this project:

Comments

Marlor

Hello Greetings. I don’t have exactly Arch, but its derivatives. I have three different systems and all three on different disks. The question concerns Manjaro and Garuda Linux. After I put Garuda in Grub, Manjaro is visible, but if I try to boot into it, the error / boot / initramfs not found appears. You can go into additional parameters and select fallback in this case Manjaro will load. I’ve tried: sudo su — manjaro-chroot -a pacman-mirrors -f 5 && pacman -Syyu update-grub exit But this did not help, maybe the problem is that Garuda is on btrfs and Manjaro is on ext4, but these are just my assumptions.

Metin

I’m dual booting Arch with Fedora on a UEFI system. Arch contorls the boot menu which is in the first order. Fedora is detected by os-prober successfully. But vmlinuz-0-resuce is always the default for Fedora. Neither I can control the order kernels in the “Advanced Options for Fedora” submenu. I update boot menu from Arch but even then rescue kernel becomes the default. How do you handle that?

Hey Alu! after mountung my ISO Ubuntu file to ‘/mnt’ im updating my GRUB using the command you are suggesting and its not finding my file. should i mount the ISO in the ‘/boot’ folder? thanks in advance!

Julio

Please, find the update-grup command output too $ sudo update-grub Generating grub configuration file … Found theme: /usr/share/grub/themes/manjaro/theme.txt Found linux image: /boot/vmlinuz-5.3-x86_64 Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.3-x86_64.img Found initrd fallback image: /boot/initramfs-5.3-x86_64-fallback.img Found Linux Mint 19.2 on /dev/sda4 Found memtest86+ image: /boot/memtest86+/memtest.bin done

Julio

I have an Intel NUC8i3BEH2 with UEFI boot and I am trying to install Linux Mint along with Manjaro xfce. The reason is that I am used to Linux Mint and I have found tha Manjaro works grate in this computer and I want to give it a try. When I made my first try, I installed Manjaro 18.1.1 XFCE first and then Linux Mint. 19.2 Cinamon Then Linux Mint deleted the Grub of Manjaro and I could not get into Manjaro any more. After that I installed Manjaro again and then I could not get into Linux Mint. I decided to delete Linux Mint and install it without grub using the ubuntity — b command according your instructions but I still can not get into Linux Mint. I attache my commands fdisk -l and lsblk on Manjaro:

Читайте также:  Windows ios safari debug

$ sudo fdisk -l [sudo] password … Disco /dev/sda: 111,82 GiB, 120040980480 bytes, 234455040 sectores Modelo de disco: WDC WDS120G2G0B- Unidades: sectores de 1 * 512 = 512 bytes Tamaño de sector (lógico/físico): 512 bytes / 512 bytes Tamaño de E/S (mínimo/óptimo): 512 bytes / 512 bytes Tipo de etiqueta de disco: gpt Identificador del disco: 375CF42…

Disposit. Comienzo Final Sectores Tamaño Tipo /dev/sda1 2048 1026047 1024000 500M Sistema EFI /dev/sda2 1026048 82946047 81920000 39,1G Linux RAID /dev/sda3 82946048 91138047 8192000 3,9G Linux swap /dev/sda4 91138048 179027967 87889920 41,9G Sistema de ficheros de Linux

$ sudo lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 111,8G 0 disk ├─sda1 8:1 0 500M 0 part /boot/efi ├─sda2 8:2 0 39,1G 0 part /home ├─sda3 8:3 0 3,9G 0 part [SWAP]

I would appreciate any help you can give me.

Jelloul

Hi Alu! I have now two Archlinux distros on separate disks and it works like a charm. I wondered why many other forums and websites are trying to give help and tutorials with a lack of minimal step-by-step path to get acquainted with the command line. hats off to your disinterested help greetings from france

Average Linux User

Hi Jelloul, Thank you for the comment. I am pleased to hear this tutorial was useful and you enjoy your Arch Linux.

Roshin Alex

Life saver… Thank you. I spent more than half a day trying to figure out what happened to my second OS then stumbled upon your article. Installed KDE Neon in one partition and Linux Mint — Mate in another but Mint didn’t pop up in the boot menu. All I had to do was to mount the partition of Linux Mint and then update grub.cfg Thanks a ton. Keep up the good work .

Average Linux User

Hi Alex, I am glad it helped you.

Julius

I just stumbled onto this article after trying to find a way to install Ubuntu on my system with Arch already in place. This was the first place that gave me the answer I needed: to install Ubuntu without the bootloader. Thank you so much for the help!

Average Linux User

Thank for the comment, Julius! Happy to help

Источник

Arch Linux

os-prober 1.79-1 File List

Package has 25 files and 15 directories.

  • usr/
  • usr/bin/
  • usr/bin/linux-boot-prober
  • usr/bin/os-prober
  • usr/lib/
  • usr/lib/linux-boot-probes/
  • usr/lib/linux-boot-probes/50mounted-tests
  • usr/lib/linux-boot-probes/mounted/
  • usr/lib/linux-boot-probes/mounted/40grub
  • usr/lib/linux-boot-probes/mounted/40grub2
  • usr/lib/linux-boot-probes/mounted/50lilo
  • usr/lib/linux-boot-probes/mounted/90fallback
  • usr/lib/os-prober/
  • usr/lib/os-prober/newns
  • usr/lib/os-probes/
  • usr/lib/os-probes/50mounted-tests
  • usr/lib/os-probes/init/
  • usr/lib/os-probes/init/10filesystems
  • usr/lib/os-probes/mounted/
  • usr/lib/os-probes/mounted/05efi
  • usr/lib/os-probes/mounted/10freedos
  • usr/lib/os-probes/mounted/10qnx
  • usr/lib/os-probes/mounted/20macosx
  • usr/lib/os-probes/mounted/20microsoft
  • usr/lib/os-probes/mounted/30utility
  • usr/lib/os-probes/mounted/40lsb
  • usr/lib/os-probes/mounted/70hurd
  • usr/lib/os-probes/mounted/80minix
  • usr/lib/os-probes/mounted/83haiku
  • usr/lib/os-probes/mounted/90linux-distro
  • usr/lib/os-probes/mounted/90solaris
  • usr/lib/os-probes/mounted/efi/
  • usr/lib/os-probes/mounted/efi/10elilo
  • usr/lib/os-probes/mounted/efi/20microsoft
  • usr/share/
  • usr/share/os-prober/
  • usr/share/os-prober/common.sh
  • var/
  • var/lib/
  • var/lib/os-prober/

The Arch Linux name and logo are recognized trademarks. Some rights reserved.

The registered trademark Linux® is used pursuant to a sublicense from LMI, the exclusive licensee of Linus Torvalds, owner of the mark on a world-wide basis.

Источник

Arch Linux

You are not logged in.

#1 2017-10-29 15:13:38

[SOLVED] os-prober probes no OS

I install arch on laptop in UEFI boot mode with Secure Boot disabled.
win 10 is already on a partition of SSD, and I want to install arch on another partition of the SSD.
I mount arch partition on /mnt and win 10 partition on /mnt/boot,
then genfstab and then chroot to /mnt,
install grub and os-prober,
then grub-mkconfig but no os is listed.
Run os-prober still no os listed. So after reboot shows just»Minimal BASH like line editing is supported. For the first word, TAB lists possible command completions. anywhere else TAB lists possible device or file completions.»
Anyone could help?
What information should I paste for help?
Thanks.

Last edited by jhello (2017-10-31 13:00:30)

#2 2017-10-29 15:26:08

Re: [SOLVED] os-prober probes no OS

Which partition did you mount to /mnt/boot?

It’s meant to be the existing EFI partition, not the Windows system partition.

No, it didn’t «fix» anything. It just shifted the brokeness one space to the right. — jasonwryan
Closing — for deletion; Banning — for muppetry. — jasonwryan

#3 2017-10-29 15:40:25

Re: [SOLVED] os-prober probes no OS

Which partition did you mount to /mnt/boot?

Читайте также:  Диск mac os как сделать образ диска

It’s meant to be the existing EFI partition, not the Windows system partition.

Sorry, I actually did as you said, that is a mistake of my description.
I will correct it.

#4 2017-10-29 17:16:50

Re: [SOLVED] os-prober probes no OS

maybe the partition you want is not mounted ?

#5 2017-10-30 01:43:33

Re: [SOLVED] os-prober probes no OS

Did you chroot or arch-chroot? Please specify the exact commands you use and the output you get. arch-chroot is not the same as chroot. If you use chroot, you need to do additional stuff first.

Were you booted in UEFI mode? Are you sure? If so, how did you check?

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Corporation Wireless 8265 / 8275 | US keyboard with Euro | 512G NVMe INTEL SSDPEKKF512G7L

#6 2017-10-30 14:40:09

Re: [SOLVED] os-prober probes no OS

Did you chroot or arch-chroot? Please specify the exact commands you use and the output you get. arch-chroot is not the same as chroot. If you use chroot, you need to do additional stuff first.

Were you booted in UEFI mode? Are you sure? If so, how did you check?

In order to record every exact command and other detail, I reinstalled it.

In InsydeH20 Setup Utility:

In boot menu of Udisk OS, select

Connect to my wifi.

shows a lot of things.

select a fast mirror

I do not mount win 10 partition so there should be only archlinux probed.
But no archlinux shows, just as each time before with timezone and others configured.
Does the warning matter?

Last edited by jhello (2017-10-30 15:59:39)

#7 2017-10-30 15:07:40

Re: [SOLVED] os-prober probes no OS

In your description of your steps here you didn’t show mounting the existing ESP to /mnt/boot. Is that just an omission? If not, that is your problem.

Simple and Open

#8 2017-10-30 15:47:23

Re: [SOLVED] os-prober probes no OS

In your description of your steps here you didn’t show mounting the existing ESP to /mnt/boot. Is that just an omission? If not, that is your problem.

I did not mount it.
I exit arch-chroot,and

Still no OS.
Where nvme0n1p1 is the ESP

Last edited by jhello (2017-10-30 15:54:27)

#9 2017-10-30 16:06:42

Re: [SOLVED] os-prober probes no OS

You need to have the EFI partition mounted to /mnt/boot before you run the pacstrap command, as this is where the kernel and bootloader are installed to.

Also the lvmetad warning from os-prober isn’t an error, if you’re not using LVM then you can safely ignore it. Did you actually install GRUB? I can’t see you doing so in your installation notes.

Do you have any particular reason for wanting to use GRUB as your bootloader? If not then I’d suggest using systemd-boot instead, as it’s already installed in a base system and the configuration is more user friendly.

Last edited by Slithery (2017-10-30 16:07:45)

No, it didn’t «fix» anything. It just shifted the brokeness one space to the right. — jasonwryan
Closing — for deletion; Banning — for muppetry. — jasonwryan

#10 2017-10-30 16:08:43

Re: [SOLVED] os-prober probes no OS

Still some issues there. After you get both the / and ESP partitions mounted, do check to make sure the /etc/fstab on the new root does have both partitions listed and use genfstab again if needed, run arch-chroot and then re-install grub (though there are better and simpler options). Reinstall grub from the start and note that you do not run os-prober itself, it runs from grub-mkconfig. Also verify that the ESP has the ESP and boot flags set.

Simple and Open

#11 2017-10-30 16:35:18

Re: [SOLVED] os-prober probes no OS

slithery and Blasphemist suggestions make os-prober probes os, that is, an available grub.cfg is made.
Thanks very much!
But only arch, no win 10.
/mnt/etc/fstab does have both partitions listed.
and

esp and boot flags are there.

Last edited by jhello (2017-10-30 16:43:40)

#12 2017-10-30 18:50:26

Re: [SOLVED] os-prober probes no OS

But only arch, no win 10

Have a look on the EFI system partition for the Windows bootloader.

If the ESP is mounted to /boot in your Arch system then it should be found at /boot/EFI/Microsoft/Boot/bootmgfw.efi

Without that file Windows cannot be booted.

Источник

Оцените статью