Page 5 of 58 FirstFirst ... 345671555 ... LastLast
Results 41 to 50 of 580

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

  1. #41
    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 set up your system in my main computer, and, for some unknown reason, 'tune2fs' limited any Labels to 16 characters, truncating anything longer.

    I also discovered why I had problems with a combination of internal HDD, external eSata /usb HDD and an USB Sandisk.

    When I set things up the SanDisk was sdb, the eSata HDD was sdc. and the Ubuntu on the internal HDD was sde.

    Later, when I started up again, I plugged the USB [ for safety ] into a socket on the back panel, instead of one on the front, [ as it had been ].

    That must have been connected to an USB hub with a higher priority, with the result that when booted, the USB SanDisk was sda, the eSata was sde, and the HDD was sdf.

    So while the orthodox system still worked using disk ID's, your system could not find the partitions it was looking for.

    In other words it is essential that all drives are plugged in to the same sockets as when set-up.

    The sdx's I am stating from memory, so they may not be entirely correct, but you will get the idea.

    Incidently, a bit off topic, I have Posted in several threads a warning about the 310 nvidia driver with 6xxx & 7xxx series cards:
    http://ubuntuforums.org/showthread.php?t=1743535

    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. #42
    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 set up your system in my main computer, and, for some unknown reason, 'tune2fs' limited any Labels to 16 characters, truncating anything longer.

    I also discovered why I had problems with a combination of internal HDD, external eSata /usb HDD and an USB Sandisk.

    When I set things up the SanDisk was sdb, the eSata HDD was sdc. and the Ubuntu on the internal HDD was sde.

    Later, when I started up again, I plugged the USB [ for safety ] into a socket on the back panel, instead of one on the front, [ as it had been ].

    That must have been connected to an USB hub with a higher priority, with the result that when booted, the USB SanDisk was sda, the eSata was sde, and the HDD was sdf.

    So while the orthodox system still worked using disk ID's, your system could not find the partitions it was looking for.

    In other words it is essential that all drives are plugged in to the same sockets as when set-up.

    The sdx's I am stating from memory, so they may not be entirely correct, but you will get the idea.

    Incidently, a bit off topic, I have Posted in several threads a warning about the 310 nvidia driver with 6xxx & 7xxx series cards:
    http://ubuntuforums.org/showthread.php?t=1743535

    Chao!, bogan.
    Thanks for that info bogan! I can imagine that if you did something to alter the partitions that could cause chaos.
    I don't really suggest using any USB drives but, if you do I suggest always plugging them back in the same place they
    were initially plugged in if you have included them in this customization.

    I have one USB drive - a 1TB drive which I use for backup. I never unplug it and it always has power.
    It is formatted NTFS so it works well with both windows and Ubuntu.
    My PC just goes to sleep or suspends after an hour of no use.

    About the Nvidia drivers, I have not added any drivers to any of my installs except Lucid.
    With Lucid it was a piece of cake but, I have not been successful with any other version of Ubuntu at upgrading the driver.

    I tried the xswat ppa on Precise and that ended in a clean install. Thankfully that was on a test install.
    But, I learned my lesson: as you said the xswat ppa works for some and not for others.
    It only takes one time for me. I have a Geforce 9800 GT.

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

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

    Something else I found out is that when you re-install a Ubuntu or install more than one, the fstab pulls in the ext4 where it was installed as
    well as where it is now installed. Every swapfile gets pulled into fstab also.

    If you have multiple Ubuntus like I do (6) that makes the boot menu look really bad after initially installing a 2nd, 3rd or re-installing any of them.
    My default grub2 menu after installing Precise and Quantal had everything on sda2 where my good Lucid install is. I knew something was weird from
    that. It said Lucid was on sda2, Precise was on sda2, Quantal was on sda2!

    Luckily after cleaning up all of the /etc/fstab files on each and every one, they all point to the correct partitions now.

    That is also mentioned in the wiki - cleaning up fstab.

  4. #44
    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
    I set up your system in my main computer, and, for some unknown reason, 'tune2fs' limited any Labels to 16 characters, truncating anything longer.
    I looked at the man page for tune2fs and it mentions a 16 character limit.
    Although it mentioned ext2 file systems, I believe it still holds true.

    I also don't think it likes spaces but, am not absolutely certain.
    My "Quantal-Generic" label kept disappearing.
    Not sure if it was caused by a space or not but, it has stuck for quite a while now.

    I initially thought there was a limit on partitions you could label but, I don't think that is true either.

  5. #45
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

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

    It gets more confusing with gpt(GUID). Now there are two labels. One is the gpt partition and the other is the file system.

    My older Maverick label or MAVERICK gpt partition label. I now use the same label for both as I do not know for sure which tools show which label.
    Attached Images Attached Images
    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.

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

    The first time I tried 'tune2fs' it allowed me to use "Quantal 12.10 EXT sdb7 Recovery"- 30 Characters - the second time only 16, that's why I mentioned it.

    The only partitions it would not let me Label were the Swaps, and empty Partitions, it complained it could not find a file system.
    ScreenshotLabels.jpg

    Edit: I have not had any problems with spaces, as long as I use double quotes to enclose the whole Label, though I did not use any in the Screenshot.

    Chao!, bogan.
    Last edited by bogan; November 19th, 2012 at 07:50 PM. Reason: spaces note added, screenshot 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. #47
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

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

    I see what you mean oldfred with the 2 labels. I noticed that you can also label the partitions in GParted as well as with the command.

    And bogan I see you are right. I labeled my one partition "Lucid Generic" with a space and it took.
    EDIT: I didn't know that you had tried 30 characters. I looked in Lucid and in Quantal at the man page and it mentioned 16 char limit.

    I labelled Quantal-Generic a dozen times and each time it would disappear for some reason that I didn't understand.
    So, I kept re-labelling it and I guess at some point it gave up and took the label.

    You can see how my partitions are all labelled on page 4 post #40 and here is what they look like in GParted:

    Gparted2012-11-19.png
    Last edited by Cavsfan; November 19th, 2012 at 08:48 PM. Reason: added edit

  8. #48
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

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

    The old How To that this thread has evolved from is now closed.
    It has links pointing to this thread.

    The old How to had some errors in it, which I could not fix because of the change in policy.
    However the Wiki in my signature and on the 1st post of this thread works very well on all versions of grub2.
    I have had Debian Squeeze installed and it worked well with that too.

    Feel free to post any screenshots of your custom grub2 screens, questions, problems or any thing else concerning the WIki here.

  9. #49
    Join Date
    Jun 2012
    Beans
    34

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

    Cavsfan,

    Glad to see you got the previous thread up into a Wiki. VERY nice, and much easier to read/understand, that's for sure!

    Just did the process on my dual-boot Windows 7 / Linux Mint 13, and have a question on some of the menu entries.

    Currently, when I boot, my grub shows my normal Linux and Linux recovery mode options, a previous kernel option, Windows 7, and then three other Windows 7 options: one for the recovery environment (which I want to keep) on sda4, one that points to the small "SYSTEM" partition on sda1 but still boots into Windows 7 directly when I select it, and one that points to sda2 (so basically a repeat of my custom entry for Windows 7). I want to get rid of those last two but keep the recovery environment option. Is there any way to do that?

    Here's my blkid output:

    Code:
    /dev/sda1: LABEL="System" UUID="E034F94D34F92766" TYPE="ntfs" 
    /dev/sda2: LABEL="TI106231W0C" UUID="32FC2690FC264E83" TYPE="ntfs" 
    /dev/sda4: LABEL="HDDRECOVERY" UUID="38F653DCF6539948" TYPE="ntfs" 
    /dev/sda5: UUID="2f60dfb5-580e-4508-a50c-345a04aed051" TYPE="ext4" 
    /dev/sda6: UUID="6e9ac2d0-0427-43ca-90ab-24656665b14d" TYPE="swap" 
    /dev/sda7: LABEL="Data" UUID="C61606BE1606B00B" TYPE="ntfs" 
    /dev/sdb1: LABEL="MyPassport" UUID="16DC46E5DC46BF2D" TYPE="ntfs"
    And my custom_06 file:

    Code:
    #!/bin/sh
    echo 1>&2 "Adding LinuxMint Maya 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 "LinuxMint 13 - Maya" {
        set root=(hd0,5)
            linux /vmlinuz root=/dev/sda5 ro quiet splash
            initrd /initrd.img
    }
    menuentry "LinuxMint 13 - Maya (Recovery Mode)" {
        set root=(hd0,5)
            linux /vmlinuz root=/dev/sda5 ro single
            initrd /initrd.img
    }
    menuentry "Windows 7" {
        insmod ntfs
        set root='(hd0,2)'
        search --no-floppy --fs-uuid --set 32FC2690FC264E83
        chainloader +1
    }
    And then when I ran that grep command I saw a few posts back, here's the output:
    Code:
    0    menuentry "LinuxMint 13 - Maya" {
         1    menuentry "LinuxMint 13 - Maya (Recovery Mode)" {
         2    menuentry "Windows 7" {
         3    menuentry 'Linux Mint 13 Cinnamon 64-bit, 3.2.0-33-generic (/dev/sda5)
         4    menuentry 'Linux Mint 13 Cinnamon 64-bit, 3.2.0-33-generic (/dev/sda5) -- recovery mode
         5    submenu "Previous Linux versions" {
         6    menuentry 'Linux Mint 13 Cinnamon 64-bit, 3.2.0-32-generic (/dev/sda5)
         7    menuentry 'Linux Mint 13 Cinnamon 64-bit, 3.2.0-32-generic (/dev/sda5) -- recovery mode
         8    menuentry 'Linux Mint 13 Cinnamon 64-bit, 3.2.0-23-generic (/dev/sda5)
         9    menuentry 'Linux Mint 13 Cinnamon 64-bit, 3.2.0-23-generic (/dev/sda5) -- recovery mode
        10    menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
        11    menuentry "Windows 7 (loader) (on /dev/sda2)" --class windows --class os {
        12    menuentry "Windows Recovery Environment (loader) (on /dev/sda4)" --class windows --class os {
    So I want to get rid of 10 and 11 but not 12. If I chmod -x the os_prober, I'm afraid it'll get rid of the WRE option. Am I right? And if so, is there a way, again, to get rid of 10 and 11 but keep 12? I'm thinking I could do another entry like my Windows 7 one, just change the uuid and the root, but what about the search and chainloader commands? Anything extra I would need to put in since it's a recovery environment?

  10. #50
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

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

    Are you sure you want to keep 12. That is the vendor recovery which erases your entire drive. Best never to accidentally run it.

    Both Windows and the Vendor call there partitions recovery. I really consider the 100MB Windows the boot/repair partition. And you can delete that if you have a separate Windows repairCD and can boot directly in the Windows main c: drive.

    Once you make a set of vendor recovery DVDs you do not even need the Vendor recovery and it is better to have a backup of Windows.

    I suggest backing up grub.cfg. And copy any additional entries you want into 40 custom or where you want then. Then turn off os-prober. You can turn it back on if you want it to find a new install, copy an entry and then turn off again.

    The vendor recovery DVDs are just an image of your drive as purchased. If you have housecleaned a lot of cruft normally included, run many updates with many reboots, and added software you may want a full back up.
    Backup windows before install - post by Mark Phelps
    http://ubuntuforums.org/showthread.php?t=2040149
    http://ubuntuforums.org/showthread.php?t=1626990
    http://www.macrium.com/reflectfree.asp
    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 5 of 58 FirstFirst ... 345671555 ... 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
  •