Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Custom Grub for Arch in multi-boot system that is maintenance free

  1. #1
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Custom Grub for Arch in multi-boot system that is maintenance free

    I customized the grub on my Arch Linux install and wanted to share this with any one who's interested. It's for those who multi boot Arch with Ubuntu or another distro and/or Windows.



    Here's a post in the Arch Forum:

    https://bbs.archlinux.org/viewtopic.php?id=200995

    You have to be logged in to view it.

    Since that thread is closed, I had to post updates here and there have been a few to simplify the whole process.
    Last edited by Cavsfan; November 20th, 2017 at 12:35 AM. Reason: update the example with a newer picture.

  2. #2
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Custom Grub for Arch in multi-boot system

    I thinned the partitions out a bit.


  3. #3
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Custom Grub for Arch in multi-boot system that is maintenance free

    PNG pictures always work for the background picture whereas JPG pictures sometimes display when grub is updated but not on the screen at boot time.

    So, instead of wasting time on JPGs, just edit the picture with GIMP, scale the image to the necessary size and then export it as a PNG picture.

    The screen size is what the grub picture resolutions is.
    Last edited by Cavsfan; November 20th, 2017 at 05:09 PM. Reason: Corrected last line

  4. #4
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Custom Grub for Arch in multi-boot system that is maintenance free

    I tried to add the Fallback and LTS kernel lines to grub when I first installed Arch but, must have have not gotten it right.
    But I have got it down now and am booted up on the LTS kernel and everything is good.
    Code:
    [cavsfan@le-beast ~]$ uname -r
    4.4.22-1-lts
    I noticed that in /boot there was no LTS kernel so I installed that and the nvidia driver for the LTS kernel.
    Code:
    sudo pacman -S linux-lts nvidia-340xx-lts
    That was the driver I use. This is the contents of /etc/grub.d/06_custom (Just the Arch part):
    Code:
    #!/bin/sh
        echo 1>&2 "Adding Arch Linux"
        exec tail -n +4 $0
        # This file provides an easy way to add custom menu entries.  Simply     type the
        # menu entries you want to add after this comment.  Be careful not     to change
        # the 'exec tail' line above.
        menuentry "Arch Linux" {
            set root=(hd0,2)
                linux /boot/vmlinuz-linux root=/dev/sda2 rw quiet
                initrd /boot/initramfs-linux.img
        }
        menuentry "Arch Linux (Fallback)" {
            set root=(hd0,2)
                linux /boot/vmlinuz-linux root=/dev/sda2 rw quiet
                initrd /boot/initramfs-linux-fallback.img
        }
        menuentry "Arch Linux (LTS Kernel)" {
            set root=(hd0,2)
                linux /boot/vmlinuz-linux-lts root=/dev/sda2 rw quiet
                initrd /boot/initramfs-linux-lts.img
        }
        menuentry "Arch Linux (LTS Kernel Fallback)" {
            set root=(hd0,2)
                linux /boot/vmlinuz-linux-lts root=/dev/sda2 rw quiet
                initrd /boot/initramfs-linux-lts-fallback.img
        }
        menuentry "Arch Linux (Recovery Mode)" {
            set root=(hd0,2)
                linux /boot/vmlinuz-linux root=/dev/sda2 rw single
                initrd /boot/initramfs-linux.img
        }
    Last edited by Cavsfan; November 20th, 2017 at 12:37 AM. Reason: put recovery mode at the bottom

  5. #5
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Custom Grub for Arch in multi-boot system that is maintenance free

    My latest Arch Grub screen with all entries:

    Last edited by Cavsfan; April 17th, 2018 at 11:12 PM. Reason: added picture back to post

  6. #6
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Custom Grub for Arch in multi-boot system that is maintenance free

    Whenever Arch installs a newer version of Grub2, it does not update grub but, it does make the original files executable.

    So, rather than leave it as is, what I have done is make 10_linux and 30_os-prober unexecutable and then updated grub.

    Code:
    sudo chmod -x /etc/grub.d/10_linux
    sudo chmod -x /etc/grub.d/30_os-prober
    sudo grub-mkconfig -o /boot/grub/grub.cfg
    Last edited by Cavsfan; November 14th, 2017 at 10:10 PM.

  7. #7
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Custom Grub for Arch in multi-boot system that is maintenance free

    *Update: If you use an HDMI to HDMI cable, there's is no need to create the font, add the GRUB_FONT= line or uncommenting out the GRUB_GFXMODE= and matching it your monitor's native resolution in /etc/default/grub.

    Apparently if you have a DVI to HDMI cable, etc. you do need to but, with straight HDMI, the size of the menu fonts are already the desired size.

    If your fonts are huge, you have probably figured this out long ago.

    I however had been using the DVI/HDMI cable and making the fonts were needed but, upon cleaning the PC last time I finally noticed that my nVidia card had an HDMI port.
    Between my son and I, we have a few extra HDMI cables laying around.

  8. #8
    Join Date
    Feb 2015
    Location
    United States
    Beans
    Hidden!
    Distro
    Ubuntu Studio

    Re: Custom Grub for Arch in multi-boot system that is maintenance free

    Hey thanks for the info. I'm wondering if this will come in handy for trying to get Manjaro to dual boot with Xubuntu better. I haven't tried that yet, but I have read on the Manjaro forums that Manjaro needs to be the "boss" GRUB, or otherwise there is incompatibility.
    May Peace Prevail for Life in all Realms of Creation --Masahisa Goi

  9. #9
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Custom Grub for Arch in multi-boot system that is maintenance free

    Quote Originally Posted by yoshii View Post
    Hey thanks for the info. I'm wondering if this will come in handy for trying to get Manjaro to dual boot with Xubuntu better. I haven't tried that yet, but I have read on the Manjaro forums that Manjaro needs to be the "boss" GRUB, or otherwise there is incompatibility.
    Actually whichever Linux system Manjaro or Xubuntu is installed last would be in control of Grub at that time.
    Because Grub is installed on the MBR (Master Boot Record) during installation.

    Section 1.9 will show you how to change Xubuntu to install it's Grub on the PBR (Partition Boot Record)

    You cannot put Manjaro's grub on the PBR, so nothing you can do will prevent grub from being re-installed on Manjaro.

    Unless you take the step above on Xubuntu, grub will be on whatever system runs a grub-install /dev/sdX.
    Last edited by Cavsfan; September 29th, 2017 at 09:50 PM. Reason: correction

  10. #10
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Custom Grub for Arch in multi-boot system that is maintenance free

    Just use your native screen resolution and that will work just fine for the grub background image.
    I thought the resolution had to be 1597x1198 like in the example picture but, it does not.

    PNG pictures always are better and work every time for me so far.

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •