How Does Live CD Find OS’s?

Home » CentOS » How Does Live CD Find OS’s?
CentOS 4 Comments

If I boot into CentOS on my home server from a Live CD or USB stick and go to Troubleshoot, it lists OS‘s it finds on the machine. How does it find these OS’s?
Presumably it looks through all the partitions on all the hard disks for something that looks like an OS?
But how exactly does it identify an OS?

4 thoughts on - How Does Live CD Find OS’s?

  • Live CD does not have a troubleshoot boot sub menu option. This is available with non-lives like DVD and netinstall images. The “rescue a system” option uses the ‘rescue’ or more recently the ‘inst.rescue’
    boot parameter, which tells anaconda to run the text rescue mode, and all of that code is found in anaconda and python-blivet.

  • Chris Murphy wrote:

    If I boot into CentOS-7-x86_64-LiveKDE-1503.iso there is a Troubleshooting option, and if I choose this there is an option to “Boot into Local Disk”. Clicking on this gives a list of OS’s to boot into.

    It seems this does run through all partitions, running os-prober on each. I thought os-prober was an object file, but I see it is a bash script, so hopefully I can see exactly what it does.

  • Jonathan Billings wrote:

    Yes, thanks. I confused os-prober with grub2-probe, which is an executable file. Hopefully I should be able to work out why I am getting this
    cannot find a GRUB drive for /dev/block/8
    error when I run grub2-mkconfig