My setup is:

-Windows 10 on a M.2 SSD

-Ubuntu 18.04 on a normal ssd (sdb)

-Arch Linux on sdb as well but on different partitions

I first installed ubuntu with grub and later added arch linux without installing a seperate boot loader, basically the same set-up this guide advises. I can add kernel parameters to ubuntu via editing /etc/default/grub and then running sudo update-grub. I can confirm the changes made here are persistent through cat /proc/cmdline.

But while I have a etc/default/grub on arch I don't have a grub.cfg for it so I can't apply the changes. sudo grub-mkconfig -o /boot/grub/grub.cfg outputs that there is no such file or directory. Obviously the changes made in archs grub-file won't transfer to ubuntu when I update the .cfg nor will the ubuntu .cfg load parameters for arch.

Is there any way I can add kernel parameters to my arch installation without installing a second instance of grub?

EDIT: I was able to get persistent changes to arch's kernel parameters by editing ubuntu's grub.cfg's arch linux entry manually but this I don't think this is a real solution, is it? Wouldn't I have to manipulate it again every time I ran update-grub?


It's wierd to say "grub.cfg on another distro", that's a config for grub(which is used during the actual boot process), not the configuration of the related software package on a distro(which might be named as grub, but never get used during boot, they're just grub-installer and configuration-tools).

I suggest you never try to install or configure grub using Arch, you don't even need to install related packages in Arch. Just install related packages in Ubuntu, configure it well so it will auto-detect Archlinux's kernel every time you run update-grub from Ubuntu. Packages have differnt behavior or configuration on different distro, using both would probably mess things up.

| improve this answer | |
  • Thanks for your answer, the reason I said the .cfg was on another distro was that I could not update it from arch and it did not react to changes made in arch's /etc/default/grub. How do I go about configuring it in a way where it will auto-detect the kernel then? It appears to me I'd have to set it up in a way that while running update-grub in ubuntu, grub looks for the /etc/default/grub on arch's partition for changes to be made in its section in the .cfg instead and uses ubuntu's grub-file for every other changes. Though I have no clue how to do this.. – Kaiton Mar 27 '19 at 10:49
  • Try to do this until you actually read the first paragraph of this answer. – 炸鱼薯条德里克 Mar 27 '19 at 12:43
  • @ 炸鱼薯条德里克: I guess you want to say something like "although the installation and configuration tools for GRUB may belong to a particular distribution, the installed GRUB is essentially shared with all distributions installed on the system", right? But the problem is, Ubuntu can auto-detect the presence of Arch's kernel and initramfs and add them to Ubuntu-generated GRUB configuration, but if there is no /boot/grub/grub.cfg in Arch, it will have no way to find out the required kernel boot options for Arch, which @Kaiton wants to specify. – telcoM Mar 27 '19 at 13:08
  • Yes. If that's what os-prober needs to work, then you might want install the grub package in Arch which provides that file or just write your own and put it in arch's partition. I would personally say, it seems to be weird that os-prober needs this file to function well, it might not be a good solution to problem. Maybe people should just read the man page of grub and write their own /etc/grub.d/ files @telcoM – 炸鱼薯条德里克 Mar 27 '19 at 13:22

What did you do to make Arch visible to Ubuntu's GRUB in the first place?

Did you edit Ubuntu's /etc/grub.d/40_custom or add another file to Ubuntu's /etc/grub.d/ directory? Then that file will most likely hold the actual kernel options used when booting Arch; edit that file, then run sudo update-grub on Ubuntu.

Or did the boot entry for Arch appear automatically when you ran sudo update-grub on Ubuntu? In that case, the os-prober script (invoked by /etc/grub.d/30_os-prober on sudo update-grub) on Ubuntu might be auto-detecting the Arch installation: it actually seems to look for /boot/grub/grub.cfg in any other Linux installation it finds, so if you make one on Arch and then run sudo update-grub on Ubuntu, it might actually pick up any kernel boot options specified in that file on Arch side, even if Arch has no "real" second copy of GRUB installed. Just having a GRUB configuration file in the expected location might be enough.

| improve this answer | |
  • Thanks for your answer. I copied my post from somewhere else and forgot to add the hyperlink to the guide: link But your assumption was right. I installed ubuntu and ran os-prober and then sudo update-grub and arch was automatically added as a boot entry in grub. I will try creating a .cfg in arch but will grub really look for two different .cfg when they are on different partitions? – Kaiton Mar 27 '19 at 10:41
  • os-prober will look for other Linux installations and their grub.cfg files, and will attempt to read the boot options from them and include them into Ubuntu's GRUB configuration when you run update-grub in Ubuntu. GRUB itself will still read just a single configuration file. – telcoM Mar 27 '19 at 11:47
  • You actually don't need to run os-prober manually: when you run sudo update-grub, it will execute the /etc/grub.d/30_os-prober file, which will automatically run os-prober as part of the update-grub procedure. – telcoM Mar 27 '19 at 11:51
  • Alright thank you, I don't have access to my machine right now but will try it ASAP and report back. – Kaiton Mar 27 '19 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.