[SOLVED] How to Install GRUB which can detect three Linux Distro
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i think kali linux has this utility
tried it but no use
arch system was working fine , earlier in /dev/sda1 there was opensuse13.2 , i replaced it with opensuse42
so earlier the /boot was under /dev/sda1 now arch is not having the entry
Dear Monojeffrey,
I remember to have a similar problem.
You probably know that If you are using grub you can use menu.lst that is a text file you can edit and add lines to it.
if you are using grub2 you need to add a file in grub folder that is called something like custom...40 where you write the information of the third distribution in your /etc/grub (look for the exact instructions in internet "how to grub2")
and you probalby know already that with grub2 whenever you run update-grub should find automatically all distributions and wtite them to grub.cfg
One of the reasons for not finding arch could be that one of the distributions is using an ext filesystem different.
For instance, grub will not know how to treat ext4, because it was developed when only ext, ext2 and ext3 were used.
Can you explain how did you installed grub2
did you make something like?
(as root or using sudo)
Which distro's grub is controlling the boot process? If you're not sure, write your /etc/grub.d/40/_custom file to both the Kali and the Opensuse partitions and run the following:
since it took much time to complete
i manually stopped it and i don't see any track of Arch entry
so how to place an entry to /etc/grub.d/40_custom file
Run the "grub-mkconfig" command posted above by RockDoctor. Obviously, there is no entry for Arch in the grub.cfg from Opensuse so this is the simplest way to add it. You could put a standard chainload entry for Arch such as the one below in the Opensuse grub.cfg file to test it, if it works add it to the 40_custom file. If it doesn't, download and run the bootinfoscript and post the output here.
Code:
menuentry 'Arch' {
insmod ext2
set root=(hd0,5)
chainloader +1
}
The entry for Arch that needs to go in boot/grub.cfg will look something like what is shown below. Back up your grub.cfg file before trying anything like this and make sure you've got rescue media handy - I don't always get it right the first time when I'm messing around with my PC's boot config, and I don't use Arch, Kali, or Opensuse. When I'm doing things like this, I just place the new menuentry in the 10_linux block. If you're unsure of yourself, don't do this!
Code:
menuentry 'Arch Linux on /dev/sda3' --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5' uuid_of_arch_partition_goes_here
else
search --no-floppy --fs-uuid --set=root uuid_of_arch_partition_goes_here
fi
linux /boot/arch kernel goes here root=UUID=uuid_of_arch_partition_goes_here ro
initrd /boot/Arch initrd goes here
}
i just remembered that all the files of Arch under /boot partition are formatted, since while installing arch /boot partition was /dev/sda1(which is formatted recently)
so is there any solution to reconstruct the /boot partition for Arch
mounted Arch(/dev/sda5) and able to see nothing except grub
linux-ertm:~ # mount /dev/sda5 /mnt
linux-ertm:~ # cd /mnt
linux-ertm:/mnt # cd boot/
linux-ertm:/mnt/boot # ls
grub
linux-ertm:/mnt/boot #
Now the truth comes out... Not to worry, we've all messed up our systems at some point.
You'll need to first populate Arch's /boot with at least the Arch kernel, initramfs, and System.map. Then regenerate openSUSE's grub.cfg (see John VV's post above or by executing openSUSE's version of update-grub) and you'll have a bootable Arch.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.