Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
That is an interesting question (at least for me).
I have an ubuntu and a debian installed (and also a win10 and win7). Now the boot loader is installed from ubuntu, therefore if I modify debian (kernel) the boot loader should be updated from ubuntu (if I knew it well).
How can I configure my system so update-grub2 works the same way from debian and ubuntu (=will generate exactly the same grub menu/config).
What I do is create a /etc/grub.d/25_custom with the following in Ubuntu and run sudo update-grub.
This puts the menu entry before the os-prober entries.
menuentry "Debian"{
set root=(hd0,2) #change accordingly for your Debian install
configfile /boot/grub/grub.cfg
}
That way I don't have to remember to go back to ubuntu to run update-grub when changes are made in Debian due to updates or anything else, just run update-grub in Debian.
Last edited by colorpurple21859; 04-30-2019 at 09:19 AM.
http://fm.no-ip.com/Share/Linux/custom.cfg is an example subset of what I do on UEFI systems (which have 6 or more Linux installations). It works much like what colorpurple21859 does, except this file is /boot/grub/custom.cfg, and instead of /etc/grub.d/25_custom, I rename 40_custom to 06_custom, without making any changes to the file's content. This also puts my (much less elaborate) custom entries at the top of the boot menu.
What I do is create a /etc/grub.d/25_custom with the following in Ubuntu and run sudo update-grub.
This puts the menu entry before the os-prober entries.
menuentry "Debian"{
set root=(hd0,2) #change accordingly for your Debian install
configfile /boot/grub/grub.cfg
}
That way I don't have to remember to go back to ubuntu to run update-grub when changes are made in Debian due to updates or anything else, just run update-grub in Debian.
I am trying this little "trick" and it not working yo.
Code:
menuentry "Void Linux" {
set root='(hd1,7)'
configfile /boot/grub/grub.cfg
}
errors out.
Code:
$ sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-huge-4.19.37
Found linux image: /boot/vmlinuz-huge
Found linux image: /boot/vmlinuz-generic-4.19.37
Found linux image: /boot/vmlinuz-generic
/etc/grub.d/25_custom: line 1: menuentry: command not found
/etc/grub.d/25_custom: line 3: configfile: command not found
/etc/grub.d/25_custom: line 4: syntax error near unexpected token `}'
/etc/grub.d/25_custom: line 4: `}'
as the other files have a x attached to them and it was not picked up I added one to the 25_custom and now am getting them errors. now what?
should that be in 40_custom instead?
and it is on the second hdd and 7th partition, so should it be counting from 0 to 7 making it hd1,6 or keep it 7?
I think I copied 40_custom to 25_custom and added entries. I'll have to wait till I get home from work to check.
grub2 counts drives starting at 0 and partitions starting at 1
Last edited by colorpurple21859; 05-01-2019 at 10:39 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.