Page 3 of 24 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 236

Thread: Grub 2 Title Tweaks Thread

  1. #21
    Join Date
    Mar 2007
    Beans
    676
    Distro
    Ubuntu Development Release

    Re: Grub 2 Title Tweaks Thread

    The memtest line with 115200 in it is explicitly inserted by 20_memtest86+. I guess it's another option the dev decided to make available.

    We could comment it out, but that would only work until the next upgrade. I don't think any fancy script stuff is needed.
    Sony vaio vgn-fw235j; Synaptics touchpad; triple boot: mint 12 64-bit; Precise 64-bit & Saucy 64-bit. 2TB external USB drive with more...

  2. #22
    Join Date
    Nov 2005
    Beans
    50

    Re: Grub 2 Title Tweaks Thread

    Hi, nice how-to!

    1 question:
    My GRUB loads 2x Windows Vista:
    Windows Vista (loader) (on /dev/sda1)
    Windows Vista (loader) (on /dev/sda2)

    From which the 1st is the recovery partition, and the second the working one.

    Changing the filename from the how-to changes them both (is the same name)

    Is there a quick way to rename 1 to 'rescue' and leave the other one to 'loader'?

  3. #23
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Title Tweaks Thread

    Quote Originally Posted by Evil Dax View Post
    Hi, nice how-to!

    1 question:
    My GRUB loads 2x Windows Vista:
    Windows Vista (loader) (on /dev/sda1)
    Windows Vista (loader) (on /dev/sda2)

    From which the 1st is the recovery partition, and the second the working one.

    Changing the filename from the how-to changes them both (is the same name)

    Is there a quick way to rename 1 to 'rescue' and leave the other one to 'loader'?
    Evil Dax,

    Let me state outright that my knowledge of scripting is very limited. However, what you want should be easily attained by combining two conditionals.

    From the Windows section:
    if [ "${LONGNAME}" = "Enter Exact Title You Just Copied" ] ; then
    LONGNAME="Enter Desired New Title Here"
    elif [ -z "${LONGNAME}" ] ; then
    LONGNAME="${LABEL}"
    fi
    You would alter the first line to include a second condition, that being that ${DEVICE} is equal to either sda1 (or sda2).

    So the conditional statement would be:

    Added: Stop the presses: go to post #31 for the formula he successfully used...

    if [[ "${LONGNAME}" = "Enter Exact Title You Just Copied" && "${DEVICE}" = "/dev/sda1" ]] ; then
    LONGNAME="Enter Desired New Title Here"
    elif [ -z "${LONGNAME}" ] ; then
    LONGNAME="${LABEL}"
    fi
    The syntax may not be exactly right (I don't have the time to look it up at the moment) but you should get the idea. You would have to work out something for the other OS as well, another "elif" for instance.
    Last edited by drs305; October 20th, 2009 at 07:42 PM.
    Back to Xorg...

    Retired.

  4. #24
    Join Date
    Apr 2006
    Location
    Galax,Va. USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Title Tweaks Thread

    Here is a nice one for somebody. I've been working with Grub 2 and I'm starting to get the hang of it but I do have a question. I also have Kubuntu installed. I would always edit the menu.lst to change Ubuntu to Kubuntu but now it does not seem to keep the Kubuntu title whenever I update Kubuntu or Ubuntu. Is there anyway at this time to keep the Kubuntu title?

    Also, nice thread.
    Iguana

    Registered Linux User #490719

  5. #25
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Title Tweaks Thread

    Quote Originally Posted by Eddie Wilson View Post
    I would always edit the menu.lst to change Ubuntu to Kubuntu but now it does not seem to keep the Kubuntu title whenever I update Kubuntu or Ubuntu. Is there anyway at this time to keep the Kubuntu title?
    Eddie,

    I tried the "lsb_release -a" command but it returns "Ubuntu". If there is a command that returns a value of "Kubuntu" a variable could easily be added into 10_linux.

    If you don't have any Ubuntu releases that you want to see, you could change all the Ubuntu listings to "Kubuntu". Again, this isn't elegant, but it would work. It looks for any {OS} named "Ubuntu" and replaces it with variable newname, which is "Kubuntu".

    Make a backup of 10_linux first: sudo cp /etc/grub.d/10_linux /etc/grub.d/10_linux && sudo chmod -x /etc/grub.d/10_linux

    In /etc/grub.d/10_linux, around line 115:

    if [ ${OS}="Ubuntu" ] ; then
    newname="Kubuntu"
    fi


    linux_entry "$newname ${version}" \
    "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_EXTRA} ${GRUB_CMDLINE_LINUX_DEFAULT}" \
    quiet
    if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
    linux_entry "$newname, Linux ${version} (recovery mode)" \
    "single ${GRUB_CMDLINE_LINUX}"
    fi
    A less desirable option would be to create an "06_custom" file and put the entry in manually, but that menu wouldn't be updated automatically.

    Perhaps someone will provide a command or another solution.
    Last edited by drs305; May 20th, 2010 at 06:42 PM. Reason: typo
    Back to Xorg...

    Retired.

  6. #26
    Join Date
    Aug 2008
    Location
    South East Montana
    Beans
    6,153

    Re: Grub 2 Title Tweaks Thread

    I would use the 06_custom file route. By using this entry, suitably edited to your partition, you will NEVER have to update, it will boot the newest kernel on the partition;
    Code:
    echo "Kubuntu 9.10 on sda22" >&2
    cat << EOF
    menuentry "Kubuntu 9.10 on sda22" {
            set root=(hd0,22)
            linux /vmlinuz root=/dev/sda22 so quiet splash
            initrd /initrd.img
    }
    EOF
    Dell 480 XPS 3G ram Quad Core 2.40GHz, Radeon HD 2400 PRO, Audigy1, 3x320G HDD, 320G External, Debian Testing for use, Debian Squeeze for secure use, Debian Sid for FUN

  7. #27
    Join Date
    Apr 2008
    Location
    Southern California, USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Title Tweaks Thread

    Quote Originally Posted by ranch hand View Post
    I would use the 06_custom file route. By using this entry, suitably edited to your partition, you will NEVER have to update, it will boot the newest kernel on the partition;
    Code:
    echo "Kubuntu 9.10 on sda22" >&2
    cat << EOF
    menuentry "Kubuntu 9.10 on sda22" {
            set root=(hd0,22)
            linux /vmlinuz root=/dev/sda22 so quiet splash
            initrd /initrd.img
    }
    EOF
    I also prefer this method now too. I wish Fedora and the rest of Linux distro's would follow suite. Makes it very convenient.

  8. #28
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Title Tweaks Thread

    Quote Originally Posted by VMC View Post
    I also prefer this method now too. I wish Fedora and the rest of Linux distro's would follow suite. Makes it very convenient.
    I like it too. In fact, I'm going to add a section to the original post for Custom Menu tweaks. This will be the first one - with attribution of course!
    Back to Xorg...

    Retired.

  9. #29
    Join Date
    Aug 2008
    Location
    South East Montana
    Beans
    6,153

    Re: Grub 2 Title Tweaks Thread

    Quote Originally Posted by drs305 View Post
    I like it too. In fact, I'm going to add a section to the original post for Custom Menu tweaks. This will be the first one - with attribution of course!
    See Hermans bit on menu entries. That is the best explaination I have found. It sure is handy.

    I have change OS' on a set of partitions and not had to change the entry. I did go back and change the buggers, the titles were not right any more, but that doesn't stop it from booting to the partition. It is cool, I love it.
    Dell 480 XPS 3G ram Quad Core 2.40GHz, Radeon HD 2400 PRO, Audigy1, 3x320G HDD, 320G External, Debian Testing for use, Debian Squeeze for secure use, Debian Sid for FUN

  10. #30
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Title Tweaks Thread

    Quote Originally Posted by ranch hand View Post
    See Hermans bit on menu entries. That is the best explaination I have found. It sure is handy.
    I visit his site often. It's a great resource and I've linked it on my main Grub 2 thread. Since I don't have a "Links" section on this page (at least not yet), here it is.


    http://members.iinet.net/~herman546/p20.html

    Worthwhile reading for anyone interested in bootloaders. Well, maybe that isn't the best choice of words, but an incredible amount of information if you want to learn more or are having problems booting.
    Back to Xorg...

    Retired.

Page 3 of 24 FirstFirst 1234513 ... 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
  •