Page 1 of 27 12311 ... LastLast
Results 1 to 10 of 267

Thread: How to have a custom Grub2 menu that is maintenance free

  1. #1
    Join Date
    Aug 2009
    Beans
    3,535
    Distro
    Ubuntu Development Release

    How to have a custom Grub2 menu that is maintenance free

    If you just use Ubuntu or dual boot/multi boot Ubuntu with Debian or Windows, etc. this will give you all the information to create a custom background, fonts colors and menu that never needs modified.
    You can also choose the default OS and the timeout before the default OS is selected. That will never need changing even when a new kernel is installed in any Ubuntu installed.

    The only time you would need to modify anything is if you get bored with the background picture, font colors or if you install/remove/re-install an operating system.

    The Wiki evolved from this thread: How to: Create a Customized GRUB2 Screen that is Maintenance Free.

    Here is the link to the Community Wiki that replaced it: How to have a custom GRUB2 menu that is maintenance free

    The wiki has several examples of what your screen could look like.

    Feel free to post questions, comments, problems, etc. here in this thread.

    EDIT: I changed the link in my signature to point to this thread. Just click on the green line above to get to the Community Wiki.
    Last edited by Cavsfan; July 15th, 2014 at 05:42 PM.
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Precise 12.04 | Trusty 14.04 | Vivid 15.04 | Mint Rebecca 17 | Windows 7 | All 64 bit

  2. #2
    dino99's Avatar
    dino99 is offline Ubuntu addict and loving it
    Join Date
    Jun 2006
    Location
    Nux Jam
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: How to have a custom Grub2 menu that is maintenance free

    hey you made a good job, clearly explained, thanks.
    thats kind of wiki have a place into "tutorials & tips" subforum.
    Last edited by dino99; October 25th, 2012 at 06:16 PM.

  3. #3
    Join Date
    Aug 2009
    Beans
    3,535
    Distro
    Ubuntu Development Release

    Re: How to have a custom Grub2 menu that is maintenance free

    Quote Originally Posted by dino99 View Post
    hey you made a good job, clearly explained, thanks.
    thats kind of wiki have a place into "tutorials & tips" subforum.
    You're welcome.
    Didn't you get the message:
    http://ubuntuforums.org/showthread.php?t=2074191

    "the forum will be closed completely to posting after a transitional period."
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Precise 12.04 | Trusty 14.04 | Vivid 15.04 | Mint Rebecca 17 | Windows 7 | All 64 bit

  4. #4
    Join Date
    Aug 2009
    Beans
    3,535
    Distro
    Ubuntu Development Release

    Re: How to have a custom Grub2 menu that is maintenance free

    Here is my current Grub2 menu on Quantal Quetzal 12.10.
    I have 2 Lucid installs, a Precise Pangolin install, a Quantal Quetzal install and Windows 7.
    I leave the default on Windows 7 for my wife in case the PC reboots.
    Even when new kernels are installed in any Ubuntu, the default still is Windows 7.
    The normal font color is yellow and highlight is white.



    Feel free to post your custom grub2 menu if you have used my wiki to make it.
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Precise 12.04 | Trusty 14.04 | Vivid 15.04 | Mint Rebecca 17 | Windows 7 | All 64 bit

  5. #5
    Join Date
    Aug 2009
    Beans
    3,535
    Distro
    Ubuntu Development Release

    Re: How to have a custom Grub2 menu that is maintenance free

    I installed 3 more systems - Lucid, Precise and Quantal on separate partitions to keep the grub files generic in case anyone needs a copy of the original file.

    I got an upgrade to grub and it gave me some errors. Luckily I had a copy of 05_debian_theme to fix the error.

    I had to edit fstab every time I installed another system as it would pull all of the swap partitions into fstab.
    There is a section on editing fstab when installing or reinstalling Ubuntu in the wiki in my signature in section 1.7.

    It would be very difficult to maneuver the long menu without customizing it as I have.
    Here is what my grub2 screen currently looks like with 7 operating systems:



    Here is the output of sudo blkid:

    Code:
    /dev/sda1: LABEL="C:" UUID="1CFC7A8DFC7A60C6" TYPE="ntfs" 
    /dev/sda2: LABEL="Lucid" UUID="a162dc8a-e4df-4b79-b4c3-524761ff7ae1" TYPE="ext4" 
    /dev/sda3: UUID="2a80f59e-e7c3-418e-aab2-ab5d19255a2f" TYPE="swap" 
    /dev/sda5: LABEL="Precise" UUID="3b8b1954-24e6-4a5e-9074-70a1a94ed4be" TYPE="ext4" 
    /dev/sda6: UUID="82c51b29-023f-4964-99b6-67b45a49527f" TYPE="swap" 
    /dev/sda7: LABEL="Quantal" UUID="b5fc902c-0bf0-45b3-95a1-29f3c46dfe6a" TYPE="ext4" 
    /dev/sda8: UUID="69ac3efc-8a8a-4056-89e0-59bb81c2f468" TYPE="swap" 
    /dev/sda9: LABEL="Lucid-Generic" UUID="109c11d0-71e3-41a4-87da-9e81535499a5" TYPE="ext4" 
    /dev/sda10: UUID="24aa8c8b-53dc-4ecc-852b-ff2c25c8b342" TYPE="swap" 
    /dev/sda11: LABEL="Precise-Generic" UUID="50104efb-d918-45a9-985e-a70c60e87ac0" TYPE="ext4" 
    /dev/sda12: UUID="139390a6-2fe1-4ff2-b650-88ae3b0586c1" TYPE="swap" 
    /dev/sda13: UUID="580e8c62-78ce-44a2-93e3-ccebd37c3acc" TYPE="ext4" LABEL="Quantal-Generic" 
    /dev/sda14: UUID="ec3048b8-c644-435a-93bb-08bb4975d0db" TYPE="swap" 
    /dev/sdb1: LABEL="Fantom" UUID="78B8D1A1B8D15DE6" TYPE="ntfs"
    They are easy to recognize since they have all been labeled as explained in 1.6 of the wiki.

    I will try to put the generic grub files on the wiki but, if any one needs a copy of something let me know and I will post the contents of the file here.
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Precise 12.04 | Trusty 14.04 | Vivid 15.04 | Mint Rebecca 17 | Windows 7 | All 64 bit

  6. #6
    Join Date
    Feb 2010
    Location
    Nr BrandsHatch, S'oaks UK
    Beans
    1,241
    Distro
    Lubuntu 13.04 Raring Ringtail

    Re: How to have a custom Grub2 menu that is maintenance free

    HI!, Cavsfan,

    I see your latest Grub menu is still using Grub v1.98-1: I thought grub 2 was 1.99.

    With Quantal 12.10 Grub Customizer is a disaster, and I get no recovery options, so I am tempted to try your method; I have studied it with interest in the past, but have not tried it out, as Grub Customer did what I needed.

    Will it work with Grub 2 v2.00 ?? which has files very different from previous versions.

    Edit: I use the following to see what my grub menu will look like : will it work with your system ?
    Code:
    grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0
    Currently mine shows like this:
    Code:
    0    ature_menuentry_id}
         1    _id_option=
         2    _id_option=
         3    entry_id_option
         4    Ubuntu  3.5.0-18 Linux 12.1 (on sda10)
         5    Memory test (memtest86+)
         6    Ubuntu Quantal (12.10) (on USB)
         7    Ubuntu 12.04.1 LTS (12.04)
         8    Ubuntu 12.10 (12.10)
         9    Ubuntu 12.04.1 LTS (12.04)
        10    Ubuntu 12.04.1 LTS (12.04)
        11    Windows 7 (loader) (on /dev/sda1)
        12    Ubuntu 3.2.0-33pae (12.04.1) ( on sda5)
    I have no idea what the first three entries mean, the first [Number 4] and the last, I renamed in grub Customer; entry 6 I( edited in /boot/grub/grub,cfg; whilst entries 7,9, & 10 are spurious duplicates of the sda5 entry, created by update-grub & Grub Customizer

    Chao!, bogan.
    Last edited by bogan; October 29th, 2012 at 06:50 PM.
    "Better Solutions may bring Worsened Problems": After Lao Tse, b. circa 405BC. a contemporary of Confucius, who died circa 600BC.
    They did things differently in those days, apparently!!

  7. #7
    Join Date
    Aug 2009
    Beans
    3,535
    Distro
    Ubuntu Development Release

    Re: How to have a custom Grub2 menu that is maintenance free

    Quote Originally Posted by bogan View Post
    HI!, Cavsfan,

    I see your latest Grub menu is still using Grub v1.98-1: I thought grub 2 was 1.99.

    With Quantal 12.10 Grub Customizer is a disaster, and I get no recovery options, so I am tempted to try your method; I have studied it with interest in the past, but have not tried it out, as Grub Customer did what I needed.

    Will it work with Grub 2 v2.00 ?? which has files very different from previous versions.

    Edit: I use the following to see what my grub menu will look like : will it work with your system ?
    Code:
    grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0
    Currently mine shows like this:
    Code:
    0    ature_menuentry_id}
         1    _id_option=
         2    _id_option=
         3    entry_id_option
         4    Ubuntu  3.5.0-18 Linux 12.1 (on sda10)
         5    Memory test (memtest86+)
         6    Ubuntu Quantal (12.10) (on USB)
         7    Ubuntu 12.04.1 LTS (12.04)
         8    Ubuntu 12.10 (12.10)
         9    Ubuntu 12.04.1 LTS (12.04)
        10    Ubuntu 12.04.1 LTS (12.04)
        11    Windows 7 (loader) (on /dev/sda1)
        12    Ubuntu 3.2.0-33pae (12.04.1) ( on sda5)
    I have no idea what the first three entries mean, the first [Number 4] and the last, I renamed in grub Customer; entry 6 I( edited in /boot/grub/grub,cfg; whilst entries 7,9, & 10 are spurious duplicates of the sda5 entry, created by update-grub & Grub Customizer

    Chao!, bogan.
    Hi bogan!

    Replace that old command with this one:
    Code:
    grep -e "menuentry " -e "submenu" /boot/grub/grub.cfg | sed 's/^[ \t]*//' | cut -d "'" -f1,2 | nl --starting-line-number=0
    I got that from drs305 just in case you thought I was smart enough to come up with it myself!
    Not sure why but, that old one doesn't even work in Lucid any more!
    However neither can see what is in the submenus of the default grub menu.
    The submenus came with grub 1.99 I believe.

    Here is the output of that command on my system and it looks just like the picture:
    Code:
         0    menuentry "Lucid Lynx" {
         1    menuentry "Lucid Lynx (Recovery Mode)" {
         2    menuentry "Lucid Lynx Generic" {
         3    menuentry "Lucid Lynx Generic (Recovery Mode)" {
         4    menuentry "Precise Pangolin 12.04" {
         5    menuentry "Precise Pangolin 12.04 (Recovery Mode)" {
         6    menuentry "Precise Pangolin Generic 12.04" {
         7    menuentry "Precise Pangolin 12.04 Generic (Recovery Mode)" {
         8    menuentry "Quantal Quetzel 12.10" {
         9    menuentry "Quantal Quetzel 12.10 (Recovery Mode)" {
        10    menuentry "Quantal Quetzel Generic 12.10" {
        11    menuentry "Quantal Quetzel 12.10 Generic (Recovery Mode)" {
        12    menuentry "Windows 7" {
    That picture is on Lucid and it uses grub 1.98, I believe Maverick Meerkat and anything after that and before Quantal uses grub 1.99.
    Quantal uses grub 2.00.

    The wiki is broken down into Lucid at the top (1.3 in the table of contents) and Maverick and later towards the bottom (1.4).
    There are just a couple of differences between 1.99 and 2.00 in 05_debian_theme.
    Pretty much everything else is the same.
    Grub 1.99 gives an erroneous error when selecting windows but, still goes into windows.
    Grub 2.00 does not give any error when selecting windows which is why I am glad Precise is getting grub 2.0 in January. At least that is what I heard.

    The wiki is a lot more straight forward than that How to. It became pretty convoluted and it was closed for editing. The Forum's policy is How Tos should be in wiki format.

    So, be sure and use the wiki on the first post of this thread or in my signature (green links).
    Let me know what you think and if you use it post your grub menu when you are done.

    Thanks for the post!
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Precise 12.04 | Trusty 14.04 | Vivid 15.04 | Mint Rebecca 17 | Windows 7 | All 64 bit

  8. #8
    Join Date
    Aug 2009
    Beans
    3,535
    Distro
    Ubuntu Development Release

    Re: How to have a custom Grub2 menu that is maintenance free

    Here is my current grub2 menu customized on Precise grub 1.99:



    The normal font color is yellow and the highlight font color is white.
    Last edited by Cavsfan; October 30th, 2012 at 03:03 PM.
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Precise 12.04 | Trusty 14.04 | Vivid 15.04 | Mint Rebecca 17 | Windows 7 | All 64 bit

  9. #9
    Join Date
    Aug 2009
    Beans
    3,535
    Distro
    Ubuntu Development Release

    Re: How to have a custom Grub2 menu that is maintenance free

    Here is my current grub2 menu customized on Quantal grub 2.00:



    The normal font color is cyan and the highlight font color is light-red.
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Precise 12.04 | Trusty 14.04 | Vivid 15.04 | Mint Rebecca 17 | Windows 7 | All 64 bit

  10. #10
    Join Date
    Feb 2010
    Location
    Nr BrandsHatch, S'oaks UK
    Beans
    1,241
    Distro
    Lubuntu 13.04 Raring Ringtail

    Re: How to have a custom Grub2 menu that is maintenance free

    Hi!, Cavsfan,

    Thanks for your response, Post #7, for some reason my subscription advisory did not pick it up.

    In Quantal with grub 2.00 and Grub Customizer 3, the 'old command' showed exactly what was displayed on the screen, apart from the first three odd extra bits.

    Weirdly, the 'new command', you suggested, shows not only what is displayed, but in addition, it shows the entries complete with part of the script for each:
    Code:
    alan@alan-MS-7616:~$ grep -e "menuentry " -e "submenu" /boot/grub/grub.cfg | sed 's/^[ \t]*//' | cut -d "'" -f1,2 | nl --starting-line-number=0
         0    menuentry "Ubuntu  3.5.0-18 Linux 12.1 (on sda10)" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b5aab3a2-0086-4a12-9276-46bb5a615038
         1    menuentry "Memory test (memtest86+)" {
         2    menuentry "Ubuntu 12.10 (12.10)" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-cee38717-6980-4485-a047-124edb4d5a23
         3    menuentry "Ubuntu Quantel (12.10) on USB" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-7608b1e5-b5ea-4563-ad94-8cf496b9f95f
         4    menuentry "Ubuntu 3.5.0-18 (12.10) on sdb7 External" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-7608b1e5-b5ea-4563-ad94-8cf496b9f95f
         5    menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os $menuentry_id_option 'osprober-chain-CC9240F39240E394
         6    menuentry "Ubuntu 3.2.0-33pae (12.04.1) ( on sda5)" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-a8ecbe4f-fc2d-40a1-b261-1b62d74e7130
    alan@alan-MS-7616:~$
    Line 2 is actually the entry for the USB OS and line 3, labelled 'USB', is actually a duplicate of the sda5 entry line6, which is very confusing.

    I have had this problem of duplicate entries for some time and Posted about it but got no response; Grub customizer adds them on Saving the configuration.

    As far as I can see, to use your system, I would need to start with virgin installations of all the OSs, none of them having run Grub Customizer, as the duplicates get copied from one OS to another by update-grub.

    Chao!, bogan.
    "Better Solutions may bring Worsened Problems": After Lao Tse, b. circa 405BC. a contemporary of Confucius, who died circa 600BC.
    They did things differently in those days, apparently!!

Page 1 of 27 12311 ... 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
  •