Page 12 of 24 FirstFirst ... 2101112131422 ... LastLast
Results 111 to 120 of 236

Thread: Grub 2 Title Tweaks Thread

  1. #111
    Join Date
    Jun 2009
    Beans
    24
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Grub 2 Title Tweaks Thread

    Quote Originally Posted by drs305 View Post
    I imported your 10_linux file into my system and ran update-grub. It generated an error message about "quiet" but the problem really lies in this line:


    Change it to the following, adding a space between false and \. Then run "sudo update-grub" and see if that fixes things for you:
    Well, it didn't work. I still get "Ubuntu, with Linux false"

    On a whim, I tried removing the "false"

    The "false" went away, replaced by "quiet splash"

    So, I tried removing the "quiet" on the line following the "false"

    It hated that. Made the menu say "Ubuntu, with Linux (recovery mode)... which, well, it wasn't recovery mode when it booted.


    I'm even more than I was before!

  2. #112
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Title Tweaks Thread

    ssaint04,

    Here is your modified file which produces "Ubuntu " for the 10_linux entry. I kept getting error messages by removing the ${version} entry so I just made it a blank instead. (I'm not a scripter, so I can't say it's pretty, but it seems to work.)

    The lines in bold are the ones I changed, but the easiest way to incorporate this is to just copy/paste.

    Code:
    #! /bin/sh -e
    
    # grub-mkconfig helper script.
    # Copyright (C) 2006,2007,2008,2009,2010  Free Software Foundation, Inc.
    #
    # GRUB is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    #
    # GRUB is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
    
    prefix=/usr
    exec_prefix=${prefix}
    bindir=${exec_prefix}/bin
    libdir=${exec_prefix}/lib
    . ${libdir}/grub/grub-mkconfig_lib
    
    export TEXTDOMAIN=grub
    export TEXTDOMAINDIR=@LOCALEDIR@
    
    CLASS="--class gnu-linux --class gnu --class os"
    
    if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
      OS=GNU/Linux
    else
      OS="${GRUB_DISTRIBUTOR}"
      CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1) ${CLASS}"
    fi
    
    # loop-AES arranges things so that /dev/loop/X can be our root device, but
    # the initrds that Linux uses don't like that.
    case ${GRUB_DEVICE} in
      /dev/loop/*|/dev/loop[0-9])
        GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
        # We can't cope with devices loop-mounted from files here.
        case ${GRUB_DEVICE} in
          /dev/*) ;;
          *) exit 0 ;;
        esac
      ;;
    esac
    
    if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
        || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
        || [ "`grub-probe -t abstraction --device ${GRUB_DEVICE} | sed -e 's,.*\(lvm\).*,\1,'`" = "lvm"  ] ; then
      LINUX_ROOT_DEVICE=${GRUB_DEVICE}
    else
      LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
    fi
    
    # add crashkernel option if we have the required tools
    if [ -x "/usr/bin/makedumpfile" ] && [ -x "/sbin/kexec" ]; then
        GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M"
    fi
    
    linux_entry ()
    {
      os="$1"
      version="$2"
      recovery="$3"
      args="$4"
      if ${recovery} ; then
        title="$(gettext_quoted "%s %s (recovery mode)")"
      else
        title="$(gettext_quoted "%s %s")"
      fi
      printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
      cat << EOF
    	recordfail
    EOF
      save_default_entry | sed -e "s/^/\t/"
    
      if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ]; then
    	  cat << EOF
    	set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
    EOF
      fi
    
      if [ -z "${prepare_boot_cache}" ]; then
        prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
      fi
      printf '%s\n' "${prepare_boot_cache}"
      if [ "x$5" != "xquiet" ]; then
        cat << EOF
    	echo	'$(printf "$(gettext_quoted "Loading Linux %s ...")" ${version})'
    EOF
      fi
      cat << EOF
    	linux	${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
    EOF
      if [ "x$5" != "xquiet" ]; then
        cat << EOF
    	echo	'$(gettext_quoted "Loading initial ramdisk ...")'
    EOF
      fi
      if test -n "${initrd}" ; then
        cat << EOF
    	initrd	${rel_dirname}/${initrd}
    EOF
      fi
      cat << EOF
    }
    EOF
    }
    
    list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
            if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
          done`
    prepare_boot_cache=
    
    while [ "x$list" != "x" ] ; do
      linux=`version_find_latest $list`
      echo "Found linux image: $linux" >&2
      basename=`basename $linux`
      dirname=`dirname $linux`
      rel_dirname=`make_system_path_relative_to_its_root $dirname`
    #  version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
       version=``
      alt_version=`echo $version | sed -e "s,\.old$,,g"`
      linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
    # User-added variable
      codename="`lsb_release -cs`"
      codename="`echo $codename | tr [hjkl] [HJKL]`"
      version_no_generic="`echo ${version} | cut -d "-" -f 1-2`"
    
      initrd=
      for i in "initrd.img-${version}" "initrd-${version}.img" \
    	   "initrd-${version}" "initrd.img-${alt_version}" \
    	   "initrd-${alt_version}.img" "initrd-${alt_version}"; do
        if test -e "${dirname}/${i}" ; then
          initrd="$i"
          break
        fi
      done
      if test -n "${initrd}" ; then
        echo "Found initrd image: ${dirname}/${initrd}" >&2
      else
        # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
        linux_root_device_thisversion=${GRUB_DEVICE}
      fi
    
      linux_entry "${OS}" "${version}" false\
          "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_EXTRA} ${GRUB_CMDLINE_LINUX_DEFAULT}" \
          quiet
      if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
        linux_entry "${OS}" true\
    	"single ${GRUB_CMDLINE_LINUX}"
      fi
    
      list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
    done
    Back to Xorg...

    Retired.

  3. #113
    Join Date
    Jun 2009
    Beans
    24
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Grub 2 Title Tweaks Thread

    It worked!


    You sir, are awesome!





    (And a better scripter than I am!)

  4. #114
    Join Date
    Aug 2008
    Beans
    573

    Re: Grub 2 Title Tweaks Thread

    drs305 could you explain how changing what you changed fixed the problem? I would like to learn.

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

    Re: Grub 2 Title Tweaks Thread

    Quote Originally Posted by COKEDUDE View Post
    drs305 could you explain how changing what you changed fixed the problem? I would like to learn.
    I would love to, but I am not a scripting wizard so I can't use the example as the way it should be done. In fact, I'm almost positive it isn't the way it should be done, it just worked with some trial and error.

    The title line had to be changed to eliminate the "with Linux..." section.
    From:
    title="$(gettext_quoted "%s, with Linux %s")"
    To:
    title="$(gettext_quoted "%s %s")"
    In an unedited file, the actual menu entry is created based on this line:
    linux_entry "${OS}" "${version}" false \
    Since the user wanted the OS (Ubuntu), but not the version (2.6.32-...), I thought I could just remove the "${version}" from the line, but when I did this it produced errors, so I fell back to just changing the version value to a space by making this change (commenting the original line that created the 'version' information and making the value always be a space).
    # version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
    version=``
    I don't want to get into much more detail. Wanting to learn how scripting works is an admirable thing. Trying to learn scripting from my efforts is something neither I nor anyone who has seen my efforts would recommend.
    Back to Xorg...

    Retired.

  6. #116
    Join Date
    Dec 2006
    Location
    San Antonio, TX
    Beans
    50
    Distro
    Ubuntu Development Release

    Re: Grub 2 Title Tweaks Thread

    Ok, I've read through this thread and several others, but I can't seem to find how to do what I want to do. On my system I have the stable version of ubuntu on sda1 and the testing version on sda3, is there a way for me to have grub 2 just set the title based on the location instead of off the codename or kernel. So that in my case it would take anything it finds on /dev/sda1 and put the title as "Stable" and then anything it finds on /dev/sda3 and put the title as "Testing"?
    The Ubuntu Counter Project - user number # 23261

  7. #117
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Title Tweaks Thread

    Quote Originally Posted by GeoPirate View Post
    On my system I have the stable version of ubuntu on sda1 and the testing version on sda3, is there a way for me to have grub 2 just set the title based on the location instead of off the codename or kernel. So that in my case it would take anything it finds on /dev/sda1 and put the title as "Stable" and then anything it finds on /dev/sda3 and put the title as "Testing"?
    I've tweaked the 10_linux file and have come up with a result which should work for you. I've had to modify several different sections of the file. The lines with a ## are originals, those within ##### are the new lines.

    I didn't take your request for the title to be "Stable" literally, since without a version number you couldn't tell the difference between Stable 2.6.32-32 and Stable 2.6.32-33. If you don't want the version number - just "Stable - edit the section in red.

    Backup your current /etc/grub.d/10_linux, replace it with the code below, then run "sudo update-grub".

    Code:
    #! /bin/sh -e
    
    # grub-mkconfig helper script.
    # Copyright (C) 2006,2007,2008,2009,2010  Free Software Foundation, Inc.
    #
    # GRUB is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    #
    # GRUB is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
    
    prefix=/usr
    exec_prefix=${prefix}
    bindir=${exec_prefix}/bin
    libdir=${exec_prefix}/lib
    . ${libdir}/grub/grub-mkconfig_lib
    
    export TEXTDOMAIN=grub
    export TEXTDOMAINDIR=@LOCALEDIR@
    
    CLASS="--class gnu-linux --class gnu --class os"
    
    if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
      OS=GNU/Linux
    else
      OS="${GRUB_DISTRIBUTOR}"
      CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1) ${CLASS}"
    fi
    
    # loop-AES arranges things so that /dev/loop/X can be our root device, but
    # the initrds that Linux uses don't like that.
    case ${GRUB_DEVICE} in
      /dev/loop/*|/dev/loop[0-9])
        GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
        # We can't cope with devices loop-mounted from files here.
        case ${GRUB_DEVICE} in
          /dev/*) ;;
          *) exit 0 ;;
        esac
      ;;
    esac
    
    if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
        || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
        || [ "`grub-probe -t abstraction --device ${GRUB_DEVICE} | sed -e 's,.*\(lvm\).*,\1,'`" = "lvm"  ] ; then
      LINUX_ROOT_DEVICE=${GRUB_DEVICE}
    else
      LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
    fi
    
    # add crashkernel option if we have the required tools
    if [ -x "/usr/bin/makedumpfile" ] && [ -x "/sbin/kexec" ]; then
        GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M"
    fi
    
    linux_entry ()
    {
      os="$1"
      version="$2"
      recovery="$3"
      args="$4"
    ##  if ${recovery} ; then
    ##    title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
    ##  else
    ##    title="$(gettext_quoted "%s, with Linux %s")"
    ##  fi
    ##### New
      if ${recovery} ; then
        title="$(gettext_quoted "%s %s (recovery mode)")"
      else
        title="$(gettext_quoted "%s %s")"
      fi
    ##### End New
    
      printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
      cat << EOF
    	recordfail
    EOF
      save_default_entry | sed -e "s/^/\t/"
    
      if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ]; then
    	  cat << EOF
    	set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
    EOF
      fi
    
      if [ -z "${prepare_boot_cache}" ]; then
        prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
      fi
      printf '%s\n' "${prepare_boot_cache}"
      if [ "x$5" != "xquiet" ]; then
        cat << EOF
    	echo	'$(printf "$(gettext_quoted "Loading Linux %s ...")" ${version})'
    EOF
      fi
      cat << EOF
    	linux	${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
    EOF
      if [ "x$5" != "xquiet" ]; then
        cat << EOF
    	echo	'$(gettext_quoted "Loading initial ramdisk ...")'
    EOF
      fi
      if test -n "${initrd}" ; then
        cat << EOF
    	initrd	${rel_dirname}/${initrd}
    EOF
      fi
      cat << EOF
    }
    EOF
    }
    
    list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
            if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
          done`
    prepare_boot_cache=
    
    while [ "x$list" != "x" ] ; do
      linux=`version_find_latest $list`
      echo "Found linux image: $linux" >&2
      basename=`basename $linux`
      dirname=`dirname $linux`
      rel_dirname=`make_system_path_relative_to_its_root $dirname`
      version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
    #####
    # version=" "
    #####
      alt_version=`echo $version | sed -e "s,\.old$,,g"`
      linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
    
      initrd=
      for i in "initrd.img-${version}" "initrd-${version}.img" \
    	   "initrd-${version}" "initrd.img-${alt_version}" \
    	   "initrd-${alt_version}.img" "initrd-${alt_version}"; do
        if test -e "${dirname}/${i}" ; then
          initrd="$i"
          break
        fi
      done
      if test -n "${initrd}" ; then
        echo "Found initrd image: ${dirname}/${initrd}" >&2
      else
        # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
        linux_root_device_thisversion=${GRUB_DEVICE}
      fi
    
    ##  linux_entry "${OS}" "${version}" false \
    ##      "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_EXTRA} ##${GRUB_CMDLINE_LINUX_DEFAULT}" \
    ##      quiet
    ##  if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
    ##    linux_entry "${OS}" "${version}" true \
    ##	"single ${GRUB_CMDLINE_LINUX}"
    ##  fi
    ##### New
    if [ ${GRUB_DEVICE} = "/dev/sda1" ]; then
      linux_entry "Stable" "${version}" false \
          "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_EXTRA} ${GRUB_CMDLINE_LINUX_DEFAULT}" \
          quiet
      if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
        linux_entry "Stable" "${version}" true \
    	"single ${GRUB_CMDLINE_LINUX}"
      fi
    else
      linux_entry "${OS}" "${version}" false \
          "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_EXTRA} ${GRUB_CMDLINE_LINUX_DEFAULT}" \
          quiet
      if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
        linux_entry "${OS}" "${version}" true \
    	"single ${GRUB_CMDLINE_LINUX}"
      fi
    fi
    ##### End New
      list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
    done
    I'll work up the changes to the sda3 "Testing" entry (30_os-prober) when I have time.
    Back to Xorg...

    Retired.

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

    Re: Grub 2 Title Tweaks Thread

    The "Testing" entry is pretty easy.

    Backup 30_os-prober and remove the executable bit so the backup won't run. Open for editing.
    Code:
    sudo cp /etc/grub.d/30_os-prober /etc/grub.d/30_os-prober.bak
    sudo chmod -x /etc/grub.d/30_os-prober.bak
    gksu gedit /etc/grub.d/30_os-prober &
    Save the file, then run:
    Code:
    sudo update-grub
    Find this section (approximately line 170) and add the bold dark red text:
    ;;
    linux)
    LINUXPROBED="`linux-boot-prober ${DEVICE} 2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
    prepare_boot_cache=

    for LINUX in ${LINUXPROBED} ; do
    LROOT="`echo ${LINUX} | cut -d ':' -f 1`"
    LBOOT="`echo ${LINUX} | cut -d ':' -f 2`"
    LLABEL="`echo ${LINUX} | cut -d ':' -f 3 | tr '^' ' '`"
    LKERNEL="`echo ${LINUX} | cut -d ':' -f 4`"
    LINITRD="`echo ${LINUX} | cut -d ':' -f 5`"
    LPARAMS="`echo ${LINUX} | cut -d ':' -f 6- | tr '^' ' '`"


    ##### Add this
    if [ ${DEVICE} = "/dev/sda3" ] ; then
    LLABEL="Testing"
    fi
    ##### End Add
    Once again, the note about this not displaying kernel version, so multiple kernels would have the same name. This can be changed to include the kernel if desired.
    If you don't want the "on /dev/sda3" in the title, go to this section a bit further down and remove the bold text:
    cat << EOF
    menuentry "${LLABEL} (on ${DEVICE})" {
    EOF
    Last edited by drs305; July 4th, 2010 at 09:37 PM.
    Back to Xorg...

    Retired.

  9. #119
    Join Date
    Mar 2010
    Beans
    38

    Re: Grub 2 Title Tweaks Thread

    I have a comment on the code for one of your tweaks, and I have one of my own tweaks to offer. When I tried using
    Code:
    sudo cat /boot/grub/grub.cfg | grep "menuentry" | cut -d '"' -f 2
    to get the menu entries, it truncated my list! I tried using
    Code:
    sudo cat /boot/grub/grub.cfg | grep "menuentry"
    instead, and got the full list. Naturally you have to use a little common sense about what part of the title to take, and whether it corresponds to LONGNAME (Windows) or LLABEL (Linux).

    Now here is my own tweak, with appropriate context. I have recently set up my computer to have 4 linux distros on it: Kubuntu, Fedora, Mandriva, and OpenSuse. Kubuntu is in charge of the boot loader. When Fedora was loaded the screen would shimmer and flicker. The solution I found in the online documentation was to add "nomodeset" to the Kernel Parameters. Doing this in GRUB is easy, but what about GRUB 2? Well the options seem to be

    a) add a custom menu entry, and remove the autmatically generated one for Fedora.

    b) change the 30_os-prober script to adjust the menu entry already generated.

    I did not like the idea of adding another menu entry for fedora without removing the automatically generated one, because that entry would be effectively useless. Who wants to look at a shimmering screen?? I decided that option b) was easier. So in the 30_os-prober immediately after the lines

    Code:
    for LINUX in ${LINUXPROBED} ; do
            LROOT="`echo ${LINUX} | cut -d ':' -f 1`"
            LBOOT="`echo ${LINUX} | cut -d ':' -f 2`"
            LLABEL="`echo ${LINUX} | cut -d ':' -f 3 | tr '^' ' '`"
            LKERNEL="`echo ${LINUX} | cut -d ':' -f 4`"
            LINITRD="`echo ${LINUX} | cut -d ':' -f 5`"
            LPARAMS="`echo ${LINUX} | cut -d ':' -f 6- | tr '^' ' '`"
    
            if [ -z "${LLABEL}" ] ; then
              LLABEL="${LONGNAME}"
            fi
    
    	if [ "${LROOT}" != "${LBOOT}" ]; then
    	  LKERNEL="${LKERNEL#/boot}"
    	  LINITRD="${LINITRD#/boot}"
    	fi
    I added the lines

    Code:
    if [ "${LKERNEL}" = "/boot/vmlinuz-2.6.33.3-85.fc13.i686" ]; then
              LPARAMS="root=/dev/sda8 nomodeset"
    fi
    "root=/dev/sda8" is what LPARAMS was before the new parameter "nomodeset" was added. Then I ran update-grub to generate the grub.cfg file. Sure enough it worked! Now when I select the Fedora menu entry, the screen is normal.

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

    Re: Grub 2 Title Tweaks Thread

    Tikhon03,

    Nice. The LPARAMS is something I haven't played with much.

    The "nomodeset" option as with others is normally be placed on the "GRUB_CMDLINE_LINUX_DEFAULT=" line of /etc/default/grub for your main Linux OS, but to get it into your Fedora OS your method works well.

    I do note that your tweak is active for a specific kernel. You could also make the LPARAMS line a condition of the OS being on sda8 (if only Fedora is on sda8 or use the "cut" command to add nomodeset to any kernel with the "fc13.i686" designation (if that is Fedora-specific).

    As to the "cat" command from the original post, the command is located in and only referenced in the Windows section of the guide. On my machines the command provides the complete Windows title without the quotes, which was what I wanted. However, I don't have Vista or 7 so their titles might be a bit different and the command may produce undesired results.

    If the command improperly truncates Windows titles I'll need to change it. If it truncates other OS's I'm not as concerned. I could expand it to grep "Windows" as well so only Windows entries appear, without quotes:
    Code:
    grep "menuentry" /boot/grub/grub.cfg | grep "Windows" | cut -d '"' -f 2
    Back to Xorg...

    Retired.

Page 12 of 24 FirstFirst ... 2101112131422 ... 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
  •