Page 3 of 58 FirstFirst 123451353 ... LastLast
Results 21 to 30 of 580

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

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

    1. Major query on your Wiki,"Making the custom Grub2 Menu entries", versions after Lucid.
    For Lucid this does not apply as there is no 'echo' line, but it emphasises the first 5 lines must not be changed.

    "Editing /etc/grub.d/40_custom:" section.
    Instructions say: "first entry copied & pasted below the 5 lines above."

    Example shows the 'echo' line as line2 between'#/bin/sh' and 'exec tail -n +3 $0'

    2. Which UIID to use for Windows?
    Your 'blkid' shows a single ntfs entry without a label, and the text says "You can see Windows is on sda1," whereas mine shows two entries, the first labeled "System Reseved" and the second "Boot".

    Though Windows is actually on the Boot partition I checked the existing Grub menu script and the Windows entry shows the UUID of System Reserved being set. So I have done the same, as I understand it, the Windows bootloader is on the reserved partition, so that is what mus be set.

    AFAIK. The separate System partition was introduced with Windows Vista, and is standard, perhaps not in XP.

    3. Minor point: The illustration of blkid output with labels, is before the instruction for putting labels in. I found this very confusing at first reading, as my blkid showed partition labels yours did not, and no Linux labels, which yours displayed.

    When I first tried the 'tune2fs -L' command I got a message about 'no magic number, could not find file system', not labeled.

    All changes made except making the grub files not executeable and I am about to reboot and see what the result is.

    Edit: The result was a disaster! This is what I got fromsudo update-grub:
    Code:
     root@alan-MS-7616:~# update-grub
    Generating grub.cfg ...
    Found background: /home/alan/Pictures/Lake_mapourika_NZ.tga
    Found background image: /home/alan/Pictures/Lake_mapourika_NZ.tga
    Found linux image: /boot/vmlinuz-3.5.0-18-generic
    Found initrd image: /boot/initrd.img-3.5.0-18-generic
    Found memtest86+ image: /boot/memtest86+.bin
    Found Windows 7 (loader) on /dev/sda1
    Found Ubuntu 12.10 (12.10) on /dev/sda10
    Found Windows Recovery Environment (loader) on /dev/sda4
    Found Ubuntu 12.04.1 LTS (12.04) on /dev/sda5
    Found Ubuntu 12.10 (12.10) on /dev/sdb7
    error: syntax error.
    error: Incorrect command.
    error: syntax error.
    Syntax error at line 127
    Syntax errors are detected in generated GRUB config file.
    Ensure that there are no errors in /etc/default/grub
    and /etc/grub.d/* files or please file a bug report with
    /boot/grub/grub.cfg.new file attached.done
    root@alan-MS-7616:~#
    I am attaching my 06_custom file, I cannot see anything wrong other than that the (hd0,1) in the Windows entry is between single quotes as your is. [ I commented out the 'echo' line after this error.]

    How can I tell what file the error in line 127 was found?
    Edit2: Line 127 in /boot/grub/grub.cfg was the 'echo' line, with it commented out, sudo update-grub ran as above, but without errors.

    Chao!, bogan.

    The file would not upload, said: 'invalid file': maybe permissions were wrong- so here it is:
    Code:
     #!/bin/sh
    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.
    # echo "Adding Ubuntu Oneiric 10.10, Precise 12.04.1, Quantal 12.10 and Windows 7" >&2
    menuentry "Quantal 12.10 USB sdc2" {
        set root=(hd2,2)
            linux /vmlinuz root=/dev/sdc2 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Quantal 12.10 USB sdc2 (Recovery)" {
        set root=(hd2,2)
            linux /vmlinuz root=/dev/sdc2 ro single
            initrd /initrd.img
    }
    menuentry "Windows 7 on sda2" {
        insmod ntfs
        set root='(hd0,1)'
        search --no-floppy --fs-uuid --set CC9240F39240E394
        chainloader +1
    }
    menuentry "Quantal 12.10 sda10" {
        set root=(hd0,10)
            linux /vmlinuz root=/dev/sda10 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Quantal 12.10 sda10 (Recovery)" {
        set root=(hd0,10)
            linux /vmlinuz root=/dev/sda10 ro single
            initrd /initrd.img
    }
    menuentry "Quantal 12.10 EXT sdb7" {
        set root=(hd1,7)
            linux /vmlinuz root=/dev/sdb7 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Quantal 12.10 EXT sdb7 (Recovery)" {
        set root=(hd1,7)
            linux /vmlinuz root=/dev/sdb7 ro single
            initrd /initrd.img
    }
    menuentry "Precise 11.10 sda5" {
        set root=(hd0,5)
            linux /vmlinuz root=/dev/sda5 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Precise 11.10 sda5 (Recovery)" {
        set root=(hd0,5)
            linux /vmlinuz root=/dev/sda5 ro single
            initrd /initrd.img
    }
    Last edited by bogan; November 2nd, 2012 at 07:52 PM. Reason: Points numbered
    "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. #22
    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!!

  3. #23
    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
    Code:
     #!/bin/sh
    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.
    # echo "Adding Ubuntu Oneiric 10.10, Precise 12.04.1, Quantal 12.10 and Windows 7" >&2
    menuentry "Quantal 12.10 USB sdc2" {
        set root=(hd2,2)
            linux /vmlinuz root=/dev/sdc2 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Quantal 12.10 USB sdc2 (Recovery)" {
        set root=(hd2,2)
            linux /vmlinuz root=/dev/sdc2 ro single
            initrd /initrd.img
    }
    menuentry "Windows 7 on sda2" {
        insmod ntfs
        set root='(hd0,1)'
        search --no-floppy --fs-uuid --set CC9240F39240E394
        chainloader +1
    }
    menuentry "Quantal 12.10 sda10" {
        set root=(hd0,10)
            linux /vmlinuz root=/dev/sda10 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Quantal 12.10 sda10 (Recovery)" {
        set root=(hd0,10)
            linux /vmlinuz root=/dev/sda10 ro single
            initrd /initrd.img
    }
    menuentry "Quantal 12.10 EXT sdb7" {
        set root=(hd1,7)
            linux /vmlinuz root=/dev/sdb7 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Quantal 12.10 EXT sdb7 (Recovery)" {
        set root=(hd1,7)
            linux /vmlinuz root=/dev/sdb7 ro single
            initrd /initrd.img
    }
    menuentry "Precise 11.10 sda5" {
        set root=(hd0,5)
            linux /vmlinuz root=/dev/sda5 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Precise 11.10 sda5 (Recovery)" {
        set root=(hd0,5)
            linux /vmlinuz root=/dev/sda5 ro single
            initrd /initrd.img
    }
    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:

    Code:
    #!/bin/sh
    echo 1>&2 "Adding Ubuntu Lucid Lynx 10.04, Precise Pangolin 12.04, Quantal Quetzal 12.10 and Windows 7"
    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 "Lycid Lynx 10.04" {
        set root=(hd0,2)
            linux /vmlinuz root=/dev/sda2 ro quiet splash
            initrd /initrd.img
    }
    The exec tail -n +4 $0 says to execute the 4th line from the top which should be a menuentry line.
    Since your echo command is commented out, the 4th line in your file is the set statement after the menuentry.

    See if that fixes it. It should.

  4. #24
    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!!

  5. #25
    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 should, perhaps, have mentioned that I have, for safety's sake, conducted what I regard as an experiment, in the 12.10 installation in a SanDisk USB, which has its own Grub active when booted to USB from the Bios boot menu.

    Of course, when the USB 12.10 is booted from the grub menu of my primary OS, sda10, the USB Grub menu also appears.

    I did not see that this matters - and still do not see how it should make any difference - but clearly it does, because........

    I have copy/pasted the 06_custom file from the USB, unchanged, to /etc/grub.d of sd10 and, Lo & Behold !!, all the entries work.

    The only queer thing is that the Recovery entries boot directly to a root prompt without displaying a Recovery menu.

    So the question is: WHY?? and, What alterations are needed to get the USB Ubuntu to recognise the partitions in sda, and find the vmlinuz & initrd.img files? - which are there in /boot/ of the USB, as well as all the other OS's.

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

  6. #26
    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,

    I should, perhaps, have mentioned that I have, for safety's sake, conducted what I regard as an experiment, in the 12.10 installation in a SanDisk USB, which has its own Grub active when booted to USB from the Bios boot menu.

    Of course, when the USB 12.10 is booted from the grub menu of my primary OS, sda10, the USB Grub menu also appears.

    I did not see that this matters - and still do not see how it should make any difference - but clearly it does, because........

    I have copy/pasted the 06_custom file from the USB, unchanged, to /etc/grub.d of sd10 and, Lo & Behold !!, all the entries work.

    The only queer thing is that the Recovery entries boot directly to a root prompt without displaying a Recovery menu.

    So the question is: WHY?? and, What alterations are needed to get the USB Ubuntu to recognise the partitions in sda, and find the vmlinuz & initrd.img files? - which are there in /boot/ of the USB, as well as all the other OS's.

    Chao!, bogan.
    I thought that maybe you had grub on the USB drive and maybe that would not work and I do not expect that it will work.
    Did you install grub on sd10 sudo grub-install /dev/sd10 ?

    For this to work, you have to have grub installed along with the picture and everything else on the same partition.

    The Wiki assumes that you have untouched grub files and that you copy and paste exactly as stated in the wiki.
    Then when you enter sudo update-grub it changes the files a bit as you see them. Like when you look at 06_custom; it is no longer like it says in the wiki because Grub2 has changed it.
    My Quantal install is somewhat finicky when I boot into recovery mode also. A lot of times it just hangs and I have to press the reset button.
    I have had to boot up a couple of times to get it to work correctly. Not really sure when the last time I got into Quantal Recovery but, it should work.

    On Lucid and Precise Recover work no problem - just Quantal doesn't always work.
    I am not real fond of Quantal but, I keep it for the Grub2 version 2.00 and to support it for the wiki.

    Here is my entire output of sudo grub-mkconfig on Quantal:

    Code:
    cavsfan@cavsfan-MS-7529:~$ sudo grub-mkconfig
    [sudo] password for cavsfan: 
    Generating grub.cfg ...
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
      set have_grubenv=true
      load_env
    fi
    set default="12"
    
    if [ x"${feature_menuentry_id}" = xy ]; then
      menuentry_id_option="--id"
    else
      menuentry_id_option=""
    fi
    
    export menuentry_id_option
    
    if [ "${prev_saved_entry}" ]; then
      set saved_entry="${prev_saved_entry}"
      save_env saved_entry
      set prev_saved_entry=
      save_env prev_saved_entry
      set boot_once=true
    fi
    
    function savedefault {
      if [ -z "${boot_once}" ]; then
        saved_entry="${chosen}"
        save_env saved_entry
      fi
    }
    
    function recordfail {
      set recordfail=1
      if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
    }
    
    function load_video {
      if [ x$feature_all_video_module = xy ]; then
        insmod all_video
      else
        insmod efi_gop
        insmod efi_uga
        insmod ieee1275_fb
        insmod vbe
        insmod vga
        insmod video_bochs
        insmod video_cirrus
      fi
    }
    
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos7'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  b5fc902c-0bf0-45b3-95a1-29f3c46dfe6a
    else
      search --no-floppy --fs-uuid --set=root b5fc902c-0bf0-45b3-95a1-29f3c46dfe6a
    fi
    if loadfont /boot/grub/DejaVuSansMono.pf2 ; then
      set gfxmode=1920x1200-24
      load_video
      insmod gfxterm
      set locale_dir=$prefix/locale
      set lang=en_US
      insmod gettext
    fi
    terminal_output gfxterm
    if [ "${recordfail}" = 1 ]; then
      set timeout=-1
    else
      set timeout=60
    fi
    ### END /etc/grub.d/00_header ###
    
    ### BEGIN /etc/grub.d/05_debian_theme ###
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos7'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  b5fc902c-0bf0-45b3-95a1-29f3c46dfe6a
    else
      search --no-floppy --fs-uuid --set=root b5fc902c-0bf0-45b3-95a1-29f3c46dfe6a
    fi
    Found background image: nature-hd-wallpaper_1920x1200.jpg
    insmod jpeg
    if background_image /boot/grub/nature-hd-wallpaper_1920x1200.jpg; then
     set color_normal=cyan/black
     set color_highlight=light-red/black
      true
    else
      set menu_color_normal=white/black
      set menu_color_highlight=black/light-gray
      if background_color 44,0,30; then
        clear
      fi
    fi
    ### END /etc/grub.d/05_debian_theme ###
    
    ### BEGIN /etc/grub.d/06_custom ###
    Adding Ubuntu Lucid Lynx 10.04, Precise Pangolin 12.04, Quantal Quetzal 12.10 and Windows 7
    # 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 "Lycid Lynx 10.04" {
        set root=(hd0,2)
            linux /vmlinuz root=/dev/sda2 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Lycid Lynx 10.04 (Recovery Mode)" {
        set root=(hd0,2)
            linux /vmlinuz root=/dev/sda2 ro single
            initrd /initrd.img
    }
    menuentry "Lycid Lynx Generic 10.04" {
        set root=(hd0,9)
            linux /vmlinuz root=/dev/sda9 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Lycid Lynx Generic 10.04 (Recovery Mode)" {
        set root=(hd0,9)
            linux /vmlinuz root=/dev/sda9 ro single
            initrd /initrd.img
    }
    menuentry "Precise Pangolin 12.04" {
        set root=(hd0,5)
            linux /vmlinuz root=/dev/sda5 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Precise Pangolin 12.04 (Recovery Mode)" {
        set root=(hd0,5)
            linux /vmlinuz root=/dev/sda5 ro single
            initrd /initrd.img
    }
    menuentry "Precise Pangolin Generic 12.04" {
        set root=(hd0,11)
            linux /vmlinuz root=/dev/sda11 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Precise Pangolin Generic 12.04 (Recovery Mode)" {
        set root=(hd0,11)
            linux /vmlinuz root=/dev/sda11 ro single
            initrd /initrd.img
    }
    menuentry "Quantal Quetzal 12.10" {
        set root=(hd0,7)
            linux /vmlinuz root=/dev/sda7 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Quantal Quetzal 12.10 (Recovery Mode)" {
        set root=(hd0,7)
            linux /vmlinuz root=/dev/sda7 ro single
            initrd /initrd.img
    }
    menuentry "Quantal Quetzal Generic 12.10" {
        set root=(hd0,13)
            linux /vmlinuz root=/dev/sda13 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Quantal Quetzal Generic 12.10 (Recovery Mode)" {
        set root=(hd0,13)
            linux /vmlinuz root=/dev/sda13 ro single
            initrd /initrd.img
    }
    menuentry "Windows 7" {
        insmod ntfs
        set root='(hd0,1)'
        search --no-floppy --fs-uuid --set 1CFC7A8DFC7A60C6
        chainloader +1
    }
    ### END /etc/grub.d/06_custom ###
    
    ### BEGIN /etc/grub.d/20_linux_xen ###
    
    ### END /etc/grub.d/20_linux_xen ###
    
    ### BEGIN /etc/grub.d/30_uefi-firmware ###
    ### END /etc/grub.d/30_uefi-firmware ###
    
    ### BEGIN /etc/grub.d/40_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.
    ### END /etc/grub.d/40_custom ###
    
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f  ${config_directory}/custom.cfg ]; then
      source ${config_directory}/custom.cfg
    elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
    As you can see that does not resemble my 06_custom file at all.

  7. #27
    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:
    The Wiki assumes that you have untouched grub files and that you copy and paste exactly as stated in the wiki.
    Then when you enter sudo update-grub it changes the files a bit as you see them. Like when you look at 06_custom; it is no longer like it says in the wiki because Grub2 has changed it.
    And:
    As you can see [ in output of sudo grub-mkconfig ]that does not resemble my 06_custom file at all.
    We do not seem to be on the same wavelength.

    My Grub files [ in both sda10 & sdc2 } are certainly not untouched but I don't think the alterations in any way affect the operation of your system. I did "copy and paste exactly as stated in the wiki."

    I only altered the 'Labels' and 'hdx,x' and 'sdxX' entries. The error in the 'echo' line is in the Wiki.

    Running 'sudo update-grub' has not altered the contents of my 06_custom file at all.

    As far as I can see, the part of 'sudo grub-mkconfig' concerned, is exactly the same as the 06_custom file in Wiki, other than it has many more entries. The same thing applies to the relevant entries in /boot/grub/grub.cfg.
    Did you install grub on sd10 sudo grub-install /dev/sd10 ?
    I did not need to, grub2 was already installed in sda10 as my main OS.

    What I do not understand is that from sda10 your system can find Windows, sda5, sdb7, & sdc2, in Internal HDD, External sata/usb HDD, & Sandisk USB; and from the USB sdc2 can find Windows, & sdb7, but not sda10 or sda5.

    Are you saying, in effect, that there is no way to get your system to work from a bootable external drive with its own grub2 installed?.

    Chao!, bogan.
    Last edited by bogan; November 3rd, 2012 at 10:15 PM. 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!!

  8. #28
    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,

    You Posted: And: We do not seem to be on the same wavelength.

    My Grub files are certainly not untouched but I don't think the alterations in any way affect the operation of your system. I did "copy and paste exactly as stated in the wiki."

    I only altered the 'Labels' and 'hdx,x' and 'sdxX' entries. The error in the 'echo' line is in the Wiki.

    Running 'sudo update-grub' has not altered the contents of my 06_custom file at all.

    As far as I can see, the part of 'sudo grub-mkconfig' concerned, is exactly the same as the 06_custom file in Wiki, other than it has many more entries. The same thing applies to the relevant entries in /boot/grub/grub.cfg. I did not need to, grub2 was already installed in sda10 as my main OS.

    What I do not understand is that from sda10 your system can find Windows, sda5, sdb7, & sdc2, in Internal HDD, External sata/usb HDD, & Sandisk USB; and from the USB sdc2 can find Windows, & sdb7, but not sda10 or sda5.

    Are you saying, in effect, that there is no way to get your system to work from a bootable external drive with its own grub2 installed?.

    Chao!, bogan.
    You were correct about the echo line and I have fixed the Wiki.
    Check it out now. I believe I have it correct.

    I have no idea if one could add this customization to a USB drive but, I also don't understand why you would want to.

    I really prefer to have my grub installed on a primary partition instead of logical ones let alone if I had a USB drive connected.
    Grub-rescue is not something I like to see.

    I have my grub installed on Lucid and will keep it there except to test until I upgrade that to Precise but, I have until April '13 to do so.

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

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

    Bogan, I just tried Quantal Recovery on my custom system and it did not go any where. It just displayed a bunch of stuff and stopped.

    So, I went to my Quantal generic where the grub is untouched and installed grub there.

    I booted into Recovery after that and the menu did come up but, when I selected Failsafe mode, it said something about the files would
    be read only and mounted according to fstab and then stopped. It would not do any thing so I had to press reset.
    While there I double checked fstab and it was correct.
    Luckily I made it back into my Lucid install to install grub.

    So, this custom grub in Quantal does not permit failsafe mode and apparently neither does generic Quantal.

    I didn't try any other options but that must be a bug in Quantal Recovery.

    Edit: You can also label partitions in GParted by clicking on the partition and then label.

    Ciao!
    Last edited by Cavsfan; November 3rd, 2012 at 11:13 PM. Reason: Added edit

  10. #30
    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 last two responses, you Posted:
    I have no idea if one could add this customization to a USB drive but, I also don't understand why you would want to.
    The USB is my emergency backup, its Grub has entries for not only the OS's on this computer but also my other desktop.

    SO, if any of the horrifying crashes I read about in the Forum, occurred to me - so far, at least, I have never had one that prevented me accessing at least one of the Ubuntu OS's - I can do so by Bios booting to the USB in either computer.

    As long as Grub Customizer was working OK - despite the nuisance of duplicate entries - I was able to rename the entries in the menu so I knew which of ten entries was which.

    With GC messing up things in 12.10 and applying name changes I made to the wrong entries, the arrangement, both on my main OS, sda10, and the USB became chaotic, with up to 24 entries all saying: "Ubuntu 12.10 ( 12.10)" without any sdaX mention.

    That is why I decided to try your system, so I could have sensible, meaning-full labels, without having to re-edit '/boot/grub/grub.cfg' every time anything altered, or 'update-grub' was run.

    The normal 12.10 boot to Recovery goes to a drop down menu in Read only mode,; the option to drop to a terminal goes to a root prompt requiring a root password.

    With the two I tried in the custom entries, they went to a text display quite different to any I have previously seen, including a line that said: " system will be reset to Read/Write in the following recovery sequence" [ or words to that effect ] and then went direct to a root text terminal prompt - without needing to login or give a password -
    Code:
     service lightdm start
    then went to the normal greeter login screen.

    I will check out the other recovery boot entries and see if I get anything like you reported.

    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 3 of 58 FirstFirst 123451353 ... 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
  •