Page 10 of 58 FirstFirst ... 8910111220 ... LastLast
Results 91 to 100 of 580

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

  1. #91
    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,

    As I proposed, I deactivated the 06_custom file in the external HDD sb7 12.10 installation, and deleted the spurious entries in /boot/grub/grub.cfg, before running 'update-grub'.

    I then went round all the installations and deleted similar files in each before running each 'update-grub' in turn.
    This resulted in reducing the number of grub menu entries in 12.10, from 44 to 34, and those in 12.04.2 from 88 to 64, though of the latter, only the first few entries are normal and usable, the rest are single lines and either end at: "class os {" or " menuentries option-id".[ or something like that.]

    Best of all it has got rid of the historical old entries for OS's & Partitions that no longer exist, and most of the duplicate entries. So that is a great improvement.

    The spurious '( on /dev/sdxX)' suffixes still occur in the Additional Options sub-menus, but they have no effect; though the altered partition references, in the scripts, cause problems, I just have to remember which work and which need editing.

    It seems clear that the combination of grub 1.99 & 2.00 with multiple drives, results in 12.04 being unable to handle the new sub-menus.

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

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

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

    Quote Originally Posted by bogan View Post
    It seems clear that the combination of grub 1.99 & 2.00 with multiple drives, results in 12.04 being unable to handle the new sub-menus.
    Bogan,
    I am glad you are getting your system sorted out. The custom grub file does not look at any sub-menus.

    The only way a sub-menu would display is if you have 10_linux executable.

    It only looks at whatever you put in 06_custom which can only contain the latest installed kernel on each Ubuntu.
    I do not believe that grub versions interfere with each other on other OSs.
    If you have grub installed on your Precise install, your PC should be using Grub 1.99 and every OS should be looked at by the Grub that is installed on Precise.

    If you have your grub installed on Quantal or Raring then Grub 2.00 will be in control. There is very little difference between 1.99 and 2.00 that I have found.

    The one thing is the error (erroneous) when I select Windows 7. I just press enter or wait and it goes into Windows fine.

    I remember Drs305 trying to help get rid of that erroneous error but, since he did not have any windows os, we did not get there from here.

    But, what I am saying is that when you login to another Ubuntu that does not have the grub installed on and enter sudo update-grub it does not effect the grub that appears at boot.

  3. #93
    Join Date
    Jul 2012
    Beans
    Hidden!

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

    Interesting thread, I will have to try this, Thanks.

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

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

    Quote Originally Posted by offgridguy View Post
    Interesting thread, I will have to try this, Thanks.
    You are welcome. Just a couple of things: when you get to the part that says to edit /etc/grub.d/40_custom be sure and save it as /etc/grub.d/06_custom, leaving /etc/grub.d/40_custom as is.
    Then make it executable and remember to enter sudo update-grub.

    This way you have not really made any drastic changes. The custom menu will display at the top and all of the normal boot entries will display below that.

    When you have made absolute sure everything works as expected in the custom section, then make /etc/grub.d/20_memtest86+, /etc/grub.d/10_linux and /etc/grub.d/30_os-prober unexecutable.

    Then you will have a nice custom screen that appears at boot time and you never have to change it unless you want to or you add or remove a Ubuntu or another OS.
    Or if you upgrade to another version of Ubuntu and the Grub version changes. The wiki has that covered too.
    It works with Ubuntu, Debian, Mint, all Windows OSs and probably others.

  5. #95
    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 elucidation, I was aware of the facts and implications of what you describe, and that, by keeping 30_os-prober executable i was going against your advice.

    I did so because the 06_custom entries for OS's on disks other than the host, would not work, giving ' the kernal must be installed first' or 'initrd file not found' messages.

    You Posted:
    But, what I am saying is that when you login to another Ubuntu that does not have the grub installed on and enter sudo update-grub it does not effect the grub that appears at boot.
    I agree that that is what is supposed to be the case, but the reverse is not the case if both have their 30_os-prober files executable:
    When 'sudo update-grub' is entered in a Ubuntu that does have grub installed on it, but does not have control, and that grub configuration is altered, the next time 'sudo update-grub' is entered in the Ubuntu that does have control, the changes to the non-controlling grub will be reflected in the grub that appears at boot, [And, of course, in the /boot/grub/grub.cfg files in both.]

    That at least is my experience with both of my Desktop computers and is reflected in the improvement in the displayed menus following my described editing exercise.

    it is also inevitable whilst grub takes its data from other drives from their existing files, rather than addressing the hardware & firmware. [Apologies if that is the wrong terminology, and for the convoluted sentences.]

    Chao!, bogan,
    Last edited by bogan; February 19th, 2013 at 09:43 PM. Reason: spelling
    "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!!

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

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

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

    Thanks for your elucidation, I was aware of the facts and implications of what you describe, and that, by keeping 30_os-prober executable i was going against your advice.

    I did so because the 06_custom entries for OS's on disks other than the host, would not work, giving ' the kernal must be installed first' or 'initrd file not found' messages.

    You Posted:I agree that that is what is supposed to be the case, but the reverse is not the case if both have their 30_os-prober files executable:
    When 'sudo update-grub' is entered in a Ubuntu that does have grub installed on it, but does not have control, and that grub configuration is altered, the next time 'sudo update-grub' is entered in the Ubuntu that does have control, the changes to the non-controlling grub will be reflected in the grub that appears at boot, [And, of course, in the /boot/grub/grub.cfg files in both.]

    That at least is my experience with both of my Desktop computers and is reflected in the improvement in the displayed menus following my described editing exercise.

    it is also inevitable whilst grub takes its data from other drives from their existing files, rather than addressing the hardware & firmware. [Apologies if that is the wrong terminology, and for the convoluted sentences.]

    Chao!, bogan,
    Bogan,
    Thanks for that explication. It does make sense that sudo update-grub would have an effect on 30_os-prober and/or 10_linux as well as the grub.cfg file when other drives with Ubuntus installed on them are involved.
    As update-grub would definitely have to examine those other drives and include what it finds.

    I was just thinking about the 06_custom file by itself along with only one drive. It cannot be altered by another Ubuntu.
    I have edited another Ubuntu's 06_custom file but, I knew that executing sudo update-grub would have to be performed while in that OS.

    You must have a fairly prodigious system with so many installations.
    I only have a 500GB drive with all of my systems on it. I have a 1TB USB drive but, I only use it for backing my windows 7 installation up which is done automatically once per week.
    Of course I also use it to backup my Ubuntus if I need to re-install.

    So, I guess you have your Grub all corrected now pointing to the right installs?

  7. #97
    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:
    So, I guess you have your Grub all corrected now pointing to the right installs?
    I wish!

    The 06_custom entries now, and the other entries on the main OS grub menu, are all Ok, and the Additional Options sub menus are mostly correct. All the entries are OK in the USB stick.

    The two 12.04 OS's on the Internal HDD are only correct for the host OS , Windows, & Mem test; the rest, all 58 of them, are garbage. An example of what they produce is this:
    Code:
    >   65    menuentry "Precise 12.04.2 sda8 (on /dev/sda10)' --class gnu-linux --class gnu --class os $menuentry_id_option 
        66    menuentry "Precise 12.04.2 sda8 (Recovery) (on /dev/sda10)' --class gnu-linux --class gnu --class os $menuentry_id_option 
        67    menuentry "Ubuntu (on /dev/sda10)' --class gnu-linux --class gnu --class os $menuentry_id_option 
        68    menuentry "Ubuntu, with Linux 3.5.0-24-generic (on /dev/sda10)' --class gnu-linux --class gnu --class os $menuentry_id_option 
        69    menuentry "Ubuntu, with Linux 3.5.0-24-generic (recovery mode) (on /dev/sda10)' --class gnu-linux --class gnu --class os $menuentry_id_option
    However, as the only time I use those grubs is following a kernal or grub update, I can live with that.

    In all this, two of the things I have learnt are perhaps important enough to pass on in the Wicki:

    First:
    With multiple OS's on multiple drives capable of being booted from Bios boot selection, only the main OS should have 06_custom files activated, to avoid confusion. Especially if a drive is on a mobile HDD or USB stick,used with multiple computers.
    This is because the 'sdxX' mount settings alter according to which drive is selected to boot from. For example: my USB back-up OS stick, can be sda, sdc, or sdf.

    Second:
    The 'spurious' suffixes on groups of menu entries, eg ( on sdb7) are not spurious at all, they tell you from which partition Grub got the data in that section, they do not have any effect on operation.

    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. #98
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

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

    Thanks Bogan. I'll try to incorporate that 1st one into the wiki when I can.
    I don't really understand the 2nd one.

    I have always been of the opinion that your main install should have the grub installed on it.
    But, because Precise uses Grub 1.99 which gives that error when selecting windows,
    I installed my grub on Quantal Quetzal 10.10 install which uses grub 2.00.

    This is just my opinion but, I believe one should keep it simple and have all of your installs on one drive.

    However having said that it is totally up to each individual but, perhaps this custom Grub setup may not
    be for those as yourself who have usb sticks, etc. connected with operating systems installed on them.

    But, what would you have if you made all of your 06_custom files unexecutable and 10_linux and 30_os-prober files executable?
    I believe you said it would be a huge mess.
    That is not the fault of this wiki's effects. Didn't you say you had used grub-customizer and have things left over from that?
    It would seem to be an inherent problem to Ubuntu/Linux having a combination of hard drives, usb sticks, etc. with many Ubuntus installed on them

    I have a 500GB drive: about 300GB is used by windows 7, about 60 or 80GB for my main Precise install and approximately 20GB set aside for each of my other 4 Ubuntus.
    I could even free up more from my windows partition if I wanted.

    But, I don't use all 5 Ubuntus. I have them installed so I can try to keep up with the wiki.
    So, why have so many installs? That is a rhetorical question but, you see my point.

  9. #99
    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:
    Code:
     So, why have so many installs?
    In order to answer forum queries with info relevant to the OP's actual situation, and in order to back-up and to transfer data from one computer to another, which are not on the same network, and without Internet or Cloud.

    I agree that I am sure some of my problems resulted from Grub Customizer not being able to deal with the Grub2 Additional Options sub-menus. I have not tried the latest version of GC - too risky.

    The one thing I really do not understand is that some of the corruption was from entries for OS's and partitions that have not existed for months, if not years.

    If I had a choice, I would only have Grub on the main OS of the main HDD and the USB; but I do not have that choice as kernal updates reinstall and update the Grub in the OS being updated.

    Chao!, bogan.
    Last edited by bogan; February 21st, 2013 at 10:37 AM. Reason: correction
    "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. #100
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

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

    I always turn off os-prober and just use my own 40_custom. But I do not boot into my other installs often, and most of them I have set to install to sda, but my BIOS boots from sdc, so any reinstall to sda does not matter.

    But someone posted that if you uncheck (with spacebar) all entries, grub will not reinstall to any MBR. I have not tried it.

    #to get grub2 to remember where to reinstall on updates:
    sudo dpkg-reconfigure grub-pc
    #Enter thru first pages,spacebar to choose/unchoose drive, enter to accept, do not choose partitions


    #To see what drive grub2 uses see this - grub-pc/install_devices:
    sudo debconf-show grub-pc
    sudo grub-probe -t device /boot/grub
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

Page 10 of 58 FirstFirst ... 8910111220 ... 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
  •