Page 1 of 11 123 ... LastLast
Results 1 to 10 of 260

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

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Beans
    3,398
    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
    Ubuntu 12.04 | 14.04 | 14.10 Mate | 15.04 Mate | Mint 13 | Mint 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,398
    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
    Ubuntu 12.04 | 14.04 | 14.10 Mate | 15.04 Mate | Mint 13 | Mint 17 | Windows 7 | All 64 bit

  4. #4
    Join Date
    Aug 2009
    Beans
    3,398
    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
    Ubuntu 12.04 | 14.04 | 14.10 Mate | 15.04 Mate | Mint 13 | Mint 17 | Windows 7 | All 64 bit

  5. #5
    Join Date
    Aug 2009
    Beans
    3,398
    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
    Ubuntu 12.04 | 14.04 | 14.10 Mate | 15.04 Mate | Mint 13 | Mint 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 copy/pasted the contents of /etc/fstab and Posted it, [after deleting the text paragraph to make it smaller - the " [Text deleted]" was my addition -.

    This morning after reading your two Posts, I went to /etc/fstab in all the Ubuntu installations on this computer and found most of them had 3 or 4 extra swap entries, which I deleted.

    Edit. Some of them were for partitions on HDDisks that no longer exist!

    It will be interesting to see if it makes any difference.

    Running the 'new command' on an OS that had not run grub Customizer worked correctly, showing all the Alternative options and partition labels.

    Could you please explain the command "sudo tune2fs -L Quantal /dev/sda7"
    Where, in what file does it place the title?
    Does it have to be run from each of the Os to be titled?
    Will it work in the standard Grub2 +Grub Customizer set-up? or only with your system?

    I guess I need to study your Wiki in more detail.

    Chao!, bogan.

    .
    Last edited by bogan; October 31st, 2012 at 01:52 PM. Reason: note added
    "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
    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 again. I am not sure what to look for in /etc/fstab, it looks much like yours except there is a entry for /home, and for some reason it also lists the Swap from the 12.10 USB, but not the one from 12.10 sdb7 [perhaps the later was not mounted].
    Code:
    alan@alan-MS-7616:~$ cat /etc/fstab
    # /etc/fstab: static file system information.
    #
    [Text deleted]
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # / was on /dev/sda10 during installation
    UUID=b5aab3a2-0086-4a12-9276-46bb5a615038 /               ext4    errors=remount-ro 0       1
    # /home was on /dev/sda11 during installation
    UUID=adc771a1-313c-47ae-8725-3c89b89bbfa2 /home           ext4    defaults        0       2
    # swap was on /dev/sda6 during installation
    UUID=a74af1d9-f7f9-4453-97e7-b9e3f370dca4 none            swap    sw              0       0
    # swap was on /dev/sdb3 during installation
    UUID=9a74bb15-1215-4774-8419-f2908ee62d2e none            swap    sw              0       0
    alan@alan-MS-7616:~$
    I have one virgin 12.10 installation in which I deliberately did not run Grub Customizer, so it would be 12.04.1 for which I might need the grub files.

    Presumably I will need to replace the files in all the other installations, as they interact; as well as deleting all the Grub Customizer files.

    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!!

  8. #8
    Join Date
    Aug 2009
    Beans
    3,398
    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,

    Thanks again. I am not sure what to look for in /etc/fstab, it looks much like yours except there is a entry for /home, and for some reason it also lists the Swap from the 12.10 USB, but not the one from 12.10 sdb7 [perhaps the later was not mounted].
    Code:
    alan@alan-MS-7616:~$ cat /etc/fstab
    # /etc/fstab: static file system information.
    #
    [Text deleted]
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # / was on /dev/sda10 during installation
    UUID=b5aab3a2-0086-4a12-9276-46bb5a615038 /               ext4    errors=remount-ro 0       1
    # /home was on /dev/sda11 during installation
    UUID=adc771a1-313c-47ae-8725-3c89b89bbfa2 /home           ext4    defaults        0       2
    # swap was on /dev/sda6 during installation
    UUID=a74af1d9-f7f9-4453-97e7-b9e3f370dca4 none            swap    sw              0       0
    # swap was on /dev/sdb3 during installation
    UUID=9a74bb15-1215-4774-8419-f2908ee62d2e none            swap    sw              0       0
    alan@alan-MS-7616:~$
    I have one virgin 12.10 installation in which I deliberately did not run Grub Customizer, so it would be 12.04.1 for which I might need the grub files.

    Presumably I will need to replace the files in all the other installations, as they interact; as well as deleting all the Grub Customizer files.

    Chao!, bogan.
    Bogan,
    You should only have whatever is for the system you are logged into in fstab.
    It looks like you have 2 swaps and you should only have one. If you originally set it up with / and home, you should have those 2 plus the swap file for that system.

    You should also not have that [Text deleted] comment as it does not have # before it.
    As I installed each additional system fstab pulled in all of the swap files and I had to edit it gksu gedit /etc/fstab each time.

    Labelling the partition is especially helpful when you have multiple systems.
    It is mentioned in 1.6 of the wiki but, here is the command:
    sudo tune2fs -L Quantal /dev/sda7
    You can probably use the files I posted above. Let me know if you need anything else.

    Ciao!
    Check Java Version | Install Java via WEB UPD8 PPA
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Ubuntu 12.04 | 14.04 | 14.10 Mate | 15.04 Mate | Mint 13 | Mint 17 | Windows 7 | All 64 bit

  9. #9
    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,

    You Posted:
    Enter gksu gedit /etc/grub.d/06_custom and remove the red # above and then enter sudo update-grub then the file should look similar to the one below:
    I did as you suggested, and, as I expected, that brought back the Syntax error in Line 127.;
    The echo line copied from the Wiki is :
    echo "Adding Ubuntu Lucid Lynx 10.04, Precise Pangolin 12.04, Quantal Quetzal 12.10 and Windows 7" >&2
    Whereas from your Post is:
    echo 1>&2 "Adding Ubuntu Lucid Lynx 10.04, Precise Pangolin 12.04, Quantal Quetzal 12.10 and Windows 7"
    Adding the '1' to the last phrase, to make it:"xxxx Windows 7" 1>&2", still gave the Syntax error.
    Placing the echo line as line 2 and putting the '1>&2' after 'echo', deleting the last phrase, got rid of the Syntax error.

    Despite the apparent logic of your explanation, that is not what happened. The first entry was, and still is, correct.

    At present, after the above changes, the part of /boot/grub/grub.cfg that is produced is:
    Code:
    ### BEGIN /etc/grub.d/06_custom ###
    # 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 "Quantal 12.10 USB sdc2" {
        set root='hd2,2'
            linux /vmlinuz root=/dev/sdc2 ro quiet splash
            initrd /initrd.img
    }
    Before, with the echo line commented out after the three text lines, it was printed out, but the first line " This file xxxxxx" was ommited.; note that the content of the echo line is not reproduced

    The menu display remains the same andnone of the Ubuntu entries will work, behaving exactly as described in my last Post.

    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!!

  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,

    First the good news: The new menu entries are AOK.

    The new Windows menu entry works correctly, no error messages and no problems.

    The bad news is: None of the Ubuntu entries work.

    The sda10 & sda5 entries both say: 'No such partition', the others say: '"/vmlinuz not found".
    Edit: Altering it to "/boot/vmlinuz" did not help, nor did adding the suffix '-3.5.0-18-generic'.
    All the Ubuntu entries say: "Error: need to load the kernal first"

    I am going to try altering (hd0,5) to (hd0,msdos5) & enclosing it in single quotes like the Windows entry.
    Edit: neither changed anything.

    Any advice earnestly awaited.

    My guess is the Syntax error was because the alteration to the tail line was for the echo line to be line 2, or is it in the echo line itself.
    Chao!, bogan.
    Last edited by bogan; November 2nd, 2012 at 09:39 PM. Reason: Updated
    "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 11 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
  •