Ubuntu Forums Archive Viewer

Grub 2 Basics

Archived thread 1195275 from Tutorials. Markdown source: Tutorials/thread_1195275_Grub_2_Basics.md

Original URL About this archive
#1

This page has been migrated to the Ubuntu Community Documentation site. For the most up-to-date information, please visit: https://help.ubuntu.com/community/Grub2

On that page are links to a variety of other Grub 2 pages which cover installation, troubleshooting, ISO booting, Grub menu displays, and more. The majority of those pages were migrated from threads started on the Ubuntu Forums.

Thank you to all the users who posted in these threads and expanded our knowledge of Grub 2 since it's introduction.

A thread for discussion of the wiki can be found at http://ubuntuforums.org/showthread.php?p=12073029

Support threads regarding the wiki and it's content should be created in a suitable forum.

[COLOR=MAROON][B][SIZE=4][CENTER][I]The Grub 2 Guide (formerly Grub 2 Basics)[/I][/CENTER] [/SIZE][/B][/COLOR]

[COLOR=DarkRed][SIZE=3]Better Documentation - Get It From the Grub 2 Developers[/SIZE][/COLOR] This thread is more than two years old. It was written at a time when Grub 2 was very new and there was very little documentation for end users. Fortunately, over time, the documentation has been greatly improved and GUI apps have been developed to assist users. Two important sources of Grub 2 information are the _GNU Grub Manual_ and on-line information available by running the following command:

info -f grub -n 'Simple configuration'

[COLOR=DarkRed][SIZE=3]Grub 1.99 / Natty: [COLOR="Red"]Black Screen, with or without blinking cursor[/COLOR][/SIZE][/COLOR] If your boot in Natty ends up at a blank black screen, or a screen with a blinking cursor, take a look at the following thread. Forum member *MAFoElffen* has done some great research and has come up with some workarounds that may get your system booted. Here is the thread: Graphics Resolution- Upgrade /Blank Screen after reboot

[COLOR=DarkRed][SIZE=3]Repair Using the Correct CD ![/SIZE][/COLOR] It appears that Grub 1.98 and Grub 1.99 don't get along well. If having to repair a Grub 2 problem using a LiveCD, make sure the OS and CD are for the same release (Natty LiveCD for Natty, Maverick LiveCD for Maverick, etc). This includes running the 'grub-install' command to write to the MBR.

[COLOR=DarkRed][SIZE=3]Grub 1.99 Changes - A Brief Look[/SIZE][/COLOR] http://ubuntuforums.org/showthread.php?p=10720322

[COLOR=DarkRed][SIZE=3]Grub 1.99: [COLOR="Red"]Error: No Argument Specified[/COLOR], and [COLOR="Red"]Error: Invalid Signature[/COLOR].[/SIZE][/COLOR]

While menuentries generated with Grub 1.99 work correctly, menuentries from older custom menus or imported from earlier Grub 2 menus may produce the above errors. The reason is a format change to the "set" section of the 'search' line. Old:

search --no-floppy --fs-uuid [COLOR="Red"]--set[/COLOR] d789eb41-eaff-458c-be34-0e2f9b414f1e

New (for Grub 1.99 / Natty only):

search --no-floppy --fs-uuid --set=root d789eb41-eaff-458c-be34-0e2f9b414f1e

[COLOR=DarkRed][SIZE=3]New for Natty - Grub 1.99 (RC) - Drag & Drop GRUB Background[/SIZE][/COLOR] For Ubuntu 11.04 Natty and Grub 1.99RC: Place a graphic in /boot/grub, run update-grub and you should have a Grub menu background image. Read more in this thread: Grub 2 Drop-In Backgrounds & Fonts

[COLOR=DarkRed][SIZE=3]GUI Apps for Grub 2 - Finally some apps for the GUI enthusiast![/SIZE][/COLOR] Grub Customizer - Daniel Richter has developed a graphical Grub2 configuration application. It's an excellent step in making Grub2 menu changes simpler for the average user. It provides users with a method of altering their Grub2 menus without using the command line and obscure commands. The application is available from this Launchpad page. How it works is detailed in this FAQ. Here is the Ubuntu Forum HOWTO on Grub Customizer: _Grub Customizer_

Boot Repair - Forum member *YannBuntu* has developed an app which helps repair the MBR or purge and restore Grub 2 without having to use the terminal extensively. If a terminal command is required, the app tells you what it is. Here is the forum link: [[Boot-Repair] Graphical tool to repair the PC boot in 1 clic !]("http://ubuntuforums.org/showthread.php?p=10871917#post10871917")

Thanks to Daniel and YannBuntu for providing these apps to the Ubuntu community.

**[COLOR=DarkRed][SIZE=3]GRUB Changes to */etc/default/grub* Options[/SIZE][/COLOR] ** Grub 1.98 has made some changes, and Grub 1.99 is making more to the options available in */etc/default/grub*. To see the current options available to /etc/default/grub for your version:

grep "export GRUB_DEVICE" -A42 /usr/sbin/grub-mkconfig

For instance, in Grub 1.98 and earlier, the /etc/default/grub entry to hide "Recovery" menu entries was "GRUB_DISABLE_LINUX_RECOVERY=true". In G2 1.99 it is currently "GRUB_DISABLE_RECOVERY=true".

[COLOR=DarkRed][SIZE=3]Wubi Megathread Guide[/SIZE][/COLOR] Having problems with your Wubi installation? Forum member *Rubi1200* has written an excellent comprehensive guide on resolving Wubi-related problems. View the "Wubi Megathread" at _http://ubuntuforums.org/showthread.php?t=1639198_

[COLOR=DarkRed][SIZE=3]Grub Submenu[/SIZE][/COLOR] Test versions of Ubuntu 11.04 (Natty Narwhale) are being released with Grub 1.99. One of the new features is the use of the *Submenu*. The submenu is still being tweaked, but should hide older kernels in the main OS. Clicking on the Submenu entry will reveal the underlying older kernels. Using a Submenu kernel as the default initially was not possible, but a patch has been submitted by Colin Watson. The user will be able to use either the exact menuentry title or the "saved" function in /etc/default/grub's GRUB_DEFAULT= setting to set a submenu default. The use of a number in GRUB_DEFAULT is currently not possible. More details as they become available.

[B][COLOR=Navy]

[/COLOR][/B]

I've written this guide to present some *basic* information about Grub 2, now the default bootloader on all supported Ubuntu Desktops. There are now versions 1.97~beta, 1.98 (Lucid/Maverick) and 1.99 (Natty), with improvements (and file changes) in each subsequent version. Since Lucid is the LTS, references to Grub 2 will refer to 1.98 unless otherwise noted. The user can check their current version with the "grub-install -v" command.

  • Introduction
  • First Look Differences
  • Improvements
  • [B][COLOR=Navy]Booting Grub[/COLOR][/B]
  • Grub 2 Files & Options
  • Adding Entries to Grub 2
  • Removing Entries from Grub 2
  • Grub 2 Splash Images & Theming
  • Changing Menu Resolution
  • Password Protection
  • Booting to Recovery Mode w/o Menu Option
  • Uninstalling GRUB 2 > GRUB
  • Reinstalling GRUB 2 from the LiveCD
  • [B][COLOR=Navy]Booting to LiveCD ISO[/COLOR][/B]
  • Booting from the Rescue Mode
  • Restoring GRUB2 / XP / Vista / Win 7 Bootloaders
  • Grub Rescue Image
  • Grub 2 Fallback Option
  • [COLOR=Red]Selected Problems & Bugs[/COLOR]
  • Links
  • [COLOR=Navy][SIZE=3]Introduction[/SIZE][/COLOR]

Grub 2 GUI Apps: There are currently 3 GUI apps which support Grub 2. This guide primarily deals with the terminal and editing files, since the thread was originally created when there was little to no support for Grub 2. [COLOR="Navy"]Startup Manager[/COLOR]: Provides basic support for Grub 2 but not all options are available. The two most-used items, however, are: setting the default kernel/OS and setting the menu timeout delay. View the StartUpManager community doc or the forum post on which it was based: [[COLOR="DarkGreen"]http://ubuntuforums.org/showthread.php?t=818177[/COLOR]]("http://ubuntuforums.org/showthread.php?t=818177") [COLOR="Navy"]Grub Customizer[/COLOR]: Designed by *Daniel Richter* for Grub 2 with a good variety of customization options. Here is a guide on installing and using GC: _Grub Customizer_ [COLOR="Navy"]Boot Repair[/COLOR]: A boot and Grub 2 repair app created by *YannBuntu*. Repair the MBR and purge/reinstall Grub 2 assistance. Boot-Repair

Official documentation for Grub 2 has been greatly expanded since it's release. The source document should take precedence over material found in this thread, unless otherwise noted. This link is to Grub 1.99: http://www.gnu.org/software/grub/manual/grub.html

For troubleshooting and modifying the Grub menu, it is important to know which version you are using (Grub legacy, 0.97; Grub 2 in Karmic 1.97~beta4; Grub 2 in Lucid 1.98, 1.99RC in Natty). To confirm the version of Grub used in your system, run this command:


grub-install -v

drs305@mycomputer:~$ grub-install -v grub-install (GRUB) 1.98+20100804-5ubuntu3

At first boot, there will not be much difference in what the user sees on the boot menu. The one exception is a clean install of Ubuntu with no other installed operating system(s). In this case, GRUB 2 will boot directly to the login prompt or Desktop without displaying a menu. Other major differences:

[SIZE=3]*[/SIZE] To update the GRUB 2 menu, the command *sudo update-grub* will be used throughout this guide. *update-grub* actually runs the command *"grub-mkconfig -o /boot/grub/grub.cfg"* This runs several scripts and incorporates the results into */boot/grub/grub.cfg* which detemines what is seen on the screen during boot. Since the GRUB 2 developers do not intend to remove the *update-grub* 'stub', it will be used for simplicity and ease of use.

  • [COLOR=Navy][SIZE=3]First Look Differences: GRUB vs GRUB 2[/SIZE][/COLOR]
  • No ''/boot/grub/menu.lst''. It has been replaced by ''/boot/grub/grub.cfg''.
  • Hold down SHIFT to display the hidden menu during boot (formerly ESC is GRUB legacy).
  • There is no "find /boot/grub/stage1" at the grub prompt. Stage 1.5 has also been eliminated.
  • The main menu file, ''/boot/grub/grub.cfg'' is not normally edited directly, as it will be overwritten by certain updates (see next).
  • ''grub.cfg'' is overwritten when there is a Grub update, a kernel is added/removed or the user runs update-grub [SIZE=3]*[/SIZE]
  • A pre-made custom file, ''/etc/grub.d/40_custom'', is available in which users can place their own entries. This file will *not* be overwritten by Grub updates.
  • The primary configuration file for changing menu display settings is ''/etc/default/grub''.
  • There are multiple files for configuring the the menu - ''/etc/default/grub'' mentioned above, and all the scripts in */etc/grub.d/* folder.
  • Other operating systems, such as Windows, should automatically be recognized and added to the menu.
  • No changes made in the configuration files will take effect until the update-grub command is also run.
  • Grub 1.99 Changes: This version introduces *submenu* and drop-in background image capabilities. Read more at: Grub 1.99 Changes

GRUB 2's major improvements over the original GRUB include:

  • [COLOR=Navy][SIZE=3]Improvements[/SIZE][/COLOR]
  • New configuration file structure
  • Scripting support including conditional statements and functions
  • Dynamic module loading
  • Rescue mode
  • Themes - under (very slow development). Users wishing to use theming should search the Internet for "burg".
  • Graphical boot menu support and improved splash capability
  • Boot Ubuntu LiveCD and some other ISO images directly from hard drive
  • Non-X86 platform support (such as PowerPC)
  • Universal support for UUIDs (not just Ubuntu)
  • Improved internationalization, including support for non-ASCII characters

Grub 2 loads before the operating system. It's modular components are loaded on an as-needed basis. Menu display behavior is generally determined by settings in /etc/default/grub. Review the "Grub 2 Files & Options" section for specific entry and formatting guidance.

  • [COLOR=Navy][SIZE=3]Booting Grub[/SIZE][/COLOR]

The main options for displaying the menu are:

  • Initial Default
  • Grub 2 will boot straight into the default operating system if no other operating system is detected. No menu will be displayed. If another operating system is detected, the Grub 2 menu will display.

  • Timed display.
  • The default delay is 10 seconds. If no user input is made Grub 2 boots to the default entry.
  • The countdown can be stopped by pressing any key. The user must then make a selection manually.
  • The booted entry is determined by the DEFAULT= setting in /etc/default/grub, The first "menuentry" is 0.

  • Hidden
  • The user can interrupt the boot process and display the menu by holding down the SHIFT key until the menu displays. Grub 2 searches for a depressed SHIFT key signal during boot. If the key is pressed or Grub 2 cannot determine the status of the key, the menu is displayed. Note: The "SHIFT" keystatus check is currently nested within in a conditional statement within /etc/grub.d/30_os-prober and may not work under certain circumstances.
  • The time the screen remains blank but available for display is determined by a setting in /etc/default/grub.
  • To provide visual feedback during while the countdown continues, a countdown display can be shown on the screen.
  • At the end of the timeout, the default entry determined in /etc/default/grub will be selected.

  • Saved
  • If the default option is set to "saved", the last kernel/system successfully booted will be selected and run if no input is made.
  • Unlike GRUB, GRUB 2 stores the "saved" entry as a string, not as a menu position number. In GRUB 2, the result is applied more consistently. Example: If the first entry (kernel -15) becomes the second entry due to a kernel update, it will still be the "saved" entry even though it's position on the menu has changed.

Many of the files in /boot/grub will not be recognizable by users of Grub Legacy. Especially noticeable are the multitude of *.mod files. Grub 2 is modular and these files are loaded as necessary by the grub bootloader.

  • [COLOR=Navy][SIZE=3]Grub 2 Files & Options[/SIZE][/COLOR]

The Grub 2 user-configurable settings are contained mainly in /etc/default/grub and the files in /etc/grub.d. When *update-grub* is executed the results are input into the */boot/grub/grub.cfg *file.

  • [SIZE=3][COLOR=DarkRed]/boot/grub/grub.cfg[/COLOR][/SIZE]
  • This is the main Grub 2 file. It "replaces" Grub Legacy's [COLOR=DarkRed]/boot/grub/menu.lst[/COLOR] This file contains the Grub menu information but unlike Grub Legacy's [COLOR=DarkRed]menu.lst[/COLOR] file, [COLOR=DarkRed]grub.cfg[/COLOR] is not normally meant to be edited as it is the product of Grub2 configuration scripts and is overwritten during certain updates. If a user edits grub.cfg, expect the changes to be removed during such updates or disable the ability of the OS to run these updates.
  • [COLOR=DarkRed]grub.cfg[/COLOR] is automatcially generated when "update-grub" is executed:
  • Each section (*### BEGIN*) is clearly delineated and references the file in the /etc/grub.d folder from which the information was generated. The major default sections are *00_header*, *05_debian_theme*, *10_linux*, *30_os-prober*, and *40_custom*.
  • [COLOR=DarkRed]grub.cfg[/COLOR] is updated by running the "[COLOR=Navy]*update-grub*[/COLOR]" or "[COLOR=Navy]*update-grub2*[/COLOR]" command as root.
  • By default, and whenever the "[COLOR=Navy]*update-grub*[/COLOR]" command is executed, this file is made "read-only". This is in keeping with the intent that the file should not be edited manually. If you must edit this file, instructions are provided in Section 2.

Note: Online documentation regarding the options available in this file is available by running the following command in a terminal:

  • [SIZE=3][COLOR=DarkRed]/etc/default/grub[/COLOR][/SIZE]
info -f grub -n 'Simple configuration'

  • This file contains information formerly contained in the upper section of Grub Legacy's [COLOR=DarkRed]menu.lst[/COLOR] and items contained on the end of the kernel line. The items in this file can be edited by a user with administrator (root) privileges.
  • To find the options available in a specific version of Grub 2, open a terminal and run: *grep "DEVICE" -A 40 /usr/sbin/grub-mkconfig*

If you change this file, run 'update-grub' afterwards to update

/boot/grub/grub.cfg.

GRUB_DEFAULT=0 #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""

Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL=console

The resolution used on graphical terminal

note that you can use only modes which your graphic card supports via VBE

you can see them in real GRUB with the command `vbeinfo'

#GRUB_GFXMODE=640x480

Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

#GRUB_DISABLE_LINUX_UUID=true

Uncomment to disable generation of recovery mode menu entries

#GRUB_DISABLE_LINUX_RECOVERY="true"

Uncomment to get a beep at grub start

#GRUB_INIT_TUNE="480 440 1"

  • GRUB_DEFAULT - Sets the default menu entry. Entries may be numeric or "saved"
  • GRUB_DEFAULT=0 - Sets the default menu entry by menu position. As Grub Legacy, the first "menuentry" in [COLOR=DarkRed]grub.cfg[/COLOR] is 0, the second is 1, etc.
  • GRUB_DEFAULT=saved - noparse[/noparse] Enables the "grub-reboot" and "grub-set-default" commands.
  • This setting allows the use of the following commands to set a default OS. The default OS will not be set merely by an interactive selection of an OS from the menu.
  • grub-set-default. Sets the default boot entry until changed.
  • The format is "sudo grub-set-default [COLOR=Red]X[/COLOR], with [COLOR=Red]X[/COLOR] being the menuentry position (starting with 0 as the first entry) or the exact menu string. Examples: *sudo grub-set-default 3* or *sudo grub-set-default "Ubuntu, Linux 2.6.32-15-generic"*
  • To obtain the existing menuentry choice number (starting from 0) or the menuentry "string", run "grep menuentry /boot/grub/grub.cfg"

  • grub-reboot. This command sets the default boot entry for the next boot only. The format of the command is the same as for "grub-set-default" (see above).
  • For an example of how to enable the "saved" option with a custom menu, see the "[COLOR=DarkRed]Custom User Entries[/COLOR]" section.

  • GRUB_DEFAULT="xxxx" - An exact menu entry, including the quotation symbols, may also be used. In this case, location in the menu will not matter. Example: *GRUB_DEFAULT="Ubuntu, Linux 2.6.31-9-generic"*

  • GRUB_SAVEDEFAULT=true [SIZE=4]**[COLOR=Blue]*[/COLOR]**[/SIZE] If set to *true* this setting will automatically set the last selected OS from the menu as the default OS on the next boot. No commands need be run to set the default OS. For this entry to work, the *GRUB_DEFAULT* entry should be set to *saved*.
  • GRUB_TIMEOUT=10 - No change from Grub Legacy. This is the number of seconds before the default entry is automatically booted.
  • Setting this value to -1 will cause the menu to display until the user makes a selection.
  • To display the menu on each boot use a value of 1 or higher.
  • This command defers to the GRUB_HIDDEN_TIMEOUT command. If the *GRUB_HIDDEN_TIMEOUT* option is interrupted by pressing the *SHIFT* key, the GRUB_TIMEOUT counter begins its countdown.
  • [COLOR=DarkRed]Caution:[/COLOR] Holding down the "SHIFT" key will not display the menu if "GRUB_TIMEOUT=" is set to "0" .
  • In addition to editing the file as *root*, you can also run the following commands the check and change the default timeout value. The first checks the existing timeout, the second replaces the value. Replace T with the new value.

cat /etc/default/grub | grep 'GRUB_TIMEOUT='   # Checks current TIMEOUT value.
sudo sed 's/GRUB_TIMEOUT=10/GRUB_TIMEOUT=**T**/g' -i /etc/default/grub  # Change TIMEOUT value. Replace **T** with new value.

  • GRUB_HIDDEN_TIMEOUT=0
  • Wait X seconds for a key to be pressed before displaying the menu. If no key is pressed during that time, boot immediately.

  • GRUB_HIDDEN_TIMEOUT_QUIET=true
  • Used with the GRUB_HIDDEN_TIMEOUT setting.
  • true - No countdown is displayed. The screen will be blank.
  • false - A counter will display on a blank screen for the duration of the GRUB_HIDDEN_TIMEOUT value.
  • This feature currently appears to be broken; the timeout counter isn't appearing when set to 'false' or not set.

  • GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
  • Determines the descriptive name in the menu entry. (Ubuntu, Xubuntu, Debian, etc.)

If it exists, this line imports any entries to the end of the 'linux' command line (Grub Legacy's "kernel" line) for both normal and recovery modes. This is similar to the "altoptions" line in menu.lst

This line imports any entries to the end of the 'linux' line (Grub Legacy's "kernel" line). The entries are appended to the end of the normal mode only. This is similar to the "defoptions" line in menu.lst. For a black screen with boot processes displayed in text, remove "quiet splash". To see the grub splash image plus a condensed text output, use "splash". This line is where other instructions, such as "acpi=off" are placed.

  • GRUB_CMDLINE_LINUX
  • GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

For the GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE, quotation marks are required (single or double) if the entry is more than one alphanumeric entry. For example, *quiet splash* requires single or double quotes, while an entry such as *quiet* would not.

Uncomment to disable graphical terminal (grub-pc only). This can be useful if the user plans on spending a lot of time in the GRUB 2 command line mode. Scrolling and screen responsiveness will be greatly speeded up. If enabled, Grub background splash images will not be displayed.

Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux [COLOR=Red]Update:[/COLOR] A bug requires quotation symbols be added for this option to be enabled. Change *true* to *[COLOR=Red]"true"[/COLOR]* and uncomment the line to eliminate UUIDs for linux entries.

You can add this line and remove the # symbol to make it active. This entry sets the resolution of the graphical menu (the menu text size). It provides resolutions supported by the user's graphics card (e.g. 640x480, 800x600, 1280x1024, etc). The setting applies only to the boot menu text.

  • #GRUB_TERMINAL=console
  • #GRUB_DISABLE_LINUX_UUID=[COLOR=Red]true[/COLOR]
  • #GRUB_GFXMODE=640x480
  • From the GRUB 2 menu you can display available resolutions by typing "c" and then at the "grub>" prompt type "vbeinfo"
  • GRUB_DISABLE_LINUX_RECOVERY=true (GRUB 1.98 & earlier) or GRUB_DISABLE_RECOVERY=true (GRUB 1.99 & later)

Add or uncomment this line to prevent "Recovery" mode kernel options from appearing in the menu. If you want a "Recovery" option for only one kernel, make a special entry in /etc/grub/40_custom.

  • GRUB_DISABLE_OS_PROBER="true" [SIZE=4]**[COLOR=Blue]*[/COLOR]**[/SIZE] Enables/disables the os-prober check of other partitions for operating systems, including Windows, Linux, OSX and Hurd.
  • GRUB_INIT_TUNE="480 440 1"
  • Introduced in Grub 1.98 (Lucid)
  • When uncommented, plays a single beep just prior to the Grub 2 menu display.
  • The format unless a file is named is: "tempo [pitch1 duration1] [pitch2 duration2] ..."
  • The duration is based on the *tempo*. A tempo of *60* gives the *duration* a value of 1 second, 120 is .5, 240 is .25, 480 is .125, etc. The length of the tone can be changed by modifying either the tempo (all tones) or duration (individual tone).
  • Just a bit of fun:
  • [COLOR=DarkRed]Warning:[/COLOR] The menu will not be displayed until the tone is *[COLOR=DarkRed]finished[/COLOR]*
  • *Close Encounters/5 Tone:* [SIZE=1]GRUB_INIT_TUNE="480 900 2 1000 2 800 2 400 2 600 3"[/SIZE]
  • *Fur Elise (note long):* [SIZE=1]GRUB_INIT_TUNE="480 420 1 400 1 420 1 400 1 420 1 315 1 370 1 335 1 282 3 180 1 215 1 282 1 315 3 213 1 262 1 315 1 335 3 213 1 420 1 400 1 420 1 400 1 420 1 315 1 370 1 335 1 282 3 180 1 215 1 282 1 315 3 213 1 330 1 315 1 282 3"[/SIZE]

[SIZE=4]**[COLOR=Blue]*[/COLOR]**[/SIZE] Entries which are not found in the default file and must be added by the user.

  • Online documentation is available by typing "info grub --index-search play" in a terminal.

  • [SIZE=3][COLOR=DarkRed]/etc/grub.d/[/COLOR][/SIZE]
  • The files in this folder are read during execution of "[COLOR=Navy]*update-grub*[/COLOR]" or "[COLOR=Navy]*update-grub*[/COLOR]" commands. The contents are imported into [COLOR=DarkRed]/boot/grub/grub.cfg[/COLOR]

The order of the entries in the grub menu is based on the order of the file names. File named with a starting numeral are run before those beginning with a letter. The order the files are run determines the menu order in grub.cfg. Custom entries can be added to the "[COLOR=DarkRed]40_custom[/COLOR]" file or in a newly created file.

Any file created must be executable in order to be included in the [COLOR=DarkRed]grub.cfg[/COLOR] file during the "[COLOR=Navy]*update-grub*[/COLOR]" command.

  • [COLOR=DarkRed]00_header[/COLOR]
  • [COLOR=DarkRed]05_debian_theme[/COLOR]: Set background and text colors, themes
  • [COLOR=DarkRed]10_hurd[/COLOR] Locates Hurd kernels
  • [COLOR=DarkRed]10_linux[/COLOR] Locates Linux kernels based on results of the "lsb_release" command.
  • [COLOR=DarkRed]10_lupin[/COLOR] Locates Linux kernels in Wubi installs within Windows, among other things.
  • [COLOR=DarkRed]20_memtest86+[/COLOR]: If the file /boot/memtest86+.bin exists, it is included as a menu item.
  • [COLOR=DarkRed]30_os-prober[/COLOR]: Searches for Linux and OS's on other partitions and includes them in the menu.
  • [COLOR=DarkRed]40_custom[/COLOR]: A template for adding custom menu entries which will be inserted into [COLOR=DarkRed]grub.cfg[/COLOR] upon execution of the "[COLOR=Navy]*update-grub*[/COLOR]" command. This and any other custom file must be made executable to allow importation into [COLOR=DarkRed]grub.cfg[/COLOR].

Menu entries can be added to [COLOR=DarkRed]grub.cfg[/COLOR] automatically or manually.

  • [COLOR=Navy][SIZE=3]Adding Entries to Grub 2[/SIZE][/COLOR]
  • [SIZE=3][COLOR=DarkRed]Automatically.[/COLOR][/SIZE]
  • When "[COLOR=Navy]*update-grub*[/COLOR]" is executed, Grub 2 will search for linux kernels and other Operating Systems. What and where is looks is based on the files contained in /etc/grub.d folder.
  • [COLOR=DarkRed]10_linux[/COLOR] searches for installed linux kernels on the same partition.
  • [COLOR=DarkRed]30_os-prober[/COLOR] searches for other operating systems.

  • [SIZE=3][COLOR=DarkRed]Custom User Entries (/etc/grub.d/40_custom).[/COLOR][/SIZE]
  • Entries to [COLOR=DarkRed]*grub.cfg*[/COLOR] can be manually inserted by creating a file in the /etc/grub.d folder.
  • The name of the file determines the order in the menu. 30_os-prober entries will be placed before 40_custom entries, which will be placed before 50_my-sample entries.
  • Any created file must be made executable. This can be done as root by running "sudo chmod +x /etc/grub.d/*filename*".
  • The files in the /etc/grub.d folder will be read and the contents included in [COLOR=DarkRed]*grub.cfg*[/COLOR] when the "[COLOR=Navy]*update-grub*[/COLOR]" command is executed as root.

#!/bin/sh exec tail -n +3 $0

  • A sample entry. This file creates a menu item for running the SystemRescueCD (previously installed) from a partition created on sda10. Folders and files must have been copied to the correct location in accordance with the SystemRescueCD if you wish to actually use this entry. *Note this entry will not work for a SystemRescue ISO. See Section 14 for instructions on how to add an entry to boot ISO images*.
  • >

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 "System Rescue CD" { set root=(hd0,10) linux /sysrcd/rescuecd subdir=sysrcd setkmap=us initrd /sysrcd/initram.igz }

  • [COLOR=Red]Note the new partition naming convention.[/COLOR] Devices start counting from "0" as done previously. sda is designated as "hd0", sdb is "hd1", etc. However the first *partition* is now designated as sda1. Counting *partitions* does not start with "0". sda5 is "5".
  • If the user wishes to get visual confirmation in the terminal that the 40_custom file contents are being added when "update-grub" is executed, the following line can be added to the /etc/grub.d/40_custom file:
  • > *[COLOR=Purple]echo "Adding 40_custom menu entries." >&2[/COLOR]*
  • Place this line immediately after the first line - "#!/bin/bash" - and before the "exec tail -n +3 $0" line.

  • [COLOR=DarkRed]Tip[/COLOR]: If you want to have your custom entries at the top of the menu (say you want custom titles), create a new file and name it "07_xxxx". Since the files in /etc/grub.d/ are read sequentially, those in "07_custom" will be placed before those of "10_linux". I recommend not naming a custom menu file lower than 06 so that any theme run from 05_debian_theme is allowed to run before any custom menu is created. After creating the file, run *sudo update-grub* and then check the value of "DEFAULT" in */etc/default/grub*. If it doesn't point to the correct *menuentry*, change the value of *DEFAULT* to the correct *menuentry* value.
  • [COLOR=DarkRed]Omitting memtest86+[/COLOR]: To prevent "memtest86+" entries in your Grub 2 menu, remove the "executable" bit from /etc/grub.d/20_memtest86+. You can do this via a file browser by selecting "Properties (right click), Permissions", or via the command line:
sudo chmod -x /etc/grub.d/20_memtest86+
  • [COLOR=DarkRed]Omitting Recovery Mode entries[/COLOR]: The file /etc/grub.d/10_linux was recently updated to include a check for recovery mode options. Edit /etc/default/grub and add or change this line:

GRUB_DISABLE_LINUX_RECOVERY=true # GRUB 1.98 & earlier GRUB_DISABLE_RECOVERY=true # GRUB 1.99 & later If you have an older version of /etc/grub.d/10_linux and the above does not work after updating grub, you can prevent "Recovery mode" entries in your Grub 2 menu, by editing /etc/grub.d/10_linux. If there are no conditional "if" statements concerning the recovery mode, place a comment symbol (#) in front of the following lines (at approximately line 146) of the old file:

[COLOR=DarkRed]#[/COLOR] linux_entry "${OS}, Linux ${version} (recovery mode)" \ [COLOR=DarkRed]#[/COLOR] "single ${GRUB_CMDLINE_LINUX}" If you wish to retain one "Recovery mode" entry for insurance, you can add an entry to /etc/grub.d/40_custom which will appear at the bottom of your grub menu.

Removing the executable bit from any file in /etc/grub.d will exclude the file from being included in grub updates.

  • [COLOR=DarkRed]Building a Totally Customized Menu[/COLOR]: Ok, admit you are a control freak and you want to see only what you build yourself - customized titles, no "*memtest86+*" and no extra kernels. Here is how you do it:
  • Run *sudo update-grub* to get the current available kernels.
  • Copy the desired "menuentry" listings from /boot/grub/grub.cfg to /etc/grub.d/40_custom The entry begins with the line starting with "menuentry" and ends with a line containing "}".
  • Add any other "menuentry" items you wish to see on the boot menu.
  • Edit the titles of the "menuentry" line if desired (between the quotation symbols). Do not change the lines following the "menuentry" line. Each entry should start with a "menuentry" line and end with a "}" on the last line.
  • Remove the executable bit from */etc/grub.d/10_linux, /etc/grub.d/20_memtest86+* and */etc/grub.d/30_os-prober*

sudo chmod -x /etc/grub.d/10_linux /etc/grub.d/20_memtest86+ /etc/grub.d/30_os-prober

  • Run "sudo update-grub"
  • The updated /boot/grub/grub.cfg file should now contain only sections for "00_header", "05_debian_theme" and "40_custom".
  • The grub.cfg file will not be updated with the addition of a new kernel. To add a new kernel, make "10_linux" executable, run "sudo update-grub" to refresh the available kernels, and repeat these instructions.

[/B][/COLOR]

  • [COLOR=DarkRed][B]Don't forget to run "sudo update-grub" after making any changes to your /etc/grub.d files.

Manual editing of /boot/grub/grub.cfg is not normally encouraged, as it can be overwritten by system operations and updates. *grub.cfg* is created by various Grub2 scripts, and it is usually preferable to edit the content of the scripts so the changes are retained during updates. The files that should be edited are contained in the */etc/grub.d* folders and the */etc/default/grub* file. Users making changes to grub.cfg should recognize these changes may be overwritten or should disable the ability of the system to update the grub.cfg file.

  • [SIZE=3][COLOR=DarkRed]Manual Editing of grub.cfg[/COLOR] [/SIZE]

In order to discourage its editing, *grub.cfg* is read-only. If you _must_ edit this file:


gksudo gedit /boot/grub/grub.cfg

Entries should be removed by editing or removing files in the /etc/grub.d folder. The [COLOR=DarkRed]*/boot/grub/grub.cfg*[/COLOR] file is read-only and should not normally require editing.

  • [COLOR=Navy][SIZE=3]Removing Entries from Grub 2[/SIZE][/COLOR]

  • [SIZE=3][COLOR=DarkRed]Automatically.[/COLOR][/SIZE]
  • Too Many Kernels?
  • If you are not sure of the kernel you are currently using, in a terminal type "uname -r".
  • Kernels removed via APT (Synaptic, "apt-get remove", etc.) will automatically update [COLOR=DarkRed]*grub.cfg*[/COLOR] and no user action is required. A great tool for removing kernels (and menu entries) is Ubuntu-Tweak, a safe and easy-to-use GUI app.
  • Many users keep one previous kernel known to work on the machine as a backup.
  • Synaptic
  • Type the kernel number in the search window at the upper right (for example - 2.6.28-11).
  • Find the "linux-image" and "linux-headers" files for the applicable kernel (example - linux-image-2.6.26-11 or "linux-image-2.6.26-11-generic).
  • Right click and select "Mark for Complete Removal" and then press the Apply main menu button.
  • The kernels will be removed from your system and from the Grub menu.

  • Ubuntu-Tweak
  • Go to the [[COLOR="DarkGreen"]Ubuntu-Tweak download page[/COLOR]]("http://ubuntu-tweak.com/downloads/").
  • Add the repository as per the instructions, or download the file manually and double-click the .deb file to install.
  • Ubuntu-Tweak will be available under Applications > System Tools.
  • To clean the kernels:
  • Select "Package Cleaner" on the left and ""Clean Kernel" from the right panel.
  • Press the "Unlock" button at the lower right, enter your password.
  • Select from the displayed list the kernel images and headers you wish to remove. The kernel in use is not listed.
  • Press the "Cleanup" button at the lower right to remove the selected kernel images and headers.

  • Too Many Operating Systems?
  • Other Operating Systems which have been removed from the computer will also be removed from the menu once "[COLOR=Navy]*update-grub*[/COLOR]" is run as root.
  • Menu items are placed on the Grub2 menu by scripts. If you don't want other Operating Systems to be entered in the menu, disable */etc/grub.d/30_osprober*
  • Run this command to stop the script from running: *sudo chmod -x /etc/grub.d/30_os-prober*
  • GRUB_DISABLE_OS_PROBER='true' in */etc/default/grub*

sudo chmod -x /etc/grub.d/20_memtest86+

  • Memtest86+
  • ```
[/LIST]
 
[/LIST]
 
[*]Run the *update-grub* command to allow the changes to be incorporated in grub.cfg
[/LIST]
 
[/LIST]
 

[*][SIZE=3]**[COLOR=DarkRed]User-Created Entries.[/COLOR]**[/SIZE]
[LIST]
[*]To remove a user-created menu entry, remove the applicable file from the /etc/grub.d folder.
[*]If a custom file contains multiple entries, individual items may be removed and others retained.
[*]Once the file has been removed or edited, run "[COLOR=Navy]*update-grub*[/COLOR]" to update [COLOR=DarkRed]*grub.cfg*[/COLOR].
[/LIST]
[/LIST]

 
[*]**[COLOR=Navy][SIZE=3]Grub 2 Splash Images & Theming[/SIZE][/COLOR] **
There are two distinct areas of this section. 

**Backgrounds & Fonts:** In Grub 2, adding a background image and changing font colors is relatively easy and are detailed briefly below. I've included additional information in the _[Grub 2 Drop-In Backgrounds & Font Selection]("http://ubuntuforums.org/showthread.php?t=1739412")_ thread, which was written specifically for Grub 1.99 (Natty and later) but which can be applied in part in earlier versions.

Here is a link to Herman's page on creating Grub 2 background images: [_http://members.iinet.net/~herman546/p20/GRUB2%20Splashimages.html_]]("Here is another guide to help with creating Grub 2 images: [URL="http://members.iinet.net/%7Eherman546/p20/GRUB2%20Splashimages.html")

**Themes:** Although there are no easy-to-use GUI applications to construct great-looking themes, Grub 2 allows the user to create complex menus if the user wishes to construct them manually. Forum member *towheedm* has written an extremely comprehensive and well-documented guide to creating great-looking themes with Grub 2. His PDF document and sample files walk you through the process of buidling a custom theme. Take a look at his example in the thumbnail at the bottom of this post. Here is the download link for _[A Beginner's Guide to Theming GRUB2]("http://ubuntuforums.org/showthread.php?t=1534689")_

**Adding a Background Image:**
[LIST]
[*]Manually copy grub splash images into the /usr/share/images/grub folder or install the default grub2 splash images via Synaptic or:

sudo apt-get install grub2-splashimages

[*]The grub2's splash images are normally, but not always, controlled by /etc/grub.d/05_debian_theme. There are additional options in Grub 1.99 & later, and 2 variants in Grub 1.98 (see below). 

[LIST]
[*]**[COLOR=Navy]Grub 1.99 (Natty)[/COLOR]**
In addition to the methods mentioned in the next section, Grub 1.99 allows the user to simply place an image in the Grub folder. This image will be used as the Grub 2 splash image (background). Here are the details on how it works:
[Grub 2 Drop-In Backgrounds & Font Selection ]("http://ubuntuforums.org/showthread.php?t=1739412")


[*]**[COLOR=Navy]Grub 1.98 late + Grub 1.99 (Maverick / Natty ) [/COLOR]**
Rather than edit the */etc/grub.d/05_header* or */usr/share/desktop-base/grub_background.sh* file, the user can now include the background image designation directly into */etc/default/grub*. The path assumes the folder is located in the default system partition. 
> 
GRUB_BACKGROUND=/path/filename
Example: GRUB_BACKGROUND="/home/my_username/grub_images/my_grubimage.png"


[*]**[COLOR=Navy]Grub 1.98 (Lucid) [/COLOR]**
For Grub 1.98, attempt to open the following two files for editing:

gksudo gedit /usr/share/desktop-base/grub_background.sh /etc/grub.d/05_debian_theme

[LIST]
[*]If the file */usr/share/desktop-base/grub_background.sh* is empty/blank, edit /etc/grub.d/05_debian_theme
[*]If the file */usr/share/desktop-base/grub_background.sh* exists, edit this file and not /etc/grub.d/05_debian_theme.
[/LIST]

Find the following line and edit the highlighted area, replacing it with the path and grub splash image you wish to use:
> 
WALLPAPER="/<path-to-image>/<your-image-name-here-including-extension>"
Example: WALLPAPER="/home/my_username/grub_images/my_grubimage.png"


[*]**[COLOR=Navy]Grub 1.97~beta4[/COLOR]**
Find the following line and edit the highlighted area, replacing it with the grub splash image you wish to use (and located in /usr/share/images/grub):
> 
for i in {/boot/grub,/usr/share/images/grub}/[COLOR=DarkRed]**moreblue-orbit-grub**[/COLOR][SIZE=6][COLOR=Red].[/COLOR][/SIZE]{png,tga} ; do
Note: There is a period ( [SIZE=6][COLOR=Red].[/COLOR][/SIZE] ) following the filename.
[LIST]
[*] At one point Grub 2 splash images were downloaded and stored in */usr/share/images/desktop.base* If this is where your grub images are stored, change the address in the previous command accordingly ( ... /usr/share/images/desktop-base} ... ).
[/LIST]
[/LIST]
 
[*]Save the file, then update grub2:

sudo update-grub

[/LIST]

A Note About Grub 2 Theming
[LIST]
Theming is still under development in Grub 2. There are several different approaches being taken and users of Lucid have had success incorporating theming into their bootlaoder menus. For those interested in trying out the experimental theming possibilities, here are some references:
[**[COLOR="DarkGreen"]GRUB2 theming for lucid?[/COLOR]**]("http://ubuntuforums.org/showthread.php?p=8607827") This thread has an excellent discussion about the state of theming in in bootloaders, as well as instructions on how to set it up as you get further into the thread. Both BURG and Grub 2 experimental are discussed.
Grub 2 Experimental:
[[COLOR="DarkGreen"]http://grub.gibibit.com/[/COLOR]]("http://grub.gibibit.com/") One method of introducing theming, when combined with this Launcpad PPA for Grub 2 experimental, [[COLOR="DarkGreen"]Felix Zielcke's PPA[/COLOR]]("https://launchpad.net/%7Efzielcke/+archive/grub-ppa")
BURG:
[[COLOR="DarkGreen"]https://help.ubuntu.com/community/Burg[/COLOR]]("https://help.ubuntu.com/community/Burg") and [[COLOR="DarkGreen"]http://ubuntuguide.net/add-os-logos-into-grub2-boot-menu-using-burg[/COLOR]]("http://ubuntuguide.net/add-os-logos-into-grub2-boot-menu-using-burg")
[/LIST]


[*]**[COLOR=Navy][SIZE=3]Changing Menu Resolutions[/SIZE][/COLOR] **
If the user wishes to change the resolution of the GRUB 2 screen while using a splash image follow these steps:
[LIST=1]
[*]Set the desired resolution in /etc/default/grub
[LIST]
[*]Change the value of GRUB_GFXMODE= (Example: GRUB_GFXMODE=800x600)
[LIST]
[*]If unsure of what resolutions are available to GRUB 2 they can be displayed by typing *vbeinfo* in the GRUB 2 command line. The command line is accessed by typing "c" when the main GRUB 2 menu screen is displayed.
[/LIST]
 
[/LIST]
 
[*]Select an image of the same size and make the change in /etc/grub.d/05_debian_theme
[LIST]
[*]The image name is located in the line beginning with *"WALLPAPER="* (Grub [noparse]1.98[/noparse]) or  *" for i in {/boot"* in Grub 1.97-beta.
[*]If an image of the correct size is not used, the menu may not be positioned correctly.
[*] Use the image editor of your choice to create/resize an image to the correct size.
[*]The user may be able to view the image size via Properties in a file browser (check the Properties Image tab in Nautilus).
[*]Images must be .tga, .png, or .jpg (8-bit) images, saved in RGB format (non-indexed).
[/LIST]
 
[*]Run update-grub as root to add the new settings to /boot/grub/grub.cfg
[/LIST]


[*]**[COLOR=Navy][SIZE=3]Basic Password Protection[/SIZE][/COLOR] **

Note: To reduce the size of this entry, a separate post with information on establishing Grub 2 password protection is located on the Ubuntu forums at: [**[COLOR="DarkGreen"]Grub 2 Password Protection[/COLOR]**]("http://ubuntuforums.org/showthread.php?t=1369019") and in the links at the bottom of this post.

Grub 2 currently supports *unencrypted* password protection. Encrypted password protection using PBKDF2, as well as password scripting, is currently under development.

Some of the major points regarding Grub 2 password protection:
[LIST]
[*]Grub 2 has the ability to set password protection on individual menuentries and/or for specific users. Examples: Password protect Windows Recovery; prevent user2 from opening the Recovery mode.
[*]If password protection is enabled, the *superuser* username and password are required to gain access to the Grub 2 command line and menu editing modes.
[*]The username and/or password do not have to be the same as the Ubuntu logon name/password.
[*]This is basic password security. The name/password are unencrypted; anyone having physical access to the machine and more than an elementary knowledge of how Linux works will be able to access the configuration files and bypass this feature.
[*]Grub 2 password protection is still being developed. Encryption is available in experimental versions only. If password protection is used, recheck your scripts for changes whenever a new Grub 2 update is released. In 1.97~beta4, passwords must be assigned to each desired menu item. In Lucid Lynx, expect Grub 1.97 to password protect the entire Grub 2 menu if a *superuser* is designated.
[/LIST]


[*]**[COLOR=Navy][SIZE=3]How to Boot to the Recovery Mode w/o a Menu Option[/SIZE][/COLOR] **
[LIST=1]
[*]If you have Grub 2 set to boot without displaying the menu at all, hold the SHIFT key down until the menu displays. (In Grub it was the ESC key.)
[*]Press any key once the menu is displayed to 'freeze' it. Then arrow to the kernel you want to boot.
[*]Press "e"
[*]Scroll to the end of the "linux /boot/vmlinuz...." line. If displayed, remove "quiet" and/or "splash". Add the word "**single**" to the end of the line.
[*]Press CTRL-X to boot to the Recovery menu.
[/LIST]

 
[*]**[COLOR=Navy][SIZE=3]Uninstalling GRUB 2[/SIZE][/COLOR] **
The command line produces a cleaner uninstall and reinstallation. While adding and removing the packages can be accomplished with Synaptic, certain steps must be accomplished in a terminal.
[LIST]
[*] Open a terminal: Applications, Accessories, Terminal.
[*] Make backup copies of the main GRUB 2 folders & files
[LIST]
[*]```
sudo cp /etc/default/grub /etc/default/grub.old
sudo cp -R /etc/grub.d /etc/grub.d.old
sudo cp -R /boot/grub /boot/grub.old

sudo apt-get purge grub-common grub-pc

  • Remove GRUB 2
  • Ensure you have an Internet connection and reliable power source. An interruption of either could leave your system in an unbootable condition.
  • ```
[*] The user will be warned the system will be unbootable without installing another bootloader.
[*] Once the packages are removed, many files will still remain in '/boot/grub'
[/LIST]
 
[*] Install GRUB 2
[LIST]
[*]```
sudo apt-get install grub-common grub-pc

sudo update-grub

  • The user will be asked for any special commands to add to the default "linux" line. If you aren't sure, leave it blank, press the TAB key to highlight "OK" and press ENTER.
  • Select the appropriate *drive* on which to install Grub2 (sda, sdb, etc) by highlighting the entry and pressing the space bar. Normally a partition (sda1, etc) should not be selected.
  • ```
[*]Reboot
[/LIST]
[/LIST]

 
[*]**[COLOR=Navy][SIZE=3]Reinstalling GRUB 2 from LiveCD[/SIZE][/COLOR] **
If you cannot boot from GRUB 2 and need to reinstall it, here is the simple method. For more details or for advanced options, refer to the Ubuntu community documentation here: [Grub2 - Reinstalling GRUB 2]("https://help.ubuntu.com/community/Grub2#Reinstalling%20GRUB%202"):
[LIST]
[*]Boot the Ubuntu Live CD (Try without installing).
[*]From the Desktop, open a terminal - Applications, Accessories, Terminal.
[*]Determine your normal system partition - `sudo fdisk -l`  (That is a lowercase L)
[*]If you aren't sure, run `df -Th`. Look for the correct disk size and ext3 or ext4 format.
[*]Mount your normal system partition: ```
sudo mount /dev/sdXY /mnt

  • If you aren't sure if you mounted the correct partition, once it's mounted run "nautilus /mnt" to inspect the partition. If it is the correct partition, you should see the normal Ubuntu folders such as /bin, /boot, /etc, /home, etc
  • Example: sudo mount /dev/sd*a1* /mnt
  • Note: The partition to mount is normally the partition on which Ubuntu was installed: sda1, sdb5, etc. If you have a separate /boot partition, use the device on which the /boot partition is located. Grub 2 works best when installed in the MBR of the drive to which BIOS boots. Also remember that you *mount* the partition (including the number) in this step, but you do *not* include the partition number when you run the "sudo grub-install" command later.
  • Note: GRUB 2 counts the first drive (X) as "0", but the first partition (Y) as "1"

sudo mount /dev/sdXY /mnt/boot

  • Only if you have a separate boot partition:
  • ```
[/LIST]
 
[*]Reinstall GRUB 2: ```
sudo grub-install --root-directory=/mnt /dev/sdX

  • Example: sudo grub-install --root-directory=/mnt /dev/sd*a*
  • Note: Substitute the device on which Ubuntu was installed - sda, sdb, etc. Do *not* specify a partition number.

sudo umount /mnt

  • Unmount the partition *: ```
[LIST]
[*]* Note: If you mounted a separate /boot partition, unmount it first:  

sudo umount /mnt/boot

[/LIST]
[*]Reboot.
[/LIST]

 
[*]**[COLOR=Navy][SIZE=3]Booting LiveCD and Other ISOs[/SIZE][/COLOR] **
Grub 2 provides the capability to boot certain .iso images. These image files (ISO's) include the [[COLOR="DarkGreen"]Ubuntu LiveCDs[/COLOR]]("http://www.ubuntu.com/getubuntu/download"), [SystemrescueCD]("http://www.sysresccd.org/Download") and the [Parted Magic CD]("http://partedmagic.com/download.html"). 

See the following thread in the Tutorials section for information and instructions on how to boot Ubuntu and other system ISOs:
[**[COLOR="DarkGreen"]ISO Booting with Grub 2[/COLOR]**]("http://ubuntuforums.org/showthread.php?t=1549847")


[*]**[COLOR=Navy][SIZE=3]Booting from the Rescue Mode[/SIZE][/COLOR] **
One of the improvements of Grub 2 is the ability to recover from a failed boot from the Grub 2 "grub rescue>" or "grub>" prompt. For a detailed discussion and instructions on booting from the Grub 2 prompt, please refer to this tutorial:
[**[COLOR="DarkGreen"][COLOR="DarkGreen"]HOWTO: Boot & Install Ubuntu from the Grub Rescue Prompt[/COLOR][/COLOR]**]("http://ubuntuforums.org/showthread.php?t=1599293")

Additional information on the *rescue mode* is available in the ["_[COLOR="DarkGreen"]Command Line & Rescue Mode[/COLOR]_"]("https://help.ubuntu.com/community/Grub2#Command%20Line%20&%20Rescue%20Mode") section of the Ubuntu Grub 2 community doc.


[*]**[COLOR=Navy][SIZE=3]Restoring GRUB2 / XP / Vista / Win 7 Bootloaders[/SIZE][/COLOR] **
*talsemgeest* has written an excellent guide on how to restore the bootloaders of various operating systems following the installation of another one. Make sure you reference the section for "9.10 and Beyond", which is for GRUB 2.

Rather than duplicate his efforts in this post, here is the link to the original:
[**[COLOR="DarkGreen"]http://ubuntuforums.org/showthread.php?t=1014708[/COLOR]**]("http://ubuntuforums.org/showthread.php?t=1014708")

**Restoring Windows MBR without a Windows CD**
If you want to boot directly to Windows but Grub has overwritten the MBR, the  normal procdeure is to use the Windows CD to restore things. If you do not have access to the Windows CD, the following commands will rewrite the MBR, removing Grub and allowing the system to boot directly into Windows. 

Boot the Ubuntu LiveCD, open a terminal (Applications, Accessories, Terminal) and enter the following commands. Make sure you correctly identify the Windows device (normally *sda*):

sudo apt-get install lilo sudo lilo -M /dev/sd[COLOR=DarkRed]a[/COLOR] mbr


**Bonus Section: BSD Menuentry** - If you need to have an entry to boot into BSD/Windows from the Grub2 menu, here is the *menuentry* to put into a custom file:
> 
menuentry "FreeBSD" {
insmod ufs2
set root=(hd1,1)
chainloader +1
}


[*]**[COLOR=Navy][SIZE=3]Grub Rescue Image[/SIZE][/COLOR] **
A bootable Grub 2 rescue image is available for both floppies and CDs. To obtain the images, install "grub-rescue-pc". Once installed, three images are available in */usr/lib/grub-mkrescue*. Use the I]grub-mkrescue [/I] command to create the rescue ISO. See the MAN page for more information. Note: A customized rescue ISO only uses the current systems Grub 2 /boot/grub files. No information from */etc/grub.d* or */etc/default/grub* is imported.

The ISO only boots to the grub prompt. It uses the Grub 2 files found on the ISO; if the problem is with the system's Grub 2 files the rescue ISO should boot. However, the ISO contains no kernels and must be told where to find the correct kernel and initrd files on the system. The user must know the drive/partition on which the boot files are located and the non-Grub files must exist and be uncorrupted. 

If the user hasn't made a rescue floppy/ISO, other alternatives include the Ubuntu Installation/LiveCD or SuperGrub Disk.
[LIST]
[*]grub-rescue-floppy.img - For floppy images.
[LIST]
[*]To Install:
[*]Insert a disk in the floppy drive.
[*]```
fdformat /dev/fd0
mkfs -t msdos /dev/fd0
dd if=/usr/lib/grub-rescue/grub-rescue-floppy.img of=/dev/fd0

grub-mkrescue --output=<path/filename>

  • grub-rescue-cdrom.iso - When burning the image to a CD, select the option to copy an image and *not* the files.
  • Generate the image using the following command:
  • ```
[/LIST]
 
[*]If an error message "/usr/bin/grub-mkrescue: 324: xorriso: not found", install the *xorriso* package and rerun the command.
[*]Copy the ISO image to a CD using the CD burning app of your choice.
[/LIST]
 
[/LIST]

Once the grub rescue floppy/CD boots to the grub prompt, run the following commands. 

The commands are slightly different than those used for booting by other means. The Grub 2 files on the floppy/CD are used, and only the kernel and initrd.img files need to be loaded.

Command line tips:
[LIST]
[*]Drives start counting at 0 (sda=0, sdb=1, etc). Partitions start counting at 1 (1=1, etc). Substitute the correct drive letter for **X**, correct number for **Y**, and substitute the correct numbers for **(hd0,1)**.
[*]You must type the entire path and kernel and initrd names if (hdX,Y)/vmlinuz and (hdX,Y)/initrd.img do not exist. You can check by running this command:
[LIST]
[*]ls **(hdX,Y)**/
[/LIST]

If *vmlinuz* and *initrd.img* do not exist at (hdX,Y)/, you can simplify the typing using the TAB complete feature.
[*]On the *linux* line, type "vml" and then TAB to help complete the kernel number. Ensure the complete kernel name is entered. Be sure to fill the kernel number completely, and don't forget the "root=" and "ro" sections of the *linux* line.
[*]On the *initrd* line, type "ini" and TAB to fill in a large part of the name. Continue typing/TABBING to ensure the complete .img name is used.
[*]Sections in **bold** should be changed to match the user's system.
[/LIST]

set root=(hd0,1) linux (hdX,Y)/vmlinuz root=/dev/sdXY ro

or if (hdX,Y)/vmlinuz does not exist:

linux (hdX,Y)/boot/vmlinuz-2.6.32.25-generic root=/dev/sdXY ro

then

initrd (hdX,Y)/boot/initrd.img

or if (hdX,Y)/initrd.img does not exist:

initrd (hdX,Y)/boot/initrd.img-2.6.33-25-generic boot

[*]**[COLOR=Navy][SIZE=3][COLOR=Red]Grub 2 Fallback[/COLOR][/SIZE][/COLOR] **
There is a little-documented 'fallback' capability which allows Grub 2 to select an alternate menuentry should the default entry fail. Since Grub 2/Natty uses submenus which may alter the way to use fallback, this section covers **Grub 1.98/Maverick & earlier**.

To designate a fallback menuentry, add the following to */etc/grub.d/40_custom*. **[COLOR="DarkRed"]X[/COLOR]** is the menuentry number (start counting the grub.cfg menuentries at 0):
> set fallback=**[COLOR="DarkRed"]X[/COLOR]**

Notes regarding the Grub 2 Fallback Option:
[LIST]
[*]In Maverick, using the title rather than the menuentry number does not appear to work in /etc/grub.d/40_custom
[*]The title can be used if ***set fallback="<title>"*** is placed in /boot/grub/grub.cfg, but is not recommended as it will be removed during updates.
[*]Instructions for using the fallback option in Natty/Grub 1.99 will be added once Natty is officially released.
[/LIST]


[*]**[COLOR=Navy][SIZE=3][COLOR=Red]Selected Problems & Bugs[/COLOR][/SIZE][/COLOR] **


**[COLOR=DarkRed][SIZE=3]"out of disk" ,"device not found", "no such device" , "root device" Errors[/SIZE][/COLOR] **
Causes are many, but can be caused by Grub2 not finding partitions/files it is looking for. Some possible areas to explore while troubleshooting:
[LIST]
[*]Does your BIOS see the files? Older BIOS may not see past 8GB or 137GB  of the partition. You may need to create a separate /boot partition or adjust the BIOS to use the 'large disk' mode or update the BIOS to allow it to use today's larger disks.
[*]Some users may need to add "rootdelay=90" to the end of the "linux" line in /etc/default/grub. The might be necessary if the system takes a long time to recognize the drive.
[*]The BIOS controller mode may need to be changed. Change the BIOS entry for the SATA Controller from from AHCI to Compatibility mode.
[/LIST]

**[COLOR=DarkRed][SIZE=3]Lubuntu Dual Booters - No Windows Menu[/SIZE][/COLOR] **
Lubuntu apparently doesn't ship with the package *os-prober* so Windows will not be added to the Grub 2 menu. To add Windows, install *os-prober*, update grub and then check to see if Windows is now in the menu:

sudo apt-get install os-prober sudo update-grub grep menuentry /boot/grub/grub.cfg



[[COLOR="DarkGreen"]http://www.gnu.org/software/grub/manual/[/COLOR]]("http://www.gnu.org/software/grub/manual/")


**[COLOR=DarkRed][SIZE=3]Grub Update results in "No Such Disk":[/SIZE][/COLOR]**
A late July 2010 Grub 2 update is causing a "**[COLOR=DarkRed]no such disk[/COLOR]**" error for some users of WUBI, resulting in an unbootable system. If the system doesn't display the original Windows menu, the most likely cause of the failure is that Grub 2 was installed in the MBR and/or on the Windows partition. To correct this, restore the Windows bootloader using this link:
[[COLOR="DarkGreen"]How to restore the Ubuntu/XP/Vista/7 bootloader[/COLOR]]("http://ubuntuforums.org/showthread.php?t=1014708")

Whether the failure is due to improper user selections or Grub 2's failure to recognize a Wubi install, it has been reported in the following bug and users can review it for status updates and recovery options when they become available:
[https://bugs.launchpad.net/wubi/+bug/610898]("http://www.webupd8.org/2010/05/fix-symbol-grubputs-not-found-when.html")


**[COLOR=DarkRed][SIZE=3]"Fix Symbol 'grub-puts' Not Found" Error Message: [/SIZE][/COLOR] **
[[COLOR="DarkGreen"]http://www.webupd8.org/2010/05/fix-symbol-grubputs-not-found-when.html[/COLOR]]("http://www.webupd8.org/2010/05/fix-symbol-grubputs-not-found-when.html")
If you can get to a normal installation, run the grub-install command or use the "dpkg-reconfigure grub-pc" command to put Grub onto your current partition. If you have to use the Live CD, use *chroot* to run these commands (see *chroot* link in my signature line.


Note: Most of this information has been incorporated, with a few graphics, into a page in the Ubuntu Help site. I will try to keep this post up-to-date and users are free to continue to post comments here. The help page is located here: [https://help.ubuntu.com/community/Grub2]("https://help.ubuntu.com/community/Grub2")


*meierfra* has been busily building pages which detail how to solve many of the common problems users are experiencing with Grub 2. His [[COLOR="DarkGreen"]SourceForge web page[/COLOR]]("http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Main_Page") should be one of the first stops for those seeking answers to Grub 2 issues.


**[COLOR=Red][SIZE=3]Wubi (Windows Ubuntu) Users - wubildr[/SIZE][/COLOR] **
Grub2 updates in the spring of 2010 triggered a bug in the ntfs module causing Wubi boot failures. The solution to this boot problem was posted by Agostino Russo and is found in this Lucid Lynx [LaunchPad Bug Report #477169, Post 210]("https://bugs.launchpad.net/ubuntu/+source/lupin/+bug/477169/comments/210"). The module causing the errors has been fixed and replacing the "wubildr" file in Windows permanently solves this problem. *meierfra* has kindly provided clear instructions on how to fix this problem at [[COLOR="DarkGreen"]http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Wubi_9.10[/COLOR]]("http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Wubi_9.10")

**[COLOR=DarkRed]Lose Ubuntu/Windows After Installing the Other [/COLOR]**
If you have lost the ability to boot into Windows or Ubuntu following the installation/reinstallation of the other OS it could be an overwritten MBR issue. If the OS was previously working, there is an excellent guide written by *talsemgeest* that may very well restore the lost OS. Here is the link:
[**[COLOR="DarkGreen"]How to restore the Ubuntu/XP/Vista/7 bootloader (Updated for Ubuntu 9.10)[/COLOR]**]("http://ubuntuforums.org/showthread.php?t=1014708")


**[COLOR=DarkRed]No Menu On Initial Boot[/COLOR]**
If you are already on the Ubuntu Desktop, run "sudo update-grub". This may detect additional operating systems, which may allow the Grub menu to be displayed on the next boot. Otherwise:
Open */etc/default/grub*:

gksu gedit /etc/default/grub

Set "**GRUB_TIMEOUT=**" to a positive integer (number of seconds to display the menu before automatic selection) or "-1" to wait for the user to press ENTER (no timeout). The entry will look like this:
> 
**#**GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="**10**"
Save the file, update grub ("sudo update-grub") and reboot.


**[COLOR=DarkRed]HP Machines Fails to Load Grub after Using Windows - Bug [/COLOR][bug/441941]("https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/441941")**
After installing Grub 2 on a HP machine, the system boots normally until the first time it's booted into Windows. On the next boot, the system hangs at "Grub loading". 

Workaround: HP protection tools are rewriting to the MBR when Windows is run. The *protecttools* app must be removed/disabled. Refer to post #10 in the Bug Report.


**[COLOR=DarkRed]"Grub loading. The symbol ' ' not found. Aborted." on Dell machines.[/COLOR]**.
On Dell computers with Dell DataSafe Local Backup (DDSLB) installed, the above message is displayed with a series of characters within the ' ' section. This is a reported bug, 
[[COLOR="DarkGreen"]bug #482757[/COLOR]]("https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/482757").  Thanks to merry_meercat's [**[COLOR="DarkGreen"]post[/COLOR]**]("http://ubuntuforums.org/showthread.php?p=9081112#post9081112") which details how to fix the problem.

**[COLOR=DarkRed]"error: the symbol `grub_xputs` not found"[/COLOR]**.
Use the Live CD to chroot into your Ubuntu partition and purge/reinstall Grub2. See post #5 here: 
[**[COLOR="DarkGreen"]http://ubuntuforums.org/showpost.php?p=9836539&postcount=5[/COLOR]**]("http://ubuntuforums.org/showpost.php?p=9836539&postcount=5").


**[COLOR=DarkRed]"error: unknown filesystem" on old motherboard & BIOS[/COLOR]**.
If you are using an older motherboard/BIOS, make sure the BIOS and system can read your hard drive. There is a 137GB limit in old BIOS settings that prevents the system from recognizing data placed 'deeper' into the partition. Try creating a /boot partition smaller than 130GB and see if the system now recognizes it. You can also check to see if there is a BIOS update which may eliminate this problem.


**[COLOR=DarkRed]Grub "error: out of disk" or "failed to boot default entries"[/COLOR]**.
This error message is sometimes generated when Grub 2 cannot properly write to the file */boot/grub/grubenv*.  Refer to *meierfra's* [[COLOR="DarkGreen"]Boot_Problems:Write[/COLOR]]("http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:write") page.


**[COLOR=DarkRed]"Grub loading. The symbol ' ' not found. Aborted." on Dell machines.[/COLOR]**.
On Dell computers with Dell DataSafe Local Backup (DDSLB) installed, the above message is displayed with a series of characters within the ' ' section. This is a reported bug, 
[bug #482757]("https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/482757").  Thanks to merry_meercat's [**[COLOR="DarkGreen"]post[/COLOR]**]("http://ubuntuforums.org/showthread.php?p=9081112#post9081112") which details how to fix the problem.


[*]**[COLOR=Navy][SIZE=3][COLOR="DarkGreen"]Links[/COLOR][/SIZE][/COLOR] **
My Threads
[Grub 2]("https://help.ubuntu.com/community/Grub2") (help.ubuntu.com)
[Grub 2: Title Tweaks]("http://ubuntuforums.org/showthread.php?t=1287602")
[Grub 2: 5 Common Tasks]("http://ubuntuforums.org/showthread.php?t=1302743")
[Grub 2: Introduction]("http://ubuntuforums.org/showthread.php?t=1285897#post8072444")
[Grub 2: Purge & Reinstall]("http://ubuntuforums.org/showthread.php?t=1581099")
[Grub 2: ISO Booting with Grub 2]("http://ubuntuforums.org/showthread.php?t=1549847")
[Grub 2: Password Protection]("http://ubuntuforums.org/showthread.php?t=1369019")
[Grub 1.99 Changes]("http://ubuntuforums.org/showthread.php?p=10720322#post10720322")
[Grub 1.99 Submenus]("http://ubuntuforums.org/showthread.php?p=10720316")
[Grub 2 Drop-In Backgrounds & Font Selection]("http://ubuntuforums.org/showthread.php?t=1739412")

Apps
[Grub Customizer ]("http://ubuntuforums.org/showthread.php?t=1664134")
[Boot Repair]("http://ubuntuforums.org/showthread.php?t=1769482")
[StartUp-Manager]("http://ubuntuforums.org/showthread.php?t=818177")

Other Links
[_Wubi Megathread by Rubi1200_]("http://ubuntuforums.org/showthread.php?t=1639198")
[Grub 2: A Guide for Users (from Kubuntu Forums)]("http://kubuntuforums.net/forums/index.php?topic=3106368.0")
[_'Official' GNU Grub 2 Manual_ (1.99)]("http://www.gnu.org/software/grub/manual/")
[_GNU Grub 2 Manual/Wiki_]("http://grub.enbug.org/Manual") (in development)
[_Grub 2 Wiki_]("http://www.gnu.org/software/grub/grub-2.en.html")
[_Herman's Grub 2 Site_]("http://members.iinet.net/%7Eherman546/p20.html") Comprehensive.
[_Herman's Grub 2 Scripts_]("http://members.iinet.net/%7Eherman546/p20.html") Useful scripts for many Grub 2 tasks.
[_How to restore the Ubuntu/XP/Vista/7 bootloader_]("http://ubuntuforums.org/showthread.php?t=1014708")
[http://grub.gibibit.com/]("https://help.ubuntu.com/community/Grub2")Grub 2 Theming (currently for Ubuntu G2 experimental)
[How to restore the Ubuntu/XP/Vista/7 bootloader]("http://ubuntuforums.org/showthread.php?t=1014708")
[http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Main_Page]("http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Main_Page")  *meierfra's * Grub 2 Solutions Page
[How-to Install 9.10 karmic on fakeraid]("http://ubuntuforums.org/showthread.php?t=1360445") by gilson585
[How to create a Grub 2 Floppy]("http://ubuntuforums.org/showpost.php?p=8761768&postcount=283") See post 283 of this thread. Thank you *peter b*
[Customizing the graphics in Grub]("http://ubuntuforums.org/showthread.php?t=1445724") See post 283 of this thread. Thank you *peter b*
[MultiBootUSB]("http://ubuntuforums.org/showthread.php?t=1518273") Script to install multiple OS's on thumb/USB drives. Thanks *sundar_ima*
[How to: Create a Customized GRUB2 Screen that is Maintenance Free]("http://ubuntuforums.org/showthread.php?t=1542338") Thanks *Cavsfan*
[The Definitive Guide To Theming GRUB 2 - 2nd Edition]("http://www.4shared.com/get/lFCl6wxL/grub_guidetar.html"). PDF with Theme example files for your reading pleasure. The title says it all. Thanks *towheedm*
[/LIST]

A sample Grub 2 Theme as detailed by forum member *towheedm*:
#2

I am running ``` sudo update-grub

~$ sudo update-grub Updating /boot/grub/grub.cfg ... Found linux image: /boot/vmlinuz-2.6.28-14-generic Found initrd image: /boot/initrd.img-2.6.28-14-generic Found linux image: /boot/vmlinuz-2.6.28-13-generic Found initrd image: /boot/initrd.img-2.6.28-13-generic Found linux image: /boot/vmlinuz-2.6.28-12-generic Found initrd image: /boot/initrd.img-2.6.28-12-generic Found linux image: /boot/vmlinuz-2.6.28-11-generic Found initrd image: /boot/initrd.img-2.6.28-11-generic Found memtest86+ image: /memtest86+.bin Found Ubuntu karmic (development branch) (9.10) on /dev/sda6 done

But it does not add the last Karmic entry in the menu:

#

DO NOT EDIT THIS FILE

#

It is automatically generated by /usr/sbin/update-grub using templates

from /etc/grub.d and settings from /etc/default/grub

#

BEGIN /etc/grub.d/00_header ###

set default=0 set timeout=5 set root=(hd0,9) search --fs-uuid --set 9018bfe2-9de3-4692-9883-fc2f875e6455 if font /usr/share/grub/ascii.pff ; then set gfxmode=640x480 insmod gfxterm insmod vbe terminal gfxterm fi

END /etc/grub.d/00_header ###

BEGIN /etc/grub.d/05_debian_theme ###

set menu_color_normal=cyan/blue set menu_color_highlight=white/blue

END /etc/grub.d/05_debian_theme ###

BEGIN /etc/grub.d/10_hurd ###

END /etc/grub.d/10_hurd ###

BEGIN /etc/grub.d/10_linux ###

set root=(hd0,8) search --fs-uuid --set c3eb67b1-7f8f-419b-a462-c79a6c76e5de menuentry "Ubuntu, linux 2.6.28-14-generic" { linux /vmlinuz-2.6.28-14-generic root=UUID=9018bfe2-9de3-4692-9883-fc2f875e6455 ro quiet splash initrd /initrd.img-2.6.28-14-generic } menuentry "Ubuntu, linux 2.6.28-14-generic (single-user mode)" { linux /vmlinuz-2.6.28-14-generic root=UUID=9018bfe2-9de3-4692-9883-fc2f875e6455 ro single initrd /initrd.img-2.6.28-14-generic } menuentry "Ubuntu, linux 2.6.28-13-generic" { linux /vmlinuz-2.6.28-13-generic root=UUID=9018bfe2-9de3-4692-9883-fc2f875e6455 ro quiet splash initrd /initrd.img-2.6.28-13-generic } menuentry "Ubuntu, linux 2.6.28-13-generic (single-user mode)" { linux /vmlinuz-2.6.28-13-generic root=UUID=9018bfe2-9de3-4692-9883-fc2f875e6455 ro single initrd /initrd.img-2.6.28-13-generic } menuentry "Ubuntu, linux 2.6.28-12-generic" { linux /vmlinuz-2.6.28-12-generic root=UUID=9018bfe2-9de3-4692-9883-fc2f875e6455 ro quiet splash initrd /initrd.img-2.6.28-12-generic } menuentry "Ubuntu, linux 2.6.28-12-generic (single-user mode)" { linux /vmlinuz-2.6.28-12-generic root=UUID=9018bfe2-9de3-4692-9883-fc2f875e6455 ro single initrd /initrd.img-2.6.28-12-generic } menuentry "Ubuntu, linux 2.6.28-11-generic" { linux /vmlinuz-2.6.28-11-generic root=UUID=9018bfe2-9de3-4692-9883-fc2f875e6455 ro quiet splash initrd /initrd.img-2.6.28-11-generic } menuentry "Ubuntu, linux 2.6.28-11-generic (single-user mode)" { linux /vmlinuz-2.6.28-11-generic root=UUID=9018bfe2-9de3-4692-9883-fc2f875e6455 ro single initrd /initrd.img-2.6.28-11-generic }

END /etc/grub.d/10_linux ###

BEGIN /etc/grub.d/20_memtest86+ ###

menuentry "Memory test (memtest86+)" { linux /memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { linux /memtest86+.bin console=ttyS0,115200n8 }

END /etc/grub.d/20_memtest86+ ###

BEGIN /etc/grub.d/30_os-prober ###

END /etc/grub.d/30_os-prober ###

BEGIN /etc/grub.d/40_custom ###

This file is an example on how to add custom entries

END /etc/grub.d/40_custom ###

#3

I don't know why grub2 isn't picking it up. I have had a few instances of grub2 not picking up all the kernels scattered over my drives but I don't remember grub2 actually ignoring ones that it located.

Here are a couple of things I do when troubleshooting:

a. Change one of the titles so I know the grub.cfg I see when it boots is the one I am looking at in the editor (i.e. if there are multiple grub.cfg files on your system). You will have to chmod +w to actually edit grub.cfg

b. Search your system for multiple instances of the file.

c. Place the kernel you want to show up in /etc/grub.d/40_custom so at least it shows up when you update grub. At best you will have two instances - the detected and the custom entries; at worst you will have at least the one from the 40_custom file. Don't forget to make the file executable.

d. Reinstall grub2 with grub-install.

#4

It seems I have to unmount the Karmic partition before running 'grub-setup'. It has listed Karmic now. But I still cannot log in. I have now a message something like:

booting from kernel on /dev/sda6
you need to load kernel first

The entries in grub.cfg:

set root=(hd0,8) 
search --fs-uuid --set c3eb67b1-7f8f-419b-a462-c79a6c76e5de
menuentry "Ubuntu, linux 2.6.28-14-generic" {
	linux	/vmlinuz-2.6.28-14-generic root=UUID=9018bfe2-9de3-4692-9883-fc2f875e6455 ro  quiet splash
	initrd	/initrd.img-2.6.28-14-generic

menuentry "Ubuntu karmic (development branch), kernel 2.6.31-2-generic (on /dev/sda6)" {
	set root=(hd0,7)
	linux /boot/vmlinuz-2.6.31-2-generic root=UUID=6ad1f928-50b9-4aea-9495-95df46d08d58 ro quiet splash
	initrd /boot/initrd.img-2.6.31-2-generic

The first entry is for Jaunty, which is my primary OS, the second is for Karmic.

This is my fstab:

# / was on /dev/sda9 during installation
UUID=9018bfe2-9de3-4692-9883-fc2f875e6455 /               ext3    relatime,errors=remount-ro 0       1

# /boot was on /dev/sda8 during installation
UUID=c3eb67b1-7f8f-419b-a462-c79a6c76e5de /boot           ext2    relatime        0       2

# /home was on /dev/sda5 during installation
UUID=4802e809-ecaa-4932-bd01-4a816c0bbd4f /home           ext3    relatime        0       2

# /media/test_boot was on /dev/sda7 during installation
UUID=0c98fbe4-ed7c-4134-994a-07d49074e137 /media/test_boot ext2    relatime        0       2

# /test was on /dev/sda6 during installation
UUID=6ad1f928-50b9-4aea-9495-95df46d08d58 /test           ext3    relatime        0       2

I am a bit lost with all this partition numbers :(

#5

foxy123 said: I still cannot log in. I have now a message something like:

booting from kernel on /dev/sda6
you need to load kernel first

The entries in grub.cfg:


menuentry "Ubuntu karmic (development branch), kernel 2.6.31-2-generic (on /dev/sda6)" {
	set root=**[COLOR="DarkRed"](hd0,7)[/COLOR]**
	linux /boot/vmlinuz-2.6.31-2-generic root=UUID=6ad1f928-50b9-4aea-9495-95df46d08d58 ro quiet splash
	initrd /boot/initrd.img-2.6.31-2-generic

This is my fstab:


# /test was on /dev/sda6 during installation
UUID=6ad1f928-50b9-4aea-9495-95df46d08d58 /test           ext3    relatime        0       2

I am a bit lost with all this partition numbers :(

Edit: foxy123 has a separate boot partition for his Karmic install as well, so his sda7 entry was correct. The following was written before I found out the separate test-boot partition was linked to the Karmic installation.

I believe the problem is with your partition numbers. First, a disclaimer. I'm relying on the *comments* in fstab being accurate. Since they aren't updated, they really can't be relied upon unless confirmed via "mount", "sudo blkid", or some other command. So I'm relying on *sda6* being the correct partition number. I'm also making the assumption that the Karmic install is on sda6 and not sda7, since it is the sda6 UUID in the boot menu.

Grub 2 counts partitions a bit differently. sdXY, with X being the device (a,b,c) and Y being the partition number (1,2,3). The *device* starts counting at 0 - sda is device 0. The partitions (and this is a change) start counting at 1, so partition 1 is counted as 1. So *sdb3* is device 1, partition 3.

In your setup, *sda6* should be listed as (0,6). Try this as your Karmic entry and see if it works correctly. If it doesn't, confirm the device and UUID designations by running "sudo blkid -c /dev/null".

menuentry "Ubuntu karmic (development branch), kernel 2.6.31-2-generic (on /dev/sda6)" { set root=COLOR="DarkRed"[/COLOR] linux /boot/vmlinuz-2.6.31-2-generic root=UUID=6ad1f928-50b9-4aea-9495-95df46d08d58 ro quiet splash initrd /boot/initrd.img-2.6.31-2-generic

#6

What about LILO?

You may have heard about another Linux bootloader called LILO (stands for LInux LOader). While a sensible option for many Linux users, I believe that GRUB is a better choice, for several reasons:

All in all, it seems that GRUB is the winner. So let's see what this baby can do.

  • LILO supports only up to 16 different boot selections; GRUB supports an unlimited number of boot entries.
  • LILO cannot boot from network; GRUB can.
  • LILO must be written again every time you change the configuration file; GRUB does not.
  • LILO does not have an interactive command interface.
#7

well, no luck. Same error. Also after I have it I cannot boot into Jaunty (same error) and have to reboot.

I have checked with sudo blkid -c /dev/null:

/dev/sda2: UUID="4d5250be-75cf-4ce4-9295-ae5e2cabd441" TYPE="swap" 
/dev/sda5: UUID="4802e809-ecaa-4932-bd01-4a816c0bbd4f" TYPE="ext3" - [COLOR="SeaGreen"]**my /home partition**[/COLOR]
/dev/sda6: UUID="6ad1f928-50b9-4aea-9495-95df46d08d58" TYPE="ext3" - [COLOR="SeaGreen"]**Karmic / partition**[/COLOR]
/dev/sda7: UUID="0c98fbe4-ed7c-4134-994a-07d49074e137" TYPE="ext2" - [COLOR="SeaGreen"]**Karmic /boot partition**[/COLOR]
/dev/sda8: UUID="c3eb67b1-7f8f-419b-a462-c79a6c76e5de" TYPE="ext2" - [COLOR="SeaGreen"]**Jaunty /boot partition**[/COLOR]
/dev/sda9: UUID="9018bfe2-9de3-4692-9883-fc2f875e6455" TYPE="ext3" - [COLOR="SeaGreen"]**Jaunty / partition**[/COLOR]

In the Jaunty setup the menu points out to a /boot partition (sda8 c3eb67b1-7f8f-419b-a462-c79a6c76e5de). So I have to use something like:

menuentry "Ubuntu karmic (development branch), kernel 2.6.31-2-generic (on /dev/sda6)" {
	set root=(hd0,7)
	linux /boot/vmlinuz-2.6.31-2-generic root=UUID=0c98fbe4-ed7c-4134-994a-07d49074e137 ro quiet splash
	initrd /boot/initrd.img-2.6.31-2-generic

But it does not either ](*,)

#8

Thank you for the background information.

I am having a small issue I cannot figure out. It is not world stopping but annoying.

I have also posted this on the kubuntu forum as I am running Kubuntu but since we are all a family:D: http://kubuntuforums.net/forums/index.php?topic=3105336.0

To be short here, my issue is the following: I have a ubuntu 9.04 and a kubuntu karmic partition with grub2 on a separate /boot.

The grub2 boot menu shows 2 ubuntu's. One pointing to the swap partition the other going to the correct partition.

The details are on the link above.

Any help would be greatly appreciated

As some of mentioned that they cannot see the atch. on the kubuntu site I will add them here as well. sorry.

#9

Hi guys,

Pretty good guide, thanx. I have a problem that many guys have aparently, but I think it's not exactly about the same issue. I get... Invalid or unsupported executable format ... when I hit my Windows Grub launcher.

Here is my fdisk


Disque /dev/sda: 1000.2 Go, 1000204886016 octets
255 têtes, 63 secteurs/piste, 121601 cylindres, total 1953525168 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Identifiant de disque : 0x00063093

Périphérique Amorce  Début        Fin      Blocs     Id  Système
/dev/sda1   *          63  1941455249   970727593+  83  Linux
/dev/sda2      1941455250  1953520064     6032407+   5  Etendue
/dev/sda5      1941455313  1953520064     6032376   82  Linux swap / Solaris

Disque /dev/sdb: 320.0 Go, 320072933376 octets
255 têtes, 63 secteurs/piste, 38913 cylindres, total 625142448 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Identifiant de disque : 0x375e8732

Périphérique Amorce  Début        Fin      Blocs     Id  Système
/dev/sdb1   *          63    40965749    20482843+   6  FAT16
/dev/sdb2        40965750   625137344   292085797+   f  W95 Etendue (LBA)
/dev/sdb5        40965813   625137344   292085766    7  HPFS/NTFS

Disque /dev/sdc: 203.9 Go, 203928109056 octets
255 têtes, 63 secteurs/piste, 24792 cylindres, total 398297088 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Identifiant de disque : 0x16c175da

Périphérique Amorce  Début        Fin      Blocs     Id  Système
/dev/sdc1   *          63   398283479   199141708+   7  HPFS/NTFS

Here is my Windows Grub boot file section:


title           Microsoft Windows XP Professional
rootnoverify    (hd2,0)
savedefault
makeactive
map             (hd0) (hd2)
map             (hd2) (hd0)
chainloader     +1

My Windows system is actually located in sdc1.

Do somebody have a clue ?

#10

glide said:

My Windows system is actually located in sdc1. Do somebody have a clue ?

Glide,

I don't have a lot of expertise with setting up dual boots with Windows - if it was something obvious and I had a solution I'd post it here.

It appears yours is a Grub legacy question. Since this thread was written about Grub 2, I suggest you create a new thread for your issue. It will get a bit confusing if we mix the two on this thread.

Thanks.

#11

Ha ok yes you are right, sorry. You can get rid of my post :)

#12

"invalid or unsupported executable format" is usually a result of a mapping error on grub 1 but you seem to have it mapped correctly. i can only guess that the device.map might be wrong, try checking /boot/grub/device.map and see if /dev/sdc is actually (hd2) like grub thinks it is

#13

Drs305, thanks for this howto ! My problem was a plethora of old kernels that were displayed when I used GRUB2 to boot into Jaunty ; I had tried to edit them using the methods that worked with the legacy GRUB, but no joy. Only after reading Part 3 in your excellent guide did I become aware that not only could I remove them from the GRUB2 list, but also uninstall them via «Synaptic», thereby saving a considerable amount of space on my HDD. Now it's done, and things are looking a lot better at boot-up time ! Your work is highly appreciated !...

Henri

#14

great tutorial indeed.i had the same problem as my friend mhenriday with lot of kernels and also that grub2 copied the old grub file and made one of his own so i had doubles for the kernels i had, hehe. I just removed executable for 30_ this was the otheros that had been copied from old grub and uninstalled from synaptic and thats all -A

#15

10_linux generates the list of kernels on the current partition on mine 30_os-prober generates the list of kernels and other os's such as windows on other partitions

#16

drs305, Thanks for this. It helped clear up some confusions. I have a couple of questions though.

/etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

If I wante to remove both quite and splash do I need to make the line as follows: GRUB_CMDLINE_LINUX_DEFAULT=""

That's what I did with no errors. Could I just as well comment it out?

Building a Totally Customized Menu: Ok, admit you are a control freak and you want to see only what you build yourself - customized titles, no "memtest86+" and no extra kernels. Here is how you do it:

* Remove the executable bit from /etc/grub.d/10_linux, /etc/grub.d/20_memtest86+ and /etc/grub.d/30_os-prober Removing the executable bit from any file in /etc/grub.d will exclude the file from being included in grub updates. Code:

sudo chmod -x /etc/grub.d/10_linux /etc/grub.d/20_memtest86+ /etc/grub.d/30_os-prober

I'm curious why we need to remove the executables from above statement?

#17

VMC,

That's what I did with no errors. Could I just as well comment it out?

Yes, commenting out the statement would serve the same purpose.

I'm curious why we need to remove the executables from above statement?

The purpose is to prevent duplication of items in a custom menu. Only the files in grub.d that are considered when building menu.cfg are those that are executable. So if you remove that designation it's like the file doesn't even exist for purposes of building a new menu. If the file's script is run, update-grub will probably find the same kernels you have already designated in your custom menu and will reproduce them in the final menu.

#18

Hi methewjay,

methewjay said: You may have heard about another Linux bootloader called LILO

Still the default loader for Slackware linux where it has given trusted service for a *long* time :).

Andrew

#19

I tried to uninstall all of the old linux headers by going through synaptic. They are no longer showing in synaptic but they are still showing in grub after running an update. I took a look in the boot folder and all of the old headers are still there.

#20

nolster12 said: I tried to uninstall all of the old linux headers by going through synaptic. They are no longer showing in synaptic but they are still showing in grub after running an update. I took a look in the boot folder and all of the old headers are still there.

Did you also use Synaptic to uninstall the older "linux-image-2.6.XX-X" files. Look in /boot to see if you still have "vmlinuz-2.6.XX-...", which is what you must uninstall to remove the entries from grub. As noted, they are *vmlinuz..* in /boot but *linux-image-2.6...* in Synaptic.

#21

Thank you for the help. Changed the wording from headers to image and it worked all the old stuff has been removed. Things were begining to look a little untidy. Oh and that was a little more straight forward then editing the old menu.lst that I had gotten used to.

#22

nolster12 said: Oh and that was a little more straight forward then editing the old menu.lst that I had gotten used to.

Grub 2 has the potential to be really powerful. For instance, right now I don't think there is an option in /etc/default/grub to limit the number of kernels to be displayed, but all it will take is for someone to write a simple script or add a few lines to an existing script and it will be done.

The creator of StartUp-Manager has indicated he will get around to making a StartUp-Manager 2 which will be another way of avoiding manual edits of system files.

#23

I need help with installing grub2 to an sd card so that the sd card is bootable. I can boot the filesystem with the machine that I copied the filesystem from (I just copied the lines in /boot/grub/grub.cfg to make a new entry and changed the uuid).

I do not want to mess up the boot of the hard disk in the machine. How do I manage this? I just want it to target boot sector in the sd card and update its grub.cfg

#24

drs305 said: ...

The creator of StartUp-Manager has indicated he will get around to making a StartUp-Manager 2 which will be another way of avoiding manual edits of system files.

Drs305, any further word on this update to «StartUp-Manager» ?...

Henri

#25

mhenriday said: Drs305, any further word on this update to «StartUp-Manager» ?...

Henri

Unfortunately I haven't heard anything but that doesn't mean the dev isn't working on it. I am not connected in any way to the development of the app, other than being a user and advocate of the original.

I just checked on launchpad and the current version (1.9.12-1) was released 24 weeks ago.

#26

I've only just started reading through your tutorial. It's very impressive. :)

I did notice a small error. Under section 2, "Custom User Entries", you have:

Any created file must be made executable. This can be done as root by running "sudo chmod 644 /etc/grub.d/*filename*".

It should be:

sudo chmod 755 /etc/grub.d/filename
sudo chmod +x /etc/grub.d/filename
#27

RedSquirrel said: I've only just started reading through your tutorial. It's very impressive. :)

I did notice a small error. Under section 2, "Custom User Entries", you have:

It should be:

sudo chmod +x /etc/grub.d/filename

Thanks. I've corrected it - I'm a "+x" kind of person myself. Don't know where I got the original value from.

#28

Based on the above tutorial i am trying out grub2 in Jaunty. Am able to boot into Jaunty with grub2. I have also set a custom splash image. One query - In other previous version of grub I could set the size of the viewport window by the command - viewport 0 0 80 25. What is the equivalent command in Grub2 to change the size of the viewport window and where/how do we set this.

#29

on my hd I have two ubuntu partitions, each with multiple kernels, customized, for testing. 30_osprober for each kernel produces the same headline with just the os-version, but no information about the selectable kernels themselves. If this would be solved, I'd see no more need to produce customized grub.conf's at all single updates. Any hints?

#30

bluesscream said: on my hd I have two ubuntu partitions, each with multiple kernels, customized, for testing. 30_osprober for each kernel produces the same headline with just the os-version, but no information about the selectable kernels themselves. If this would be solved, I'd see no more need to produce customized grub.conf's at all single updates. Any hints?

I'm slowly developing a post for the truly anal. It would tell users how to tweak the scripts to effect title changes. Simple examples like this one: "Ubuntu 2.6.31-11" instead of"Ubuntu, Linux 2.6.31-11" or getting rid of the "(on sda7)".

I have several Ubuntu releases scattered on my drive and it picks them all up. A typical display in /boot/grub/grub.cfg and on boot is > Ubuntu, Linux 2.6.31-9-generic (on /dev/sda9)

The line responsible for the additional linux kernel displays should be around line 130 of /etc/grub.d/30-osprober Specifically, this is the line that generates the title:

menuentry "${LLABEL} (up ${DEVICE})" {

The LLABEL variable comes from this line, around line 126:

LLABEL="echo ${LINUX} | cut -d ':' -f 3 | tr '^' ' '"

An example of ${LLABEL} is "Ubuntu, linux 2.6.28-15-generic"

You could check your files to see if you have the same lines.

Perhaps if you have customized the names of the kernels to the point that Grub 2's os-prober is not picking them up. It seems to be doing a pretty good job for me recognizing standard kernel designations.

#31

Hello,

Is there any graphical Grub menu editor for Kubuntu 9.10?? I just want to edit the default loading item on grub menu. (Kubuntu 8.10 instead of 9.10)

Thanks.

#32

Tx drs305 for your great work. I read your howto again a little more attentively, and figured out that there was a relict from early karmic alphas in my /etc/grub.d, a file named 30_otheros with nondescriptive static entries, competing with 30_os-prober. I removed the exec-flag. Is there a limit for the number of oses/kernels 30_os-prober can handle? There are only two automatic entries for my jaunty-partition: only the rt-kernels are found, not the -generics (untouched from standard repos). Another mystery: I deactivated "recovery" in /etc/default/grub, but when I added another drive containing a hardy 8.04.3 with single 2.6.24-24-generic kernel, reconfigure-grub nevertheless made an additional recovery entry, but only for this drive, not for the other ubuntu partitions.

#33

bluesscream said:

Is there a limit for the number of oses/kernels 30_os-prober can handle? There are only two automatic entries for my jaunty-partition: only the rt-kernels are found, not the -generics (untouched from standard repos).

There is no limit that I am aware of. However, 30_os-prober needs work from what I've read on the forum. It is still having problems locating all a system's OSs. Given the scope, I guess that is to be expected. Many times running update-grub after the installation finds some of OS's not found during installation, but there users who can't yet get Grub 2 to find everything. I guess you'll just have to keep monitoring the Karmic forum or the Launchpad bug reports to track developments.

Another mystery: I deactivated "recovery" in /etc/default/grub, but when I added another drive containing a hardy 8.04.3 with single 2.6.24-24-generic kernel, reconfigure-grub nevertheless made an additional recovery entry, but only for this drive, not for the other ubuntu partitions.

Funny you should bring this up. I am working on a post about how to tweak the actual titles - something I don't think comes "pre-installed" in the scripts. While you can disable memtest86+ and recovery modes for 10_linux, I learned today as did you that it doesn't apply to those found with 30_os-prober.

The guide I'm writing provides a way to eliminate memtest86+ and recovery modes but I'm not a programmer and my bash skills are pathetic at best. But I plan on posting what I've learned and let everyone improve on them.

#34

I have multiple distros which change all the time. I chainload to them so I don't have to change my MBR grub. Like when I replace Mandriva with Arch legacy grub could care less and everything boots just fine no matter what and I do not have to wade through an endless list of kernels to find the one I want.

What I would like to do is just dirt simple chainload with grub2. Can I do this??? None of the tutorials or wikis I have seen so far seem to have a very clear answer.

From them I gather that Grub2 seems to rely on UUIDs and these can change when distros are replaced and partitions edited which would be a serious issue with how I go about things.

Running reconfigure-grub on my MBR distro every time one of my other distros gets a kernel update or I replace it seems a ridiculous way to go about this and a serious regression in usability, at least for me.

I am in no real hurry since I do not plan to replace the MBR distro until well after the next LTS is released. If the next time you update the OP you could include something about this it would be greatly appreciated. If I figure it out in the mean time I will let you know.

BTW, chainloading to grub2 works just fine but it complains when it is not on the MBR and tells me that I am making a serious error in not putting it there. I noticed that message in the terminal when grub2 was updating itself on karmic after a kernel update. I think that anyone who would actually see that message would not need to since only people like me actually watch their updates that closely, lol!!.

Anyway, thanks for the great tutorial.

regards, mark

#35

fourscore said: Based on the above tutorial i am trying out grub2 in Jaunty. Am able to boot into Jaunty with grub2. I have also set a custom splash image.

One query - In other previous version of grub I could set the size of the viewport window by the command - viewport 0 0 80 25. What is the equivalent command in Grub2 to change the size of the viewport window and where/how do we set this.

Folks - pls help with above query.

#36

fourscore said: Folks - pls help with above query.

fourscore,

I don't know the answer to this question.

You will probably have more success either doing a search for this issue or posting a new thread which would probably get more responses directly related to your request. I hope you find an answer, as I'm sure there are others who would like to know as well.

#37

The manual is still in development - vestigial would be the best description. A couple of the sites to which you link point out that Grub 2 is still beta or that it isn't ready for new Linux users. So why, oh why are we being lumbered with it at this stage? I've just blown an hour or so trying to boot single user & failed. Now I've found this guide I may be able to make some progress but Grub 2 really shouldn't have been included until (a) it was ready and (b) its own site had useable docs. No, make that just (a) because until its own site has useable docs it *isn't* ready.

Can I suggest that Karmic revert to legacy grub. Don't use grub2 until such time as it's ready for the big time. 10.04, 10.10 or whenever. If the boot loader breaks the whole system breaks. It's far, far too important to go with something that's not ready.

#38
#39

Hi,

I'm creating custom live-cd's following the guide from Capink on http://ubuntuforums.org/showthread.php?t=688872.

I want to use his instructions to build a custom Karmic live-cd. His instructions are very good, but grub is used instead of grub2 (just because no one was using grub2 in early 2008). That presents me with a problem: How do I have to adapt his guide, to have it working for Karmic?

I can't use menu.lst anymore, I don't know what UUID my cd-drive will get while booting the live-cd, and so on. So if anyone could give me any hints? By the way, is there a possibility to still use grub-legacy as boot-loader of the live-cd? I guess that solves the problem too, and it's probably the easiest solution.

Thanks for helping out.

#40

So I'm spending my Saturday afternoon re-writing a bunch of deployment scripts to accommodate the move from Grub to Grub2 :-(

The thing I'm stuck on is that I want to prevent the user from being able to boot to Recovery Mode.

I've set up Grub2 so it doesn't display the menu, and removed the recovery option from the menu, but the user can still bring the menu up by holding down SHIFT. Then they can boot to Recovery Mode (see *How to Boot to the Recovery Mode w/o a Menu Option* above).

Surely, there must be a way of turning this off? Would greatly appreciate any help, as the Grub2 documentation is ... sparse ... :)

#41

igoddard said: Can I suggest that Karmic revert to legacy grub. Don't use grub2 until such time as it's ready for the big time. 10.04, 10.10 or whenever. If the boot loader breaks the whole system breaks. It's far, far too important to go with something that's not ready.

+1 to that.

:popcorn:

#42

duncan_bayne said: So I'm spending my Saturday afternoon re-writing a bunch of deployment scripts to accommodate the move from Grub to Grub2 :-(

The thing I'm stuck on is that I want to prevent the user from being able to boot to Recovery Mode.

I've set up Grub2 so it doesn't display the menu, and removed the recovery option from the menu, but the user can still bring the menu up by holding down SHIFT. Then they can boot to Recovery Mode (see *How to Boot to the Recovery Mode w/o a Menu Option* above).

Surely, there must be a way of turning this off? Would greatly appreciate any help, as the Grub2 documentation is ... sparse ... :)

I hope I haven't exposed a security flaw! ;-)

Seriously though, this ability to edit the menu to boot into the recovery mode is not new to GRUB 2. You can do it on Hardy, Jaunty, etc. If someone has access to the initial boot process I'm not sure what can be done. (Anyone?...)

Once a system is running, one approach would be to restrict who can restart or shut down the system. Of course, if they have access to the computer's power button further measures would have to be taken.

I understand your concerns but since this isn't really a Grub 2 issue, please continue this in a new thread if you wish.

#43

At least with legacy GRUB, if you edit the kernel line to include "rw init=/bin/bash", you are dropped to a root (bash) shell. I assume the same is true with GRUB2.

The only way that I know of to prevent this is to encrypt the root partition (using LUKS, for example) so /bin/bash is unreadable until after a password is entered.

Well, I suppose there is also a way to password-protect the GRUB menu -- at least there was a way to do with under legacy GRUB -- but it is not an effective form of security against someone with physical access to the machine. They could always overwrite GRUB.

#44

unutbu said: Well, I suppose there is also a way to password-protect the GRUB menu -- at least there was a way to do with under legacy GRUB

According to this, password support is not available for grub2 (yet).

#45

I have an old Thinkpad and acpi functions requires the force option ("acpi=force" as kernel parameter); how can I add this to grub2? Also a question for me, how to change grub2 resolution to 1024x768?

#46

sh4d0w808 said: I have an old Thinkpad and acpi functions requires the force option ("acpi=force" as kernel parameter); how can I add this to grub2? Also a question for me, how to change grub2 resolution to 1024x768?Edit with sudo nano /etc/default/grub in *Terminal* so that You have _acpi=force_ in GRUB_CMDLINE_LINUX="... acpi=force ..." keeping whatever else You have inside those qoutes and run sudo update-grub, also in *Terminal*.

#47

sh4d0w808 said: Also a question for me, how to change grub2 resolution to 1024x768?

For this part, uncomment and change this line in /etc/default/grub, assuming this is a resolution supported by your monitor:

GRUB_GFXMODE=1024x768

Then run "sudo update-grub"

Note this answers your question about changing the "GRUB2" resolution. Setting the resolution in the kernel is placed in GRUB_CMDLINE_LINUX="" using the "vga=XXX" convention as in Grub legacy.

#48

THX, guys, I will try these options...

#49

RedSquirrel said: According to this, password support is not available for grub2 (yet).

I was just glancing at the grub wiki again and there may be *some* password support, but it's for individual entries, not for the menu as a whole. (It wouldn't solve duncan_bayne's problem.)

http://grub.enbug.org/Authentication

I haven't played around with it at all since I have no need for it here.

#50

RedSquirrel said: (It wouldn't solve duncan_bayne's problem.)

Thanks for taking a look :-) In the meantime some helpful chap has written a HOWTO on reverting from Grub2 to Legacy Grub (although I'm hesitant to use the term 'revert' when Grub Legacy offers a feature set that's more useful to some people).

I'm going to look into this & will post my experiences.

#51

Found a nit-picking error:

Under *Custom User Entries (/etc/grub.d/40_custom).*

Omitting memtest86+: To prevent "memtest86+" entries in your Grub 2 menu, remove the "executable" bit from /etc/grub.d/20_memtest86+. You can do [COLOR="Red"]thisMergeList[/COLOR] via a file browser by selecting "Properties (right click), Permissions", or via the command line:

#52

egalvan said: Found a nit-picking error:

Under *Custom User Entries (/etc/grub.d/40_custom).*

Thanks egalvan. I've been doing a lot of updates to the original post as Grub 2 keeps evolving (and I learn more). That's one of the reasons the internal title has changed from "Basics" to "Guide". Sometimes I end up with weird cut/paste results - this is one I obviouslu missed.

Edited: Response to next post: I'm not a perfectionist but want to correct any errors. By the way, the "obviouslu" was an attempt at humor but I forgot the smiley... so here it is... ;-)

#53

drs305 said: Thanks egalvan... Sometimes I end up with weird cut/paste results - this is one I obviouslu missed.

No problem, I just don't know how important "nit-picks" are. Some authors want everything perfect, including grammar and spelling. Others just want the code to be perfect.

ErnestG

#54

drs305... I tried to post this as a separate howto, but I don't think it was approved by the mods. maybe you can incorporate some of the additional info into your excellent guide.

[SIZE="4"]How to re-size the grub menu, add a custom image and customize the colors.[/SIZE]

The grub boot menu Ubuntu uses has bothered me since I first saw the SUSE implementation of grub. So, after installing the latest 9.10 beta, I decided it was time to figure out how to get rid of that awful black grub menu. Two days later, here is what I have figured out.

[SIZE="3"]Find an image[/SIZE]

I used the cool heron image from a previous release of ubuntu. Find it here. My desktop resolution is 1280X1024 so that's what I trimmed down this image to match.

You'll have to save this image in PNG/TGA format. You'll see why later so just make sure this is the format you use.

[SIZE="3"]Set the default grub resolution[/SIZE]

Grub2 uses a collection of files to set the various settings it uses. You can specify your desired resolution in the /etc/default/grub file. Edit it with this command:

gksudo gedit /etc/default/grub

Look for the line #GRUB_GFXMODE=640X480. Remove the # and set your desired resolution. Here's what I did:

GRUB_GFXMODE=1280x1024

For whatever reason, one that I don't totally understand, this is not all you have to do to change the resolution grub uses. As I discovered in this blog, there is one more change you need to make.

Edit this file: /etc/grub.d/00_header with the command:

gksudo gedit /etc/grub.d/00_header

You are looking for the line that consists of:

set gfxmode=${GRUB_GFXMODE}

After that line, add:

set gfxpayload=keep

your block of code will look like:

if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
  set gfxmode=${GRUB_GFXMODE}
  **set gfxpayload=keep**
  insmod gfxterm

With this new line, your resolution will now be displayed by grub. If you ran the sudo update-grub command you could reboot and witness the glorious resolution. Since I want to add a background, I won't run this command yet. [SIZE="3"] Set a background image and change the highlighting colors[/SIZE]

To set a background in grub you have to edit the debian theme file stored at /etc/grub.d/05_debian_theme. Edit this file with the command:

gksudo gedit /etc/grub.d/05_debian_theme

First, look for the line:

use bg=false

change it to:

use bg=true

Next you are looking for the "for" statement just below the use bg piece of code we just changed. This for statement will show you the directories that grub will look for your background image in. I added another directory, emphasized in bold, to this list so my entry looks like this:

for i in {/boot/grub,/usr/share/images/desktop-base**,/usr/share/images/grub**}/xxxxxxxxxx.{png,tga} ;

Make sure your image is in either png or tga format and then copy it into one of the directories listed above. I just used /usr/share/images/grub. I named my image ubuntu for ease of use, so I replaced the previous image name (the x's in the example above) with my image name. In the end, it looks like this:

for i in {/boot/grub,/usr/share/images/desktop-base,/usr/share/images/grub}/ubuntu.{png,tga} ;

Finally, depending on your preferences, you might want to adjust the colors grub uses for text and highlighting. With background images enabled, grub defaults to black text with magenta highlighting. To change this scroll down to the bottom of the file and look for the code:

if background_image `make_system_path_relative_to_its_root ${bg}` ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else

You'll want to keep the color after the slash, for both instances, set to black. It seems this makes the foreground transparent allowing your to see your handsome new background. You can see a list of available colors in the grub manual. This is what I used for my brown-heavy image.

if background_image `make_system_path_relative_to_its_root ${bg}` ; then
  set color_normal=white/black
  set color_highlight=brown/black
else

[SIZE="3"]One last thing[/SIZE] In order for all of this stuff to work, you'll have to recompile the grub configuration file. Do this by running:

sudo update-grub

All that's left is to restart and behold the wonder. Enjoy.

#55

johns996 said: drs305... I tried to post this as a separate howto, but I don't think it was approved by the mods. maybe you can incorporate some of the additional info into your excellent guide.

The mods sometimes take 3-4 days or more to approve a tutorial, especially if it's not something they have dealt with. It's possible they just haven't thoroughly reviewed it yet.

I haven't run the commands but it is definitely is worth a separate post. Nice explanation! :-)

#56

Great job! Thanx! :)

#57

GRUB 2 is excellent. It's an important step towards the goal of turning a popular Linux distro into a needlessly convoluted pile of crap just like That Other OS.:(

#58

To me it's easier to remove all prior kernels and related files, then run sudo update-grub than to edit the Menu.lst file in the legacy grub. fwiw

#59

I have upgraded a 9.10 install to grub2 and it won't load the initrd. It says it can't read it and press any key to continue. Grub.cfg is ok but it just won't load it.

#60

rv65 said: I have upgraded a 9.10 install to grub2 and it won't load the initrd. It says it can't read it and press any key to continue. Grub.cfg is ok but it just won't load it.

Does the message say "unrecognized device string"? Although I thought that was a Jaunty bug, but if that is what you are getting then highlight the entry, press "e" until you see a command line that starts with "root", and change that to "uuid", and then boot.

If that isn't the problem but it says it's an "unrecognized device string" you can still attempt to boot by entering the data manually. That error means it can't read or find something in one of the lines of the menuentry.

Refer to this part of the help.ubuntu.com Grub2 page. It also shows graphics of the above example farther down the page.

You can't post questions there, so ask here if needed. I'll be off shortly but someone else can probably help.

#61

It says it's unrecognized. It also can't find /etc/default/grub

It' says that /etc/default/grub isn't a directory.

I'm still finding out how to fix it.

#62

It sounds like you need to reinstall grub2. You can check to see if it thinks it is installed with "update-grub -v" which should read 1.97... if installed. Even so, if it can't find /etc/default/grub there is something messed up with the installation.

If you can get into Ubuntu I'd try reinstalling it, substituting the device you want it installed on.


sudo grub-install /dev/sd[COLOR="Red"]X[/COLOR]

If not, follow these instuctions with the LiveCD: Reinstalling GRUB2 from LiveCD

I'll check back tomorrow. I'm off for the night.

#63

update-grub -v works though

#64

This thread should be made a sticky in the beginners, upgrade & tutorial forums...mods--please--there will be thousands of "how do I edit grub2" threads in the coming weeks.

#65

autocrosser said: This thread should be made a sticky in the beginners, upgrade & tutorial forums...mods--please--there will be thousands of "how do I edit grub2" threads in the coming weeks.

I've taken a lot of this information, added a few graphics, and put it in the "Grub 2" Ubuntu Help documention pages at https://help.ubuntu.com/community/Grub2

The big thing about *all* the posts that have come out in the past month or two is that they will be moved (I think) to an archive section when Karmic is released on Thursday. I believe the individuals will have to 'petition' to get the individual threads moved out of the Testing archive and back somewhere that users can continue to add comments to.

#66

This thread has already been moved to Tutorials and Tips. I think it would be better placed if stickied in Installations and Upgrades.

#67

To tell the truth--this "should" be sticky in every forum we have & I would bet that won't be enough.....

#68

drs305 said: I've taken a lot of this information, added a few graphics, and put it in the "Grub 2" Ubuntu Help documention pages at https://help.ubuntu.com/community/Grub2

Drs305, thanks for this move ! I think users will find this wiki of great value - in the event we come across fellow users with problems of this nature, it seems to obvious place to which to point them !...

Henri

#69

I still haven't read through the whole tutorial. I'm just glancing at bits and pieces. :)

I noticed the first example under "Custom User Entries (/etc/grub.d/40_custom)" has a small error. It appears you accidentally included both tail and cat commands for output.

#!/bin/sh
[COLOR=Blue]exec tail -n +3 $0[/COLOR]
# 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 SystemRescueCD" >&2
[COLOR=Blue]cat << EOF[/COLOR]
menuentry "System Rescue CD" {
set root=(hd0,10)
linux /sysrcd/rescuecd subdir=sysrcd setkmap=us
initrd /sysrcd/initram.igz
}
[COLOR=Blue]EOF[/COLOR]

You could either comment out the tail command or get rid of the cat command (and matching EOF) and move the echo command to the top of the file. (Change the tail command to output from the fourth line onwards.)

#!/bin/sh
echo "Adding SystemRescueCD" >&2
[COLOR=Black]exec tail -n +4 $0[/COLOR]
# 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 "System Rescue CD" {
set root=(hd0,10)
linux /sysrcd/rescuecd subdir=sysrcd setkmap=us
initrd /sysrcd/initram.igz
} 

Edit: You've done an amazing job with this tutorial, drs305. I think the mysterious grub2 will make more sense to users thanks to your effort.

#70

RedSquirrel said: I still haven't read through the whole tutorial. I'm just glancing at bits and pieces. :)

I noticed the first example under "Custom User Entries (/etc/grub.d/40_custom)" has a small error. It appears you accidentally included both tail and cat commands for output.

RedSquirrel,

You are correct and I'll make the change. When th 40_custom files came out with 1.96-Beta the "exec tail -n +3 $0" line was not included in the file. It was added later, perhaps with 1.97-Beta2. I edited the file to include the new line but failed to remove the now extraneous lines.

Thanks.

#71

Is there seriously no way of completely hiding the grub menu on a dual-boot pc?

#72

moore.bryan said: Is there seriously no way of completely hiding the grub menu on a dual-boot pc?

In talking to some of the devs it appears like it may be an Ubuntu/GRUB interface bug rather than an bug in GRUB itself.

EDITED: While I don't know what is being done to fix it, a semi-workaround might be to set both timeouts to "0" so the system boots without displaying the menu. What you lose is the ability to change what you can boot to via the bootloader until you change the menu, since the option of holding down the SHIFT key would not work. With the default timeout of zero it would immediately boot the system without showing the menu.

I keep trying different settings and looking at the files involved in the process. Hopefully someone will eventually figure this one out.

#73

Thanks for the tip drs305, but setting the timeout to zero only boots the default os immediately and holding-down the Shift key does nothing. :-( !

#74

Hi,

By setting GRUB_DEFAULT=saved in /etc/default/grub, update-grub adds saved_entry=${chosen} to every menu entry in /boot/grub/grub.cfg.

However I need it to add saved_entry=0 to every menu entry in /boot/grub/grub.cfg.

Can anybody please tell me how it should be done? For the moment I am doing it by editing the grub.cfg file.

Or is there a way I can choose the entry to use to boot with the pointer? (That would be an alternative, even better solution to my problem.)

Thanks in advance for any reply.

Francesco

#75

Hi,

Replying to myself for the case somebody has a similar problem. Here is what I did:

  • I disabled 20_memtest86+ and 30_os-prober by doing a "sudo chmod 644" on these files. This way, the menu entries for the other operating systems are not created in grub.cfg

saved_entry=0 save_env saved_entry

  • I manually created the menu entries for the other operating systems in 40_custom and added the following two lines to each entry to reset the value to 0:

However, if there is a way to choose the menu entry with the pointer when grub2 shows the menu, that would be better.

Cheers,

Francesco

#76

Well, I am trying to get my two internal HDDs reorganized for 10.04 testing and I need to be able to boot from sda for both and sdb for just sdb.

This worked great for me if sdb was external.

I have PhatDebian on sda and installed grub2 on it. Works great on sda (4 OS').

I have 9.10 on sdb and it works great on sdb when I turn off sda.

When I try to boot to either of the OS' currently on sdb from sda I get the song and dance about needing to mount the kernel first.

I tried installing to the MBR of sdb instead of sda and this continued to work for sda but not for sdb. It did, of coarse, screw booting on sdb when it was the only drive on. I just fixed that.

So, how do you get grub2 to boot 2 internal HDDs? I have nothing on here, now but Debian based OS'.

jak@jak-desktop:~$ blkid /dev/sda1: UUID="3f89f003-c61d-4de5-9da8-9665cfe0b442" SEC_TYPE="ext2" TYPE="ext3" LABEL="Ph.D-B2-root" /dev/sda3: LABEL="Jaunty-64" UUID="4ac13ed4-c6af-4965-ad49-5dc81641814f" TYPE="ext4" /dev/sda5: TYPE="swap" /dev/sda6: LABEL="Stoner-64-root" UUID="f8e427dd-f406-495b-a1ac-a9354c841a45" TYPE="ext4" /dev/sda7: LABEL="Stoner-64-home" UUID="6c29ec93-c9e5-44ec-9e55-cfb1dccda6bc" TYPE="ext4" /dev/sda8: UUID="a7ed8e99-2c87-497d-af02-39948658eb4f" SEC_TYPE="ext2" TYPE="ext3" LABEL="Debian-root" /dev/sda9: LABEL="Debian-home" UUID="df117f65-b942-49d2-9811-5d7e0b6d937d" SEC_TYPE="ext2" TYPE="ext3" /dev/ramzswap0: TYPE="swap" /dev/sda4: UUID="d2665c89-ef8a-40ff-87e9-672b5a7c1efc" SEC_TYPE="ext2" TYPE="ext3" LABEL="Ph.D-B2-home" /dev/sdb5: TYPE="swap" /dev/sdb6: UUID="a4a911c2-0abb-4c5f-87ac-147bf796b6c7" SEC_TYPE="ext2" TYPE="ext3" LABEL="Ph.D-home" /dev/sdb7: UUID="b211ec8b-329a-42d4-8ca4-00d1d87ac8c6" SEC_TYPE="ext2" TYPE="ext3" LABEL="Ph.D-root" /dev/sdb8: UUID="99de3e95-b76e-4f0b-bb2f-be7f8b3250a2" TYPE="ext4" LABEL="Kinky-home" /dev/sdb9: UUID="da21d101-5934-40af-8eb7-3de18c187a95" TYPE="ext4" LABEL="Kinky-root" /dev/sdb10: UUID="7894403b-bc9f-445d-87ba-d091a55134f7" TYPE="ext4" /dev/sdb11: UUID="e765a4fa-0d7b-4972-96cf-db358c07a1db" TYPE="ext4"

There is nothing on sdb10 or sdb11 currently.

All uuids match up fine with the menu.

BEGIN /etc/grub.d/06_custom ###

This file is an example on how to add custom entries

echo "Adding Stoner-64 on sda6" >&2 cat << EOF menuentry "Stoner-64 on sda6" { set root=(hd0,6) linux /vmlinuz root=/dev/sda6 so quiet splash initrd /initrd.img } EOF

echo "Adding PhatDebian on sda1" >&2 cat << EOF menuentry "PhatDebian on sda1" { set root=(hd0,1) linux /vmlinuz root=/dev/sda1 so quiet splash initrd /initrd.img } EOF

echo "Adding Jaunty-64 on sda3" >&2 cat << EOF menuentry "Jaunty-64 on sda3" { set root=(hd0,3) linux /vmlinuz root=/dev/sda3 so quiet splash initrd /initrd.img } EOF

echo "Adding Debian on sda8" >&2 cat << EOF menuentry "Debian on sda8" { set root=(hd0,8) linux /vmlinuz root=/dev/sda8 so quiet splash initrd /initrd.img } EOF

echo "Adding PhatDebian-64 on sdb7" >&2 cat << EOF menuentry "PhatDebian-64 on sdb7" { set root=(hd1,7) linux /vmlinuz root=/dev/sdb7 so quiet splash initrd /initrd.img } EOF

echo "Adding KinkyFR on sdb9" >&2 cat << EOF menuentry "KinkyFR on sdb9" { set root=(hd1,9) linux /vmlinuz root=/dev/sdb9 so quiet splash initrd /initrd.img } EOF

END /etc/grub.d/06_custom ###

BEGIN /etc/grub.d/10_hurd ###

END /etc/grub.d/10_hurd ###

BEGIN /etc/grub.d/10_linux ###

menuentry "Debian GNU/Linux, linux 2.6.30-bpo.1-amd64" { set root=(hd0,1) search --fs-uuid --set 3f89f003-c61d-4de5-9da8-9665cfe0b442 linux /boot/vmlinuz-2.6.30-bpo.1-amd64 root=UUID=3f89f003-c61d-4de5-9da8-9665cfe0b442 ro y initrd /boot/initrd.img-2.6.30-bpo.1-amd64 } menuentry "Debian GNU/Linux, linux 2.6.30-bpo.1-amd64 (single-user mode)" { set root=(hd0,1) search --fs-uuid --set 3f89f003-c61d-4de5-9da8-9665cfe0b442 linux /boot/vmlinuz-2.6.30-bpo.1-amd64 root=UUID=3f89f003-c61d-4de5-9da8-9665cfe0b442 ro single y initrd /boot/initrd.img-2.6.30-bpo.1-amd64 } menuentry "Debian GNU/Linux, linux 2.6.26-2-amd64" { set root=(hd0,1) search --fs-uuid --set 3f89f003-c61d-4de5-9da8-9665cfe0b442 linux /boot/vmlinuz-2.6.26-2-amd64 root=UUID=3f89f003-c61d-4de5-9da8-9665cfe0b442 ro y initrd /boot/initrd.img-2.6.26-2-amd64 } menuentry "Debian GNU/Linux, linux 2.6.26-2-amd64 (single-user mode)" { set root=(hd0,1) search --fs-uuid --set 3f89f003-c61d-4de5-9da8-9665cfe0b442 linux /boot/vmlinuz-2.6.26-2-amd64 root=UUID=3f89f003-c61d-4de5-9da8-9665cfe0b442 ro single y initrd /boot/initrd.img-2.6.26-2-amd64 }

END /etc/grub.d/10_linux ###

BEGIN /etc/grub.d/20_memtest86+ ###

menuentry "Memory test (memtest86+)" { linux /memtest86+.bin }

END /etc/grub.d/20_memtest86+ ###

BEGIN /etc/grub.d/30_os-prober ###

menuentry "Ubuntu 9.04, kernel 2.6.28-16-generic (on /dev/sda3)" { set root=(hd0,3) linux /boot/vmlinuz-2.6.28-16-generic root=UUID=4ac13ed4-c6af-4965-ad49-5dc81641814f ro quiet splash initrd /boot/initrd.img-2.6.28-16-generic } menuentry "Ubuntu 9.04, kernel 2.6.28-16-generic (recovery mode) (on /dev/sda3)" { set root=(hd0,3) linux /boot/vmlinuz-2.6.28-16-generic root=UUID=4ac13ed4-c6af-4965-ad49-5dc81641814f ro single initrd /boot/initrd.img-2.6.28-16-generic } menuentry "Ubuntu 9.04, kernel 2.6.28-15-generic (on /dev/sda3)" { set root=(hd0,3) linux /boot/vmlinuz-2.6.28-15-generic root=UUID=4ac13ed4-c6af-4965-ad49-5dc81641814f ro quiet splash initrd /boot/initrd.img-2.6.28-15-generic } menuentry "Ubuntu 9.04, kernel 2.6.28-15-generic (recovery mode) (on /dev/sda3)" { set root=(hd0,3) linux /boot/vmlinuz-2.6.28-15-generic root=UUID=4ac13ed4-c6af-4965-ad49-5dc81641814f ro single initrd /boot/initrd.img-2.6.28-15-generic } menuentry "Ubuntu 9.04, memtest86+ (on /dev/sda3)" { set root=(hd0,3) linux /boot/memtest86+.bin } menuentry "Debian GNU/Linux, kernel memtest86+ (on /dev/sda3)" { set root=(hd0,3) linux /boot/memtest86+.bin } menuentry "Stoner Edition, 2.6.28-16-generic (on /dev/sda6)" { set root=(hd0,6) linux /boot/vmlinuz-2.6.28-16-generic root=UUID=f8e427dd-f406-495b-a1ac-a9354c841a45 ro quiet splash initrd /boot/initrd.img-2.6.28-16-generic } menuentry "Stoner Edition, 2.6.28-16-generic (recovery mode) (on /dev/sda6)" { set root=(hd0,6) linux /boot/vmlinuz-2.6.28-16-generic root=UUID=f8e427dd-f406-495b-a1ac-a9354c841a45 ro single initrd /boot/initrd.img-2.6.28-16-generic } menuentry "Ubuntu 9.04, memtest86+ (on /dev/sda6)" { set root=(hd0,6) linux /boot/memtest86+.bin } menuentry "Jaunty, kernel 2.6.28-16-generic (on /dev/sda6)" { set root=(hd0,6) linux /boot/vmlinuz-2.6.28-16-generic root=UUID=4ac13ed4-c6af-4965-ad49-5dc81641814f ro quiet splash initrd /boot/initrd.img-2.6.28-16-generic } menuentry "Jaunty, kernel 2.6.28-16-generic (recovery mode) (on /dev/sda6)" { set root=(hd0,6) linux /boot/vmlinuz-2.6.28-16-generic root=UUID=4ac13ed4-c6af-4965-ad49-5dc81641814f ro single initrd /boot/initrd.img-2.6.28-16-generic } menuentry "Debian GNU/Linux, kernel 2.6.26-2-amd64 (on /dev/sda8)" { set root=(hd0,8) linux /boot/vmlinuz-2.6.26-2-amd64 root=/dev/sda8 ro quiet initrd /boot/initrd.img-2.6.26-2-amd64 } menuentry "Debian GNU/Linux, kernel 2.6.26-2-amd64 (single-user mode) (on /dev/sda8)" { set root=(hd0,8) linux /boot/vmlinuz-2.6.26-2-amd64 root=/dev/sda8 ro single initrd /boot/initrd.img-2.6.26-2-amd64 } menuentry "Debian GNU/Linux, kernel 2.6.30-bpo.1-amd64 (on /dev/sdb7)" { set root=(hd1,7) linux /boot/vmlinuz-2.6.30-bpo.1-amd64 root=UUID=b211ec8b-329a-42d4-8ca4-00d1d87ac8c6 ro initrd /boot/initrd.img-2.6.30-bpo.1-amd64 } menuentry "Debian GNU/Linux, kernel 2.6.30-bpo.1-amd64 (single-user mode) (on /dev/sdb7)" { set root=(hd1,7) linux /boot/vmlinuz-2.6.30-bpo.1-amd64 root=UUID=b211ec8b-329a-42d4-8ca4-00d1d87ac8c6 ro single initrd /boot/initrd.img-2.6.30-bpo.1-amd64 } menuentry "Debian GNU/Linux, kernel 2.6.26-2-amd64 (on /dev/sdb7)" { set root=(hd1,7) linux /boot/vmlinuz-2.6.26-2-amd64 root=UUID=b211ec8b-329a-42d4-8ca4-00d1d87ac8c6 ro initrd /boot/initrd.img-2.6.26-2-amd64 } menuentry "Debian GNU/Linux, kernel 2.6.26-2-amd64 (single-user mode) (on /dev/sdb7)" { set root=(hd1,7) linux /boot/vmlinuz-2.6.26-2-amd64 root=UUID=b211ec8b-329a-42d4-8ca4-00d1d87ac8c6 ro single initrd /boot/initrd.img-2.6.26-2-amd64 } menuentry "Debian GNU/Linux, kernel memtest86+ (on /dev/sdb7)" { set root=(hd1,7) linux /boot/memtest86+.bin } menuentry "KinkyFR on sda9 (on /dev/sdb9)" { set root=(hd1,9) linux /vmlinuz root=/dev/sda9 so quiet splash initrd /initrd.img } menuentry "PhatDebian on sda7 (on /dev/sdb9)" { set root=(hd1,9) linux /vmlinuz root=/dev/sda7 so quiet splash initrd /initrd.img } menuentry "PhatDebian on sda7 (on /dev/sdb9)" { set root=(hd1,9) linux /vmlinuz root=/dev/sda7 so quiet splash initrd /initrd.img } menuentry "Ubuntu, Linux 2.6.31-14-generic (on /dev/sdb9)" { set root=(hd1,9) linux /boot/vmlinuz-2.6.31-14-generic root=UUID=da21d101-5934-40af-8eb7-3de18c187a95 ro quiet splash initrd /boot/initrd.img-2.6.31-14-generic } menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode) (on /dev/sdb9)" { set root=(hd1,9) linux /boot/vmlinuz-2.6.31-14-generic root=UUID=da21d101-5934-40af-8eb7-3de18c187a95 ro single initrd /boot/initrd.img-2.6.31-14-generic }

END /etc/grub.d/30_os-prober ###

BEGIN /etc/grub.d/40_custom ###

This file is an example on how to add custom entries

END /etc/grub.d/40_custom ###

I get the same error with my custom entries as with the generated entries.

#77

Just an update.

I was trying to boot with PhatDebian as the root. The only problem that I could see was that the grub2 version was 1.96.

Having a Jaunty install on that same drive, I popped over there and it had the same thing in the repos. Enabled a karmic repo and checked again and there it was, 1.97beta4. Installed that and tried it.

Different grub2, same result. Bummer.

#78

Another update;

I thought maybe turning off sdb and updating grub so that only sda was on the bugger would help. I made sure the the fstab an device map reflected only sda.

Then I turned sdb back on, chrooted into the 9.10 there and updated grub so that it was on sdb instead of sda (I have been using it as the only drive turned on).

Then updated grub on sda again. Same old song and dance still.

Now I need to boot the LiveCD and rescue grub on 9.10 on sdb again.

What FUN. And people wonder why I don't play games on here.

#79

Chainloading DOS - on the first partition.

This took me an hour to figure out (mostly random scattershot until something worked).

  1. (hd0) and (hd1) might be reversed from the BIOS v.s. linux, so although it ends up being sdb1 when linux boots, I have to specify (hd0,1).
  1. You can use "chainloader (hd0,1)+1" without anything else which is what I needed, but also files or other devices.

Something as simple as this isn't documented anywhere.

http://members.iinet.net/%7Eherman546/p20.html has the best documentation on Grub2.

#80

drs305 said:

sudo mount --bind /dev/ /mnt/dev

  • Mount devices: ```
[*]Chroot into your normal system device: ```
sudo chroot /mnt

sudo grub-install /dev/sdX

  • Reinstall GRUB 2: ```
[*]
[LIST]
[*]Note: Substitute the correct device - sda, sdb, etc. [COLOR=Red]**Do ''not'' specify a partition number.**[/COLOR]
[/LIST]
 
[/LIST]
[/LIST]


Hi. Thanks for the excellent guide. Can anyone explain what the result of the above steps are? In particular, I want to install grub to a partition and I do not want to touch the disk's MBR.

I have a separate boot partition where grub resides independently from any OS. I use chainloading to boot a number of OS's. Each OS has its own bootloader in its partition. All is working except for Mythbuntu.

I just sbooted up with Mythbuntu 9.10 LiveCD and now I want to fix Mythbuntu not booting.

Mythbuntu is installed on /dev/sda9. My separate boot partition (which is working) is on /dev/sda1 and it is presently **not** mounted (in order to avoid creating any new issues).

I have done all the steps up to chroot. Now I am ready to run:

sudo grub-install /dev/sda


but I wish I could do this to be sure of where things were going:

sudo grub-install /dev/sda[COLOR=Red]9[/COLOR]


I do not want this to touch the sda MBR. (As per above, all other OS's are booting perfectly via chainloading.) I only want to get Mythbuntu to boot now (which I believe requires putting grub into sda9).
#81

MountainX said:

I do not want this to touch the sda MBR. (As per above, all other OS's are booting perfectly via chainloading.) I only want to get Mythbuntu to boot now (which I believe requires putting grub into sda9).

Any time you run "grub-install" it is going to run several scripts, among which is "grub-setup". This writes to the MBR. I believe the way to make sure it gets written to the partition and not the MBR is to run "grub-setup" directly and using the "--force" option. This is not the devs recommended way of handling things, and if you try putting it on a partition via the "grub-install" command it will complain about it.

The command would be:


grub-setup --force /dev/sda9

Herman's site has a lot more technical information than does this post, and I would advise you to refer to his site for confirmation and a better understanding of how to put GRUB 2 on the partition without also writing to the MBR.

Herman's Illustrated Dual Boot Site: http://members.iinet.net/~herman546/p20/GRUB2%20Bash%20Commands.html#GRUB_to_a_Partition

You can always use the dd command to copy the MBR before you attempt this so you can put it back the way it was if the results aren't what you expected. ;-)

#82

Hi all,

I am reading all the guides about grub2 but I cannot understand if it provide a way to run os_prober just manually (through update-grub) and avoid to run it at every boot of the system: I have a lot of partitions and kernels and these make grub2 to take quite 20 seconds to show the boot menu.

Thanks a lot in advance :-)

#83

mithrandir77 said: Hi all,

I am reading all the guides about grub2 but I cannot understand if it provide a way to run os_prober just manually (through update-grub) and avoid to run it at every boot of the system: I have a lot of partitions and kernels and these make grub2 to take quite 20 seconds to show the boot menu.

Thanks a lot in advance :-)

Several users filed bug reports on the delay between seeing "loading grub" and seeing the menu. In some cases, the reason was because the computer's BIOS was first looking at a device other than the one GRUB was on. Making sure GRUB 2 was installed on the same device as the BIOS was first looking solved the delay problems.

I don't believe the 30_os-prober script is responsible for the delay during boot. You can check by disabling it and seeing if the delay remains:


sudo chmod -x /etc/grub.d/30_os-prober

If you remove the executable bit "update-grub" will not search for your OSs/kernels on other than your system partition. Thus it will not see your other OSs or put them in the menu.

If they do not change often, you could move them to a custom menu, such as 40_custom. This would allow you to leave 30_os-prober off but still have the items on the menu. It would speed up "update-grub" at the cost of not updating the information on other installed OSs.

#84

drs305 said:

If they do not change often, you could move them to a custom menu, such as 40_custom. This would allow you to leave 30_os-prober off but still have the items on the menu. It would speed up "update-grub" at the cost of not updating the information on other installed OSs.

Hi,

thank you a lot for your support. As I can understand from your message, I can disable 30_os-prober and the configure static entries in a 40_custom file or similar.

In order to add static entries to 40_custom, can I use "as are" the menu entries found in /boot/grub/grub.cfg?

For example

menuentry "Ubuntu 9.04, kernel 2.6.28-16-generic (on /dev/sda9)" { saved_entry=${chosen} save_env saved_entry insmod ext2 set root=(hd0,9) search --no-floppy --fs-uuid --set c9318744-47e2-4083-8085-8d574bcf8373 linux /boot/vmlinuz-2.6.28-16-generic root=UUID=c9318744-47e2-4083-8085-8d574bcf8373 ro quiet splash vga=791 initrd /boot/initrd.img-2.6.28-16-generic }

Thanks again :-)

#85

mithrandir77 said: As I can understand from your message, I can disable 30_os-prober and the configure static entries in a 40_custom file or similar.

In order to add static entries to 40_custom, can I use "as are" the menu entries found in /boot/grub/grub.cfg?)

Yes. In fact, that is the safest way to do it. I would recommend creating your 40_custom menu and run "sudo update-grub" *before* you disable 30_os-prober.

Check all the items at the bottom of your menu (the 40_custom entries) and once you are sure they are working you can then disable 30_os-prober and run "sudo update-grub" again.

If you would like your custom entries to appear at the *top* of the menu, you can save the file as "06_custom". Make it executable before you run "update-grub" so it will be entered into your grub.cfg file.

#86

Thanks. This is a great tutorial!

I had been editing the grub.cfg file to customize my menus. (I know... wrong method) -X and had to redo it each time I did an update-grub (or simply started Start-up manager).

But since I came across your tutorial, I haven't had to... \\:D/ Thanks again!

Is there any way to get a screenshot of the Grub2 bootmenu? (instead of taking a picture of course!)

#87

robinparriath said: Is there any way to get a screenshot of the Grub2 bootmenu? (instead of taking a picture of course!)

There is a graphic of a sample boot menu on the GRUB2 Ubuntu help site: https://help.ubuntu.com/community/Grub2#Upgrading%20to%20GRUB%202 Step 5 under "Upgrading to GRUB 2".

If you mean you want to take a pic of yours, someone else will have to reply. I made the images in the above doc by using a virtual machine and taking a screenshot of the VM window.

#88

drs305 said:

If you mean you want to take a pic of yours

Yup... that's what I meant. It's not that critical though...

#89

drs305 said: Yes. In fact, that is the safest way to do it. I would recommend creating your 40_custom menu and run "sudo update-grub" *before* you disable 30_os-prober.

Check all the items at the bottom of your menu (the 40_custom entries) and once you are sure they are working you can then disable 30_os-prober and run "sudo update-grub" again.

If you would like your custom entries to appear at the *top* of the menu, you can save the file as "06_custom". Make it executable before you run "update-grub" so it will be entered into your grub.cfg file.

I disabled 30_os-prober, created my own 40_custom with my static entries, added GRUB_DISABLE_LINUX_RECOVERY=true to /etc/default/grub, updated grub.cfg by update-grub, but at the next boot grub2 still took about 15 seconds to show its menu: it seemed to be looking for all the Os present on my system, like before disabling os-prober...

:(

Is there a way to make it to boot quickly? When you need to reboot the system for whatever reason, it is frustrating to wait a lot of seconds for grub's menu...

#90

mithrandir77 said: at the next boot grub2 still took about 15 seconds to show its menu: it seemed to be looking for all the Os present on my system, like before disabling os-prober...

:(

Is there a way to make it to boot quickly? When you need to reboot the system for whatever reason, it is frustrating to wait a lot of seconds for grub's menu...

mithrandir77,

This sounds exactly like what happens when your BIOS boots to one device and the /boot partition is on another drive. GRUB 2 will search all of the first drive looking for the files before finding them on the second. That accounts for the delay.

The 'conventional' solution is to change the BIOS to boot from the same partition as the one with the /boot folder (or you could move the /boot folder to the first device I suppose).

There may be ways to change some of the GRUB 2 settings internally but I've not investigated this.

#91

@ drs305,

scenario, jaunty with grub2 1.96 installed and working ok1 with all previous kernels as well as karmic.

just installed in karmic grub2 (1.97 beta4) and updated --> everything ok, all kernels 'seen'. however,

sudo grub-install /dev/sda

that's MBR not run. how safe is the last 1.97 beta4 ?

should I run it or hold a little longer ?

thanks.

#92

peter b said: that's MBR not run. how safe is the last 1.97 beta4 ?

should I run it or hold a little longer ?

I am not sure I understand that first part. If jaunty was also on sda I would say it is very safe. If jaunty was on another device I would still run the command - especially since all your G2 menus have installed without issue so far. Of course, that's just one opinion.

#93

yes, jaunty and the other kernels, karmic included, are all on sda (logical part) with/had their own PBR. grub2 1.96 upgrade brought MBR in my situation into the play.

#94

peter b said: yes, jaunty and the other kernels, karmic included, are all on sda (logical part) with/had their own PBR. grub2 1.96 upgrade brought MBR in my situation into the play.

Grub2 can be installed in a partition but it will complain first and isn't recommended. The reason is that it uses blocklists and the system is subject to failure if things change position on the drive/partition. The chances of this are probably much higher than having problems from installing Grub 2 to the MBR.

#95

So, what is the trick to get 40_custom entries to load? The file, 40_custom is set to execute, I have disabled 30_os-prober, but the custom file is nerver "read." I am at my wits end!!

What the hell am I forgetting?

Here is the 40_custom file:


#!/bin/sh
exec tail -n +3 $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 Arch Linux" >$2
menuentry "Arch Linux" {
	set root=(hd2,1)
	linux /vmlinuz26 root=/dev/sdg2 ro
	initrd /kernel26.img
}

menuentry "Arch Linux Fallback" {
	set root=(hd2,1)
	linux /vmlinuz26 root=/dev/sdg2 ro
	initrd /kernel26-fallback.img
}

Thanks, Mark.

#96

n6yga said: So, what is the trick to get 40_custom entries to load? The file, 40_custom is set to execute, I have disabled 30_os-prober, but the custom file is nerver "read." I am at my wits end!!

What the hell am I forgetting?

Did you run:

sudo update-grub

By the way, you should remove that echo command OR move it to the top of the file and increment the tail command line number, like this:


#!/bin/sh[COLOR=Blue]
echo "Adding Arch Linux" >$2[/COLOR]
exec tail -n [COLOR=Blue]+4[/COLOR] $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 "Arch Linux" {
    set root=(hd2,1)
    linux /vmlinuz26 root=/dev/sdg2 ro
    initrd /kernel26.img
}

menuentry "Arch Linux Fallback" {
    set root=(hd2,1)
    linux /vmlinuz26 root=/dev/sdg2 ro
    initrd /kernel26-fallback.img
}

#97

Your origan entries look prefect. Except you need to ADD one thing to each of them;


echo "Adding Arch Linux" >$2
menuentry "Arch Linux" {
    set root=(hd2,1)
    linux /vmlinuz26 root=/dev/sdg2 ro
    initrd /kernel26.img
}
EOF

That "EOF" addeed to both of them and running "sudo update-grub" should do it.

Let us know.

#98

ranch hand said: Your origan entries look prefect. Except you need to ADD one thing to each of them;


echo "Adding Arch Linux" >$2
menuentry "Arch Linux" {
    set root=(hd2,1)
    linux /vmlinuz26 root=/dev/sdg2 ro
    initrd /kernel26.img
}
EOF

The EOF is not needed in this case. That is only required when you used the cat command. See my earlier post here.

#99

Well, it turns out that the file was being added to grub.cfg. What's weird is I can boot the initrd for Arch, but Arch craps out looking for either the UUID of the root partition, or the "/dev/sdg2." Both of which are correct.

I may just try chainloading to Arch on the external USB drive.

Thanks, guys!

Mark.

#100

The new version of grub through me off a little, but after reading this guide I am defiantly a fan of Grub 2.

Great guide very easy to follow!

#101

Hey, sorry if I missed this but I had a good look around at a few threads too... I can't find how to totally get rid of some entries:

My PC had 3 OS partitions BEFORE Ubuntu: Vista (Install, the first thing when the PC was turned on) Vista (OS) XP Embedded

So my grub has these three in addition to the two Linux entries and the memory tests (which got disabled)

I want to get rid of the Vista Install and the XP Embedded from the menu alltogether, like I could very easily on Grub.

Is this at all possible...?

#102

Pott said: So my grub has these three in addition to the two Linux entries and the memory tests (which got disabled)

I want to get rid of the Vista Install and the XP Embedded from the menu alltogether, like I could very easily on Grub.

Is this at all possible...?

You might have to give us more information. Your options include:

  1. Tweak the menu with conditional statements in /etc/grub.d/30_os-prober. See this link: Grub 2 Title Tweaks
  1. Turn off the os-prober if you don't want other OS's/kernels on other partitions searched for. /etc/default/grub Add this line:

GRUB_DISABLE_OS_PROBER=true

  1. Create a custom menu (/etc/grub.d/40_custom) which puts in only the items you want, then make the other files in /etc/grub.d non-executable. Of course, entries in the custom file will not automatically account for new changes to your system.
#103

I think this is the best thread to ask for support (a user suggested me) There's a thread here about the topic. The problem is that this guide (link) won't work anymore on grub2. The system is a dual boot encrypted with both (ubuntu and Windows) encrypted with truecrypt. The old grub chainloads Windows from a backup image of the mbr taken before ubuntu install. Here's the _old menu.lst that worked well_, where (hd0,0) is sda1, Ubuntu /boot partition, (hd0,2) is sda3, Windows Partition truecrypt.mbr is the image of "Truecrypt Windows boot loader", taken with``` dd if=/dev/sda of=/mnt/boot/truecrypt.mbr count=1 bs=512

title Windows rootnoverify (hd0,2) makeactive chainloader (hd0,0)/truecrypt.mbr boot

Is there a way to obtain the same chainloading ability (from an image, not a partition) with grub2?
PS: at post [#12 ]("http://ubuntuforums.org/showpost.php?p=8259069&postcount=12")of the thread linked above there's also my actual grub.cfg that bring me to a truecrypt error that says truecrypt bootloader is corrupted.
#104

robpower said: I think this is the best thread to ask for support (a user suggested me)

There are several of us that regularly read this thread (ranch hand for one) but a lot of us know the *basics* of Grub 2 learned though what we have experienced for ourselves. I don't know much about encryption and I believe ranch hand has indicated the same for himself in another post. Hopefully someone with an encryption solution will wander by and reply.

If you don't get a quick response here, you might try the grub 2 developers over at the Freenode #grub IRC channel. They would be the experts at this kind of question if you cannot find the answer in one of the posts specifically dealing with this topic.

Here is the community doc if you aren't familiar with IRC: https://help.ubuntu.com/community/InternetRelayChat

#105

I tried to reinstall grub2 and here is what went on in the terminal. I followed the commands like it said but it didn't work maybe someone can see what I did wrong. sudo fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x78c8a7e6

Device Boot Start End Blocks Id System /dev/sda1 * 1 26775 215069664 7 HPFS/NTFS /dev/sda2 26776 29814 24410767+ 83 Linux /dev/sda3 29815 37228 59552955 5 Extended /dev/sda4 37229 38913 13530112 7 HPFS/NTFS /dev/sda5 29815 31638 14651248+ 83 Linux /dev/sda6 31639 35285 29294496 83 Linux /dev/sda7 35286 37228 15607116 82 Linux swap / Solaris ubuntu@ubuntu:~$ sudo mount /dev/sda2 /mnt ubuntu@ubuntu:~$ sudo mount /dev/sda5 /mnt/boot ubuntu@ubuntu:~$ sudo mount /dev/sda6 /mnt/home ubuntu@ubuntu:~$ sudo mount --bind /dev/ mnt/dev mount: mount point mnt/dev does not exist ubuntu@ubuntu:~$ sudo chroot /mnt root@ubuntu:/# sudo grub-install /dev/sda sudo: unable to resolve host ubuntu grub-probe: error: cannot find a device for /boot/grub.

No path or device is specified. Try `grub-probe --help'' for more information. Auto-detection of a filesystem module failed. Please specify the module with the option --modules' explicitly. root@ubuntu:/# sudo grub-install --recheck /dev/sda sudo: unable to resolve host ubuntu grub-probe: error: cannot find a device for /boot/grub.

No path or device is specified. Try `grub-probe --help'' for more information. Auto-detection of a filesystem module failed. Please specify the module with the option --modules' explicitly. root@ubuntu:/# exit ubuntu@ubuntu:~$

#106

willmac38 said: I tried to reinstall grub2 and here is what went on in the terminal. I followed the commands like it said but it didn't work maybe someone can see what I did wrong.

ubuntu@ubuntu:~$ sudo mount --bind /dev/ mnt/dev mount: mount point mnt/dev does not exist

It looks like you are missing a / in front of "mnt" when you tried to mount /dev/. The command should be:

sudo mount --bind /dev/ /mnt/dev

That means the devices never were mounted properly, so the remainder of the commands would not work.

#107

I hope someone can help me. I managed to mess up grub2 somehow and would like to know, how it should start to recover the system: Initially I wanted to add libstdc++.so.5 because some other application requires it. As Kubuntu 9.10 does not have it, I made the mistake to add a Debian 4 one and added an repository. This “updated” some packages. I made the mistake, that I did not carefully look for what it was going to install. After a reboot ubuntu would not start. Fortunately grub was o.k. and an older Karcmic kernel *14 would start an everything was fine. I thought that removing the newest kernel and later reinstalling it would solve my problem, but this was a big mistake. There was one *15.50 and ome *15.52 kernel. I removed the 15.52 one. Then I tried the reboot. Grub would not start and I get a grub menue where is weitten something about DEBIAN. So somehow grub was after kernel removal rewritten but assumes wrong settings. System should be bootable at least with the ole *14 kernel of kubuntu 9.10. How can I tell grub to start? Or how can I try to fix the mess? I’ll appreciate every useful hint, thank you.

#108

stc77 said: Grub would not start and I get a grub menue where is weitten something about DEBIAN. So somehow grub was after kernel removal rewritten but assumes wrong settings. System should be bootable at least with the ole *14 kernel of kubuntu 9.10. How can I tell grub to start? Or how can I try to fix the mess?

I’ll appreciate every useful hint, thank you.

If you can get to the Grub 2 menu, press "c" to get to the grub prompt. Then use the guidelines found in the Grub 2 community doc to boot to the -14 kernel. Here is the link: Using CLI to Boot

#109

After a plain install of ubuntu 9.10 as the only system on an old ThinkPad I can´t boot the system. The initial reboot after installation was OK, but after that grub gives:

error: no such device: c3ee2fd9-1d96-48c8-a48a-8075ae9746cf

The UUID is correct for /dev/sda1 where Linux is (and which is marked with an asterix at bootable).

I reinstalled grub from the CD, believing it vas a grub error, but that didn´t help.

Any sugestions on this problem?

Thanks.

#110

sejsen said: Any sugestions on this problem?

From the Grub 2 menu, press "c" and see if you can boot from the command line. The good thing about this method is that you will be able to tell if Grub can find the correct files by using TAB to complete the entries. For now we will assume sda1 is the correct location of the linux system. The # and what follows are not entered, just explanations, *except in the linux line, where you have to add "root=/dev/sda1 ro" after the kernel is entered*.


ls # Press ENTER and you should see (hd0), (hd0,1) at least.
set root=(hd0,1)
linux /boot/vml  # then tab. It should add all or most of your kernel, you may have to add the specific kernel number; then add **root=/dev/sda1 ro**
initrd /boot/initr #then tab to complete the initrd image
boot

These steps are outlined in the GRUB 2 community doc: Using CLI to Boot

#111

sejsen said: Any sugestions on this problem?

From the Grub 2 menu, press "c" and see if you can boot from the command line. The good thing about this method is that you will be able to tell if Grub can find the correct files by using TAB to complete the entries. For now we will assume sda1 is the correct location of the linux system. The # and what follows are not entered, just explanations, *except in the linux line, where you have to add "root=/dev/sda1 ro" after the kernel is entered*.


ls # Press ENTER and you should see (hd0), (hd0,1) at least.
set root=(hd0,1)
linux /boot/vml  # then tab. It should add all or most of your kernel, you may have to add the specific kernel number; then add **root=/dev/sda1 ro**
initrd /boot/initr #then tab to complete the initrd image
boot

These steps are outlined in the GRUB 2 community doc: Using CLI to Boot

If you can boot you will then have to figure out what is wrong with the main menu. The first thing to do would be to run:


sudo grub-install /dev/sda
sudo update-grub
#112

@drs305

Yes, I can boot from the command line and yes, autocomplete works fine.

After running grub-install and update-grub I booted the system again - and recieved the same error text, but with a new line added:

"Failed to boot default entries."

Is that of any help?

+ forgot one thing: now I dont get the grub menu, hence no access to command line

#113

sejsen said: + forgot one thing: now I dont get the grub menu, hence no access to command line

Ouch!

You can try holding down the SHIFT key during boot to see if the menu appears, but your G2 seems severely broken. I think it's time to reinstall G2 from the LiveCD. The instructions are available from the same community doc or the "GRUB2" link below.

#114

You can try holding down the SHIFT key during boot to see if the menu appears

Yes, this still works.

I have tried to edit in the menu deleted the line: search --no-floppy --fs-uuid --set c3ee.......... and modifying the line: linux /boot/vmlinuz-2.6.31-14-generic root=UUID=c3ee........ into: linux /boot/vmlinuz-2.6.31-14-generic root=/dev/sda1 ro

after this boot is fine!

If this is the solution, how do I get this into grub.cfg without editing that file?

#115

sejsen said:

You can try holding down the SHIFT key during boot to see if the menu appears

Yes, this still works.

I have tried to edit in the menu deleted the line: search --no-floppy --fs-uuid --set c3ee.......... and modifying the line: linux /boot/vmlinuz-2.6.31-14-generic root=UUID=c3ee........ into: linux /boot/vmlinuz-2.6.31-14-generic root=/dev/sda1 ro

after this boot is fine!

If this is the solution, how do I get this into grub.cfg without editing that file?

GRUB 2 has a "built-in" fix when there are UUID problems. You can turn off UUIDs by opening /etc/default/grub and removing the # symbol from this line:

[COLOR="Red"]#[/COLOR]GRUB_DISABLE_LINUX_UUID=true

Save the file and then run "sudo update-grub". Then take a look at /boot/grub/grub.cfg, see if the 'new' menu has the correct location, and if it is correct, reboot.

If you still have problems, you can remove the "search" line in the file that creates grub.cfg (/usr/lib/grub/grub-mkconfig). However, if you do this and your system changes (such as device boot order or partition order) GRUB 2 will not detect the changes.

#116

Finally OK.

I had to use both modifications to get it up and running.

Thanks a lot for your patient help.

#117

Many thanks drs305, this post really helped me out :)

#118

In my laptop I had done the followings: Boot up ubuntu from the livecd,open terminal from Applications menu -> Accessories -> Terminal and login as root using the following command

sudo -iMounted my root partition: mount /dev/sda9 /mntMounted my home partition: mount /dev/sda10 /mntReinstalled GRUB 2: grub-install --root-directory=/mnt/ /dev/sda

Thats all. Frankly speaking the procedures given in the first page by drs305 was not completely working in my machine. I got too many errors. I fixed it combining the procedures given by drs305 [second and third command] and described in the link http://www.ubuntugeek.com/how-to-restore-grub-boot-loader-after-installing-windows.html. Thank you.

#119

@ Tapas Bose, India

I have been updating the community doc page with more detailed instructions but your's are simpler and will work in most cases. I think I will simplify the instructions in this post and reference the other site should the 'easy' method not work.

Thanks for the input.

#120

@drs305,

You may already know this but I discovered something today quite accidentally. I had previously run:

sudo chmod -x /etc/grub.d/20_memtest86+

to get rid of my Lucid memtest menu options, but I have 3 other *buntu installs, all with legacy grub.

After cleaning up some kernels I realized that one of those legacy installations did not have a memtest option whereas two of them did. Upon closer inspection I discovered that the menu.lst for the one without the memtest option was:

memtest86=false

Whereas those with the memtest option were:

memtest86=true

After changing those to false and running update-grub in Lucid the memtest options disappeared. I know that doesn't particularly make sense but who knows exactly what all grub2 looks at when it's updated.

I'll have to see what happens some day if I upgrade one of those legacy installs to grub2, so many experiments, so little time:)

Oh, and I'm not chain-loading or anything, I am however running Debian Sid's grub-common and grub-pc. I filed a package upgrade request in Launchpad:

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/485457

BTW many thanks for this great tutorial. I use it a lot!

#121

@ drs305. Thank you.

#122

kansasnoob said: After cleaning up some kernels I realized that one of those legacy installations did not have a memtest option whereas two of them did.

After changing those to false and running update-grub in Lucid the memtest options disappeared. I know that doesn't particularly make sense but who knows exactly what all grub2 looks at when it's updated.

Nice! I'll have to play with it a bit - I'd love for it to be effective in hiding memtest86+ from other installs using Grub2. I don't think it will, which is too bad, but getting them eliminated from the Grub legacy files is a positive move.

I have a Grub 2 Title Tweaks thread which discusses ways to hide the memtest86+ entries and I'll make mention of your finding in the memtest86+ section of that thread later today. :p

Update: Note and attribution added to Section 2D of Grub 2 Title Tweaks

#123

[IMG]http://ubuntuforums.org/home/mahiyar/Desktop/Screenshot-mahiyar@mahiyar-desktop:%20%7E.png[/IMG]My update grub has the following 7 entries as in shown in the attachment, however in the actual grub menu there are same kernel multiple entries, it is like I have ended up with at least 12 more useless entries. How to trim these? Please guide.

[IMG]http:///home/mahiyar/Desktop/Screenshot-mahiyar@mahiyar-desktop:%20%7E.png[/IMG]

#124

mahiyar,

I can only see the screenshot showing the update-grub screen. So I am going to assume you are seeing memtest86+ and recovery mode entries.

To eliminate the recovery mode options (which you may or may not want to do), open /etc/default/grub and edit the following line: Open:


gksu gedit /etc/default/grub

Make the applicable line look like this:

GRUB_DISABLE_LINUX_RECOVERY="true"

To prevent the display of the memtest86+ entries, you want to make the file that searches for it non-executable. The file is /etc/grub.d/memtest86+ You can remove the executable bit via Nautilus by right clicking on the file, selecting Properties, and unticking the 'executable' box in Permissions. Or you can run this command:

sudo chmod -x /etc/grub.d/20_memtest86+

I created a thread on tweaking the GRUB 2 menu. It's a bit geeky for the normal user but with the examples you can make a lot of changes to what the menu displays without creating a custom menu. Here is the link: Grub 2 Title Tweaks

#125

Hy I've read the post but i didn't find any solution to my problem:

I'm using karmic and I've installed grub2 with the step that you give in this tutorial. After installing the paquet I was still booting with grub-legacy, but asking me if i wanted to use grub2 chainloader. And if everything works fine i should do an upgrade-grub-from-legacy.

After doing this my grub legacy is broken (Error 15: No file found). And I can not install the grub2 in the MBR, how can i do this ???


sudo grub-install  /dev/sda7
grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR.  This is a BAD idea.
grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and its use is discouraged.
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

I'm actually booting with SuperGrub boot disk, which correctly find my grub legacy.

#126

benpaka said:

After doing this my grub legacy is broken (Error 15: No file found). And I can not install the grub2 in the MBR, how can i do this ???


sudo grub-install  /dev/sda7
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

Some questions.

Is there a reason you need Grub 2 installed on sda7? Normal installations do not put it onto a specific partition (such as sda7). The problem with blocklists is that if the location of the information changes G2 will no longer be able to find it. Despite the warning, installing G2 on sda7 should work, at least until things change. But the normal command would be "sudo grub-install sda" to put it into the MBR.

Another common problem during the upgrade to G2 is when the user is presented with the list of devices. You *must* select one with the space bar before tabbing to "OK" and pressing ENTER. There is a graphic and explanation of this screen in the community doc.

Did you just cut out the device map when you posted? Normally after the "This is the contents of the device map..." it shows the drives is it aware of. You may just not have copied it, but if it didn't display, that is a problem too.

The device map is located in /boot/grub/device.map and usually looks something like this:

(hd0) /dev/sda (hd1) /dev/sdb

If you can boot into Ubuntu or from the LiveCD you can reinstall Grub2. The instructions on reinstalling it are located in the community doc: https://help.ubuntu.com/community/Grub2

#127

drs305-- thanks for quick reply, to make things clear here is a screenshot of my grub menu ....

As you can see there are 8 instances of /dev/sdb3. 3 instances of /dev/sdb6. 1 extra entry of sdb1. I would not mind if you can tell the prober not to probe my sdb device, can you guide me how? As all these are old / obsolete Ubuntu's, built on an older system and would no longer work on my new hardware.

#128
  1. Removing Entries from Grub 2

Grub 2 gathers information about other kernels from menu.lst files on other partitions. Thus, clean up these menu.lst files to remove superfluous Grub 2 entries. Run update-grub and restart to make it effective.

#129

mahiyar said: drs305-- thanks for quick reply, to make things clear here is a screenshot of my grub menu ....

As you can see there are 8 instances of /dev/sdb3. 3 instances of /dev/sdb6. 1 extra entry of sdb1. I would not mind if you can tell the prober not to probe my sdb device, can you guide me how? As all these are old / obsolete Ubuntu's, built on an older system and would no longer work on my new hardware.

Have you considered *removing/reformatting* sdb?

In any case, I can give you the way to modify your 30_os-prober so it *hides* the sdb partition, but of course the old kernels will all still be on your partition and taking up space.

Open 30_os-prober and add the [COLOR="DarkRed"]highlighted entry[/COLOR]. The section should be start around line 120.

gksu gedit +120 /etc/grub.d/30_os-prober

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 '^' ' '" no_sdb="echo ${DEVICE} | cut -c -8"

[COLOR="DarkRed"][B] if [ "${DEVICE}"="/dev/sdb" ] ; then continue fi[/B][/COLOR]

Save the file, run "sudo update-grub" *and then check /boot/grub/grub.cfg to make sure your linux and Windows entries are still there!* If they are not, undo the change in 30_os-prober, save the file, and run "sudo update-grub" again.

cat /boot/grub/grub.cfg | less

Press "q" when you are done inspecting the file.

#130

Well I have considered reformatting sdb till the time I take back up of all my important files, I will have to live with them a little more I guess, esp since I have jumped from 8.04 to 9.10.

As suggested I inserted those lines after the particular section, in my case it was more then line no 120.

On update-grub all the earlier kernels, even of sdb2 were found, i.e in the output of the command. But on inspecting the config file the kernels were not there. On rebooting they were certainly not there as shown in the attached pic.

Grub-2 is really very powerful, but does that mean that we would have to learn programming language to control it?

Thanks a ton drs305.

#131

mahiyar said: On update-grub all the earlier kernels, even of sdb2 were found, i.e in the output of the command. But on inspecting the config file the kernels were not there. On rebooting they were certainly not there as shown in the attached pic.

Grub-2 is really very powerful, but does that mean that we would have to learn programming language to control it?

What we did was change the output, not change the input. The os-prober still *looked* at sdb but the script we altered prevented GRUB 2 from adding the results to the menu. There is probably a method to alter the way the command works rather than the script it generates, but as you found the *menu* results would be the same.

Glad your menu now does what you wish. As GRUB 2 is upgraded you will have to re-edit the file to include the change you made. This is not to be confused with running "update-grub", but when a new version is released and you are asked if you want to retain your current version or accept the maintainer's newer version.

Yes, G2 is very powerful. The scripting language is not complex but is something an average non-IT user isn't used to. For example, I am an average user and not well versed in programming languages. Every time someone asks how to hide something, I have to experiment with "cut", "awk", "sed" and other commands until I can come up with the correct output. Sometimes it takes me a while. Users with programming experience can easily do these things in a very short time. Those of us without such experience have to rely on others or take the time to figure it out.

The good news is that, because of the power of Grub 2 and the basic way in which it works, there will come a day when a GUI app will be able to do all these things for us. StartUp-Manager 2 or some other app will be created to do all these things via menus in an easily-understood graphic application. We'll just have to get by with editing the scripts ourselves until that time.

#132

Yeah when GUI start up manager does come it would make a lot of things easier. Till then we will rely on good souls like you to guide us.

#133

I can't seem to keep grub from wiping out my MBR. I have Karmic installed on an SD card on my desktop and a CF card in the Expresscard port on my laptop. Both, when I run

dpkg-reconfigure grub-pc, ask what device I want to install grub on, and I choose sdb1 and not sda1.

The I run the windows setup and do "fixmbr" to make the internal disk bootable should I not have the sd card or CF card inserted. This works until one of the kernels or grub upgrades, then it still insists to install itself on sda1 and sda2. I clearly DO NOT want it on sda1 on these two machines and can't seem to prevent that.

Help?

#134

drs305 said: Some questions.

Is there a reason you need Grub 2 installed on sda7? Normal installations do not put it onto a specific partition (such as sda7). The problem with blocklists is that if the location of the information changes G2 will no longer be able to find it. Despite the warning, installing G2 on sda7 should work, at least until things change. But the normal command would be "sudo grub-install sda" to put it into the MBR.

Another common problem during the upgrade to G2 is when the user is presented with the list of devices. You *must* select one with the space bar before tabbing to "OK" and pressing ENTER. There is a graphic and explanation of this screen in the community doc.

Did you just cut out the device map when you posted? Normally after the "This is the contents of the device map..." it shows the drives is it aware of. You may just not have copied it, but if it didn't display, that is a problem too.

The device map is located in /boot/grub/device.map and usually looks something like this:

If you can boot into Ubuntu or from the LiveCD you can reinstall Grub2. The instructions on reinstalling it are located in the community doc: https://help.ubuntu.com/community/Grub2

Thank you! The problem was selecting the correct drive (the famous screen), This should be really improve because by pushing enter (when you did not select the correct partition) you remove you corrupt the grub legacy but don't install the grub2 on the MBR. This line just didn't appear in the french documentation!

#135

On a related note is there any way where during a windows install you can avoid windows touching the mbr.

#136

Hi,

is there a possibility to let the "Recovery Mode" entry be created AFTER the Windows entry BUT the normal entry should be BEFORE the Windows entry? To get the memtest entry after the Windows entries was quite simple by just exchanging the order when which script runs but I have I don't know how I get this done - at least without doing the whole entries through the 40_custom file. Though I already thought about something like copying the 10_linux and modifying it that way that it will only create the recovery entries in one and the normal ones in the other but I am not sure if this is the best way to do it.

Furthermore, I want to add that though I had Grub2 installed as bootloader - through a clean 9.10 installation - the installed package was grub and not grub2. I noticed today by installing the kernel updates and update-grub always wanted a menu.lst A simple apt-get install grub2 was enough though but still I don't think that it should have been that way.

#137

ghost_zero said: Hi,

is there a possibility to let the "Recovery Mode" entry be created AFTER the Windows entry BUT the normal entry should be BEFORE the Windows entry? To get the memtest entry after the Windows entries was quite simple by just exchanging the order when which script runs but I have I don't know how I get this done - at least without doing the whole entries through the 40_custom file.

In my thread on Grub 2 Title Tweaks I have a way to hide the Windows Recovery mode. You could edit the 30_os-prober file to incorporate this tweak and then copy the entire Windows section of the file and repeat it, this time hiding the actual Windows entry. If you need help I could probably come up with the new section fairly quickly. Of course the change would be lost whenever a new version of G2 was uploaded and you would have to re-enable the 30_os-prober file.

Furthermore, I want to add that though I had Grub2 installed as bootloader - through a clean 9.10 installation - the installed package was grub and not grub2. I noticed today by installing the kernel updates and update-grub always wanted a menu.lst A simple apt-get install grub2 was enough though but still I don't think that it should have been that way.

Did you actually see 0.97 on at the top of the menu? As you note, that shouldn't have happened. Did you have a separate, unformatted boot partition in which jn old menu.lst may have survived the clean install?

#138

@drs305: Regarding first point: I meant the "Linux Recovery" option, not the Windows one BUT I actually did it by copying the 10_linux to 25_linux-recovery and uncommented the normal linux menu entry there and in 10_linux I uncommented the statement (actually the whole if) that creates the recovery entry. Though I don't know if I could have done it better or not. I am especially, concerned that future grub2 updates might overwrite my 10_linux script which is why I also thought about setting the GRUB_DISABLE_LINUX_RECOVERY value to true and making the 25_linux-recovery script so that it always creates the entry or uses a different value than that one but I think the way it is currently would be "cleaner".

Did you actually see 0.97 on at the top of the menu?

Of course not (I think you misunderstood that part a bit, I while try to explain it better), it was Grub 2 that was installed along with its configuration BUT the package grub2 wasn't installed but grub. So I mean the correct bootloader and configuration was installed but the wrong package for configuration and reinstallation of the bootloader was "available".

Furthermore, I had all partitions removed prior to installing Windows 7 and afterwards Ubuntu 9.10. I still don't know why grub was installed instead of grub2 as you can't configure grub2 with the utilites that come with grub. Of course, I could have accidentally - though I extremely doubt it - installed grub sometime instead of grub2 but if that is the case I should have had a menu.lst which I didn't.

Btw. different question: Is there an easy way to let 10_linux only detect the NEWEST kernel images, instead of all of them? Though, of course, having all of them listed has its advantages too. Especially, if a new kernel might create some problems. In that case it would be easy to boot the old one.

#139

BUT the package grub2 wasn't installed but grub. So I mean the correct bootloader and configuration was installed but the wrong package for configuration and reinstallation of the bootloader was "available". For whatever reason, they didn't call the package grub2. It's called *grub-pc* ](*,)

Btw. different question: Is there an easy way to let 10_linux only detect the NEWEST kernel images, instead of all of them? Of course, I can uninstall the old ones but still...

A menuentry like this should always use the latest entry:

menuentry "Latest Kernel" { insmod ext2 set root=COLOR="DarkRed"[/COLOR] search --no-floppy --fs-uuid --set [COLOR="DarkRed"]5a880a39-36a1-46f5-b106-e979608f295a[/COLOR] linux /vmlinuz root=[COLOR="DarkRed"]/dev/sda1[/COLOR] ro initrd /initrd.img }

Just take your existing entry and remove the specific info from the end of the "vmlinuz" and "initrd" entries.

You could put it at the top of your menu by creating a 06_custom file. To hide the other entries, you could disable 10_linux if you really wanted to. But check that this entry works first, of course.

#140

Can anyone help. My GRUB menu just sits there until I select an option. It used to just carry on it's own way. Not sure whats caused the change

Thanks

/etc/default/grub file below

If you change this file, run 'update-grub' afterwards to update

/boot/grub/grub.cfg.

GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT="0" GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""

Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL=console

The resolution used on graphical terminal

note that you can use only modes which your graphic card supports via VBE

you can see them in real GRUB with the command `vbeinfo'

#GRUB_GFXMODE=640x480

Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

#GRUB_DISABLE_LINUX_UUID=true

Uncomment to disable generation of recovery mode menu entrys

#GRUB_DISABLE_LINUX_RECOVERY="true"

#141

gibbylinks said: Can anyone help. My GRUB menu just sits there until I select an option. It used to just carry on it's own way. Not sure whats caused the change

Thanks

/etc/default/grub file below

If you change this file, run 'update-grub' afterwards to update

/boot/grub/grub.cfg.

GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT="0" GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""

Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL=console

The resolution used on graphical terminal

note that you can use only modes which your graphic card supports via VBE

you can see them in real GRUB with the command `vbeinfo'

#GRUB_GFXMODE=640x480

Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

#GRUB_DISABLE_LINUX_UUID=true

Uncomment to disable generation of recovery mode menu entrys

#GRUB_DISABLE_LINUX_RECOVERY="true"Try with this:similar problem that I solved myself

#142

Cheers Zika worked a treat :p

#143

drs305 said: For whatever reason, they didn't call the package grub2. It's called *grub-pc*

](*,)

Actually, it is called grub2 - at least in synaptic there is one but grub-pc gets installed with it. So it might be just a "link name" to the other package. HOWEVER, what I meant is that neither grub2, nor grub-pc was installed but grub (grub1). So when the kernel updates run and they called update-grub, it was looking for a menu.lst as it was the grub1 configuration utility.

#144

A question about grub2 decoration using BURG I've followed this guidehttp://ubuntuguide.net/decorate-grub...1#comment-2121and make it successfully.But I want to know how to add OS logo icons to the panel.Like pictures here:http://grub.gibibit.com/Themes.Anyone could tell me detailedly? I'm a green hand. My OS is Ubuntu9.10 and boot by grub2.

#145

lwq316 said: A question about grub2 decoration using BURG Anyone could tell me detailedly? I'm a green hand.

My OS is Ubuntu9.10 and boot by grub2.

That is an interesting site and although I generally am not "into" eye candy I think I'll play with this when I return from vacation.

The main reason for this post is to suggest you open a new thread along the lines of "Grub 2 Theming" or such. Although theming is still in development in G2, BURG appears to be a nice step and I'm sure many users would be interested in exploring it and other ways to enhance their Grub 2 menus.

#146

I am trying to set up a computer for someone that isn't very computer savvy, and I've set it up to dual boot so they boot to Windows for games (with all easy icon access to web browsers removed) and boot to Ubuntu for everything else.

Everything seems good--I've gotten it down to two entries (grub_disable_linux_uuid=true and sudo chmod -x /etc/grub.d/20_memtest86+), but I can't seem to find a way to edit how those entries will show up on the menu.

When I look at the documentation, the entry for "GRUB_DISTRIBUTOR" is supposed to affect the name, but right now it says "echo Debian'" but it doesn't show up in the menu as Debian, it shows as "Ubuntu, Linux 2.6.31-14-generic" and the windows entry shows up as "Microsoft Windows XP Professional (on /dev/sda1)".

I'm wanting the Ubuntu entry to simply show as "Internet and Email" and the Windows entry to show up as "Games"--I want it to be really simple for the person I'm setting this computer up for.

Is this possible to do?

#147

maestrobwh1 said: i can't seem to keep grub from wiping out my mbr. I have karmic installed on an sd card on my desktop and a cf card in the expresscard port on my laptop. Both, when i run

dpkg-reconfigure grub-pc, ask what device i want to install grub on, and i choose sdb1 and not sda1.

The i run the windows setup and do "fixmbr" to make the internal disk bootable should i not have the sd card or cf card inserted. This works until one of the kernels or grub upgrades, then it still insists to install itself on sda1 and sda2. I clearly do not want it on sda1 on these two machines and can't seem to prevent that.

Help?

bump

#148

maestrobwh1 said: I can't seem to keep grub from wiping out my MBR. I have Karmic installed on an SD card on my desktop and a CF card in the Expresscard port on my laptop. Both, when I run

dpkg-reconfigure grub-pc, ask what device I want to install grub on, and I choose sdb1 and not sda1.

The I run the windows setup and do "fixmbr" to make the internal disk bootable should I not have the sd card or CF card inserted. This works until one of the kernels or grub upgrades, then it still insists to install itself on sda1 and sda2. I clearly DO NOT want it on sda1 on these two machines and can't seem to prevent that.

I have talked to the devs about similar issues. One thing that might apply to your situation is that if Ubuntu is installed on sdb it may still install Grub 2 on sda. They consider it a bug.

In your situation, do you know which drive boots first? If you change the boot order in BIOS so that Ubuntu boots first it *may* keep the system from writing to the Windows MBR. I don't know for sure but it's something you might try. At the very least, it should speed up the Grub menu displaying since Grub 2 currently would look at sda before moving on to sdb to find the Grub files.

#149

This is a great guide. Many thanks for writing it.

#150

drs305 said: [COLOR=MAROON][B][SIZE=3][I]The Grub 2 Guide

(formerly Grub 2 Basics)[/I] [/SIZE][/B][/COLOR] ... [COLOR="DarkRed"]/etc/default/grub[/COLOR] * This file contains information formerly contained in the upper section of Grub Legacy's menu.lst and items contained on the end of the kernel line. The items in this file can be edited by a user with administrator (root) privileges... Quote:

[COLOR="Blue"]Thank you for posting![/COLOR]

#151

Hi, I am having some problems in applying this guide (no. 2) after reinstalling windows. I am using a USB to boot using the liveubuntu version and further, when I start typing in the command: COMMAND: grub-install –root-directory=/mnt/ /dev/sda RESULT: The file /mnt//boot/grub/stage1 not read correctly. Stuck here.. need some help to proceed..

FYI, I am reproducing the fdisk output: omitting empty partition (5) Disk /dev/sda: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0×366ed536 Device Boot Start End Blocks Id System /dev/sda1 * 1 2603 20908566 7 HPFS/NTFS /dev/sda2 2604 14593 96309675 f W95 Ext’d (LBA) /dev/sda3 5207 9076 31085743+ 7 HPFS/NTFS /dev/sda5 2604 4670 16603114+ 83 Linux /dev/sda6 4671 5206 4305388+ 82 Linux swap / Solaris /dev/sda7 9077 14593 44315271 7 HPFS/NTFS Thanks for your help, I really appreciate it.

#152

I dont see your problem either

#153

sharath.sridhar said: Hi,

I am having some problems in applying this guide (no. 2) after reinstalling windows. I am using a USB to boot using the liveubuntu version and further, when I start typing in the command: COMMAND: grub-install –root-directory=/mnt/ /dev/sda RESULT: The file /mnt//boot/grub/stage1 not read correctly. Stuck here.. need some help to proceed..

FYI, I am reproducing the fdisk output: omitting empty partition (5) Disk /dev/sda: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0×366ed536 Device Boot Start End Blocks Id System /dev/sda1 * 1 2603 20908566 7 HPFS/NTFS /dev/sda2 2604 14593 96309675 f W95 Ext’d (LBA) /dev/sda3 5207 9076 31085743+ 7 HPFS/NTFS /dev/sda5 2604 4670 16603114+ 83 Linux /dev/sda6 4671 5206 4305388+ 82 Linux swap / Solaris /dev/sda7 9077 14593 44315271 7 HPFS/NTFS Thanks for your help, I really appreciate it.

Note: I'm assuming that this is Karmic w/grub2! If not don't proceed until providing proper info!

I do things a bit differently (not that my way is better, it's just my way). I can see that Ubuntu is on sda5 so from a Live CD (I'd think a Live USB would work the same way, but haven't tested it):

sudo mount /dev/sda5 /mnt && sudo mount --bind /dev /mnt/dev && sudo mount --bind /proc /mnt/proc && sudo mount --bind /dev/pts /mnt/dev/pts && sudo cp /etc/resolv.conf /mnt/etc/resolv.conf && sudo chroot /mnt
dpkg-divert --local --rename --add /sbin/initctl && ln -s /bin/true /sbin/initctl
grub-install /dev/sda

If that produces any failures or warnings:

grub-install --recheck /dev/sda

If that still fails for any reason post the terminal output here along with the results of:

lsb_release -a
grub-install -v

Then:

rm /sbin/initctl  && dpkg-divert --local --remove /sbin/initctl
exit
sudo umount /mnt/dev/pts && sudo umount /mnt/dev && sudo umount /mnt/proc && sudo umount /mnt

Hope that helps.

#154

Can't help wondering if anyone else has noticed this particular phenomenon : after I've booted my computer, the GRUB screen shows «GNU GRUB version 1.97~beta3», despite the fact that, as seen in the attached screenshot, Synaptic indicates that the version installed is rather 1.97~beta4-1ubuntu4. If I remember correctly, the GRUB update was installed several weeks ago. As GRUB seems to be working fine on both my two main boxes, one of which triple-boots into 64-bit Karmic by default and otherwise into 32-bit Windows Server 2008 and Windows 7, respectively, and the other double-boots into 64-bit Karmic or 32-bit Windows Vista, the problem is of a distinctly minor nature, but I'd still like to know what's going on....

Henri

#155

I suspect that the text you refer to was just not updated from the previous version.

#156

Thanks for your reply, ranch hand ; may I ask what you yourself see on your own GRUB screen ?...

Henri

#157

mhenriday said: Thanks for your reply, ranch hand ; may I ask what you yourself see on your own GRUB screen ?...

Henri You bugger, I had to reboot just to check. Have done that several times today and never even looked.

It says that it is grub1.97beta4.

If you really have your panties in a bunch about this (I probably would) I would run;


grub-install -v

and see what pops up there. It should give you the version being used.

You could remove grub-pc and grub-common and then install them again if it comes up with beta3 but why? If you have a working boot loader, I wouldn't argue with it.

Everything in your screen shot indicated beta4 as installed. It is the kind of question that would be nice to know so run that code and you will know.

#158

mhenriday said: Can't help wondering if anyone else has noticed this particular phenomenon : after I've booted my computer, the GRUB screen shows «GNU GRUB version 1.97~beta3», despite the fact that, as seen in the attached screenshot, Synaptic indicates that the version installed is rather 1.97~beta4-1ubuntu4...

Henri

[COLOR="Navy"] Yep... something like that is going on here, too. And my PC (2 hard drives, Ubuntu 9.10 in the secondary one, X_XP in the primary) is taking *ages *to load grub! And the HDs led keeps blinking as it was searching for something. Any clues? Thanks.[/COLOR]

#159

I am also running 10.04-testing and as of todays updates my menu now reads "grub1.97".

If you get a grub-pc and grub-common update go with the maintainers version. I did on one install to check (I have 3) and did not loose any configuration except the default OS (/etc/default/grub was rest to default=0 - my time out was not changed).

That should insure that you get the proper designation. I should add that the install that I stayed with my version also reads "grub1.97" though.

Nice not to see the "beta4" on there.

You may want to enable backports for 9.10.

#160

ranch hand said: I am also running 10.04-testing and as of todays updates my menu now reads "grub1.97".

If you get a grub-pc and grub-common update go with the maintainers version. I did on one install to check (I have 3) and did not loose any configuration except the default OS (/etc/default/grub was rest to default=0 - my time out was not changed). [COLOR="Navy"] I rebooted right now and I read GRUB 1.97 beta4 :p[/COLOR]

ranch hand said: That should insure that you get the proper designation. I should add that the install that I stayed with my version also reads "grub1.97" though.

Nice not to see the "beta4" on there. You may want to enable backports for 9.10.

[COLOR="Navy"]I didn't get this last part. What backports? To clarify: I installed Ubuntu 9.10 to a clean HD and the GRUB that came with it. Then keep the system updated properly. And this is what I have.

Before the menu (list) of the options appears, my PC keeps "thinking" (HD light blinking, like searching something) for almost a whole minute! Then I got the GRUB menu and the x seconds I had to "be shure" I want the default system to load. I was referring to the crazy waiting I had at boot :confused: Maybe is just my HDs are old and bad, and the PC have difficulties to boot...[/COLOR]

#161

I was just refering to getting the update to grub2 final. I know it has not hit the karmic repos yet because I updated 2 of them today.

If you look in your /etc/atp/sources.list and look toward the bottom of the page you will find something like this;

Uncomment the following two lines to add software from the 'backports'

repository.

N.B. software from this repository may not have been tested as

extensively as that contained in the main release, although it includes

newer versions of some applications which may provide useful features.

Also, please note that software in backports WILL NOT receive any review

or updates from the Ubuntu security team.

deb http://us.archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse

deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse

This is for packages that were developed for newer versions and then "backported" for earlier ones. You need to uncomment (remove the #),save the file, run; sudo apt-get update [/code/ to have what ever there is there in your system.

I want Grub1.97 on my 9.10 installs.

#162

Well I had an issue, but I fixed it. I HAD to edit the /boot/grub/grub.cfg to get rid of very stupid mistake by grub. It put in the windows recovery partion in there with the standard boot img. Last thing I need is for my wife to acciedently "recover" windows and wipe my nix out. So I was forced to remove the one. Works great now. I wish they would make a gui version for grub, call it "grubbie" grub basic interface editior. :)

Allowing users to checkoff whats displayed.

using an: Asus N10h-a1

Just got it today! :)

#163

Hi!

I am having issues with my current setup, as GRUB2 is not picking up Kernel updates from any partition but the one it is installed in.

I have 3 OS running on two different hard drives. Here's the output from blkid:

/dev/sda1: UUID="4e6d9489-ed5c-4072-9ea5-4db6fa803ea7" TYPE="ext4" /dev/sda5: UUID="79184dff-56da-4180-bfad-fcbfe01d847f" TYPE="swap" /dev/sdb1: UUID="c117c290-0b45-4ec3-a71f-3b7102126df9" SEC_TYPE="ext2" TYPE="ext3" /dev/sdb2: UUID="320cab82-89aa-4b6f-aa43-35eec56035d9" SEC_TYPE="ext2" TYPE="ext3" /dev/sdb3: UUID="d7484810-59a5-498b-a266-62156c85ca2c" TYPE="swap" /dev/sdc1: UUID="8C58962558960E58" LABEL="Iomega_HDD" TYPE="ntfs"

Karmic was installed last on SDA1, while Ubuntu Studio and Jaunty are sittin on SDB1 and 2 respectively. Then I have an external USB drive on SDC1 and the usual swap partitions.

My problem is that, when Jaunty gets a kernel upgrade, it will not update in GRUB2, so I am forced to boot into 2.6.28.15 when updates are already on 2.6.28.17.

How can I tweak GRUB2 config files to pick up such change, or to force it in? (Because of the number of entries, I'd rather avoid creating /etc/grub.d/40_custom entries... or my menu will be too long to be displayed!) :D

In addition, how can I hide my Karmic kernel upgrades? I would like to have just the one in use showing, instead of the full history of changes.

Thanks!

#164

Make sure that the permissions for 30_os-prober have it executable.

Run;


sudo update-grub
#165

Divider said: Well I had an issue, but I fixed it. I HAD to edit the /boot/grub/grub.cfg to get rid of very stupid mistake by grub. It put in the windows recovery partion in there with the standard boot img. Last thing I need is for my wife to acciedently "recover" windows and wipe my nix out. So I was forced to remove the one. Works great now. I wish they would make a gui version for grub, call it "grubbie" grub basic interface editior. :)

Allowing users to checkoff whats displayed.

Divider, you probably realize this, but your edit of grub.cfg will be overwritten the next time you (or the system) runs "update-grub".

Having the Windows recovery partition displayed is an annoyance for some users. I wrote a tweak that will remove the Windows recovery option from the menu if you want to tinker with the files a bit and don't want to just use a custom menu entry. The link is: Grub 2 Title Tweaks Specifically 2F.

I agree that a GUI tweaker will be warmly welcomed when all of this can be done that way. And congrats on the new computer. ;-)

#166

I ran ``` grub-install -v

But despite uninstalling and re-installing «grub-pc» and «grub-common» in Synaptic, my **GRUB** screen still shows «GNU GRUB version 1.97~beta3» when I reboot. Again, no great problem, as everything else works as it should, but I can't help wondering why this happens. Note that I see this on 64-bit **Karmic** on both my desktop and my laptop, so it doesn't seem to be idiosyncratic to a single box....

Henri
#167

mhenriday said:

But despite uninstalling and re-installing «grub-pc» and «grub-common» in Synaptic, my GRUB screen still shows «GNU GRUB version 1.97~beta3» when I reboot. Again, no great problem, as everything else works as it should, but I can't help wondering why this happens.

Is it possible you are reinstalling to a device that is not the one that Grub2 is not booting from? i.e. installing grub2 to one device (sda) but G2 is actually booting from sdb? G2 can be installed to multiple devices.

You can see if you have it installed in multiple locations with:

sudo dpkg-reconfigure grub-pc

Go through the steps until you get to the device list display.

#168

newbie here...I just finally got Ubuntu to work on my MAC and messing with it right now so please bear with me.

I am doing Dual boot of Ubuntu 9.10 and OS X. I installed REFIT into OS X to get the dual boot. After selecting LINUX from the refit menu, grub2 pop-up asking me to choose which kernel i want to use. But the thing is that I removed both MEMTEST and OS X already and the only one left is Linux, Ubuntu 2.6.31-16.

So is there a way for me to tell it to boot directly into the ONE AND ONLY kernel left after I select Linux from the refit menu?

thanks

#169

Noob37S said:

So is there a way for me to tell it to boot directly into the ONE AND ONLY kernel left after I select Linux from the refit menu?

thanks

I don't know anything about Macs or REFIT, but with a normal G2 install if you can access /etc/default/grub you should be able to get it to boot directly into the kernel with these two lines:

DEFAULT=0

GRUB_TIMEOUT="0" From inside Linux, you should be able to edit the lines with:

gksudo gedit /etc/default/grub
*Save the file, then:*
sudo update-grub
#170

Running grub-install -v returns grub-install (GNU GRUB 0.97) in my system running win vista and ubuntu 910. changing the default to vista (4) through startup-manager and through default/grub have not helped, there are no changes. Help.

#171

foxy123 said:

This is my fstab:

# / was on /dev/sda9 during installation
UUID=9018bfe2-9de3-4692-9883-fc2f875e6455 /               ext3    relatime,errors=remount-ro 0       1

# /boot was on /dev/sda8 during installation
UUID=c3eb67b1-7f8f-419b-a462-c79a6c76e5de /boot           ext2    relatime        0       2

# /home was on /dev/sda5 during installation
UUID=4802e809-ecaa-4932-bd01-4a816c0bbd4f /home           ext3    relatime        0       2

# /media/test_boot was on /dev/sda7 during installation
UUID=0c98fbe4-ed7c-4134-994a-07d49074e137 /media/test_boot ext2    relatime        0       2

# /test was on /dev/sda6 during installation
UUID=6ad1f928-50b9-4aea-9495-95df46d08d58 /test           ext3    relatime        0       2

You know you don't have to use UUID in your fstab :).. IMO using the volume label in fstab saves a lot of time and headache if you deal with several kernels..looks like you have a test partition or two in there.. I'd recommend just use the LABEL="volumeLabel" syntax instead of UUID=.... you could also just use /dev/sda(X) :) but those change around as do UUIDs if you resize or move or delete a partition.

#172

Package: mbr

Replacement for ms-sys, so from even a live CD:

sudo apt-get install mbr

I think prior to Jaunty requires either multiverse or universe repos. Then:

sudo install-mbr /dev/sdX

Of course X must be replaced with actual destination.

I've successfully used that with both XP and Win 7, I have no Win Vista to try it on.

I found that here:

http://www.dociletree.co.za/fixing-windows-mbr-with-ubuntu-8041-live-cd/

I lurve things that just work :guitar:

#173

sudo install-mbr /dev/sdX

kansasnoob: did you post this in the wrong thread??

Anyway, I don't recommend "install-mbr" for installing a windows type MBR. It disk signature, which can cause problems in some rare cases. I usually recommend lilo:

sudo  apt-get install lilo
sudo lilo -M /dev/sdX mbr
#174

meierfra. said: kansasnoob: did you post this in the wrong thread??

Anyway, I don't recommend "install-mbr" for installing a windows type MBR. It disk signature, which can cause problems in some rare cases. I usually recommend lilo:

sudo  apt-get install lilo
sudo lilo -M /dev/sdX mbr

Well, I only stumbled upon that here:

http://www.dociletree.co.za/fixing-windows-mbr-with-ubuntu-8041-live-cd/

I've since tried that with both XP and Win 7, not because they were unbootable but because I wanted to check it out.

So, I still sometimes (seldom) use lilo for external drives, but how would that help to boot a win OS where grub has failed?

#175

meierfra. said: kansasnoob: did you post this in the wrong thread??

Anyway, I don't recommend "install-mbr" for installing a windows type MBR. It disk signature, which can cause problems in some rare cases. I usually recommend lilo:

sudo  apt-get install lilo
sudo lilo -M /dev/sdX mbr

Also in retrospect I should have been more descriptive. I'm recovering from a small fire in my utility room and ........ well, sometimes I'm just kind of abrupt and stupid!

It's good to see you around. I'd love to see more of you. Have you any idea whatever happened to caljohnsmith?

#176

"lilo -M /dev/sdX mbr" just installs some code in the MBR which will load the boot sector of the partition with the boot flag (it does not install the full blown lilo boot loader). So it is very similar to "install-mbr /dev/sdX" and "fixmbr X:".

#177

I have added a "Password Protection" section to this guide (Section 10). It details the method to add very basic password protection to the entries in Grub 2's menu.

Grub 2 has the capability of allowing specific user access to designated menuentries by tailoring each menuentry item. This is beyond the scope of this guide. I hope to create a Password HOWTO will more advanced password options as time permits.

#178

Following up on my blurb yesterday about the package "mbr". As I said, it's worked for me with both XP and Win 7, but I totally trust Meierfra's experience over my own.

If Meierfra says my method sometimes fails I believe that. Also I did try from Live CD the suggestion of:

sudo apt-get install lilo
sudo lilo -M /dev/sda mbr

And I had no problem reverting to either grub or grub2 as the boot-loader so I think it's safe to say that Meierfra is once again right!

So, my thoughts, pitch both "ms-sys" and "mbr" to the curb, and choose "lilo" to restore the Windows mbr if nothing but the Ubuntu Live CD is available.

Sorry for the somewhat inappropriate blurb yesterday.

#179

[SIZE=3][FONT=Calibri]Hi all,[/FONT][/SIZE]

[SIZE=3][FONT=Calibri]Last week I've installed karmic, which comes with grub-setup (GRUB) 1.97~beta4 as default loader.[/FONT][/SIZE]

[SIZE=3][FONT=Calibri]As default, after an unsuccessful shutdown (let's say, a power fail or press power button while starting up to force a premature shutdown) GRUB2 will show the menu without a countdown. It will stay like that until the enter key is pressed.[/FONT][/SIZE]

[SIZE=3][FONT=Calibri]The problem: it's a media player without a keyboard. Only has a remote control and it works only after the driver is loaded. So, if I have an unsuccessful boot, I will need to get my desktop's keyboard and plug it to the media box just to press enter.[/FONT][/SIZE]

[SIZE=3][FONT=Calibri]Even if I force the menu display by commenting the line "GRUB_HIDDEN_TIMEOUT=0", there is no countdown if the previous boot failed.[/FONT][/SIZE]

[SIZE=3][FONT=Calibri]If this happens when I'm not at home, my wife and kids can't boot the media box.[/FONT][/SIZE]

[SIZE=3][FONT=Calibri]So, let me ask: there is any option to ignore if the last boot was or wasn't ok and always load Linux?[/FONT][/SIZE]

[SIZE=3][FONT=Calibri]Thanks in advance.[/FONT][/SIZE]

#180

@MCunha Just rename /boot/grub/grubenv to /boot/grub/grubenv.backup, boot again to try if everything is OK, and, then You can delete /boot/grub/grubenv.backup. You need to do this as a root.

sudo mv /boot/grub/grubenv /boot/grub/grubenv.backup
sudo rm /boot/grub/grubenv.backup
#181

Hi Zika,

Thanks for your reply. This didn't solve the problem. After rename or delete the file /boot/grub/grubenv a new one is created in the next system start and still locking in the menu, without a countdown, after an unsuccessful start :(

Cheers.

#182

MCunha said: Hi Zika,

Thanks for your reply. This didn't solve the problem. After rename or delete the file /boot/grub/grubenv a new one is created in the next system start and still locking in the menu, without a countdown, after an unsuccessful start :(

Cheers.OK. Check if You have a piece of code``` if [ ${recordfail} = 1 ]; then set timeout=-1<- important! else set timeout=4<- I use 4, You could use whatever fi

If there is some difference try with this piece of code I gave You. If it proves to be solution then You should check if You have ```
if [ \${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=${GRUB_TIMEOUT}
fi
#183

zika, thanks for your help. It did point me in the right direction and I was able to disable the menu after an unsucessful boot!

But what I change to solve my problem was exactly the "-1" value. I discover the following:

With -1 will not have a countdown after a fail startup With 0 will bypass the menu after a fail startup Any value >= 1 will represent the countdown in the menu afte a fail startup.

All I need to change was the -1 to 0 in /etc/grub.d/00_header and run update-grub2 to solve my issue.

Many thanks for your help :)

Regards.

#184

MCunha said: zika, thanks for your help. It did point me in the right direction and I was able to disable the menu after an unsucessful boot!

But what I change to solve my problem was exactly the "-1" value. I discover the following:

With -1 will not have a countdown after a fail startup With 0 will bypass the menu after a fail startup Any value >= 1 will represent the countdown in the menu afte a fail startup.

All I need to change was the -1 to 0 in /etc/grub.d/00_header and run update-grub2 to solve my issue.

Many thanks for your help :)

Regards.What You did is working by it is not "by the book". You disabled "getting help" after troublesome boot. But, if You're happy, I'm happy too. Have fun!

#185

Hi zica,

I don't know 4 sure, but I think "set timeout" is the timeout value if last boot fail (recordfail=1). So, -1 set it off. It's quiet logical. Is the same behavior if you set the default timeout to -1 (GRUB_TIMEOUT=-1 in grub.cfg or the second one you are using 4): you will stick on menu for ever in every boot. Give it a try and you will see what happens.

These lines speaks for then self's:

if [ \${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=${GRUB_TIMEOUT}
fi

"if the last startup fails (recordfail=1) there is no countdown in menu (timeout=-1); but (else), if didn't fail the timeout is the one set by the user in grub.cfg (timeout=GRUB_TIMEOUT). That's it (fi).

If is not it, what else the 1st timeout means? If you put set timeout=15 instead of -1, you will get a 15 seconds countdown after an unsuccessful startup. It is coincidence?

Cheers.

#186

MCunha said: Hi zica,

I don't know 4 sure, but I think "set timeout" is the timeout value if last boot fail (recordfail=1). So, -1 set it off. It's quiet logical. Is the same behavior if you set the default timeout to -1 (GRUB_TIMEOUT=-1 in grub.cfg or the second one you are using 4): you will stick on menu for ever in every boot. Give it a try and you will see what happens.

These lines speaks for then self's:

if [ \${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=${GRUB_TIMEOUT}
fi

"if the last startup fails (recordfail=1) there is no countdown in menu (timeout=-1); but (else), if didn't fail the timeout is the one set by the user in grub.cfg (timeout=GRUB_TIMEOUT). That's it (fi).

If is not it, what else the 1st timeout means? If you put set timeout=15 instead of -1, you will get a 15 seconds countdown after an unsuccessful startup. It is coincidence?

Cheers.What I meant is: If there is a failure of some sort that set $recordfail then, if You change that value from -1 to something else, You will not get "default" behavior for that situation, You will get "normal" boot. It is, sometimes, useful to have boot stop and wait for You, if there was a problem in previous attempt. That is the purpose, as I see, of that check in program. This way, You have disabled it. I prefer to clean the mess left from un-suscessfull attempt rather than just ignore it. It seems that we are both right and we have different approaches to this thing. I'm OK with that. I suspect that You have some other problem masked right now, if the only solution is to change -1 to some positive value. But, that is just my opinion. The very fact that You have difference in behavior while changing that first value proves that You, still, have $recordfail set to true. I would try to reset it, one way was by removing the marker file... Since that did not work, You have to dig further. I might be wrong... Update: The first thing that I thought of was that You migh need to check Your FS. You can force fsck on next boot with``` sudo touch /forcefsck

#187

check out this strange thing:

I just tried installing karmic (vanilla ubuntu-desktop) twice on an eeepc 901 with a 64GB SSD sdb drive from a usb flashdrive (which checks ok). It gave me the same result both times - exits successful, but upon reboot, a black screen with this message:

"Gnu Grub version 1.97~ beta 4 Minimal BASH-like editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device/file completions

rescue:grub> unaligned pointer 0xb8

Aborted. Press any key to exit.

It doesn't let me press shift to input commands.

After rebooting from the liveUSB again:

sudo su 
mount /dev/sdb1 /mnt
ls /mnt

shows that the system IS installed:

bin    dev   initrd.img  media  proc  selinux  tmp  vmlinuz
boot   etc   lib         mnt    root  srv      usr
cdrom  home  lost+found  opt    sbin  sys      var

But even attempts to reinstall grub-pc fail:

root@ubuntu:/# grub-install --root-directory=/mnt /dev/sdb
cp: cannot stat `/mnt/boot/grub/raid.mod': Input/output error
root@ubuntu:/# sudo grub-setup -d /media/1d1163cd-05ed-4458-b64f-db517e82ce4f/boot/grub /dev/sdb
grub-setup: error: cannot stat /media/1d1163cd-05ed-4458-b64f-db517e82ce4f/boot/grub/boot.img

but then I realised that I am asking it to restore grub from the installed location, the {/dev/sdb1}/boot/grub, but that they were never properly installed in the first place:

root@ubuntu:/# ls /mnt/boot/grub                                
ls: cannot access /mnt/boot/grub/core.img: Input/output error
ls: cannot access /mnt/boot/grub/vga.mod: Input/output error
ls: cannot access /mnt/boot/grub/ufs1.mod: Input/output error
ls: cannot access /mnt/boot/grub/serial.mod: Input/output error
ls: cannot access /mnt/boot/grub/pxeboot.img: Input/output error
ls: cannot access /mnt/boot/grub/read.mod: Input/output error
ls: cannot access /mnt/boot/grub/vbeinfo.mod: Input/output error
ls: cannot access /mnt/boot/grub/test.mod: Input/output error
ls: cannot access /mnt/boot/grub/scsi.mod: Input/output error
ls: cannot access /mnt/boot/grub/uhci.mod: Input/output error
ls: cannot access /mnt/boot/grub/raid6rec.mod: Input/output error
ls: cannot access /mnt/boot/grub/reiserfs.mod: Input/output error
ls: cannot access /mnt/boot/grub/usbtest.mod: Input/output error
ls: cannot access /mnt/boot/grub/efiemu64.o: Input/output error
ls: cannot access /mnt/boot/grub/tar.mod: Input/output error
ls: cannot access /mnt/boot/grub/search.mod: Input/output error
ls: cannot access /mnt/boot/grub/sleep.mod: Input/output error
ls: cannot access /mnt/boot/grub/sfs.mod: Input/output error
ls: cannot access /mnt/boot/grub/true.mod: Input/output error
ls: cannot access /mnt/boot/grub/grubenv: Input/output error
ls: cannot access /mnt/boot/grub/udf.mod: Input/output error
ls: cannot access /mnt/boot/grub/vbetest.mod: Input/output error
ls: cannot access /mnt/boot/grub/raid5rec.mod: Input/output error
ls: cannot access /mnt/boot/grub/sh.mod: Input/output error
ls: cannot access /mnt/boot/grub/usb.mod: Input/output error
ls: cannot access /mnt/boot/grub/cdboot.img: Input/output error
ls: cannot access /mnt/boot/grub/terminfo.mod: Input/output error
ls: cannot access /mnt/boot/grub/efiemu32.o: Input/output error
ls: cannot access /mnt/boot/grub/vbe.mod: Input/output error
ls: cannot access /mnt/boot/grub/kernel.img: Input/output error
ls: cannot access /mnt/boot/grub/raid.mod: Input/output error
ls: cannot access /mnt/boot/grub/reboot.mod: Input/output error
ls: cannot access /mnt/boot/grub/usb_keyboard.mod: Input/output error
ls: cannot access /mnt/boot/grub/setjmp.mod: Input/output error
ls: cannot access /mnt/boot/grub/usbms.mod: Input/output error
ls: cannot access /mnt/boot/grub/ufs2.mod: Input/output error
ls: cannot access /mnt/boot/grub/tga.mod: Input/output error
ls: cannot access /mnt/boot/grub/diskboot.img: Input/output error
ls: cannot access /mnt/boot/grub/lnxboot.img: Input/output error
915resolution.mod  echo.mod       loadenv.mod     raid.mod
acpi.mod           efiemu.mod     loopback.mod    raid5rec.mod
affs.mod           efiemu32.o     ls.mod          raid6rec.mod
afs.mod            efiemu64.o     lsmmap.mod      read.mod
afs_be.mod         elf.mod        lspci.mod       reboot.mod
aout.mod           ext2.mod       lvm.mod         reiserfs.mod
at_keyboard.mod    extcmd.mod     mdraid.mod      scsi.mod
ata.mod            fat.mod        memdisk.mod     search.mod
ata_pthru.mod      font.mod       memrw.mod       serial.mod
befs.mod           fs_file.mod    minicmd.mod     setjmp.mod
befs_be.mod        fs_uuid.mod    minix.mod       sfs.mod
biosdisk.mod       fshelp.mod     mmap.mod        sh.mod
bitmap.mod         gfxterm.mod    msdospart.mod   sleep.mod
blocklist.mod      gptsync.mod    multiboot.mod   tar.mod
boot.mod           grub.cfg       normal.mod      terminfo.mod
bsd.mod            grubenv        ntfs.mod        test.mod
bufio.mod          gzio.mod       ntfscomp.mod    tga.mod
cat.mod            halt.mod       ohci.mod        true.mod
cdboot.img         handler.mod    part_acorn.mod  udf.mod
chain.mod          hdparm.mod     part_amiga.mod  ufs1.mod
cmp.mod            hello.mod      part_apple.mod  ufs2.mod
configfile.mod     help.mod       part_gpt.mod    uhci.mod
core.img           hexdump.mod    part_msdos.mod  usb.mod
cpio.mod           hfs.mod        part_sun.mod    usb_keyboard.mod
cpuid.mod          hfsplus.mod    parttool.mod    usbms.mod
crc.mod            iso9660.mod    password.mod    usbtest.mod
date.mod           jfs.mod        pci.mod         vbe.mod
datehook.mod       jpeg.mod       play.mod        vbeinfo.mod
datetime.mod       kernel.img     png.mod         vbetest.mod
device.map         keystatus.mod  probe.mod       vga.mod
diskboot.img       linux.mod      pxe.mod
dm_nv.mod          linux16.mod    pxeboot.img
drivemap.mod       lnxboot.img    pxecmd.mod

I guess i must have filesystem errors, and not just a problem with GRUB? its a brand new drive, straight from the factory, and i added the partition table during the install. its ext3, and checks clean:

root@ubuntu:/# fsck /dev/sdb1
fsck from util-linux-ng 2.16
e2fsck 1.41.9 (22-Aug-2009)
/dev/sdb1: clean, 132935/3817472 files, 848030/15269774 blocks

any ideas?

#188

I also tried reinstalling grub as recommended on this tutorial, to no avail:

root@ubuntu:/# grub-install /dev/sdb
grub-probe: error: cannot find a device for /boot/grub.

No path or device is specified.
Try ``grub-probe --help'' for more information.
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.

I guess I should console myself that I'm learning, right?

#189

I do not know why folks insist on going to blogs and then come to the community. Try community resources first;

https://wiki.ubuntu.com/Grub2#Recover%20Grub%202%20via%20LiveCD

If you have not tried that, I hope the other did not screw your system.

From you LiveCD, before you try the above, check the /etc/default/grub file and the /etc/grub.d directory and see if they are whole and how you want them.

That way you can ignore the instructions on editing files and just do the update and install stuff.

#190

...and just who is served by this "new and improved", pardon me, crap? Why would I care where on my hard-drive this kernel or that o.s. is located? Does anyone really expect the people that Canonical is trying to attract (Windows users) to be able to deal with this?

#191

menuentry "Ubuntu, Linux 2.6.31-12-generic (recovery mode)" { recordfail=1 save_env recordfail insmod ext2 set root=(hd0,1) [SIZE=5]search --no-floppy --fs-uuid --set 7ebcfe33-6914-42ec-9d2e-0859f7396933[/SIZE] linux /boot/vmlinuz-2.6.31-12-generic root=UUID=7ebcfe33-6914-42ec-9d2e-0859f7396933 ro single initrd /boot/initrd.img-2.6.31-12-generic }

[SIZE=5] What will the 'Search' line look like, when device name is used???[/SIZE]

  • If GRUB 2 cannot find the referenced kernel, try replacing the UUID with the device name (example: /dev/sda6 ).

#192

My advice since writing that, due to several bugs which have appeared from time to time, would be to remove the entire search line with the delete key; then try booting without the line by pressing CTRL-x. ;-)

The format would be "/dev/sda1" but it wouldn't go in the "search" line. You would be replacing the UUID in the "linux" line below it.


linux /boot/vmlinuz-2.6.31-12-generic root=/dev/sda1 ro single 

If doing this, I would remove the "search" line entirely.

Note: You *can* change the UUID search option in the "search" line, substituting a "label" search for the UUID search. The format for a root partition labeled "*partition_label*" would be:


search --no-floppy --label --set *partition_label*
#193

drs305 said: My advice since writing that, due to several bugs which have appeared from time to time, would be to remove the entire line with the delete key. Try booting without the line by pressing CTRL-x. ;-)

Added:

I haven't had success with device names in the search line, but another option if you have your partition is labeled (a good idea for many reasons) you can use:


search --no-floppy --label --set *yourpartitionlabel*

Until someone has success with the device name, I think I'll change it to recommend the label option.

Neither worked...

Tried without the line at all, and tried with just search --no-floppy --label --set [I]/dev/sda4 [/I] Both gave same result as default result[I]

[/I][COLOR=Navy][B]VFS: Cannot open root device "sda4" or unknown-block (0, 0) Please append a correct "root=" boot option; here are the available partitions: Kernel Panic - not syncing: VFS Unable to mount root FS on unknown-block (0, 0)[/B][/COLOR]

#194

I revised the post after you probably read it. The label wouldn't be "/dev/sda4" as you tried in any case.

I posted an example of how you would change the UUID to a device setting in the linux line. So try deleting the entire search line and changing the "linux" line to what I posted above, substituting your device (/dev/sda4) for the one in my example.

Also, are you sure it's sda4? That seems like an odd partitioning scheme.

In any case, you can check to see if that is where your boot files are by dropping to the command line in Grub 2 (press "c") and inspecting what is in sda4:


ls (hd0,4)/boot

You should have a linux kernel and an initrd image file in the /boot folder, along with other files.

#195

This is a 5-boot setup.

Upgrade to 9.10 showed/listed in GRUB2 all 5 OS's. 2 Linux's won't boot. 9.10, XP, Vista boot ok...

Edit: ls (hd0,4) /boot returned Partition hd0,4: fs ext2, Label /, last mod time (yesterday), UUID xx-xx-xxxxx-xx

2nd edit: Got FC10 back up booted; needed only 'initrd' entry; going for PCLOS next...

3rd edit: Got PCLOS back; see error here (if you're sharp) post #1

#196

Hey. I'm a newbie.

I'm trying to change GRUB 2 default value to "Windows 7" as code "6". Startup manager doesn't show windows 7. But I modified "sudo gedit /etc/default/grub" and put default value as 6 and time delay as 3.

BUT after that when I tried to "update-grub" terminal says:

*****@*****-laptop:~$ update-grub
/usr/sbin/grub-mkconfig: You must run this as root

So grub doesn't change!!!!!!!

Help!!

#197

turisti said:

BUT after that when I tried to "update-grub" terminal says:

*****@*****-laptop:~$ update-grub
/usr/sbin/grub-mkconfig: You must run this as root

So grub doesn't change!!!!!!! Help!!

Since you are trying to change system files, you must run this as root:

**sudo** update-grub

The reason what I put as the command and what was reported is that "update-grub" is a *stub* for the *mkconfig* command.

Don't forget that the first menuentry is counted as "0", so if you are putting "6" as the default it should be the 7th *menuentry* listed.

#198

turisti said: Hey. I'm a newbie.

I'm trying to change GRUB 2 default value to "Windows 7" as code "6". Startup manager doesn't show windows 7. But I modified "sudo gedit /etc/default/grub" and put default value as 6 and time delay as 3.

BUT after that when I tried to "update-grub" terminal says:

*****@*****-laptop:~$ update-grub
/usr/sbin/grub-mkconfig: You must run this as root

So grub doesn't change!!!!!!!

Help!! If what you are trying to do is get Win JerryLewis Pro to be your default OS in Grub2 you have couple of problems.

You should get rid of Startup manager first. The last I new it does not get along with grub2 real well yet. Remove it through synaptic.

Run;


gksudo gedit /boot/grub/grub.cfg

Count ALL menu entries to your MS and including your MS entry. Start with 0 for the first one.

Then run;


gksudo gedit /etc/default/grub

and replace the number in this line;

GRUB_DEFAULT=0

with the number you counted in your grub.cfg file.

Then run;


sudo update-grub

Reboot and see if you have the number right.

#199

hey. just came across you post last night from a liveCD via google needing a fix .. i had changed a partiton for xtra space, not expecting grub issues .. found your post and the section # Reinstalling GRUB 2 from the LiveCD and it totally fixed me. i also wrote down the section # Booting from the Rescue Mode but didn't neet it. though that exactly where i had been left .. grub>

thanks for the post, saved me tonight .. ;D

#200

Thought I'd give a shout out regarding proposed grub-pc and grub-common updates (available in Karmic proposed this AM).

Anyway it has to do with the Karmic Wubi problem for which I'd been using this:

http://ubuntuforums.org/showpost.php?p=8627484&postcount=12

More about the update:

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/477104

Well, darn! I should have saved a copy of the changelog, can't download it for some reason :(

Anyway it is supposed to be a bug fix for the Karmic/Wubi thing.

I can't verify the fix because I don't use Wubi, but I installed it accepting the "maintainers version" of changes and it doesn't break anything :)

Very minimal changes. Just thought you'd like to know if you hadn't seen it.

#201

What I do not understand about this is that there seems to be this same problem (I think from what I read in the testing forum) in grub1.97.

Why not throw grub 1.97 onto 9.10 and fix it there? Grub 1.97 is a little nicer than grub1.97beta4 and I do not understand why the folks in charge os the Ubuntu grub program do not use it in 9.10. I know that it runs fine there as that is what I am using in my 9.10 installs.

I particularly like being able to use "grub-mkconfig" to pull up my grub.cfg file in the terminal to check things. This is quicker than going to the file or pulling it up in gedit.

#202

I have been following the theming discussion in the testing forum and everyone seems to think that the /etc/grub.d/10_linux file is where all your Ubuntu installs are picked up.

This is not the case as far as I can tell. Here is the grub.cfg file from my 9.10 respin on my test platform. As can be seen there is only on non-Ubuntu install and all installs can be seen to be Linux;

#

DO NOT EDIT THIS FILE

#

It is automatically generated by /usr/sbin/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="0" if [ ${prev_saved_entry} ]; then set saved_entry=${prev_saved_entry} save_env saved_entry set prev_saved_entry= save_env prev_saved_entry fi insmod ext2 set root=(hd0,12) search --no-floppy --fs-uuid --set d938681d-2c8e-47f7-9d0b-2ff29c760489 if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=640x480 insmod gfxterm insmod vbe if terminal_output gfxterm ; then true ; else # For backward compatibility with versions of terminal.mod that don't # understand terminal_output terminal gfxterm fi fi set locale_dir=/boot/grub/locale set lang=en insmod gettext if [ ${recordfail} = 1 ]; then set timeout=-1 else set timeout=100 fi

END /etc/grub.d/00_header ###

BEGIN /etc/grub.d/05_debian_theme ###

insmod ext2 set root=(hd0,12) search --no-floppy --fs-uuid --set d938681d-2c8e-47f7-9d0b-2ff29c760489 insmod png if background_image /usr/share/images/desktop-base/menu.png ; then set color_normal=black/black set color_highlight=magenta/black else set menu_color_normal=white/black set menu_color_highlight=black/white fi

END /etc/grub.d/05_debian_theme ###

BEGIN /etc/grub.d/09_custom ###

menuentry "Stoner1.2 on sda12" { set root=(hd0,12) linux /vmlinuz root=/dev/sda12 so quiet splash initrd /initrd.img } menuentry "Lounge on sda7" { set root=(hd0,7) linux /vmlinuz root=/dev/sda7 so quiet splash initrd /initrd.img } menuentry "Lxde on sda8" { set root=(hd0,8) linux /vmlinuz root=/dev/sda8 ro quiet splash initrd /initrd.img } menuentry "Daily on sda13" { set root=(hd0,13) linux /vmlinuz root=/dev/sda13 so quiet splash initrd /initrd.img } menuentry "ISO-test on sda14" { set root=(hd0,14) linux /vmlinuz root=/dev/sda14 ro quiet splash initrd /initrd.img } menuentry "Mini on sda15" { set root=(hd0,15) linux /vmlinuz root=/dev/sda15 ro quiet splash initrd /initrd.img } menuentry "Throw on sda16" { set root=(hd0,16) linux /vmlinuz root=/dev/sda16 ro quiet splash initrd /initrd.img } menuentry "Krap on sda17" { set root=(hd0,17) linux /vmlinuz root=/dev/sda17 ro quiet splash initrd /initrd.img } menuentry "Zenix on sda11" { set root=(hd0,11) linux /vmlinuz root=/dev/sda11 so quiet splash initrd /initrd.img } menuentry "Main, kernel 2.6.24-24-generic (sda6)" { set root=(hd0,6) search --no-floppy --fs-uuid --set e2e3cd65-bc09-487f-be96-a83fcc282e38 linux /boot/vmlinuz-2.6.24-24-generic root=UUID=e2e3cd65-bc09-487f-be96-a83fcc282e38 ro quiet vga=773 initrd /boot/initrd.img-2.6.24-24-generic } menuentry "Mandriva on sda10" { set root=(hd0,10) linux /vmlinuz root=/dev/sda10 so quiet splash initrd /initrd.img } menuentry "Man-Both on sda10" { linux (hd0,10)/boot/vmlinuz initrd (hd0,10)/boot/initrd.img }

END /etc/grub.d/09_custom ###

BEGIN /etc/grub.d/10_linux ###

menuentry "Ubuntu, with Linux 2.6.31-17-generic" { set recordfail=1 if [ -n ${have_grubenv} ]; then save_env recordfail; fi set quiet=1 insmod ext2 set root=(hd0,12) search --no-floppy --fs-uuid --set d938681d-2c8e-47f7-9d0b-2ff29c760489 linux /boot/vmlinuz-2.6.31-17-generic root=UUID=d938681d-2c8e-47f7-9d0b-2ff29c760489 ro quiet splash initrd /boot/initrd.img-2.6.31-17-generic } menuentry "Ubuntu, with Linux 2.6.31-17-generic (recovery mode)" { set recordfail=1 if [ -n ${have_grubenv} ]; then save_env recordfail; fi insmod ext2 set root=(hd0,12) search --no-floppy --fs-uuid --set d938681d-2c8e-47f7-9d0b-2ff29c760489 linux /boot/vmlinuz-2.6.31-17-generic root=UUID=d938681d-2c8e-47f7-9d0b-2ff29c760489 ro single initrd /boot/initrd.img-2.6.31-17-generic } menuentry "Ubuntu, with Linux 2.6.31-16-generic" { set recordfail=1 if [ -n ${have_grubenv} ]; then save_env recordfail; fi set quiet=1 insmod ext2 set root=(hd0,12) search --no-floppy --fs-uuid --set d938681d-2c8e-47f7-9d0b-2ff29c760489 linux /boot/vmlinuz-2.6.31-16-generic root=UUID=d938681d-2c8e-47f7-9d0b-2ff29c760489 ro quiet splash initrd /boot/initrd.img-2.6.31-16-generic } menuentry "Ubuntu, with Linux 2.6.31-16-generic (recovery mode)" { set recordfail=1 if [ -n ${have_grubenv} ]; then save_env recordfail; fi insmod ext2 set root=(hd0,12) search --no-floppy --fs-uuid --set d938681d-2c8e-47f7-9d0b-2ff29c760489 linux /boot/vmlinuz-2.6.31-16-generic root=UUID=d938681d-2c8e-47f7-9d0b-2ff29c760489 ro single initrd /boot/initrd.img-2.6.31-16-generic }

END /etc/grub.d/10_linux ###

As you can see the only thing that 10_linux is picking up is the entries for partition sda12 which is StonerEdition1.2, the OS generating this grub.cfg. All scripts past 10_linux have been disabled.

Is this right? It is the way of all my many installs, both on my test platform and on my main drives with stable releases.

Does 30_os-prober read something from 10_linux in doing its thing for identifying OS'?

#203

10_linux only picks up linux versions on the default partition. 30_os-prober will find linux kernels on other partitions. If you look at the script in 30_os-prober there are sections for windows (OS), Linux (linux) and OSX.

I have been told that 1.97beta4 will not be upgraded to 1.97 in Karmic, in keeping with the 'stable release' philosophy. I've also been told there are no huge improvements. I do know the GRUB devs are working very hard to improve GRUB 2. I asked if 1.98 would make it into the Lucid LTS and they are not sure.

#204

It seems I'm either having problems with grub-mkconfig or lacking patience. I start it with {sudo,gksu} grub-mkconfig and nothing happens for ages. I know, update-grub takes for ages also, but is it something wrong or am I inpatient?

#205

OK, I thought maybe I was nuts. Well I probably am anyway.

I suspect that the impression I got was from reading posts from folks that have enough brains not to have lots of installs or at least just one of each type of OS (Linux, Mac, MS).

Thanks for clearing that up for me.

For those wondering, yes there are 2 entries in my menu for Mandriva 2009-1. I need to get rid of the first one "Mandriva" and just leave the "Man-both" entry. The Mandriva entry does not work, it was put in to see if it would. I knew the Man-both would work so it was put in too.

#206

zika said: It seems I'm either having problems with grub-mkconfig or lacking patience. I start it with {sudo,gksu} grub-mkconfig and nothing happens for ages. I know, update-grub takes for ages also, but is it something wrong or am I inpatient?

On my machine, update-grub takes about 20 seconds. It searches all your partitions. You can speed it up by disabling scripts in /etc/grub.d/ that you don't need run, such as 30_os-prober if you don't have systems on other partitions or already have them in a custom file.

#207

zika said: It seems I'm either having problems with grub-mkconfig or lacking patience. I start it with {sudo,gksu} grub-mkconfig and nothing happens for ages. I know, update-grub takes for ages also, but is it something wrong or am I inpatient?

It does take a while to come up. It basically is checking the entire thing before displaying it so it takes about the same time as "update-grub".

#208

drs305 said: On my machine, update-grub takes about 20 seconds. It searches all your partitions. You can speed it up by disabling scripts in /etc/grub.d/ that you don't need run, such as 30_os-prober if you don't have systems on other partitions or already have them in a custom file.

Good point.

I assume everyone has a custom file of some kind. It just is too easy to maintain. I love it. I do leave the 10_linux file enabled on the test drive in case I need it for some reason. Haven't needed it yet so it may be going soon.

#209

ranch hand said: It does take a while to come up. It basically is checking the entire thing before displaying it so it takes about the same time as "update-grub".Thanks. So, as I suspected, it is, just, my impatience...

I'll stick with nano and editing those two files, it's much faster...

#210

According to the grub project folks "grub-mkconfig" was supposed to take the place of "update-grub" in 1.97. I haven't checked recently so I do not know if they changed the plan or if the Ubuntu folks decided to have it work this way.

#211

In recent weeks I've been testing different multi-disc scenarios and also following the forums, and I've made certain observations. I can not guarantee you'll have the same results I've had.

********Spoiler Alert**********

GRUB2 is pretty darn awesome at handling multiple drives! People just don't know how to do it. Except in a few corner applications where it just doesn't work, possibly due to certain systems BIOS?????????

********on with business********

Anyway my observations are:

#1. I think we've all used meierfra's Boot Info Script. The first thing it shows is what's installed to the mbr of each drive. Don't say, "duh, like we know that"? That information is hugely useful! You can see if a drive has a legacy-grub mbr, a Windows mbr or a Grub2 mbr.

#2. Furthermore if you've installed more than one OS with grub2 you'll see which OS that grub2 mbr is assigned to! Likewise if you've reinstalled an OS the Boot Info Script breaks things down to, not only a device like sda1, but to UUID! That's super important!

#3. Grub2 (aka: G2) (*if it works on your system with one hard drive*) always seems to respect and recognize a Windows mbr. Of course if your cable connections and BIOS settings are wrong it will then boot directly into Windows.

#4. The grub2 mbr must be "set" or "installed" from the OS that controls grub2. That is if I have Karmic w/G2 on sda, Lucid w/G2 on sdb, and Win 7 on sdc (with a Win mbr) and I want Lucid's G2 to run the show I must either boot into Lucid and run "grub-install /dev/sda" followed by "grub-install /dev/sdb" or do the same through a mount & chroot:

http://ubuntuforums.org/showpost.php?p=8068512&postcount=10

It does seem to be important to install grub2 to the mbr of the [COLOR="Red"]boot drive[/COLOR] last!

**********Conclusions**********

#1. IMHO it's always safe to install the controlling OS's G2 to the mbr of every drive! However the last move should be to install (or reinstall) to the mbr of the boot drive.

#2. In those cases where someone wants to keep a Windows mbr on a certain drive they must be able to "cable" things right or set the BIOS right. G2 has no problem with any Windows mbr that I've seen.

#3. This just makes G2 work right! No need for anything but personal tweaks. Of course people will get lost, like if I have Lucid G2 controlling, and I have a kernel update in Karmic, I'll then have to boot into two systems for the kernel update to show up in the menu.

Holy cow, that'll be hard to do!

Does this make sense?

Looking forward to feedback from all of you. It would be awesome if meierfra would take a look.

I'm reasonably certain of what I'm saying here but it's impossible to run every possible test case.

Soon no editing will be needed, it'll be replaced with running either "update-grub" or "grub-mkconfig". I'm good with that :D

I should add that I know nothing about RAID!

#212

drs305

Many thanks for this info, been searching all over for this, should have come here first!

#213

I would add that if you are scared of changing uuids, as I so far am, you better plan your partition lay out and decide where you want to be able to boot from in advance.

I basically run 3 drives, 2 internal and 1 external. I can't boot with my 1st internal to anywhere because it was out of the loop when the others were formatted and partitioned. There is no trouble with the second internal and the external.

You need to have all your drive "live" when you partition or you will get conflicts in your uuids. This is what I am fumbling around to say.

#214
  1. Grub2 (aka: G2) (if it works on your system with one hard drive) always seems to respect and recognize a Windows mbr. Of course if your cable connections and BIOS settings are wrong it will then boot directly into Windows.

If Ubuntu is on the same drive as Windows, Grub will overwrite the Windows MBR (of course anything else would be ridiculous) I also have seen plenty of cases where Ubuntu is installed on external USB drive and grub2 was installed to the MBR of the internal drive, overwriting the Windows MBR. That might be a wise choice, since not all bios allow you to boot from the USB drive. But I think the Ubuntu installer should explicitly asked to user, where to install Grub.

On second thought, I'm not sure what you mean with :"recognize Windows mbr." Do you mean "able to boot Windows?"

I have a kernel update in Karmic, I'll then have to boot into two systems for the kernel update to show up in the menu.

Not if you set it up right: You can use the symlinks "/vmlinuz" and /initrd.img". Or you can use the "configfile" method with the second menu hidden.

The grub2 mbr must be "set" or "installed" from the OS that controls grub2. That is if I have Karmic w/G2 on sda, Lucid w/G2 on sdb, and Win 7 on sdc (with a Win mbr) and I want Lucid's G2 to run the show I must either boot into Lucid and run "grub-install /dev/sda" followed by "grub-install /dev/sdb" or do the same through a mount & chroot:

This is my recommended procedure:

1) If you can boot into the OS holding the Grub folder, do it and run "grub-install --recheck /dev/sdX".

2) If you can't, boot into a different OS or live CD and run "grub-install --recheck --root-directory=\mnt \dev/sdX" I never had problems with this.

3) If 2) fails, use chroot.

In my opinion, using "chroot" before your try "root-directory=/mnt" causes more problems than it solves. Also one should always use "--recheck" unless one already knows that there is a problem with the automatically generated device.map

In those cases where someone wants to keep a Windows mbr on a certain drive they must be able to "cable" things right or set the BIOS right. G2 has no problem with any Windows mbr that I've seen.

I have seen very rare case where Legacy Grub was not able to boot Windows. Might have been some bios issue, but I'm sure where are some bios, which one just cannot set right. There is some evidence that the same is true for Grub 2.

PS: I really like Grub 2. Lost of the problems with Grub2 are just due to the fact that its new and people aren't used to it.

PSPS:

I think we've all used meierfra's Boot Info Script.

I'm actually very surprised how many people use the script. It had 10000 downloads in its first year. Currently it has around 70 downloads a day. Kind of scary that people are willing to run a script with root permission, without even giving it a second thought.

#215

@meierfra. The first time I used your script I downloaded it and looked through it (not sure this did much good with my lack of knowledge in these things) as close as I could. Pretty scary but I was on a test OS (9.10-testing) and decided to take the chance.

Glad I did. Handy little bugger. Thank you for it.

#216

@rayburn - thanks

@ kansasnoob I think you should remove the 'disclaimer', since what you have to say is important to others reading the thread. Perhaps more so since others can learn a lot from your observations.

@ ranchhand I tried looking through the script before running it as well, but the fact that it's on Launchpad gave me some comfort even before that.

@meierfra, With others, I thank your for the script - many times over.

#217

I'm actually very surprised how many people use the script. It had 10000 downloads in its first year. Currently it has around 70 downloads a day. Kind of scary that people are willing to run a script with root permission, without even giving it a second thought.

I knew who authored it. Still wish I knew what happened to caljohnsmith. No doubt he was a great contributor.

Anyway a personal trust level exceeds any signed certificate. You earned my personal trust long ago.

#218

@ kansasnoob

I think you should remove the 'disclaimer', since what you have to say is important to others reading the thread. Perhaps more so since others can learn a lot from your observations.

Maybe. This is your thread, and a darn good one. I don't want to give the impression that I know best. I just wanted to share with you and others that are truly inquisitive what I've learned.

I'll give it another look.

#219

Darn, I sat here and dozed off.

Meierfra, you asked "On second thought, I'm not sure what you mean with :"recognize Windows mbr." Do you mean "able to boot Windows?""

Yes. As long as the drive with the Win mbr is not the boot drive G2 seems to generally be happy with that.

But the simplest thing seems to be "installing" the controlling OS's G2 to the mbr of all drives. Just make sure you install/reinstall to the boot drive last.

Did I say that so it's understandable?

#220

hey, nice chatter here folks, nice thread.

one thing i have Not seen mentioned, one of you well versed grub folks can maybe address ..

howto install a distro using grub legacy onto my lucid box with grub2 already in place??

i have a single hdd drive with only lucid now and i want to get another distro as a dual boot. but all the current releases, mandrivaOne, fedora12, Suse, debian, all still using grub legacy.

how can i install another one of these distros without the old grub taking over? anyone done this yet? it may be like this awhile until the next round of releases get grub2 in place .. thx for help ..

#221

You can, when the installer comes to installing the boot loader, have it install on the partition instead of the mbr.

I do not like this. I prefer to have the new installs grub take over. That way I know that it is working and can see if it will pick up ext4 formatted OS'.

If your 10.04 is picked up and you can boot to it you can easily change back to its grub2 by running;


sudo grub-install /dev/sda

from terminal in your 10.04 istall (changing the "sda" to fit your needs)

If not then you will have to chroot into 10.04 from the new OS and do that or; https://wiki.ubuntu.com/Grub2#Recover%20Grub%202%20via%20LiveCD

All debian based OS' seem to be picked up great by grub2 with bootable generated menu entries. Some of the others not so good.

I have a menu entry for Mandriva that works in my grub2 intro (see sig) and there are a lot of tips and examples for other OS' in this thread.

I just tried os-prober on the newgrub1.98 to see if Mandriva was picked up right. No, it was not. The generated menu entry has 2 instances of defining the partition. The first one is correct and the second one is incorrect. You can edit this (hit "e") when your menu comes up or have a custom entry that is right.

#222

woodnymph said: hey, nice chatter here folks, nice thread.

one thing i have Not seen mentioned, one of you well versed grub folks can maybe address ..

howto install a distro using grub legacy onto my lucid box with grub2 already in place??

i have a single hdd drive with only lucid now and i want to get another distro as a dual boot. but all the current releases, mandrivaOne, fedora12, Suse, debian, all still using grub legacy.

how can i install another one of these distros without the old grub taking over? anyone done this yet? it may be like this awhile until the next round of releases get grub2 in place .. thx for help ..

I always choose to install no bootloader at all. Then I boot into the distro who's grub2 controls the show and run "sudo update-grub". That is usually all it takes.

A couple of times I've had to:

sudo apt-get install --reinstall libdebian-installer4
sudo os-prober
sudo update-grub
#223

Hey, thanks for all the great info. Just one question (and I hope it hasn't been asked before - I tried searching...):

How do you hide the rectangular frame around the Grub entries?

#224

ybd said: Hey, thanks for all the great info. Just one question (and I hope it hasn't been asked before - I tried searching...):

How do you hide the rectangular frame around the Grub entries?

I don't think that is possible at the moment unless you get into theming - I believe the 'frame' is hard-coded into Grub 2.

The good news is that 'theming' is coming along, which allows great customization of the boot screen. There is a thread on GRUB2 theming for lucid? which discusses some Grub 2 alternatives/spinoffs (aka BURG) which can already produce some really nice boot themes.

And the Grub 2 devs hope to have theming ready for the rollout of Lucid, incorporating theming into Grub 1.98.

#225

Thank you for that informative (and ridiculously fast) answer. I'll look into themes.

#226

@drs305

grub2 floppy created with

grub-mkrescue --overlay=/boot/grub --image-type=floppy GRUB2.img sudo dd if=GRUB2.img of=/dev/fd0

at boot time mssge as follows

GTUB2 loading ...............

then the pc locks; pc reset not working, pc had to be powered down.

could it be because the grub,cfg script in my case still has --no-floppy option present ? like below ?

search --no-floppy --fs-uuid --set ........

thank you.

#227

peter b said:

at boot time mssge as follows GTUB2 loading ............... then the pc locks; pc reset not working, pc had to be powered down. could it be because the grub,cfg script in my case still has --no-floppy option present ? like below ? search --no-floppy --fs-uuid --set ........

Peter,

I haven't tried making a floppy, but you could check to see if your theory is correct from the Grub 2 menu. Highlight the menu item you want to try, press "e" and then in the search line use the DEL key to remove the "--no-floppy" reference. Then press CTRL-x and see if it will boot.

#228

thanks drs305,

sorry, I wasn't to clear I guess; what it boils down to is that when booting off the floppy created as mentioned, the only thing that I can get is

GRUB2 loading ...............

message then a hard locked pc that must be powered down.

I want to get/end up with a grub shell prompt

sh:grub>

similar with the one I'm getting when ubuntu is fully functional, booted off a hd etc. from the prompt above I'm feeling v comfortable to enter what it takes to get an os booted up.

thank you.

btw. is there any lterature/documentation re this --no-floppy option ?

#229

peter b said: btw. is there any lterature/documentation re this --no-floppy option ?

I only know of the "--no-floppy" option because it produced errors early on in Grub 2's introduction. One of the bugs had users remove the "--no-floppy" option. That bug has been fixed as far as I know.

Unfortunately I don't know of a location that documents its use. There wasn't anything about it in the GRU Grub manual the last time I looked. http://grub.enbug.org/Manual#head-21f23e1d0efb30d818a9f54c4c9f796d6ebc8787

In fact, I searched before responding to your initial post and wasn't able to find anything pertinent.

#230

yes, thanks.

any idea about getting a grub2

sh:grub>

prompt when booting off floppy ? I'm not sure if it is sh:grub> or something similar - never seen it -; as said, booting off grub2 floppy process never finished successfully in my case. I just assume it is so based on the prompt I'm getting when ubuntu is fully functional.

thank you.

#231

Here's a biggy! I've been trying to figure out lots of grub2 problems and following up on this:

http://ubuntuforums.org/showthread.php?p=8687669#post8687669

I did this:

lance@lance-desktop:~$ sudo grub-install /dev/sda11

[sudo] password for lance: grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea. grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged. Installation finished. No error reported. This is the contents of the device map /boot/grub/device.map. Check if this is correct or not. If any of the lines is incorrect, fix it and re-run the script `grub-install'.

(fd0) /dev/fd0 (hd0) /dev/sda

WTF? Plenty of warnings but no chance to say (y or n), yes or no., so it just does it's thing.

To me that's a huge bug so I filed this:

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/509438

I'd really appreciate everyone piling on that :)

Confirm and use whatever influence you have to get it fixed.

The up side is that I'll get to have an inside look at what's messed up and how to fix it :D

#232

The bug now effects 2 people.

#233

?????????????????????

What's the problem?

That command installs grub to the boot sector of /dev/sda11. Grub gives you a warning that its is not a reliable way to boot. But installing grub to the boot sector of an ext partition does not cause any harm whatsoever. So why shouldn't Grub proceed and do what you asked it to do?

Legacy Grub does not even give you the warning.

#234

meierfra. said: ?????????????????????

What's the problem?

That command installs grub to the boot sector of /dev/sda11. Grub gives you a warning that its is not a reliable way to boot. But installing grub to the boot sector of an ext partition does not cause any harm whatsoever. So why shouldn't Grub proceed and do what you asked it to do?

Legacy Grub does not even give you the warning.

I think it should give you a (y) or (n) option. It warns you but the warning means nothing without the option to choose to proceed or not.

Would that be terribly difficult?

#235

meierfra. said: ?????????????????????

What's the problem?

That command installs grub to the boot sector of /dev/sda11. Grub gives you a warning that its is not a reliable way to boot. But installing grub to the boot sector of an ext partition does not cause any harm whatsoever. So why shouldn't Grub proceed and to what you asked it to do?

Legacy Grub does not even give you the warning. Well, that is a pretty good argument you have there.

A couple of points from someone that figures that screwing my OS is a learning experience and good for me.

We seem to be in a period when we must worry about the mythical average user and that appears to mean that we need to protect them from themselves.

Grub2 is a lot easier to install than grub-legacy. Therefore more folks will try it, probably on the advice from some blogger that has never seen grub2 let alone used it.

Now, I actually agree with your position. Why on earth is any one doing this and isn't it good for them to have to fix it?

But we have to have a stupid slide show on the install CD to cater to the mindless MS user and build a "user friendly" atmosphere. I think that improving this warning to something that you have to aprove is a better way to create a protected feeling than more bells and whistles on the desktop.

Functionality is what should be attracting folks to Linux in general and Ubuntu in particular. As a relative noob, I can sympathize with folks that are scared by the possibilities of Linux. I certainly don't share it but I can feel sorry for them.

This is a little harmless hand holding. If it is never changed it will not bother me at all. If it is fixed it will mean one more click that will not bother me to much either and it may make some poor sucker happier with his/her results.

#236

Another unrelated one is if someone Google's around looking for a way to restore grub after installing Windows and they try the "sudo grub" command. One of the options is to install grub so people "sudo apt-get install grub" and really hose things.

Then once they do get grub-pc reinstalled they end up with a "mixed" /boot/grub directory which totally messes up either grubs ability to update properly. and it screws with the operation of startupmanager, and it can even effect boot times.

#237

we need to protect them from themselves.

That really is it in a nutshell.

Like with the graphical installer we know if it says advanced that means we better do some studying.

In this case I see no reason not to have the warning followed by giving a choice: (y) or (n). Of course i don't know how to write code either :(

While I no longer consider myself a total noob I make typos sometimes so lets say I'm typing and mistakenly type sda1 instead of sda. Well sda1 is my Win XP partition .... oops :(

If I had a decision to make I could choose yes or no :P

#238

@Meierfra: Remember recently when we had the Linux "boot" something or other file in a Vista or Win 7's stuff? You know the Boot vs. boot thing?????????

I think you remember that. Look at this one:

=> Windows is installed in the MBR of /dev/sda

sda1: __________________________________________________ _______________________

File system: ntfs Boot sector type: Grub 1.97 Boot sector info: Grub 1.97 is installed in the boot sector of sda1 and looks at sector 2619851 of the same hard drive for core.img, core.img is at this location on /dev/sda and looks on partition #1 for /grub. No errors found in the Boot Parameter Block. Boot file info: Grub in the file /ubninit looks at sector 39 of the same hard drive for the stage2 file, but no stage2 files can be found at this location. Operating System: Boot files/dirs: /boot.ini /ntldr /NTDETECT.COM /grub/core.img

From:

http://ubuntuforums.org/showthread.php?t=1382221&page=2

How did that happen?

#239

kansasnoob: You are mixing up three different issues:

1) The warning you get from Grub 2 when installing to a boot sector: It is about using blocklist which makes booting slightly more unreliable (since booting fails if core.img is moved)

In my opinion that is a minor warning, and requiring a yes or no answer is ridiculous.

2) Grub 2 gets installed to the boot sector of Windows System partition.

Grub 2 does not worry about this at all. But it should. It should issue a clear warning that this will make Windows unbootable. In particular, there is essentially no reason to install Grub to the boot sector of the Windows System partition. So doing this should require the "--force" option.

On the bright sight, it seems that future versions of Grub 2 will automatically backup any MBR or boot sector which gets overwritten. So this will make recovery from such a mistake much easier. (Although it is already easy to fix with the "BackupBS" feature of "testdisk")

3) The "boot" versus "Boot" thing. This actually happens when grub is installed to the MBR (so this has nothing to do with the our current discussion):

sudo grub-install --root-directory=/mnt /dev/sda (and the Windows System partition is mounted at /mnt.)

There are valid reasons to do that (although in all the cases I have seen, it happened by accident). But a bug in Ubuntu ntfs drives causes the problem with "Boot" and "boot". You can't blame that on Grub 2.

#240

But shouldn't a warning be followed by a choice?

It seems to me like a warning without a choice is like saying "oops".

#241

But shouldn't a warning be followed by a choice?

The warning lets you know that installing to the boot sector is unreliable and you should be looking for a better option. But since installing Grub to the boot sector does not cause any harm, it might as well do what you requested to do.

In your other thread you said that you were no able to boot into Ubuntu after you installed Grub to the partition. And after "grub-install /dev/sda" booting was slower than before. I think this is a coincidence. I don't see anyway how this could have been caused by "grub-install /dev/sda11":

"grub-install /dev/sda11" does the following

1) Writes some boot code into the boot sector of /dev/sda11 2) Embeds a couple of variables into /boot/grub/core.img 3) Copies the grub files from /usr/lib/grub/i386-pc to /boot/grub

Since you had grub installed in the MBR, neither the boot sector nor /boot/grub/core.img are used during booting. So 1) and 2) will not effect your system in any way. And since the files in/usr/lib/grub/i386-pc and /boot/grub should be the same, also 3) should not cause a problem.

Where you doing anything else which might have caused the problems? Any updates?

One thing I forgot to mention: Various versions of Grub 2, I have been working with, required the "--force" option to install to a partition. So the bug you reported might already be fixed,

#242

The blocklists issue at least has been fixed in Grub 1.97 (but not in Grub 1.97~beta4). The devs said Grub 1.98 may be shipped with the official release of Lucid and Grub 1.97 is currently being used in Lucid Alpha 2.

If the user tries to install grub to a partition (e.g. sudo grub-install /dev/sdX[COLOR="Red"]Y[/COLOR]), the following message is displayed:

/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea. /usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged. /usr/sbin/grub-setup: error: If you really want blocklists, use --force.

#243

We got an update a while back;

sam@sam-desktop:~$ grub-install -v grub-install (GNU GRUB 1.98~20100101-1ubuntu2)

in 10.04-testing.

#244

ranch hand said: We got an update a while back;

(1.98) in 10.04-testing.

That's good news. Now if they can get theming into Lucid - they are trying to meet the deadline. It's already in experimental (and in the Grub 'alternative' BURG).

#245

OK I just tried it in Lucid and the behavior there seems correct, but I'd still say it's not correct in Karmic.

And if you'll look here:

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/485457

I requested:

(1) Ideally introduce this in Lucid testing, this way I can also try it with an installation from an upcoming daily build to see how it works with ubiquity.

(2) If all appears well in Lucid then introduce this in Karmic proposed updates.

Colin Watson said:

By the way, we're not going to do a full update in karmic-proposed; the changes are just too big and very many of them are not required in a stable release. If you want to help to identify individual isolated changes that are needed, feel free (in separate bugs).

So maybe a patch can be added to Karmic's grub2?

#246

There are several people in the forum who have burg going on their boxes.

I haven't as I really do not like the icon type menu. Burg is doing some great things with dealing with encrypted stuff. I think that it looks pretty solid and people seem to really like it. There are at least two solid, different themes.

#247

kansasnoob said: OK I just tried it in Lucid and the behavior there seems correct, but I'd still say it's not correct in Karmic.

And if you'll look here:

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/485457

I requested:

Colin Watson said:

So maybe a patch can be added to Karmic's grub2? I do not get this at all. I am running 1.97 from the lucid repo on 9.10 very well. Works great, no trouble at all. I am going to change it to 1.98 and I bet it works just as well.

I can't understand the problem with upgrading grub-pc in 9.10 to the newer ones at all.

#248

ranch hand said: I do not get this at all. I am running 1.97 from the lucid repo on 9.10 very well. Works great, no trouble at all. I am going to change it to 1.98 and I bet it works just as well.

I can't understand the problem with upgrading grub-pc in 9.10 to the newer ones at all.

I was just going to report the same thing. I apt-get removed grub-pc and grub-common then used gdebi to install grub-pc and grub-common from here:

http://packages.ubuntu.com/lucid/grub-pc

No problems:

lance@lance-desktop:~$ lsb_release -a

No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 9.10 Release: 9.10 Codename: karmic lance@lance-desktop:~$ grub-install -v grub-install (GNU GRUB 1.98~20100101-1ubuntu2)

Oh I did run update-grub, that's all :)

Three reboots and all works fine, and it prevents installing grub to a partition as it should:

lance@lance-desktop:~$ sudo grub-install /dev/sda11

/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea. /usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged. /usr/sbin/grub-setup: error: If you really want blocklists, use --force.

I verified with the Boot Info Script:

Grub 1.97 is installed in the MBR of /dev/sda and looks on the same drive

in partition #11 for /boot/grub.

It refused to install to sda11 and left it on sda where it should be. I also verified with a reboot.

So I fail to see why a package update can't be done. No configuration files were changed or nothing??????

It feels to me like Karmic just can't get no love :(

#249

Just FYI I am pushing for a package update in Karmic:

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/509438

I tried and failed once before:

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/485457

#250

kansasnoob: From what have I seen in the bug reports, I have been very impressed with Collin Watson. He understands Grub inside out and he does care a great deal about the user. He seems to think that upgrading Grub on Karmic will cause more problems than it will solve. Do you honestly believe that you know better?

#251

There are changes in the configuration files, at least 05_debian-theme. It is better but quite different in the way it looks. It also gives you a nicer menu that doesn't need the font changed to be read on your background.

#252

meierfra. said: kansasnoob: From what have I seen in the bug reports, I have been very impressed with Collin Watson. He understands Grub inside out and he does care a great deal about the user. He seems to think that upgrading Grub on Karmic will cause more problems than it will solve. Do you honestly believe that you know better?

No. I have only my own experience to go on.

Hmmm, I don't know why that posted twice??????????

#253

I'm learning the Grub 2. I have experience in configuring 5 Linux OS with Grub. Thanks for your tips!

#254

Unless I am missing something I (and I hope I am), then it seems to me that grub2 was written by windows haters. Well, I hate windows, but grub 2 was made to punish users of windows.

It is now VERY difficult to put in my own menu entries for windows and NOT get the automatic ones.

The automatic entries may be find and dandy for older versions of windows, but Vista uses TWO partions (at least by some vendors) and Windows 7 uses THREE partitions. So I get two nearly identical menu entries and I have to know which one to choose.

Well, not a problem for me, I am techie, but I am setting up a new computer for my daughter.

She will get something like:

Windows Vista (loader) (on /dev/sda1) Windows Vista (loader) (on /dev/sda2)

and how the heck is she supposed to know which is the recovery and which is the real menu entry to select?

She will take the easy way and scroll down to the first one she comes to....the WRONG one. Then interrupt me at whatever I am doing because her machine won't boot windows.

The best I can do AFAIK is add a THIRD entry manually

Windows Vista (loader) (on /dev/sda1) Windows Vista (loader) (on /dev/sda2) Windows Vista ->select this one<-

or something like that.

That sucks.

What I really want to do is make the normal linux and normal vista entries be the first two, and maybe a blank line then all the others. Easy to do with the old grub, but AFAIK, no way to do it with grub2 except maybe manually do everything and somehow disable the automatic entries.

Or am I wrong? Please tell me I am wrong. But, I am at least right that changing the menu to be more human friendly is NOT NOT NOT easy.

--Carey

#255

Lets see here. Grub-legacy you need to go to one file and edit the entry. In grub2 you need t ogo to one file and cut and paste an entry into it.

You do have to go to a second file to change the default OS to boot to, in your case this would entail changing a 0 to a 2 (I think from the massive amount of useful info you gave us).

Yes I can see that this is tough.

I would say that what you want is in this link;

http://ubuntuforums.org/showthread.php?t=1298932&highlight=kansasnoob

I would be careful to follow the directions as there are a couple pit falls that you do not want to get into. The guy that wrote this up, like drs305 and myself, is a refuge of 9.10-testing and really did a good job on that How To.

#256

No need to revert to Legacy Grub. drs305 has a section on removing the Recovery Partition from the Grub menu in his Grub2 Title Tweak thread. See section F in Tweaks

Or you can follow drs305 advice on "Building a Totally Customized Menu" in the first post of this thread.

Edit: Opps Just noticed that you already realized this. Yes, you are right. To achieve what you want, you either have to create a custom menu or rewrite the code which generates the Grub menu. But see my next post. I wrote up what I have done for my Family computer. It is little bit of work, but I'm really happy with the way it turned out. I have just two entries on my Custom Grub menu, but if I press the "SHIFT" key during boot up, I can access the regular Grub menu.

#257

meierfra. said: No need to revert to Legacy Grub. drs305 has a section on removing the Recovery Partition from the Grub menu in his Grub2 Title Tweak thread. See section F in Tweaks

I do not think that the OP is interested in something that complicated. This quote from his post

"That sucks.

What I really want to do is make the normal linux and normal vista entries be the first two, and maybe a blank line then all the others. Easy to do with the old grub, but AFAIK, no way to do it with grub2 except maybe manually do everything and somehow disable the automatic entries."

shows a certain lack of desire to try to learn something new.

Yes, I know that it is easy to do. Yes a simple edit to make windows the default and then hit the"page up button" to go to Ubuntu would be simple. Yes I know that a custom menu would never, ever need touched again.

This does not matter because it is not done the way it was done by grub-legacy. Therefore it sucks.

The sensible thing to do here is to revert to grub-legacy. I would not dwell too long on the fact that it is not supported any longer.

#258

The sensible thing to do here is to revert to grub-legacy.

I disagree. Grub 2 just has to many nice feature which one should not give up so easily. Look at this howto I just wrote up. Setting it up, is little bit of work. But then one has a custom menu, which is just as easy to manage as in Legacy Grub, and the ability to access the regular Grub 2 menu with all the recovery options and extra kernels.

And I don't think its more difficult to do than reverting to Legacy Grub.

#259

Deleted (did not contain any useful information)

#260

meierfra. said: I disagree. Grub 2 just has to many nice feature which one should not give up so easily. Look at this howto I just wrote up. Setting it up, is little bit of work. But then one has a custom menu, which is just as easy to manage as in Legacy Grub, and the ability to access the regular Grub 2 menu with all the recovery options and extra kernels.

And I don't think its more difficult to do than reverting to Legacy Grub. Very nice How To. Very nice.

I would add that the file once edited should, or at least could, be saved as some thing like 07_custom as this will put the custom menu at the top of the generated grub.cfg. I like that so that it can be checked before doing any disabling of things like 30_os-prober.

As you can see from the link in my sig it is not needed to sell me on grub2. I had some problems with grub-legacy when I started using Ubuntu and multi-booting with other Linux distros. Learned to love the bugger for its power and flexibility. Grub2 is better.

#261

I would add that the file once edited should, or at least could, be saved as some thing like 07_custom as this will put the custom menu at the top of the generated grub.cfg.

The custom menu (/boot/grub/custom_menu.cfg) will not be processed by "grub-mkconfig". It needs to be edited directly, not through scripts. "grub.cfg" only contains a link to the the custom menu. One could place that link in 07_custom, rather than 40_custom, so that the link appears at the top of the regular Grub Menu. But I don't think one would ever use that link manually, so the bottom of the regular Grub Menu seems to be the correct place.

before doing any disabling of things like 30_os-prober.

No need to disable 30_os-prober with my How To. In fact I would recommend against it. The hidden regular Grub menu will contain the items generated by os_prober. They might come in handy some day.

As you can see from the link in my sig it is not needed to sell me on grub2. I just trying to convince you and kansasnoob not the give up on Grub2 so easily. I have seen several cases where reverting to Legacy Grub was recommend, although a solution with Grub2 would have been just as easy.

#262

I was not giving up on grub2, just the OP.

I have grub2 on anything that has it in the repos and run grub1.98 on 9.10.

I find that renaming the file to 07_custom (and making sure that it is enabled to be executable) indeed putsit at the top of the menu with update-grub. This is the way it is on all my installs from PhatDebian (Lenny respin running on 2.6.30 so it can deal with ext4 OS' and read their files) to 9.04, 9.10 and 10.04A2. This spans grub1.96, grub1.97beta4, grub1.97 and grub1.98 (yes I have a lot of installs).

Grub2 is an improvement over grub-legacy. Os-prober is a problem but that is not the fault of the grub devs. It has never, in my experience, worked well with grub-legacy. It is improving. RPM base distros do not seem to get a good generated menu entry but they have improved to where they are easy to edit.

I find that a strictly custom menu, with symbolic menu entries are trouble free and better yet edit free as they boot the newest kernel on the partition.

The disabling of 30_os-prober is not really a problem as any new OS takes over the MBR and can easily be added to the custom menu of the other OS' through nautilus after copying an old one onto it and adding it to it.

I generally boot from one OS but on my most populated drive, my test drive, I bounce around from OS to OS to make sure they are working properly. It is easy to tell which I am using as boot/root because the background on the screen menu is the same as the xsplash/gdm or plymouth theme and my wallpaper for that install.

Menu backgrounds, as much as I really like grub-legacy, were more trouble than they were worth there plus a 12 color limit. In grub2 this is a breeze.

To some up, if you are nuts enough to multi-boot (I only have 12 OS' on my test platform) grub2 is a lot easier. If you have only 1 OS you don't even need to see the bugger. If you are silly and still dual booting with Win JerryLewis Pro (yes there is a little hostility here for MS) it is no problem unless you have a strange setup, in which case there is 40_custom.

Grub2 rox the box.

#263

[SIZE=4]Hello! it's a nice tutorial, but i couldn't find there how to make grub load automatically, my grub2 doesn't countdown and would load if i wouldn't press enter, how can i make it load itself? any help will be appreciated! Thank you![/SIZE] :confused:

#264

hovrashko said: Hello! it's a nice tutorial, but i couldn't find there how to make grub load automatically, my grub2 doesn't countdown and would load if i wouldn't press enter, how can i make it load itself? any help will be appreciated! Thank you![/SIZE] :confused:

There are a few possibilities why it won't boot automatically.

1, Your settings are *not* set up to automatically boot: Open /etc/default/grub:

gksu gedit /etc/default/grub

Make sure [COLOR="DarkRed"]"GRUB_TIMEOUT="10"[/COLOR] is not set to "-1". This would keep the menu displayed until you make a selection. Any positive integer will wait for the number of seconds in the entry, then boot.

[COLOR="DarkRed"]Edit see posts #266/267 before accomplishing Step 2:[/COLOR]

You should try to determine why you are getting a "recordfail" event, but there are also bugs associated with this action.

  1. Your system is recording a "Recordfail" event, which forces the system to wait for you to make a selection.

To fix it and allow the default menuentry to boot automatically, you can edit one of the scripts to prevent a "recordfail" event from stopping your system:

gksu gedit /etc/grub.d/00_header

At the bottom of the file, make the changes in dark red:

cat << EOF [COLOR="DarkRed"]#[/COLOR]if [ \${recordfail} = 1 ]; then [COLOR="DarkRed"]#[/COLOR] set timeout=-1 [COLOR="DarkRed"][COLOR="DarkRed"]#[/COLOR][/COLOR]else set timeout=${GRUB_TIMEOUT} [COLOR="DarkRed"]#[/COLOR]fi EOF

After making the changes, run this to update the menu:

sudo update-grub
#265

Maybe You have grubenv from a bad boot in Yout /boot/grub folder. Move /boot/grub/grubenv somewhere or, simply, delete it, and, then, retry... That is, in my opinion, better than (2.) from post above...

#266

zika said: Maybe You have grubenv from a bad boot in Yout /boot/grub folder. Move /boot/grub/grubenv somewhere or, simply, delete it, and, then, retry...

That is, in my opinion, better than (2.) from post above...

I should have included that in my post and have edited it. Thanks zika.

The easiest way to clear grubenv is to run this command. Do *not* try to edit the file manually.


sudo grub-editenv /boot/grub/grubenv create

Reboot and see if Grub 2 boots normally before accomplishing Step 2 above.

#267

drs305 your first post part 2 did it, thanks a bunch =),:D now only one problem bathers me it's disabling a touch-pad.

#268

I have a dumb question or two :confused:

Consider a scenario where the Windows entry created in /etc/grub.d/30_os-prober does not work properly.

If I can create a working entry in /etc/grub.d/40_custom and Windows is the only OS represented in /etc/grub.d/30_os-prober I can just make it non-executable by:

sudo chmod -x /etc/grub.d/30_os-prober

So, first dumb question, how can I restore the executable bit to /etc/grub.d/30_os-prober later on if I so desire, for instance if I added another OS?

Second dumb question, if Windows is not the only OS in /etc/grub.d/30_os-prober is there some way to delete it while leaving the other entries untouched.

I'm thinking "no" on the latter question so that would be a perfect place to use a custom menu like meierfra describes. I'd be able to do most of it using copy-n-paste it appears.

I'd still like to know exactly what changes when I run:

sudo chmod -x /etc/grub.d/30_os-prober

And how to change it back short of purging and reinstalling.

#269

@ meierfra, I've been studying your tutorial:

http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Custom_Menu

I noticed a minor typo:

Open a terminal and then open a blank file "custom_menu.cfg" via

gksudo gedit /boot/grub/**costum**_menu.cfg

I think should be custom.

Also here:

That's it. During boot up, the "Costum Menu" will appear

Going to give that a try later. I usually have to run through a procedure 3 or 4 times to get it somewhat nailed into my memory. But that looks like a very good solution to my prior questions.

I'll shout if I run into any issues.

BTW my old eyes overlook things sometimes but I've seen you link to other HowTo's you've made on SourceForge and I'm probably just overlooking something, but is there a way to "search" all of your HowTo's on SourceForge.

Thanks in advance.

Oops just noticed these:

Add this to the end of the file:

menuentry "Costum Menu"{ set root=(hd0,5) search --no-floppy --fs-uuid --set e7fee477-6a63-492e-839c-4d27ce99e2cf configfile /boot/grub/costum_menu.cfg }

#270

OK, sorry to be a pain, but this:

Edit /etc/grub.d/40_custom

gksudo gedit /etc/grub.d/40_custom

Add this to the end of the file:

menuentry "Costum Menu"{
 	set root=(hd0,5)
	search --no-floppy --fs-uuid --set e7fee477-6a63-492e-839c-4d27ce99e2cf
        configfile /boot/grub/costum_menu.cfg
        }

I'm assuming for instance since the grub2 I'm using is on sda3:

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, with Linux 2.6.32-11-generic" {
        recordfail
	set quiet=1
	insmod ext2
	set root=(hd0,3)
	search --no-floppy --fs-uuid --set 9c10b8f7-89d3-4a72-a0ab-e89d061653b0
	linux	/boot/vmlinuz-2.6.32-11-generic root=UUID=9c10b8f7-89d3-4a72-a0ab-e89d061653b0 ro  splash quiet  quiet
	initrd	/boot/initrd.img-2.6.32-11-generic
}

That would be the info I wanted to use for the "set root" and "search" settings??????

Or in other words the info from /etc/grub.d/10_linux????????

Sorry to be dense.

#271

The entry that is in /boot/grub/grub.cfg is an easy copy/paste.

I would encourage another entry;


menuentry "Lxde on sda8" {
    set root=(hd0,8)
        linux /vmlinuz root=/dev/sda8 ro quiet splash
        initrd /initrd.img
}

It boots to the newest kernel on the defined partition. Never needs updated.

#272

"Costum"

Thanks. I fixed those.

but is there a way to "search" all of your HowTo's on SourceForge.

Click on "Main Page" in the left navigation panel in any of my howto's Or just click here:

https://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Main_Page

I started about a week ago writing those Howto. It's a Wicki. So anybody can add a new HowTo or fix mistakes in the current HowTos. In the long run I would like to have a HowTo for each of the usual boot problems we run into in the forums. And, if I find time, I'll try to teach the Boot Info Script to detect those problem and, for every problem detected, insert a link in "RESULTS.txt" to the correspond Howto in the Boot Info Script Wicki.

sudo chmod -x /etc/grub.d/30_os-prober

This removes the "executable" bit from "30_os-prober" You can see the effect by running

ls -l /etc/grub.d/30_os-prober

before and after.

To reverse it

sudo chmod +x /etc/grub.d/30_os-prober

That would be the info I wanted to use for the "set root" and "search" settings

Yes.

linux /vmlinuz root=/dev/sda8 ro quiet splash
 initrd /initrd.img

It boots to the newest kernel on the defined partition. Never needs updated. My HowTo says the same thing. :D

#273

linux /vmlinuz root=/dev/sda8 ro quiet splash

initrd /initrd.img

Both of you taught me a lot today :D

I have to say it's great to learn all this.

#274

can i hide the partition in GRUB 2? like before booting

#275

for anyone interested re #226 - #230 --no-floppy option ; answer from

sh:grub> help search Usage: search [-f|-l|-u|-s|-n] NAME Search devices by file, filesystem label or filesystem UUID. If --set is specified, the first device found is set to a variable. If no variable name is specified, "root" is used.

-f, --file search devices by a file -l, --label search devices by a filesystem label -u, --fs-uuid search devices by a filesystem UUID -s, --set=VAR set a variable to the first device found -n, --no-floppy do not probe any floppy drive -h, --help display this help and exit --usage display the usage of this command and exit

ex

sh:grub> search -f /boot/grub/grub.cfg host hd0,8 hd2,1 sh:grub>

@drs305

didn't try yet removing --no-floppy from script and do a new grub.cfg I'll do it when time permits and keep you posted.

#276

Burillo said: can i hide the partition in GRUB 2? like before booting

You will have to be more specific. What partition are you trying to hide? There are various ways: disabling certain scripts in /etc/default.d or by modifying scripts.

If you want to hide the Windows Recovery partition, you can review the section in Section 2F of Grub 2 Title Tweaks

#277

drs305 said: You will have to be more specific. What partition are you trying to hide? There are various ways: disabling certain scripts in /etc/default.d or by modifying scripts.

If you want to hide the Windows Recovery partition, you can review the section in Section 2F of Grub 2 Title Tweaks

i am trying to hide one windows partition from another windows partition at boot time. the reason behind this is that these two partitions are cloned (i.e. have the same OS and same partition ID) and in order to prevent these two OS's from knowing about each other i want to hide one partition at boot time.

#278
  1. Reinstalling GRUB 2 from LiveCD

... Substitute the correct device - sda, sdb, etc. Do ''not'' specify a partition number.

This is frustrating - "correct device" FOR WHAT!

Is this the device on which your file system root is located on? Is the device you want the MBR on? Something else?

Specifying that something needs to be "correct" without giving anyone a way of knowing what "correct" should be is simply infuriating.

P.S. What's up with the irony quotes around not?

#279

R3M3 said: This is frustrating - "correct device" FOR WHAT!

Is this the device on which your file system root is located on? Is the device you want the MBR on? Something else?

The correct device is the one your Ubuntu installation is on.

Specifying that something needs to be "correct" without giving anyone a way of knowing what "correct" should be is simply infuriating.

Sorry it wasn't clear to you. The first paragraph of the section asks readers to refer to the community doc for elaboration. I will reword the section.

P.S. What's up with the irony quotes around not?

Nothing. (Insert irony here). ;-)

#280

drs305 said: The correct device is the one your Ubuntu installation is on.

And if your Ubuntu installation is on multiple partitions spread over multiple hard drives? (e.g. / on one, /usr on another, /home on a third, etc.) Which one is it then?

At any rate, if it's the location of a *filesystem* I don't understand why you specify the drive rather than the partition. Specifying just the drive would make more sense if it's the location of the MBR you're booting from, rather than the location of the Ubuntu filesystem. The distinction is important if you have a situation where the booted drive isn't your Ubuntu one. (Say you have /hda given over entirely to Windows, and are installing Ubuntu on a separate harddrive.)

drs305 said: Sorry it wasn't clear to you.

That's okay. I was just increasingly frustrated after encountering the same vague statement in a number of places. Nothing against your version in particular - it's just the only one I could vent on. :)

Edit Addition:

Careful reading of the community docs now seems to indicate that the device specification is the location of the booted drive (location of the MBR), rather than the location of the Ubuntu file system.

Run the grub-install command as described below. This will reinstall the GRUB 2 files on the mounted partition to the proper location and to the MBR of the designated device.

sudo grub-install --root-directory=/mnt/ /dev/sdX

I'd interpret that as meaning if you had the BIOS set to boot /sda, but had installed the Ubuntu filesystem on /sdb1 (because e.g. /sda1 is your Windows drive), you would specify /dev/sd*a* as the device.

(I swear it wasn't that clear when I read it earlier. - Not that I'm 100% sure that's what it means.)

#281

Yes you are installing grub on the boot MBR when you run "grub-install /dev/ sdwhatever. This is where grub belongs.

There is a partition somewhere on your box that has the actual grub files. This is where you are running the command "grub-install" from.

I find this very handy on my box as I have 4 drives. I can swap the boot/root (the OS with the files running the MBR) around to suit my needs and whims.

#282

I installed Ubuntu 9.10 & Grub2 on the same HP 6910P laptop computer where Windows XP Professional had been installed and run for quiet a long time ago.

I encountered the same Grub hanged situation after the first time I rebooted my HP laptop from WinXP.

Then, I studied the post comments and helpful information in this forum and I found downgrading to Grub as described in post #21 of this link -- https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/441941, matched with my need and it worked for me.

Thanks.

#283

re #275

@drs305 as promised and anyone interested; rescue floppy created and working ok1.

procedure attached ==> grub2-floppy-setup.txt

floppy contents attached ==> grub2-floppy-contents.txt

nautilus contents ==> grub2-nautilus-content_part.png

floppy properties ==> grub2-floppy0-properties.png

pls note the size on floppy approx 740 Kb - I'd say v elegant, inexpensive and slick (I guess small is beautiful always).

and, to cap it all off, I get the desired sh:grub> prompt if 'c' is entered at grub menu.

grub 1.97 beta4 used from current karmic release.

#284

peter b,

Thanks for the update and taking the time to document your efforts. I'll add a link in the original to your post.

#285

I searched and searched for the answer to the following question: "How do I change the font size in grub2?" It seems that no one on the entire Internet knew!

Well, I did *a lot* of digging into the grub2 documentation and the scripts bundled with Ubuntu and I *finally* have the answer!

  • Pick a font you want to use for your menu. I recommend a nice easy-to-read monospace font such as DejaVu Sans Mono (it's in the example below).
  • Convert the font to grub2's format using the grub-mkfont command, taking the extra step of setting the font size:
sudo grub-mkfont --output=/boot/grub/DejaVuSansMono.pf2 \
--size=24 /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
  • Add a GRUB_FONT variable to /etc/default/grub with the path to your freshly-converted font:
GRUB_FONT=/boot/grub/DejaVuSansMono.pf2

sudo update-grub

  • ```
That's it!  Finally we can use native resolutions without needing a magnifying glass to read the text!

FYI:  I believe the "--size=" indicates point size but I'm not entirely sure (the documentation doesn't say).  If it is based on the point scale I don't believe it is taking dpi into account since I tried "--size=72" on a 120dpi display and letters were only about half an inch tall (72 points is precisely one inch).

Also, I'm wondering why /etc/default/grub doesn't already have a commented-out GRUB_FONT line indicating the usage.  The scripts are already coded to support it and it appears to work fine.
#286

riskable

Real nice job.

Thanks a bunch.

#287

riskable,

Good work. I'm debugging a Grub menu and when finished will run your solution on Grub 1.97~beta (Karmic) and 1.98 (Lucid). I'll then post it as a new section in the original post - giving you all the credit of course.

Eventually we will get more documentation from the people actually creating this stuff, but for now we'll just have to rely on efforts such as yours to figure it out. Thanks again.

Added: I've been playing around with various font settings but am having mixed results on my 1.97~beta machine. If I attempt to change the size to another setting I am getting frequent lockups or automatic boots without the opportunity to choose an alternate OS, even with a delay programmed. I'll keep experimenting and see if I can determine a pattern.

Reports from other users on their experiences while trying this out are appreciated.

#288

I've been playing with various fonts/sizes and they appear to work with Grub 1.98. Some have pretty ugly border gaps but the sizing and font type do work. I would still be wary of using the font technique on production machines using 1.97~beta, which on the few tests I've run so far have often locked up the system at boot.

#289

drs305 said: I've been playing with various fonts/sizes and they appear to work with Grub 1.98. Some have pretty ugly border gaps but the sizing and font type do work. I would still be wary of using the font technique on production machines using 1.97~beta, which on the few tests I've run so far have often locked up the system at boot.

I have some ugly bits too: The top pixel or two of the highlighted entry gets cut off and the borders end up looking like dashed lines (they're supposed to be solid). Nothing major but I'm going to investigate to see if I can find a font that grub2 likes better than DejaVu Sans Mono.

Also, if I change the font size to something huge grub2 locks up. Everything under 30 seems to work fine though (I was going to test "--size=36" next).

#290

I just installed linux on my primary drive, but I have another hard drive in my computer which originally had Windows 7 installed.

Should I restore the windows bootloader? because when Grub loads I cannot see my windows OS in the options.

I see 2 entries for linux (including one for safe mode) and 2 for memtest.

Somebody help, how do I restore windows 7 to grub so I can have the option to boot to windows...

Cheers!

#291

benplanet said: I just installed linux on my primary drive, but I have another hard drive in my computer which originally had Windows 7 installed.

Should I restore the windows bootloader? because when Grub loads I cannot see my windows OS in the options.

I see 2 entries for linux (including one for safe mode) and 2 for memtest.

Somebody help, how do I restore windows 7 to grub so I can have the option to boot to windows...

Cheers!

First, run "sudo update-grub" again to see if Grub 2 will see Windows 7. Sometimes update-grub has to be run once after an install to find the Windows partition.

If that doesn't work, refer to the following link to help you restore Windows: How to restore the Ubuntu/XP/Vista/7 bootloader

#292

drs305 said: First, run "sudo update-grub" again to see if Grub 2 will see Windows 7. Sometimes update-grub has to be run once after an install to find the Windows partition.

If that doesn't work, refer to the following link to help you restore Windows: How to restore the Ubuntu/XP/Vista/7 bootloader

I did the upgrade-grub in terminal, nothing about my old windows 7 os. IT just shows linux mint and memtest entries.

When I boot with the windows CD I don't see any existing windows installations either. But.. my files are all there, take a look at the screenshot. I used Disk manager to mount it.

[[img]http://img2.pict.com/f1/52/d0/2760692/0/300/diskwin.jpg[/img]](http://img2.pict.com/f1/52/d0/2760692/0/diskwin.jpg)

How do I make this bootable? All my work is in Windows 7! Thanks much!

Here are the results of boot info script:

============================= Boot Info Summary: ==============================

 => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
    partition #2 for /boot/grub.
 => Paragon is installed in the MBR of /dev/sdb
 => Windows is installed in the MBR of /dev/sdc
 => Windows is installed in the MBR of /dev/sdd
sda1: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info:  

sda5: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

sda2: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Linux Mint 8 Helena - x64 
                       Edition
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sdb1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

sdb2: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info:  

sdb5: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  According to the info in the boot sector, sdb5 starts 
                       at sector 1. But according to the info from fdisk, 
                       sdb5 starts at sector 398540583.
    Operating System:  Windows 7
    Boot files/dirs:   /etc/lilo.conf /Windows/System32/winload.exe

sdc1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

sdd1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders, total 160836480 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xa79fa79f

Partition  Boot         Start           End          Size  Id System

/dev/sda1         160,810,650   160,826,714        16,065   5 Extended
/dev/sda5         160,810,713   160,826,714        16,002  82 Linux swap / Solaris
/dev/sda2    *             63   160,810,649   160,810,587  83 Linux


Drive: sdb ___________________ _____________________________________________________

Disk /dev/sdb: 400.1 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders, total 781422768 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x01030bc9

Partition  Boot         Start           End          Size  Id System

/dev/sdb1    *             63   398,540,519   398,540,457   7 HPFS/NTFS
/dev/sdb2         398,540,520   781,417,664   382,877,145   f W95 Ext d (LBA)
/dev/sdb5    *    398,540,583   781,417,664   382,877,082   7 HPFS/NTFS


Drive: sdc ___________________ _____________________________________________________

Disk /dev/sdc: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x8e7c4595

Partition  Boot         Start           End          Size  Id System

/dev/sdc1                  63   488,392,064   488,392,002  42 SFS


Drive: sdd ___________________ _____________________________________________________

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x44fdfe06

Partition  Boot         Start           End          Size  Id System

/dev/sdd1                  63   976,768,064   976,768,002   7 HPFS/NTFS


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda2        55ae3495-dea7-4eeb-aa32-683d75ecb031   ext4                                     
/dev/sda5        a74f01e6-0677-4560-ae27-264a30f69964   swap                                     
/dev/sdb1        D42AF0782AF058C6                       ntfs       File Drive 1                  
/dev/sdb5        A64CD9AB4CD97711                       ntfs                                     
/dev/sdc1        4EC067F4C067E0A7                       ntfs       Backup Disk                   
/dev/sdd1        B426069F2606632A                       ntfs       My Book                       

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

/dev/sda2        /                        ext4       (rw,errors=remount-ro)
/dev/sr1         /media/cdrom0            udf        (ro,nosuid,nodev,utf8,user=ben)
/dev/sdd1        /media/My Book           fuseblk    (rw,nosuid,nodev,allow_other,default_permissions,blksize=512)
/dev/sdb1        /media/File Drive 1      fuseblk    (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sdc1        /media/Backup Disk       fuseblk    (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sdb5        /media/A64CD9AB4CD97711  fuseblk    (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)


=========================== sda2/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
  have_grubenv=true
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  saved_entry=${prev_saved_entry}
  save_env saved_entry
  prev_saved_entry=
  save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set 55ae3495-dea7-4eeb-aa32-683d75ecb031
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/06_mint_theme ###
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set 55ae3495-dea7-4eeb-aa32-683d75ecb031
insmod png
if background_image /boot/grub/linuxmint.png ; then
  set color_normal=white/black
  set color_highlight=white/light-gray
else
  set menu_color_normal=white/black
  set menu_color_highlight=white/light-gray
fi
### END /etc/grub.d/06_mint_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Linux Mint 8 Helena x64, linux 2.6.31-14-generic (/dev/sda2)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	set quiet=1
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set 55ae3495-dea7-4eeb-aa32-683d75ecb031
	linux	/boot/vmlinuz-2.6.31-14-generic root=UUID=55ae3495-dea7-4eeb-aa32-683d75ecb031 ro   quiet splash
	initrd	/boot/initrd.img-2.6.31-14-generic
}
menuentry "Linux Mint 8 Helena x64, linux 2.6.31-14-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	insmod ext2
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set 55ae3495-dea7-4eeb-aa32-683d75ecb031
	linux	/boot/vmlinuz-2.6.31-14-generic root=UUID=55ae3495-dea7-4eeb-aa32-683d75ecb031 ro single 
	initrd	/boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

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

=============================== sda2/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sda2 during installation
UUID=55ae3495-dea7-4eeb-aa32-683d75ecb031 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=a74f01e6-0677-4560-ae27-264a30f69964 none            swap    sw              0       0
/dev/scd1       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

============================= sdb5/etc/lilo.conf: =============================

paragon_jboot
image=/etc/psrdisk
label="###NdenHden"
initrd=/etc/psr.img
append="paragon_lang=en"

################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################=======Devices which don't seem to have a corresponding hard drive==============

sde 

If this helps here is what I did to install linux: I had an old win installation in my F drive (83GB primary drive). I couldn't format that old partition, so I used a paragon boot cd to do it from there, and I formatted to ext3. I then booted into linux mint CD and installed from there, I also re-formatted the fresh ext3 into ext4.

#293

benplanet,

Did you try restoring the MBR as detailed in the link I provided? If that doesn't fix things, run the boot info script and post the results within "code" tags. To do that, click on the # icon in your post, and then paste the results within.

Here is the link to *meierfra's* boot info script

#294

drs305 said: benplanet,

Did you try restoring the MBR as detailed in the link I provided? If that doesn't fix things, run the boot info script and post the results within "code" tags. To do that, click on the # icon in your post, and then paste the results within.

Here is the link to *meierfra's* boot info script

updated with results above.

I hope you can interpret the results and come back with a solution, thanks much for all the help! :)

#295

benplanet said: updated with results. Should I give this a try? http://www.arsgeek.com/2008/01/15/how-to-fix-your-windows-mbr-with-an-ubuntu-livecd/

I hope you can interpret the results and come back with a solution, thanks much for all the help! :)

Edit: I just saw you posted the results in a previous response!

Line deleted.....

Post removed while I review your info script results.....

#296

Don't run the lilo command or try to fix the MBR. According to your RESULTS.txt your MBR is in perfect condition. But the boot files for Windows are missing. Just give me couple of minutes to write up instructions.

Edit: Didn't not see drs305 edit until after I posted this.

#297

Meierfra is correct and I will defer to his advice as to how to procede as I am not a frequent Windows user.

@ meierfra - Hehe. I just about jumped when I saw his results *after* I had made the post. If I'd had his phone number, I might have even called.

Benplanet - sorry for the confusion - I expected a new post with the boot info script and didn't scroll up to the previous posts until after I posted a response asking you again for the results and providing recommendations.

#298

drs305 said: Meierfra is correct and I will defer to his advice as to how to procede as I am not a frequent Windows user.

@ meierfra - Hehe. I just about jumped when I saw his results *after* I had made the post. If I'd had his phone number, I might have even called.

Benplanet - sorry for the confusion - I expected a new post with the boot info script and didn't scroll up to the previous posts until after I posted a response asking you again for the results and providing recommendations.

Good thing you edited it in time then :)

I am standing by ready to try anything that can solve this problem and preserve my windows 7, tones of important work in there :(

cheers guys

#299

Window always puts its boot files on a primary partition on the boot drive. You deleted that partition when you installed Ubuntu, and so the boot files for Window 7 are gone. Also since you do not have any fat/ntfs partition on the boot drive your Windows CD is not able to find any operating system.

First I suggest to remove the boot flag from /dev/sdb5, since the two boot flags might confuse your Windows CD:

sudo sfdisk -A1 /dev/sdb

Next change the boot order in the bios so that your Windows hard drive is first among all the hard drive. If your bios don't let you change the boot order you will have to physically remove the Ubuntu drive.

Then boot from the Window 7 CD:

At the first screen select your favorite language. At the second screen choose "Repair your Computer".

If a pop up appears, offering to repair a problem with the "Startup options", click on "Repair and restart".

Otherwise, on the next screen select "Use recovery tools ..." and click on "Next". Choose "Startup Repair" at the next screen.

"Startup Repair" tends to fix one problem at the time. So you might have to run "Startup Repair" several times.

After running startup repair, boot from the Windows drive. You should boot directly into Windows. Once you successfully booted into Windows, reboot but set your Bios to boot from the Ubuntu drive (and plug your Ubuntu drive back in, if you had to detach it)

Once booted in Ubuntu run

sudo update-grub

Hopefully, this will be all you need to do to boot Windows 7 again.

#300

meierfra. said: Window always puts its boot files on a primary partition on the boot drive. You deleted that partition when you installed Ubuntu, and so the boot files for Window 7 are gone. Also since you do not have any fat/ntfs partition on the boot drive your Windows CD is not able to find any operating system.

First I suggest to remove the boot flag from /dev/sdb5, since the two boot flags might confuse your Windows CD:

sudo sfdisk -A1 /dev/sdb

Next change the boot order in the bios so that your Windows hard drive is first among all the hard drive. If your bios don't let you change the boot order you will have to physically remove the Ubuntu drive.

Then boot from the Window 7 CD:

At the first screen select your favorite language. At the second screen choose "Repair your Computer".

If a pop up appears, offering to repair a problem with the "Startup options", click on "Repair and restart".

Otherwise, on the next screen select "Use recovery tools ..." and click on "Next". Choose "Startup Repair" at the next screen.

"Startup Repair" tends to fix one problem at the time. So you might have to run "Startup Repair" several times.

After running startup repair, boot from the Windows drive. You should boot directly into Windows. Once you successfully booted into Windows, reboot but set your Bios to boot from the Ubuntu drive (and plug your Ubuntu drive back in, if you had to detach it)

Once booted in Ubuntu run

sudo update-grub

Hopefully, this will be all you need to do to boot Windows 7 again.

this didn't work. in fact i couldn't boot to any loader, i just got an error saying: no operating system....

so i installed ubuntu 9.10 over linux mint, same thing no signs of windows 7 :(

Should I be backing up my files and re-installing windows, or is there one last thing i could try?

#301

i just got an error saying: no operating system....

Did this happen when booting from the Window CD? Or were you able to run "Start Up Repair"? Were you able to change the boot order in the bios? Did your trying booting from Windows CD with only the Windows drive attached to the computer?

How early did you got the "no operating system" message? Did you get to the screen with "Use recovery tools ..." ?

Please describe exactly all the step you took and what happened.

or is there one last thing i could try?

Yes, there are more things one can try. But I'll wait for the answers to my question before I decide on the next move. Since your reinstalled, could you also run the boot info script again and post the new RESULTS.txt

#302

meierfra. said: Did this happen when booting from the Window CD? Or were you able to run "Start Up Repair"? Were you able to change the boot order in the bios? Did your trying booting from Windows CD with only the Windows drive attached to the computer?

How early did you got the "no operating system" message? Did you get to the screen with "Use recovery tools ..." ?

Please describe exactly all the step you took and what happened.

Yes, there are more things one can try. But I'll wait for the answers to my question before I decide on the next move. Since your reinstalled, could you also run the boot info script again and post the new RESULTS.txt (it might be called RESULTS1.txt) Boot into script results:

============================= Boot Info Summary: ==============================

 => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
    partition #1 for /boot/grub.
 => Paragon is installed in the MBR of /dev/sdb
 => Windows is installed in the MBR of /dev/sdc
 => Windows is installed in the MBR of /dev/sdd
sda1: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Ubuntu 9.10
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda2: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info:  

sda5: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

sdb1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

sdb2: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info:  

sdb5: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  According to the info in the boot sector, sdb5 starts 
                       at sector 1. But according to the info from fdisk, 
                       sdb5 starts at sector 398540583.
    Operating System:  Windows 7
    Boot files/dirs:   /etc/lilo.conf /Windows/System32/winload.exe

sdc1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

sdd1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders, total 160836480 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xa79fa79f

Partition  Boot         Start           End          Size  Id System

/dev/sda1    *             63   154,191,869   154,191,807  83 Linux
/dev/sda2         154,191,870   160,826,714     6,634,845   5 Extended
/dev/sda5         154,191,933   160,826,714     6,634,782  82 Linux swap / Solaris


Drive: sdb ___________________ _____________________________________________________

Disk /dev/sdb: 400.1 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders, total 781422768 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x01030bc9

Partition  Boot         Start           End          Size  Id System

/dev/sdb1    *             63   398,540,519   398,540,457   7 HPFS/NTFS
/dev/sdb2         398,540,520   781,417,664   382,877,145   f W95 Ext d (LBA)
/dev/sdb5         398,540,583   781,417,664   382,877,082   7 HPFS/NTFS


Drive: sdc ___________________ _____________________________________________________

Disk /dev/sdc: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x8e7c4595

Partition  Boot         Start           End          Size  Id System

/dev/sdc1                  63   488,392,064   488,392,002  42 SFS


Drive: sdd ___________________ _____________________________________________________

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x44fdfe06

Partition  Boot         Start           End          Size  Id System

/dev/sdd1                  63   976,768,064   976,768,002   7 HPFS/NTFS


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda1        553f1a69-8331-4577-b2fc-1eac7bc6a8fe   ext4                                     
/dev/sda5        6ee43b4c-8808-405e-83e2-45510b7fd281   swap                                     
/dev/sdb1        D42AF0782AF058C6                       ntfs       File Drive 1                  
/dev/sdb5        A64CD9AB4CD97711                       ntfs                                     
/dev/sdc1        4EC067F4C067E0A7                       ntfs       Backup Disk                   
/dev/sdd1        B426069F2606632A                       ntfs       My Book                       

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

/dev/sda1        /                        ext4       (rw,errors=remount-ro)
/dev/sdd1        /media/My Book           fuseblk    (rw,nosuid,nodev,allow_other,default_permissions,blksize=512)


=========================== sda1/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
  have_grubenv=true
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  saved_entry=${prev_saved_entry}
  save_env saved_entry
  prev_saved_entry=
  save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 553f1a69-8331-4577-b2fc-1eac7bc6a8fe
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-19-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	set quiet=1
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 553f1a69-8331-4577-b2fc-1eac7bc6a8fe
	linux	/boot/vmlinuz-2.6.31-19-generic root=UUID=553f1a69-8331-4577-b2fc-1eac7bc6a8fe ro   quiet splash
	initrd	/boot/initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-19-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 553f1a69-8331-4577-b2fc-1eac7bc6a8fe
	linux	/boot/vmlinuz-2.6.31-19-generic root=UUID=553f1a69-8331-4577-b2fc-1eac7bc6a8fe ro single 
	initrd	/boot/initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	set quiet=1
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 553f1a69-8331-4577-b2fc-1eac7bc6a8fe
	linux	/boot/vmlinuz-2.6.31-14-generic root=UUID=553f1a69-8331-4577-b2fc-1eac7bc6a8fe ro   quiet splash
	initrd	/boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 553f1a69-8331-4577-b2fc-1eac7bc6a8fe
	linux	/boot/vmlinuz-2.6.31-14-generic root=UUID=553f1a69-8331-4577-b2fc-1eac7bc6a8fe ro single 
	initrd	/boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

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

=============================== sda1/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sda1 during installation
UUID=553f1a69-8331-4577-b2fc-1eac7bc6a8fe /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=6ee43b4c-8808-405e-83e2-45510b7fd281 none            swap    sw              0       0
/dev/scd1       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

============================= sdb5/etc/lilo.conf: =============================

paragon_jboot
image=/etc/psrdisk
label="###NdenHden"
initrd=/etc/psr.img
append="paragon_lang=en"

################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################

followed the steps to the t, I entered the command you gave me in terminal.. rebooted, changed boot order, did the startup repair with windows disk, which failed and asked me to "send to microsoft" prompt (i tried it this morning, got same error)

I then rebooted, changed back the boot order... and error: no operating system found...

anyway I re-installed linux (ubuntu karmic kuala)

I still see my drive with all my files, but cant seem to boot into windows.

I did update the mbr while in startup repair using command prompt. but it kept saying something along the the extent that it can't find any drive (i think a windows drive)

anywhoo, what's next sir? :)

#303

While I'm writing up the instructions for manually repairing the Windows boot loader, could you run the boot infos script again and post the RESULTS.txt?

#304

Boot from the Windows CD (with the windows drive first in the boot order). At the screen with the "Startup Repair" choose "Command Prompt" Type

 diskpart
 list volume
 exit

Type


copy E:\bootmgr C:\

mkdir C:\BOOT

copy E:\BOOT C:\BOOT 

bcdedit /store C:\boot\bcd /set {default} osdevice boot

bcdedit /store C:\boot\bcd /set {default} device boot

bcdedit /store C:\boot\bcd /set {default} path \Windows\system32\winload.exe

bcdedit /store C:\boot\bcd /set {bootmgr} device boot

bcdedit /store C:\boot\bcd /set {memdiag} device boot

bcdedit /store C:\boot\bcd /deletevalue  {default} detecthal 

bcdedit /store C:\boot\bcd /deletevalue  {default} winpe

bcdedit /store C:\boot\bcd /deletevalue  {default} ems

Reboot with the Bios set to boot from Ubuntu drive. Boot into Ubuntu. (make sure that The Universe Repository is enabled in Systmem->Administration->Software Sources. Then install and run "testdisk via


sudo apt-get install testdisk
sudo testdisk /dev/sdb

Press "enter" to "proceed" Press "enter" to select "intel" Use the "down arrow" and "enter" to select "advanced" Use the down error to select the "Windows 7" partition and then "enter" to select "boot" Use the "right arrow" key and "enter" to select "Rebuild BS" Once done just follow the instruction on the screen to save the new boot sector and quit testdisk.

sudo update-grub

Reboot and hope for the best.

#305

I don't think that really worked, when i reboot, it goes straight to ubuntu, doesn't even show grub.

here is a short vid of the last step i did in terminal:

http://www.youtube.com/watch?v=uKeUHrh30t4

I forgot to mention this but i was running a 64bit version of win 7, and this version of ubuntu is also 64bit.

there seems to be something wrong.. i did use a software to build the windows partition which was a 400GB disk which i split in half, one side for backup and the other side to host win 7.

#306

I'm really surprised that testdisk did not fix this problem:

According to the info in the boot sector, sdb5 starts

at sector 1. But according to the info from fdisk, sdb5 starts at sector 398540583.

Then i reboot, it goes straight to ubuntu, doesn't even show grub.

Did you run "sudo update-grub" yet and rebooted after that? If not, do it now. If yes, run the boot info script and post the RESULTS.txt again.

#307

I forgot to ask:

I did use a software to build the windows partition which was a 400GB disk which i split in half, one side for backup and the other side to host win 7.

Were you able to boot into Window 7 before you installed Ubuntu?

#308

I was able to boot into windows just fine. Had 2 entries in there, one for the old win 7 setup (noew linux) and one for the newer and stable setup (a partition of my 400GB drive) which i really need to access :(

I did run update-grub multiple times, no signs of windows yet.

should i try manually add the windows entrie to the grub config file??

============================= Boot Info Summary: ==============================

 => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
    partition #1 for /boot/grub.
 => Paragon is installed in the MBR of /dev/sdb
 => Windows is installed in the MBR of /dev/sdc
 => Windows is installed in the MBR of /dev/sdd
sda1: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Ubuntu 9.10
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda2: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info:  

sda5: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

sdb1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   /bootmgr /BOOT/bcd

sdb2: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info:  

sdb5: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files/dirs:   /etc/lilo.conf /Windows/System32/winload.exe

sdc1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

sdd1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders, total 160836480 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xa79fa79f

Partition  Boot         Start           End          Size  Id System

/dev/sda1    *             63   154,191,869   154,191,807  83 Linux
/dev/sda2         154,191,870   160,826,714     6,634,845   5 Extended
/dev/sda5         154,191,933   160,826,714     6,634,782  82 Linux swap / Solaris


Drive: sdb ___________________ _____________________________________________________

Disk /dev/sdb: 400.1 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders, total 781422768 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x01030bc9

Partition  Boot         Start           End          Size  Id System

/dev/sdb1    *             63   398,540,519   398,540,457   7 HPFS/NTFS
/dev/sdb2         398,540,520   781,417,664   382,877,145   f W95 Ext d (LBA)
/dev/sdb5         398,540,583   781,417,664   382,877,082   7 HPFS/NTFS


Drive: sdc ___________________ _____________________________________________________

Disk /dev/sdc: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x8e7c4595

Partition  Boot         Start           End          Size  Id System

/dev/sdc1                  63   488,392,064   488,392,002  42 SFS


Drive: sdd ___________________ _____________________________________________________

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x44fdfe06

Partition  Boot         Start           End          Size  Id System

/dev/sdd1                  63   976,768,064   976,768,002   7 HPFS/NTFS


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda1        553f1a69-8331-4577-b2fc-1eac7bc6a8fe   ext4                                     
/dev/sda5        6ee43b4c-8808-405e-83e2-45510b7fd281   swap                                     
/dev/sdb1        D42AF0782AF058C6                       ntfs       File Drive 1                  
/dev/sdb5        A64CD9AB4CD97711                       ntfs                                     
/dev/sdc1        4EC067F4C067E0A7                       ntfs       Backup Disk                   
/dev/sdd1        B426069F2606632A                       ntfs       My Book                       

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

/dev/sda1        /                        ext4       (rw,errors=remount-ro)
/dev/sr1         /media/cdrom0            udf        (ro,nosuid,nodev,utf8,user=ben)
/dev/sdd1        /media/My Book           fuseblk    (rw,nosuid,nodev,allow_other,default_permissions,blksize=512)


=========================== sda1/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
  have_grubenv=true
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  saved_entry=${prev_saved_entry}
  save_env saved_entry
  prev_saved_entry=
  save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 553f1a69-8331-4577-b2fc-1eac7bc6a8fe
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-19-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	set quiet=1
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 553f1a69-8331-4577-b2fc-1eac7bc6a8fe
	linux	/boot/vmlinuz-2.6.31-19-generic root=UUID=553f1a69-8331-4577-b2fc-1eac7bc6a8fe ro   quiet splash
	initrd	/boot/initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-19-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 553f1a69-8331-4577-b2fc-1eac7bc6a8fe
	linux	/boot/vmlinuz-2.6.31-19-generic root=UUID=553f1a69-8331-4577-b2fc-1eac7bc6a8fe ro single 
	initrd	/boot/initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	set quiet=1
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 553f1a69-8331-4577-b2fc-1eac7bc6a8fe
	linux	/boot/vmlinuz-2.6.31-14-generic root=UUID=553f1a69-8331-4577-b2fc-1eac7bc6a8fe ro   quiet splash
	initrd	/boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 553f1a69-8331-4577-b2fc-1eac7bc6a8fe
	linux	/boot/vmlinuz-2.6.31-14-generic root=UUID=553f1a69-8331-4577-b2fc-1eac7bc6a8fe ro single 
	initrd	/boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

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

=============================== sda1/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sda1 during installation
UUID=553f1a69-8331-4577-b2fc-1eac7bc6a8fe /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=6ee43b4c-8808-405e-83e2-45510b7fd281 none            swap    sw              0       0
/dev/scd1       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

============================= sdb5/etc/lilo.conf: =============================

paragon_jboot
image=/etc/psrdisk
label="###NdenHden"
initrd=/etc/psr.img
append="paragon_lang=en"

################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################=======Devices which don't seem to have a corresponding hard drive==============

sde 
#309

ok some progress. The error message in RESULTS.txt for the sdb5 boot sector disappeared. Did you run "testdisk" more than once?

You put the boot files onto /dev/sdb1, but they need to be on /dev/sdb5. I don't know why "update-grub" did not detect Window 7. Maybe because the Window 7 boot folder is called "BOOT" instead of "Boot" . So try this in Ubuntu:


cd /mnt
sudo mkdir  1 5
sudo mount /dev/sdb1 1
sudo mount /dev/sdb5 5
sudo mv 1/bootmgr 5/
sudo mv 1/BOOT 5/Boot
sudo update-grub

if update-grub detects Window 7, reboot and try to boot Window 7. if not,let me know and I'll show you how to create a custom entry for Window 7.

#310

I fixed some typos in my previous post.

#311

Wasn't able to boot into windows, I did see the grub entry for it, once i click it there is an error that it cannot boor windows because it can't find the boot.ini files in C:/system32/boot.ini or something like that...

[I will paste the exact message tonight]

So i'm guessing something went wrong went i entered those lines in command prompt. btw, i am using a 64 edition of win 7. perhaps the boot file is located in /SysWOW64 ?

cheers

#312

perhaps the boot file is located in /SysWOW64 ?

No. According to "RESULTS.txt" , "winload.exe" is in /Windows/System32

tcan't find the boot.ini files in C:/system32/boot.ini or something like that...

Windows 7 does not use boot.ini. So I'll wait for the exact error message.

You might also post a new RESULTS.txt.

#313

Let's also have a look at your bcd. Go to the command prompt on the the Windows 7 CD, just as before. Then

bcdedit /store C:\boot\bcd > C:\bcd.txt

(Replace "C:" by the drive letter of your Windows partition /dev/sda5) This creates the file bcd.txt on your C: drive. You can access it from Ubuntu via

sudo mount /dev/sda5 /mnt
gedit /mnt/bcd,txt

Post the content of that file.

#314

I think this is on the point. I have Grub2 after a clean install of 9.10. I have two hard drives, one with Ubuntu and another with Mepis. The problem is that I want Ubuntu as the default OS, but Mepis is at the top and always loads automatically. I have followed instructions in many of these posts. They seem to be simple solutions to changing the default, but none works. Is it because they work only with two distros on one hard drive rather than, as in my case, two different drives?

#315

beacon said: I think this is on the point. I have Grub2 after a clean install of 9.10. I have two hard drives, one with Ubuntu and another with Mepis. The problem is that I want Ubuntu as the default OS, but Mepis is at the top and always loads automatically. I have followed instructions in many of these posts. They seem to be simple solutions to changing the default, but none works. Is it because they work only with two distros on one hard drive rather than, as in my case, two different drives?

If the entries are showing up anywhere in the Grub 2 menu setting the default boot OS should not be affected by what drive the OS is located on.

If you post the results of meierfra's boot info script we can see what the problem might be. Please paste the contents between code tags (use the # icon).

Before running the script, try to set it up to boot the OS you want as a default.

#316

When I was even noober than I am now I had trouble with the # sign for the code tag. I had set my preferences way down as it speeded up the page load on my dialup.

Some kind person told me about typing code in side [] to start and /code inside [] to end.

I have the preferences set higher now that I have a connection with speed but still find that faster to use.

The # is less prone to mistakes due to poor typing skills of folks (like me) though. I do screw it up at times.

#317

Im sorry if someone asked this before, but since there's a fix for the known bug of grub2 taking ages to load, because of having incorrect order of hard drives in bios, I was wondering if there's something i can download and install to fix this?

#318

mushis said: Im sorry if someone asked this before, but since there's a fix for the known bug of grub2 taking ages to load, because of having incorrect order of hard drives in bios, I was wondering if there's something i can download and install to fix this?

mushis,

I just reviewed the Launchpad bug report ( 420933 ) on this problem - all 120 entries. From what I read, the fix was made in 1.98 and will be in Lucid, but is not in the Karmic version (1.97~beta). There have been numerous entries requesting it be incorporated into the Karmic version but the only "solution" I've found in the reports is for Karmic users to use Felix Zielcke's experimental version. The PPA is listed in post #109.

The other option, as has been detailed in the bug report thread, is to change the device on which Grub 2 is installed.

#319

Hey, I got an idea.... Lets take something that was formerly simple and easy to edit/change and make it as complicated as possible!

I think I'm gonna jump ship on Ubuntu and Grub before they change the name to win-buntu!

I mean seriously, what was the problem with editing menu.lst? It was the simplest thing to do and it worked....why change it and make it unbelieveably more complicated and time consuming!?!

Sorry for the rant, but I really don't understand why the linux world is headed the path of Windoze!

#320

A>grub0.97 is no longer supported B>grub0.97 could no longer be patched to function with new storage devices and file systems C>every distro will be going to grub 1.xxx (1.98 is in the Lenny repo now) D>if you, very simply, make a custom entry menu it will never need editing E>if you are unwilling, or can't learn to use grub 1.xxx follow these directions

http://ubuntuforums.org/showthread.php?t=1298932

#321

Grub2 os-prober detects recovery partition in Windows Vista on /dev/sda2. How do I edit the os-pober to remove this entry? I want to keep os-prober rather than create a custom file.

#322

A>your recovery partition is supposed to be bootable, if it is not delete it as it is of no use B>if you buils a custom menu and name it 06_custom it will be at the top of your menu - no need to disable anything.

#323

daodeltaforce said: Grub2 OS prober is detecting HDD1 recovery partition 2 in Windows Vista as OS but it is just a 12GB recovery partition, there is no bootable OS in this partition. Grub2 detects it as Windows Vista on /dev/sda2. How do I edit the OS Prober to remove this entry? I want to keep OS Prober (rather than create a custom file).

You can hide any partition, and if you don't want a custom menu, this is probably the easiest thing to do. The method is detailed in Grub 2 Title Tweaks. See Number 3.

The thread looks a bit intimidating but in fact all you will do is add a few lines to your */etc/grub.d/30_os-prober* file.

Section 4 details how to hide *any* partition you don't want included in the menu.

#324

ranch hand said: A>grub0.97 is no longer supported

B>grub0.97 could no longer be patched to function with new storage devices and file systems C>every distro will be going to grub 1.xxx (1.98 is in the Lenny repo now) D>if you, very simply, make a custom entry menu it will never need editing E>if you are unwilling, or can't learn to use grub 1.xxx follow these directions

http://ubuntuforums.org/showthread.php?t=1298932

Thanks RH! A~B: so couldn't grub have been rebuilt AND still utilize the simple menu.lst method?! Maybe I just don't understand the proceedure correctly with Grub2...but from what I'm seeing its way more time consuming and more complicated - two things I personally don't need since I'm very busy most the time.

#325

tidan said: Thanks RH!

A~B: so couldn't grub have been rebuilt AND still utilize the simple menu.lst method?! Maybe I just don't understand the proceedure correctly with Grub2...but from what I'm seeing its way more time consuming and more complicated - two things I personally don't need since I'm very busy most the time.In a normal usage of Ubuntu You do not spend a lot of time fiddling with Grub. That time might be bigger when using development release, but with ordinary one, that is, in my opinion, less that time it took me to type this reply. In special occasions when problem occur that might become an issue... But new Grub is going to be more resistant to problems and more versatile so that is a small price to pay. Just my .002$.

#326

Thanks drs305.

For my installation I added the following script to os-prober and it worked perfectly.

[B][COLOR=DarkRed]# Added to remove Windows Recovery if [ "$LONGNAME" = "[COLOR=Red]Windows Vista Home Premium 32 SP2[/COLOR]" ] && [ "${DEVICE}" = "/dev/[COLOR=Red]sda2[/COLOR]" ] ; then continue fi

End Added[/COLOR][/B]

#327

tidan said: Thanks RH!

A~B: so couldn't grub have been rebuilt AND still utilize the simple menu.lst method?! Maybe I just don't understand the proceedure correctly with Grub2...but from what I'm seeing its way more time consuming and more complicated - two things I personally don't need since I'm very busy most the time. Read the link in my sig it should help give you an over view of the new grub.

The second link I provide in my post is the link to this thread because it is the best in depth documentation you will find.

The first link is the only real documentation that existed when we were thrown grub1.96 in 9.10-testing alpha2. That was kind of a rough ride for a while.

I think that if you think back to your first experience with grub0.97 you will remember a good bit of frustration and nervousness. If you search the archives for when it was introduced you will find it very much disliked.

This is true of any new system and, with time and practice, I believe you will come to see that grub1.xx is actually easier to use and much more flexible (I use grub1.xx because I am not sure what you are using. I am mainly using 1.98 on 10.04-testing installs.)

A good example is the ability to change the screen menu background. This was, in grub0.97, a pain and very limited in the number of colors so that it looked poor. I preferred the black. In grub1.96 I found that it was easy to put a high quality image in and use the wallpaper of each install for that and xsplash/gdm (9.10,9.04) and plymouth and gdm in 10.04.

If you want to change the the OS you are using for boot/root it is very simple. In grub0.97 you need to go to the LiveCD and run 5 commands in terminal. In grub1.xx you boot to the chosen OS and type one command in its terminal ("grub-install /dev/<the drive with your mbr>" in my case that would be "grub-install /dev/sda" and you are done)

It is true that there are a lot of scripts responsible for generating /boot/grub/grub.cfg. Each one is editable to meet your needs and wishs. I use a custom menu with symbolic menu entries. These point to the partition and boot the newest kernel there. You can format and install another, Debian based, OS on that partition and the old menu entry will boot it with no editing (I do usually edit the title for my convenience).

Burg is making the screen menu have a different look completely and it works well. See;

http://ubuntuforums.org/showthread.php?t=1371288

I do not use it because I prefer the simple text menu but it is a very nice piece of work.

#328

ranch hand said: Read the link in my sig it should help give you an over view of the new grub.

The second link I provide in my post is the link to this thread because it is the best in depth documentation you will find.

The first link is the only real documentation that existed when we were thrown grub1.96 in 9.10-testing alpha2. That was kind of a rough ride for a while.

I think that if you think back to your first experience with grub0.97 you will remember a good bit of frustration and nervousness. If you search the archives for when it was introduced you will find it very much disliked.

This is true of any new system and, with time and practice, I believe you will come to see that grub1.xx is actually easier to use and much more flexible (I use grub1.xx because I am not sure what you are using. I am mainly using 1.98 on 10.04-testing installs.)

A good example is the ability to change the screen menu background. This was, in grub0.97, a pain and very limited in the number of colors so that it looked poor. I preferred the black. In grub1.96 I found that it was easy to put a high quality image in and use the wallpaper of each install for that and xsplash/gdm (9.10,9.04) and plymouth and gdm in 10.04.

If you want to change the the OS you are using for boot/root it is very simple. In grub0.97 you need to go to the LiveCD and run 5 commands in terminal. In grub1.xx you boot to the chosen OS and type one command in its terminal ("grub-install /dev/<the drive with your mbr>" in my case that would be "grub-install /dev/sda" and you are done)

It is true that there are a lot of scripts responsible for generating /boot/grub/grub.cfg. Each one is editable to meet your needs and wishs. I use a custom menu with symbolic menu entries. These point to the partition and boot the newest kernel there. You can format and install another, Debian based, OS on that partition and the old menu entry will boot it with no editing (I do usually edit the title for my convenience).

Burg is making the screen menu have a different look completely and it works well. See;

http://ubuntuforums.org/showthread.php?t=1371288

I do not use it because I prefer the simple text menu but it is a very nice piece of work.

Maybe your right. I do remember being a bit overwhelmed with the early Grub, but once I got it figured out and added my custom splash screens and several OS's, I got comfortable with it. It just seems that everytime I turn around now, Ubuntu changes entirely the way something is handled I have to spend hours learning the new method which oftentimes seems way worse than the original method! If the days were longer and we lived more years I'd probably have more patience with these things, but I'm always in a race against the clock it seems ;-)

#329

According to some of the GRUB 2 developers, in Ubuntu the menu will not be hidden any time there are other OSs found by os-prober, regardless of this setting. This is in keeping with the Ubuntu Team's goal towards booting: https://wiki.ubuntu.com/DesktopExper...pec#Bootloader

Is there any way around this issue, I really do NOT want the menu displayed.

#330
#331

grub 097 is still available from ubuntu's main server on karmic;

changing to main server synaptic shows it. I just downgraded grub2 to grub 097 today on a stubborn pc that kept not seeing xp with grub2 doesn't matter what; problem solved in no time elegantly; moreover, by doing this I could see that in menu.lst there is an option that offers chainloading to grub2.

grub2 is still beta so I guess that glitches here and there can be expected; so far grub2 was 'dissected' extensively by the community and lots of v good tips and tricks were made available and documented. for sure os-prober needs some additional work - just my opinion.

it looks like upcoming lucid will have a new version of grub2.

#332

10.04 has its 3rd version of grub. Started with 1.97beta4 went to 1.97 and we are now running 1.98.

I would have put in a custom entry for MS.

Os-prober is a dependency for grub of any version. It is more important in the newer versions for sure. It has improved a good bit but it certainly needs a lot more.

I am a long term lover of grub0.97 but I really like the new one even better. The only problem I have with grub-legacy is that it is no longer supported. I hope that grub-common keeps supporting both (that i where your chain loading comment comes from).

#333

grub 097 never, and I mean never let me down booting anything that crossed my desk.

about the grub custom file entries - I made at least 5 attempts with no luck so I just gave up (os-prober exec rights either in place or removed). grub2/os-prober pure and simple stunned me - not able to read the presence of a functional boot.ini on (hd0,1) ?

So I plugged in an old hardy grub floppy and in 1 minute I was up to the races xp and all. I guess this is one of the odd situations in beta releases;

probably it has something to do with the way the hd was initialised and formatted initially (after first use) - apparently, the hd was part of an array then used as a standalone hd now; so once again the wiping/zeroing of previously used hd, especially the ones used in arrays, is a must before reuse. I guess the owner or whoever installed xp did not know or did not want to spend time on such an exercise.

#334

Like I said, I really have a long standing love of grub0.97.

I am glad that you got it going to. There are a cou;e of pitfalls that can get you in reverting. If you encourage anyone else to do that send them to;

http://ubuntuforums.org/showthread.php?t=1298932

Now, I really think it is time to turn this thread back over to the newer grub.

#335

Thanks. This is really tutorial, i teach a very much. ;)

#336

I wondered if I could get some of you grub2 aficionados to have a look at something. Basically the OP installed Karmic in a dual boot with Win XP, but created a separate /boot partition.

Later he installed another Debian based distro with legacy grub. So he ended up with a /boot that looks like this:

sda5: __________________________________________________ _______________________

File system: ext4 Boot sector type: Grub Boot sector info: Grub 0.97 is installed in the boot sector of sda5 and looks at sector 2453506 of the same hard drive for the stage2 file. A stage2 file is at this location on /dev/sda. Stage2 looks on partition #2 for /boot/grub/menu.lst. Operating System: Boot files/dirs: /grub/grub.cfg /grub/core.img

Cute huh?

I'm a bit scared to have him restore grub2 so I gave him some legacy grub entries that I hope will get Karmic booting from the legacy grub install.

Here's the link:

http://ubuntuforums.org/showthread.php?p=8855727#post8855727

#337

I'm a bit scared to have him restore grub2 so I gave him some legacy grub entries that I hope will get Karmic booting from the legacy grub install.

The OP installed the Backtrack Grub to the boot sector of the Ubuntu boot partition. That won't cause any problem. So I posted in that thread and gave instructions how to install Ubuntu's Grub to the MBR.

#338

Hi all.

#339

undrakh_orgil said: Hi all.

Hi there undrakh_orgil, welcome to the Ubuntu forums! :-)

With the title of your post, did you happen to post to the wrong thread? ... Even though you are most welcome here as well. ;-)

#340

meierfra. said: The OP installed the Backtrack Grub to the boot sector of the Ubuntu boot partition. That won't cause any problem. So I posted in that thread and gave instructions how to install Ubuntu's Grub to the MBR.

Thank you :D

#341

Thought I'd share something. I've been busy but happened to stumble up on this very interesting thread regarding booting Fedora 12 from grub2:

http://ubuntuforums.org/showthread.php?t=1415879

I must say oldfred did an excellent job but I've repeatedly seen people struggle getting Fedora to boot from grub2 so I installed it myself and gave things a whirl:

http://ubuntuforums.org/showpost.php?p=8893128&postcount=40

It just worked with no tweaks whatsoever. So at least we know the newest grub2 can boot Fedora 12 with nothing but "update-grub" unless something else is amiss.

I hope this might help someone else in the future.

#342

I am curious about something if meierfra happens to see this. My results from the Boot Info Script show:

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
    partition #3 for /boot/grub.
 => Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in 
    partition #3 for /boot/grub.

Which I know is incorrect.

Another example of that:

http://ubuntuforums.org/showpost.php?p=8889114&postcount=11

Not a big deal but I know meierfra likes things perfect :) And I must say that Boot Info Script has been a blessing!!!!!!!!!!!!!!

If I can ever help with testing a new version of the Boot Info Script I'd be glad to do so :)

#343

Are you able to boot from both hard drives?

Sounds like Lucid's Grub as made same changes I have not been aware of. I'll to some testing and see whether I can figure out what is going on.

#344

kansasnoob said: Thought I'd share something. I've been busy but happened to stumble up on this very interesting thread regarding booting Fedora 12 from grub2:

http://ubuntuforums.org/showthread.php?t=1415879

I must say oldfred did an excellent job but I've repeatedly seen people struggle getting Fedora to boot from grub2 so I installed it myself and gave things a whirl:

http://ubuntuforums.org/showpost.php?p=8893128&postcount=40

It just worked with no tweaks whatsoever. So at least we know the newest grub2 can boot Fedora 12 with nothing but "update-grub" unless something else is amiss.

I hope this might help someone else in the future. Did I miss something here? I do not recall an update for os-prober which is the problem.

Did the boys in the grub project take matters in their own hands? Maybe the devs for Ubuntu?

It would be hard to correct that in grub, and obviously in os-prober too.

I will have to check and see what is up in Mandriva department. It has been almost right for a long time in the generated entry.

Using custom entries, I shut os-prober down right away so I do not see the output. When I installed A3 it ran oos prober, of coarse and every OS was listed on every partition on the drive. Been like that for months. I saw that and fixed while still on the Live CD so that it ran on a custom menu and no prober.

If they can get os-prober to work it will be just fantastic.

#345

Does someone know how to solve this without livecd please? http://img684.imageshack.us/img684/3584/p2802102144.jpg Thanks!

#346

You are going to have to get into the system with a compatible OS somehow. If you have an install of 9.10 on the box you could chroot in.

I have never used a usb stick but you can put the ISO on one of those.

Frankly I do not see how you got the OS installed without a Live Cd or a usb stick.

I do not use the Alt CD often enough to know what it can do but I know there is a rescue functionality to it too.

#347

meierfra. said: Are you able to boot from both hard drives?

Sounds like Lucid's Grub as made same changes I have not been aware of. I'll to some testing and see whether I can figure out what is going on.

Yes, everything boots fine.

I know for a fact that I actually have Lucid's grub2 installed to the mbr of both drives.

I have in fact tried booting this with a legacy grub mbr, a Windows mbr, and Lucid's grub2 mbr on sdb just to see what happens and it'll boot with any mbr whatsoever on sdb. This of course is just two IDE drives on one cable with sda being primary.

Hopefully I can get a SATA drive in the mix soon but this board is still SATA 1.5 and all of my spare drives are SATA 3.0 w/o jumpers to revert to 1.5. I think Western Digital is the only one that includes that "jumpering" function.

#348

If they can get os-prober to work it will be just fantastic.

It worked flawlessly for me with that Fedora 12 install. I honestly doubt that it would have mattered if I installed Fedora's grub to the mbr of sdb or to the / partition as I did.

I just did it that way thinking that I might have to chainload to it's legacy grub, but all it took was an "update-grub" in Lucid and away she went. I updated Fedora today and when I rebooted I went to Lucid first and again ran "update-grub" and it found the new kernel, and Fedora booted again just fine :D

I think the first Alpha of Fedora 13 is coming next week so I might try an install of it putting it's grub on the mbr of sdb just to see what happens. It just seems strange installing distros that I don't like nearly as well as Ubuntu and Debian, but I gotta' test!

#349

Rawatak said: Does someone know how to solve this without livecd please?

http://img684.imageshack.us/img684/3584/p2802102144.jpg Thanks!

Really need much more info, like what type of installation media did you use? Is that the only OS on the machine?

#350

I have a query for the grub2 fluent ;)

You can read what's going on here:

http://ubuntuforums.org/showpost.php?p=8925365&postcount=119

Anyway that got Plymouth working in Lucid but I'm curious if I changed the resolution in the following line from "/etc/default/grub":

GRUB_GFXMODE=640x480

Would I also have to edit the following line in "/etc/grub.d/00_header":

if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi

eg: change the 640x480 to 1440x900 in both entries?

No rush I'm just playing.

#351

kansasnoob said: I have a query for the grub2 fluent ;)

You can read what's going on here:

http://ubuntuforums.org/showpost.php?p=8925365&postcount=119

Anyway that got Plymouth working in Lucid but I'm curious if I changed the resolution in the following line from "/etc/default/grub":

Would I also have to edit the following line in "/etc/grub.d/00_header":

eg: change the 640x480 to 1440x900 in both entries?

No rush I'm just playing. I was just doing my update/upgrade song and dance and decided to look into this a little while I was at it.

First, that line in my /etc/default/grub is commented out so I saw no reason to edit it.

Second, I changed the resolution in /etc/grub.d/00_header to 1440X900. Ran update-grub and grub-mkconfig.

Third, rebooted the victim OS. Gave me a very nice looking menu with very small font on a full screen. I would guess the font size at about 8.

I use a background and that was, of course, off and just in the upper left corner of the menu. Changing it to 1440x900 still was too small. 2560x1600 is too big but that is where I left it for now as I needed to get back over here.

What is the purpose of changing this setting? While it worked on my box with my /etc/default/grub setting, the font is really a little small for comfort if you have several entries. If you do not have several entries there would be little point in changing it.

It would list, on one page, an awful lot of entries.

#352

Hi! I'm a wub user. Karmic and win7. When I select win7 at grub, got this error:

error: no such device: 8eecaf0aecaeeba1

and then back to grub.

I looked for an answer at web but I dind't find much information.

Before this happens I use Gparted to format a Recovery partition (I've a notebook Dell Vostro 1720). I formatted this one to FAT32 and there was an other little partition that I erase (erasing it was a silly thing, I'm not even using it). I think, but don't remember, that both were NTFS, the recovery's for sure.

picknick

#353

ranch hand said: I was just doing my update/upgrade song and dance and decided to look into this a little while I was at it.

First, that line in my /etc/default/grub is commented out so I saw no reason to edit it.

Second, I changed the resolution in /etc/grub.d/00_header to 1440X900. Ran update-grub and grub-mkconfig.

Third, rebooted the victim OS. Gave me a very nice looking menu with very small font on a full screen. I would guess the font size at about 8.

I use a background and that was, of course, off and just in the upper left corner of the menu. Changing it to 1440x900 still was too small. 2560x1600 is too big but that is where I left it for now as I needed to get back over here.

What is the purpose of changing this setting? While it worked on my box with my /etc/default/grub setting, the font is really a little small for comfort if you have several entries. If you do not have several entries there would be little point in changing it.

It would list, on one page, an awful lot of entries.

I should have been more clear about what's going on instead of just posting a link to a thread. Many of us Lucid testers (nvidia users especially) have just an ugly blue/white progress bar coming out of Plymouth. I use the openchrome drivers and get the same.

So removing the comment in front of the following line in "/etc/default/grub"

#GRUB_GFXMODE=640x480

And also adding the following to "/etc/grub.d/00_header":

case x${GRUB_TERMINAL_OUTPUT} in
 xgfxterm)
    # Make the font accessible
    prepare_grub_to_access_device `${grub_probe} --target=device ${GRUB_FONT_PATH}`

    cat << EOF
if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
  set gfxmode=${GRUB_GFXMODE}
 **[COLOR="Red"]+[/COLOR]**set gfxpayload=keep
  insmod gfxterm
  insmod ${GRUB_VIDEO_BACKEND}
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi

And that seems to work :D

I'm just confused about the relationship between the aforementioned two files.

They both seem to me to refer to the same thing:

GRUB_GFXMODE=640x480
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi

I'm just asking folks that may know more than I do.

#354

picknick said: Hi! I'm a wub user. Karmic and win7. When I select win7 at grub, got this error:

error: no such device: 8eecaf0aecaeeba1

and then back to grub.

I looked for an answer at web but I dind't find much information.

Before this happens I use Gparted to format a Recovery partition (I've a notebook Dell Vostro 1720). I formatted this one to FAT32 and there was an other little partition that I erase (erasing it was a silly thing, I'm not even using it). I think, but don't remember, that both were NTFS, the recovery's for sure.

picknick

Odd being Wubi makes me think this:

http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Wubi_9.10

But that error makes me think this:

http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:search

It would be best to see the output of the Boot Info Script as described here:

http://bootinfoscript.sourceforge.net/

#355

kansasnoob said: Odd being Wubi makes me think this:

http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Wubi_9.10

But that error makes me think this:

http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:search

It would be best to see the output of the Boot Info Script as described here:

http://bootinfoscript.sourceforge.net/

Thanks a lot!!! But I dind't repear it. I have been looking the situation closely. The second link you sent me the one that reefer to the "search" command.

I follow the steps that are recommended there. I realized that the UUID that the grub was looking for when I choose win7 to boot is wrong. Maybe this is because I erase the partition that grub was reefering to.

So, when I updated grub with

sudo udpate-grub

and restart I found that the win7 option wasn't there to boot. Which makes more reliable my theory (but I don't know really).

Fortunately, thanks to you, I use bootscript before and after the update-grub. I tried to edit boot.cfg from "grub-mkconfig_lib" but I don't know how to handle it. I can't tell him how to see win7 partitoin (maybe that partition does not have the information to boot, but again I don't know).

picknick

P.D.: I will paste here the first result of bootscript. The only difference with the last one (the one I made after update-grub) is that the lines

menuentry "Windows 7 (loader) (on /dev/sda2)" { insmod ntfs set root=(hd0,2) search --no-floppy --fs-uuid --set 8eecaf0aecaeeba1 chainloader +1 }

that are at line 219, don't appears.


                Boot Info Script 0.55    dated February 15th, 2010                    

============================= Boot Info Summary: ==============================

 => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
    partition #6 for /grub.

sda1: _________________________________________________________________________

    File system:       vfat
    Boot sector type:  Fat32
    Boot sector info:  According to the info in the boot sector, sda1 starts 
                       at sector 0. But according to the info from fdisk, 
                       sda1 starts at sector 63.
    Operating System:  
    Boot files/dirs:   

sda3: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files/dirs:   /Windows/System32/winload.exe

sda4: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info:  

sda5: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

sda6: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files/dirs:   /grub/grub.cfg /grub/core.img

sda7: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Ubuntu 9.10
    Boot files/dirs:   /etc/fstab

sda8: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files/dirs:   

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disco /dev/sda: 320.1 GB, 320072933376 bytes
255 cabezas, 63 sectores/pista, 38913 cilindros, 625142448 sectores en total
Unidades = sectores de 1 * 512 = 512 bytes
Identificador de disco: 0xb63575e1

Partition  Boot         Start           End          Size  Id System

/dev/sda1                  63    30,796,604    30,796,542   b W95 FAT32
/dev/sda3          30,801,920   518,944,498   488,142,579   7 HPFS/NTFS
/dev/sda4         518,947,695   625,137,344   106,189,650   5 Extended
/dev/sda5         518,947,758   536,522,804    17,575,047  82 Linux swap / Solaris
/dev/sda6         536,522,868   536,731,649       208,782  83 Linux
/dev/sda7         536,731,713   567,978,074    31,246,362  83 Linux
/dev/sda8         567,978,138   625,137,344    57,159,207  83 Linux


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda1        4B8B-039A                              vfat                                     
/dev/sda3        8070B0E470B0E1D8                       ntfs       OS                            
/dev/sda5        cd67bba8-1a7f-4be0-8263-1a6d9ad03111   swap                                     
/dev/sda6        bf26e330-5ba7-4efe-a0b0-557a04c535cd   ext4                                     
/dev/sda7        84b8941d-815a-4a1b-b277-63666a7d3677   ext4                                     
/dev/sda8        530c7959-56d7-4298-a5eb-eca90faa1dc4   ext4                                     

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

/dev/sda7        /                        ext4       (rw,errors=remount-ro)
/dev/sda6        /boot                    ext4       (rw)
/dev/sda8        /home                    ext4       (rw)
/dev/sda1        /media/4B8B-039A         vfat       (rw,nosuid,nodev,uhelper=devkit,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,flush)


============================= sda6/grub/grub.cfg: =============================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
  have_grubenv=true
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  saved_entry=${prev_saved_entry}
  save_env saved_entry
  prev_saved_entry=
  save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,7)
search --no-floppy --fs-uuid --set 84b8941d-815a-4a1b-b277-63666a7d3677
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-19-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    set quiet=1
    insmod ext2
    set root=(hd0,6)
    search --no-floppy --fs-uuid --set bf26e330-5ba7-4efe-a0b0-557a04c535cd
    linux    /vmlinuz-2.6.31-19-generic root=UUID=84b8941d-815a-4a1b-b277-63666a7d3677 ro   quiet splash
    initrd    /initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-19-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    insmod ext2
    set root=(hd0,6)
    search --no-floppy --fs-uuid --set bf26e330-5ba7-4efe-a0b0-557a04c535cd
    linux    /vmlinuz-2.6.31-19-generic root=UUID=84b8941d-815a-4a1b-b277-63666a7d3677 ro single 
    initrd    /initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-17-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    set quiet=1
    insmod ext2
    set root=(hd0,6)
    search --no-floppy --fs-uuid --set bf26e330-5ba7-4efe-a0b0-557a04c535cd
    linux    /vmlinuz-2.6.31-17-generic root=UUID=84b8941d-815a-4a1b-b277-63666a7d3677 ro   quiet splash
    initrd    /initrd.img-2.6.31-17-generic
}
menuentry "Ubuntu, Linux 2.6.31-17-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    insmod ext2
    set root=(hd0,6)
    search --no-floppy --fs-uuid --set bf26e330-5ba7-4efe-a0b0-557a04c535cd
    linux    /vmlinuz-2.6.31-17-generic root=UUID=84b8941d-815a-4a1b-b277-63666a7d3677 ro single 
    initrd    /initrd.img-2.6.31-17-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    set quiet=1
    insmod ext2
    set root=(hd0,6)
    search --no-floppy --fs-uuid --set bf26e330-5ba7-4efe-a0b0-557a04c535cd
    linux    /vmlinuz-2.6.31-14-generic root=UUID=84b8941d-815a-4a1b-b277-63666a7d3677 ro   quiet splash
    initrd    /initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    insmod ext2
    set root=(hd0,6)
    search --no-floppy --fs-uuid --set bf26e330-5ba7-4efe-a0b0-557a04c535cd
    linux    /vmlinuz-2.6.31-14-generic root=UUID=84b8941d-815a-4a1b-b277-63666a7d3677 ro single 
    initrd    /initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    linux16    /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    linux16    /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda2)" {
    insmod ntfs
    set root=(hd0,2)
    search --no-floppy --fs-uuid --set 8eecaf0aecaeeba1
    chainloader +1
}
### END /etc/grub.d/30_os-prober ###

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

=================== sda6: Location of files loaded by Grub: ===================


 274.7GB: grub/core.img
 274.7GB: grub/grub.cfg
 274.7GB: initrd.img-2.6.31-14-generic
 274.7GB: initrd.img-2.6.31-17-generic
 274.7GB: initrd.img-2.6.31-19-generic
 274.7GB: vmlinuz-2.6.31-14-generic
 274.7GB: vmlinuz-2.6.31-17-generic
 274.7GB: vmlinuz-2.6.31-19-generic

=============================== sda7/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sda7 during installation
UUID=84b8941d-815a-4a1b-b277-63666a7d3677 /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda6 during installation
UUID=bf26e330-5ba7-4efe-a0b0-557a04c535cd /boot           ext4    defaults        0       2
# /home was on /dev/sda8 during installation
UUID=530c7959-56d7-4298-a5eb-eca90faa1dc4 /home           ext4    defaults        0       2
# swap was on /dev/sda5 during installation
UUID=cd67bba8-1a7f-4be0-8263-1a6d9ad03111 none            swap    sw              0       0

=================== sda7: Location of files loaded by Grub: ===================


 274.8GB: initrd.img
 274.8GB: initrd.img.old
 274.8GB: vmlinuz
 274.8GB: vmlinuz.old

So how do I do to put win7 at grub (as an option) with the right UUID?

#356

picknick said: Thanks a lot!!! But I dind't repear it. I have been looking the situation closely. The second link you sent me the one that reefer to the "search" command.

I follow the steps that are recommended there. I realized that the UUID that the grub was looking for when I choose win7 to boot is wrong. Maybe this is because I erase the partition that grub was reefering to.

So, when I updated grub with

sudo udpate-grub

and restart I found that the win7 option wasn't there to boot. Which makes more reliable my theory (but I don't know really).

Fortunately, thanks to you, I use bootscript before and after the update-grub. I tried to edit boot.cfg from "grub-mkconfig_lib" but I don't know how to handle it. I can't tell him how to see win7 partitoin (maybe that partition does not have the information to boot, but again I don't know).

picknick

P.D.: I will paste here the first result of bootscript. The only difference with the last one (the one I made after update-grub) is that the lines

that are at line 219, don't appears.


                Boot Info Script 0.55    dated February 15th, 2010                    

============================= Boot Info Summary: ==============================

 => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
    partition #6 for /grub.

sda1: _________________________________________________________________________

    File system:       vfat
    Boot sector type:  Fat32
    Boot sector info:  According to the info in the boot sector, sda1 starts 
                       at sector 0. But according to the info from fdisk, 
                       sda1 starts at sector 63.
    Operating System:  
    Boot files/dirs:   

sda3: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files/dirs:   /Windows/System32/winload.exe

sda4: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info:  

sda5: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

sda6: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files/dirs:   /grub/grub.cfg /grub/core.img

sda7: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Ubuntu 9.10
    Boot files/dirs:   /etc/fstab

sda8: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files/dirs:   

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disco /dev/sda: 320.1 GB, 320072933376 bytes
255 cabezas, 63 sectores/pista, 38913 cilindros, 625142448 sectores en total
Unidades = sectores de 1 * 512 = 512 bytes
Identificador de disco: 0xb63575e1

Partition  Boot         Start           End          Size  Id System

/dev/sda1                  63    30,796,604    30,796,542   b W95 FAT32
/dev/sda3          30,801,920   518,944,498   488,142,579   7 HPFS/NTFS
/dev/sda4         518,947,695   625,137,344   106,189,650   5 Extended
/dev/sda5         518,947,758   536,522,804    17,575,047  82 Linux swap / Solaris
/dev/sda6         536,522,868   536,731,649       208,782  83 Linux
/dev/sda7         536,731,713   567,978,074    31,246,362  83 Linux
/dev/sda8         567,978,138   625,137,344    57,159,207  83 Linux


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda1        4B8B-039A                              vfat                                     
/dev/sda3        8070B0E470B0E1D8                       ntfs       OS                            
/dev/sda5        cd67bba8-1a7f-4be0-8263-1a6d9ad03111   swap                                     
/dev/sda6        bf26e330-5ba7-4efe-a0b0-557a04c535cd   ext4                                     
/dev/sda7        84b8941d-815a-4a1b-b277-63666a7d3677   ext4                                     
/dev/sda8        530c7959-56d7-4298-a5eb-eca90faa1dc4   ext4                                     

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

/dev/sda7        /                        ext4       (rw,errors=remount-ro)
/dev/sda6        /boot                    ext4       (rw)
/dev/sda8        /home                    ext4       (rw)
/dev/sda1        /media/4B8B-039A         vfat       (rw,nosuid,nodev,uhelper=devkit,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,flush)


============================= sda6/grub/grub.cfg: =============================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
  have_grubenv=true
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  saved_entry=${prev_saved_entry}
  save_env saved_entry
  prev_saved_entry=
  save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,7)
search --no-floppy --fs-uuid --set 84b8941d-815a-4a1b-b277-63666a7d3677
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-19-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    set quiet=1
    insmod ext2
    set root=(hd0,6)
    search --no-floppy --fs-uuid --set bf26e330-5ba7-4efe-a0b0-557a04c535cd
    linux    /vmlinuz-2.6.31-19-generic root=UUID=84b8941d-815a-4a1b-b277-63666a7d3677 ro   quiet splash
    initrd    /initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-19-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    insmod ext2
    set root=(hd0,6)
    search --no-floppy --fs-uuid --set bf26e330-5ba7-4efe-a0b0-557a04c535cd
    linux    /vmlinuz-2.6.31-19-generic root=UUID=84b8941d-815a-4a1b-b277-63666a7d3677 ro single 
    initrd    /initrd.img-2.6.31-19-generic
}
menuentry "Ubuntu, Linux 2.6.31-17-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    set quiet=1
    insmod ext2
    set root=(hd0,6)
    search --no-floppy --fs-uuid --set bf26e330-5ba7-4efe-a0b0-557a04c535cd
    linux    /vmlinuz-2.6.31-17-generic root=UUID=84b8941d-815a-4a1b-b277-63666a7d3677 ro   quiet splash
    initrd    /initrd.img-2.6.31-17-generic
}
menuentry "Ubuntu, Linux 2.6.31-17-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    insmod ext2
    set root=(hd0,6)
    search --no-floppy --fs-uuid --set bf26e330-5ba7-4efe-a0b0-557a04c535cd
    linux    /vmlinuz-2.6.31-17-generic root=UUID=84b8941d-815a-4a1b-b277-63666a7d3677 ro single 
    initrd    /initrd.img-2.6.31-17-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    set quiet=1
    insmod ext2
    set root=(hd0,6)
    search --no-floppy --fs-uuid --set bf26e330-5ba7-4efe-a0b0-557a04c535cd
    linux    /vmlinuz-2.6.31-14-generic root=UUID=84b8941d-815a-4a1b-b277-63666a7d3677 ro   quiet splash
    initrd    /initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    insmod ext2
    set root=(hd0,6)
    search --no-floppy --fs-uuid --set bf26e330-5ba7-4efe-a0b0-557a04c535cd
    linux    /vmlinuz-2.6.31-14-generic root=UUID=84b8941d-815a-4a1b-b277-63666a7d3677 ro single 
    initrd    /initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    linux16    /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    linux16    /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda2)" {
    insmod ntfs
    set root=(hd0,2)
    search --no-floppy --fs-uuid --set 8eecaf0aecaeeba1
    chainloader +1
}
### END /etc/grub.d/30_os-prober ###

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

=================== sda6: Location of files loaded by Grub: ===================


 274.7GB: grub/core.img
 274.7GB: grub/grub.cfg
 274.7GB: initrd.img-2.6.31-14-generic
 274.7GB: initrd.img-2.6.31-17-generic
 274.7GB: initrd.img-2.6.31-19-generic
 274.7GB: vmlinuz-2.6.31-14-generic
 274.7GB: vmlinuz-2.6.31-17-generic
 274.7GB: vmlinuz-2.6.31-19-generic

=============================== sda7/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sda7 during installation
UUID=84b8941d-815a-4a1b-b277-63666a7d3677 /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda6 during installation
UUID=bf26e330-5ba7-4efe-a0b0-557a04c535cd /boot           ext4    defaults        0       2
# /home was on /dev/sda8 during installation
UUID=530c7959-56d7-4298-a5eb-eca90faa1dc4 /home           ext4    defaults        0       2
# swap was on /dev/sda5 during installation
UUID=cd67bba8-1a7f-4be0-8263-1a6d9ad03111 none            swap    sw              0       0

=================== sda7: Location of files loaded by Grub: ===================


 274.8GB: initrd.img
 274.8GB: initrd.img.old
 274.8GB: vmlinuz
 274.8GB: vmlinuz.old

So how do I do to put win7 at grub (as an option) with the right UUID?

The first thing I notice is that you have no boot flag set on sda3 which is your Win 7 partition. You can set a boot flag on it using Gparted:

[ATTACH]149291[/ATTACH]

But you might also be missing some Win 7 boot files, yours is in black below and mine is in red:

sda3: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files/dirs:   /Windows/System32/winload.exe
                       **[COLOR="Red"]/bootmgr /Boot/BCD /Windows/System32/winload.exe[/COLOR]**

Maybe you deleted the partition (sda2?) that held that part of the Win 7 boot files :o

If you have a Win 7 disc that may be recoverable, I'm not sure.

#357

You can set a boot flag on it using Gparted

+1

If you have a Win 7 disc that may be recoverable,

Yes, it is. But even if you don't have a Win 7 CD you can download one.

Detailed instructions:

boot from your Windows 7 CD/DVD. (If you do not have one, you can download a Windows 7 repair CD from here)

At the first screen select your favorite language. At the second screen choose "Repair your Computer".

If a pop up appears, offering to repair a problem with the "Startup options", click on "Repair and restart".

Otherwise, on the next screen select "Use recovery tools ..." and click on "Next". Choose "Startup Repair" at the next screen.

"Startup Repair" tends to fix one problem at the time. So you might have to run "Startup Repair" several times.

After running startup repair, boot into Ubuntu and run

sudo update-grub
#358

Thanks Meierfra.

I'm curious if anyone has a list of all the grub2 files that are supposed to be executable?

No rush just wanting to satisfy my curiosity.

HMMMMMMMMM, as I look I wonder if it's just everything in "/etc/grub.d"????????

#359

Thanks to kansasnoob and meierfra!!!

Now I can boot win7 again. I put the boot flag, used the recovery cd 2 times (at the link) and did the


sudo update-grub

As kansasnoob said my output of bootsript shows me the right boot files of win7 for grub.

sda3: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files/dirs:   /bootmgr /Boot/BCD /Windows/System32/winload.exe

Something else: now the UUID that appears at the boot.cfg is the same that blkid returns.

Thanks a lot!!!!

#360

Ok, I have two questions. First, why is it not advised to install GRUB to the linux partition instead of the MBR? I currently have Windows 7 as the default OS, and I used EasyBCD to add the GRUB2 for my Xubuntu 8.10 install to the Windows 7 Bootloader. What issues could this cause me? I am doing it this way so that Windows 7 will boot if the machine comes out of Hibernate.

Which brings me to my next question. Can I set up GRUB to do this for me? As in, does GRUB2 have a way to detect if my (Windows or linux) installs were hibernated and boot into the hibernated one? Thanks in advance.

#361

exoren22 said: Ok, I have two questions. First, why is it not advised to install GRUB to the linux partition instead of the MBR? ...

Which brings me to my next question. Can I set up GRUB to do this for me? As in, does GRUB2 have a way to detect if my (Windows or linux) installs were hibernated and boot into the hibernated one? Thanks in advance.

Installing to a specific partition requires the use of blocklists, which makes booting slightly more unreliable since booting fails if core.img is moved.

I believe that with recent Grub 2 updates when the user now tries to install on a specific partition the user is presented with a brief explanation.

I don't know the answer to the second question.

#362

What issues could this cause me?

None.

Grub2 installed in a boot sector is bit more unreliable since it has to located core.img by the physical address. So one has to reinstall Grub anytime core.img gets moved. Also Grub 2 in the boot sector does not come with the "rescure" mod.

But EasyBCD 2 does not use the boot sector. It uses Grub4Dos, which is able to locate core.img by name. So you should not run into any problems.

does GRUB2 have a way to detect if my (Windows or linux) installs were hibernated and boot into the hibernated one?

Grub2 does not need to detect whether Windows or linux is hibernating

For windows: Grub2 calls the Windows boot loader, which then is in charge of booting the hibernated system

For linux: Grub2 calls the kernel, which then will wake up the hibernated system.

So Grub2 works just fine with hibernation.

#363

I have 2 recurring problems. 1 is with gfxpayload which, hopefully, will be fixed in 1.98. No matter what I try, I cannot get my intel graphics normalized to 1024x768 so I can use the framebuffer except if i use "nomodeset vga-792" in the command line. I will await this fix and see.

the other problem is that sometimes after a shutdown (abrupt power disconnect), Grub2 will just sit and wait at the menu screen until I hit enter. Most reboots fly right into the OS, but every so often it will glitch like this. This is on a kiosk type project and I cannot control how or when the power will be removed. The OS is running off a flash card.

keithspg

#364

keithspg said: I have 2 recurring problems. 1 is with gfxpayload which, hopefully, will be fixed in 1.98. No matter what I try, I cannot get my intel graphics normalized to 1024x768 so I can use the framebuffer except if i use "nomodeset vga-792" in the command line. I will await this fix and see.

the other problem is that sometimes after a shutdown (abrupt power disconnect), Grub2 will just sit and wait at the menu screen until I hit enter. Most reboots fly right into the OS, but every so often it will glitch like this. This is on a kiosk type project and I cannot control how or when the power will be removed. The OS is running off a flash card.

keithspg

1, I am using 1.98 in Lucid and still can't get gfxpayload to set the system resolution. I've tried setting a specific resolution and I've tried gfxpayload=keep but have been unsuccessful. I haven't pursued this to any great extent since I have a couple of other minor graphics issues that may or may not influence this topic.

  1. Most likely the system is awaiting user input because of the "recordfail" check. If Grub 2 detects a problem it forces the user to make an input rather than proceed on its on. I don't know all the specifics of what conditions create a recordfail event, but the 00_header section that forces the check (and subsequent pause in the boot) is this section of /etc/grub.d/00_header:

cat << EOF [B]if [ \${recordfail} = 1 ]; then set timeout=-1 else[/B] set timeout=${GRUB_TIMEOUT} fi EOF

There were some bugs early on in Grub 2 and the solution was to disable the lines in bold by placing a # symbol at the start of the line. Disabling this would remove the feature - whether or not you want to do so is up to you.

#365

meierfra. said: None.

But EasyBCD 2 does not use the boot sector. It uses Grub4Dos, which is able to locate core.img by name. So you should not run into any problems.

But does it still use Grub4Dos if you don't use NeoGRUB? I installed GRUB2 to /dev/sda6 in this case, which is the Xubuntu partition. Then in EasyBCD I selected the GRUB 2 option and added it in.

meierfra. said:

Grub2 does not need to detect whether Windows or linux is hibernating

For windows: Grub2 calls the Windows boot loader, which then is in charge of booting the hibernated system

For linux: Grub2 calls the kernel, which then will wake up the hibernated system.

Ok, what I mean is, I want it to boot to the hibernated partition automatically, which is usually in this case Windows. I don't want to select the OS to wake it up. Though I think setting the default setting to the last booted OS should work.

#366

Wow, 37 pages, 365 post - makes me scared to try dual boot for friends vista laptop. too much for me to read - too complicated. This guy's vista is already bad, I've spent the whole last week trying to fix Blu screens after cleaning viruses off and trying to put SP1 on. Can't get it to take SP1. It kills vista every time and takes a day of running chkdsk to fix after following all of MS instructions to prep for SP1.

Can anyone point me to a thread that sums this up as in step by step instructions to get 9.1 and vista to work easily?

I'm 110% Ubuntu and trying to spread the goodness, but don't want to spread any problems and don't want Ubuntu to be blamed for messing up his computer. Suggestions welcome - THANKS, BT

#367

I recommend the link in my sig. Just the first post. This will give you a basic working knowledge of grub.

The interaction between grub and MS products is actually pretty smooth if you have a clean install that came with grub (as opposed to grub-legacy). If you are installing 9.04 and upgrading to 9.10, purge the "grub" and "grub-common" packages and install "grub-pc" and "grub-common" before the upgrade.

If you want a newer, and I think, better grub for 9.10, get hold of grub1.98 and the grub-common that goes with it. It is really only with updated systems (with residual grub-legacy) and dual booting with non debian based OS' that problems still occur and they are getting rarer all the time.

Grub is different and you do need to learn to work with it but there are a couple things to remember. 1>grub0.97 just could not keep up with some of the file systems and storage devices coming out, it seems, every other month. 2>grub0.97 is no longer supported.

If you are running 9.04, for instance you are actually running grub-common1.96 which will support both versions of grub but has installed files on your system that will be used by grub1.96.

There was a lag in the documentation at the start. Most good documentation was from hermans (forum member) blog. drs305, the poster of this thread, has done wonders to get that straightened out along with several others.

This is the best in depth coverage you will find anywhere.

Avoid non community documentation as i am convinced that many have never even seen the new grub and have you really screwing up. This is a major source of posts to this and other grub threads on the forums where they should have looked first.

#368

I am curious about something if meierfra happens to see this. My results from the Boot Info Script show:

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
    partition #3 for /boot/grub.
 => Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in 
    partition #3 for /boot/grub.

Which I know is incorrect.

I will file a new release soon, which will remove the wrong information. But unfortunately, the boot info script will no be able to replace the wrong information by the correct one.

If the grub folder is not on the boot drive, Grub 2 uses UUID's to located the partition with the grub folder. In Grub1.96 and Grub1.97, the UUID was directly embedded into sector 5 of the hard drive. In Grub 1.98, the UUID's appears in the later sectors of the hard drive. Those sectors have been compressed before being embedded.

This means that I have no idea how to retrieve the UUID's from the MBR and the boot info script will no longer be able to display on which partition Grub2 is looking for the grub folder.

#369

peter b said: re #275

@drs305 as promised and anyone interested; rescue floppy created and working ok1.

procedure attached ==> grub2-floppy-setup.txt

floppy contents attached ==> grub2-floppy-contents.txt

nautilus contents ==> grub2-nautilus-content_part.png

floppy properties ==> grub2-floppy0-properties.png

pls note the size on floppy approx 740 Kb - I'd say v elegant, inexpensive and slick (I guess small is beautiful always).

and, to cap it all off, I get the desired sh:grub> prompt if 'c' is entered at grub menu.

grub 1.97 beta4 used from current karmic release.

Can this be placed on a CD?

#370

@ TutAmongUs

for a grub2 rescue CD pls take a look at

http://members.iinet.net/~herman546/p20/GRUB2%20Bash%20Commands.html#GRUB2_CD-ROM

mind you, I never done it; I prefer to use the floppy route for obvious reasons.

#371

drs305 said: 1, I am using 1.98 in Lucid and still can't get gfxpayload to set the system resolution. I've tried setting a specific resolution and I've tried gfxpayload=keep but have been unsuccessful. I haven't pursued this to any great extent since I have a couple of other minor graphics issues that may or may not influence this topic.

Yea! I finally was able to get a 1280x800 grub menu and a 1280x800 VT!

I was helped here: http://harrison3001.blogspot.com/2009/09/grub-2-graphical-boot-tips-to-set.html

summary: edit /etc/modules by adding these lines:

fbcon uvesafb vbemode=353

#sudo update-initramfs -u

add the lines to 00_header and grub and update-grub. If you want to see what resolutions your card can handle, get a grub prompt and type vbeinfo and use the decimal version of the value you want in the vbemode= line above.

Keith

#372

keithspg said: Yea! I finally was able to get a 1280x800 grub menu and a 1280x800 VT!

Thanks Keith. I will play around with those settings. I was hoping that there would be nothing more than /etc/default/grub which needed tweaking but perhaps that is too much to expect at this point.

#373

I have an Ubuntu server 9.10 64bit running as a kvm virtual guest. The server should always boot to the linux prompt and it usually does so but sometimes it stops at the grub menu. There i have one single choice: Ubuntu, Linux 2.6.31-14-generic-pae, i have to press enter to proceed booting. This is annoying because i usually only connect by ssh, so i have to start a graphical user interface on the vm host connect to that and open the vm console to confirm the menu entry. By simply restarting the virtual machine i was never able to reproduce this, but it looks like it is occurring almost every time when i start the vm after a restart of the host. Any help is appreciated.

Here some additional infos: GNU GRUB version 1.97~beta4

/etc/default/grub: GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT="3" GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" GRUB_TERMINAL=console GRUB_DISABLE_LINUX_RECOVERY="true"

/boot/grub/grub.cfg: ... menuentry "Ubuntu, Linux 2.6.31-14-generic-pae" { recordfail=1 if [ -n ${have_grubenv} ]; then save_env recordfail; fi set quiet=1 insmod ext2 set root=(hd0,1) search --no-floppy --fs-uuid --set 2d64b7b2-3ec2-45e2-acca-a90d4f6c4e78 linux /boot/vmlinuz-2.6.31-14-generic-pae root=UUID=2d64b7b2-3ec2-45e2-acca-a90d4f6c4e78 ro quiet splash initrd /boot/initrd.img-2.6.31-14-generic-pae } ...

#374

oyo said: ... but it looks like it is occurring

almost every time when i start the vm after a restart of the host. Any help is appreciated.

There is a good chance this is occurring because Grub2 is finding a "recordfail". What produces the recordfail varies, but you can try to reset the value with this command:

sudo grub-editenv unset recordfail

This may allow you to boot without the pause, however if a recordfail event subsequently occurs your system will pause again at the boot menu.

You can take a more agressive approach by disabling the recordfail check in /etc/grub.d/00_header. This isn't of course the optimum solution but if the problem causing the event can't be identified, this is a workaround.

In version 1.98, The lines to alter are below (approximately line 150 of /etc/grub.d/00_header). The changes are in [COLOR="Red"]red[/COLOR]:

cat << EOF

[COLOR="Red"]#[/COLOR]if [ \${recordfail} = 1 ]; then [COLOR="Red"]#[/COLOR] set timeout=-1 [COLOR="Red"]#[/COLOR]else set timeout=${GRUB_TIMEOUT} [COLOR="Red"]#[/COLOR]fi EOF

Save the file and then run "sudo update-grub"

#375

I've discussed my trials and tribulations with upgrading from 64-bit Karmic to Lucid on [_[COLOR="Blue"]this thread[/COLOR]_]("http://ubuntuforums.org/showthread.php?t=1435093"). I thought they were over and marked the thread as «solved», until I discovered that while I can indeed run Lucid on my HP Pavilion dv9000 box, GRUB can no longer be used to boot it into Vista Business (for the sake of explicitness, the laptop concerned boasts a dual-core AMD Turion 64 X2 TL-56 processor and two 120 GB HDD. One, /dev/sda is used for the Windows OS, the other, /dev/sdb for Ubuntu). As was the case prior to the upgrade usual, GRUB lists my Linux kernels (with 2.6.32-17 as the current default) mem-tests, and then Windows Vista (loader) on /dev/sda1 (before the GRUB menu appears, I see the following notice on my screen :

udevd-work [355] open /dev/null failed : No such file or directory

which may or may not be relevant here). Aside from minor problems with Nvidia, I have no trouble booting into Ubuntu ; if, however, I select the the Windows Vista loader, instead of booting into Vista, the machine restarts and the GRUB menu once more appears ! When I perform

/etc/grub.d/30_os-prober

as root, I get the following results :

Found Windows Vista (loader) on /dev/sda1

menuentry "Windows Vista (loader) (on /dev/sda1)" { insmod ntfs set root='(hd0,1)' search --no-floppy --fs-uuid --set 72746dd9746da099 chainloader +1 } Found Windows Vista (loader) on /dev/sda2 menuentry "Windows Vista (loader) (on /dev/sda2)" { insmod ntfs set root='(hd0,2)' search --no-floppy --fs-uuid --set 2c88743c8874071c chainloader +1 which corresponds pretty closely to the *status quo ante*, save for the fact that the string (hd0,1) was not surrounded by single quotation marks (' ') in Karmic (this seems to be one of the differences obtaining between Karmic and Lucid code - I experimented with removing them in GRUB, but they always reappeared).

I've checked with Gparted, and the /dev/sda1 NTFS partition is flagged as «boot».

Any suggestions as to how I could recover the ability to boot into the Vista partition ?...

Henri

#376

run grub-mkconfig then update-grub

#377

Thanks for your speedy reply, dino99 (cool penguin, by the way) ! Below what displayed in my terminal upon my performing

sudo grub-mkconfig

and

sudo update-grub

[sudo] password for mhenriday:

Generating grub.cfg ... #

DO NOT EDIT THIS FILE

#

It is automatically generated by /usr/sbin/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 load_env fi set default="0" 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 } insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=640x480 insmod gfxterm insmod vbe if terminal_output gfxterm ; then true ; else # For backward compatibility with versions of terminal.mod that don't # understand terminal_output terminal gfxterm fi fi insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 set locale_dir=($root)/boot/grub/locale set lang=sv insmod gettext if [ ${recordfail} = 1 ]; then set timeout=-1 else set timeout=5 fi

END /etc/grub.d/00_header ###

BEGIN /etc/grub.d/05_debian_theme ###

set menu_color_normal=white/black set menu_color_highlight=black/light-gray

END /etc/grub.d/05_debian_theme ###

BEGIN /etc/grub.d/10_linux ###

Found linux image: /boot/vmlinuz-2.6.32-17-generic Found initrd image: /boot/initrd.img-2.6.32-17-generic menuentry "Ubuntu, med Linux 2.6.32-17-generic" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 linux /boot/vmlinuz-2.6.32-17-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro quiet splash initrd /boot/initrd.img-2.6.32-17-generic } menuentry "Ubuntu, med Linux 2.6.32-17-generic (återställningsläge)" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 echo Läser in Linux 2.6.32-17-generic ... linux /boot/vmlinuz-2.6.32-17-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro single echo Läser in initial ramdisk ... initrd /boot/initrd.img-2.6.32-17-generic } Found linux image: /boot/vmlinuz-2.6.32-16-generic Found initrd image: /boot/initrd.img-2.6.32-16-generic menuentry "Ubuntu, med Linux 2.6.32-16-generic" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 linux /boot/vmlinuz-2.6.32-16-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro quiet splash initrd /boot/initrd.img-2.6.32-16-generic } menuentry "Ubuntu, med Linux 2.6.32-16-generic (återställningsläge)" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 echo Läser in Linux 2.6.32-16-generic ... linux /boot/vmlinuz-2.6.32-16-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro single echo Läser in initial ramdisk ... initrd /boot/initrd.img-2.6.32-16-generic } Found linux image: /boot/vmlinuz-2.6.31-20-generic Found initrd image: /boot/initrd.img-2.6.31-20-generic menuentry "Ubuntu, med Linux 2.6.31-20-generic" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 linux /boot/vmlinuz-2.6.31-20-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro quiet splash initrd /boot/initrd.img-2.6.31-20-generic } menuentry "Ubuntu, med Linux 2.6.31-20-generic (återställningsläge)" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 echo Läser in Linux 2.6.31-20-generic ... linux /boot/vmlinuz-2.6.31-20-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro single echo Läser in initial ramdisk ... initrd /boot/initrd.img-2.6.31-20-generic }

END /etc/grub.d/10_linux ###

BEGIN /etc/grub.d/20_memtest86+ ###

Found memtest86+ image: /boot/memtest86+.bin menuentry "Memory test (memtest86+)" { insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 linux16 /boot/memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 linux16 /boot/memtest86+.bin console=ttyS0,115200n8 }

END /etc/grub.d/20_memtest86+ ###

BEGIN /etc/grub.d/30_os-prober ###

Found Windows Vista (loader) on /dev/sda1 menuentry "Windows Vista (loader) (on /dev/sda1)" { insmod ntfs set root='(hd0,1)' search --no-floppy --fs-uuid --set 72746dd9746da099 chainloader +1 } Found Windows Vista (loader) on /dev/sda2 menuentry "Windows Vista (loader) (on /dev/sda2)" { insmod ntfs set root='(hd0,2)' search --no-floppy --fs-uuid --set 2c88743c8874071c chainloader +1 }

END /etc/grub.d/30_os-prober ###

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

done mhenriday@mhenriday-baerbar:~$ sudo update-grub Generating grub.cfg ... Found linux image: /boot/vmlinuz-2.6.32-17-generic Found initrd image: /boot/initrd.img-2.6.32-17-generic Found linux image: /boot/vmlinuz-2.6.32-16-generic Found initrd image: /boot/initrd.img-2.6.32-16-generic Found linux image: /boot/vmlinuz-2.6.31-20-generic Found initrd image: /boot/initrd.img-2.6.31-20-generic Found memtest86+ image: /boot/memtest86+.bin Found Windows Vista (loader) on /dev/sda1 Found Windows Vista (loader) on /dev/sda2 done

Alas, no joy ; I still can't boot into Vista. Don't know if the fact that the line «recordfail» appears under the Linux kernels listed but not under the Vista loaders could be relevant here ; in any event, it does not appear under the memtests, which seem to be working fine....

Henri

#378

Add your WinJerryLewis Pro entry in the /etc/grub.d/40_custom file.

There has to be an example of that in this list, I can't give you one as this house is not polluted by MS products. Sorry.

I will be surprised if that does not do it for you.

#379

mhenriday said: Thanks for your speedy reply, dino99 (cool penguin, by the way) ! Below what displayed in my terminal upon my performing

sudo grub-mkconfig

and

sudo update-grub

Alas, no joy ; I still can't boot into Vista. Don't know if the fact that the line «recordfail» appears under the Linux kernels listed but not under the Vista loaders could be relevant here ; in any event, it does not appear under the memtests, which seem to be working fine....

Henri

Would you please post the full output from the Boot Info Script as described here:

http://bootinfoscript.sourceforge.net/

Please either compress the RESULTS.txt and attach the tar.gz or use CODE tags by clicking on the # in the reply box.

The output of that script can be very helpful :)

Edit: Feel free to PM me once you post that info just to point me back here, but let's keep the bulk of our conversation here.

#380

I've been doing some comparisons between two separate Lucid installs on my machine and I have an anomaly. The following is from the /etc/default/grub of each:

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="60"
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
[B]GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="splash quiet"[/B]
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
**GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"**
GRUB_CMDLINE_LINUX=""

Both are nearly virgin installs, just a few days apart. What do you think might be up with that?

I'm wondering if I should file a bug report?

#381

kansasnoob said: I've been doing some comparisons between two separate Lucid installs on my machine and I have an anomaly.

I'm wondering if I should file a bug report?

I just updated today and chose the maintainer's version. It matches your second entry, which has been the standard. I don't know how your first entry was created, but since the second (latest) is correct, unless you can duplicate the first one I wouldn't file a bug quite yet.

#382

Where these installed before or after the recent grub updates?

If before, I would remove and install grub and see what happens. I would save a copy of all the files pertaining to grub.

I had to reinstall grub on one of my installs because it was having trouble replacing some of the files. The rest of the installs had no problem.

#383

kansasnoob said: Would you please post the full output from the Boot Info Script as described here:

http://bootinfoscript.sourceforge.net/

... Thanks for the reply, kansasnoob ! Below the contents of the RESULT.txt file created by following the instructions at SourceForge :

Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in partition #1 for /boot/grub. => Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in partition #1 for /boot/grub.

sda1: _________________________________________________________________________

File system: ntfs Boot sector type: Grub 2 Boot sector info: Grub 2 is installed in the boot sector of sda1 and looks at sector 207620287 of the same hard drive for core.img, but core.img can not be found at this location. No errors found in the Boot Parameter Block. Operating System: Windows Vista Boot files/dirs: /bootmgr /boot/bcd /Windows/System32/winload.exe

sda2: _________________________________________________________________________

File system: ntfs Boot sector type: Grub 2 Boot sector info: Grub 2 is installed in the boot sector of sda2 and looks at sector 207620287 of the same hard drive for core.img, but core.img can not be found at this location. No errors found in the Boot Parameter Block. Operating System: Boot files/dirs: /bootmgr /boot/BCD

sdb1: _________________________________________________________________________

File system: ext4 Boot sector type: Grub 2 Boot sector info: Grub 2 is installed in the boot sector of sdb1 and looks at sector 207620287 of the same hard drive for core.img, but core.img can not be found at this location. Operating System: Ubuntu lucid (development branch) Boot files/dirs: /boot/grub/menu.lst /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sdb2: _________________________________________________________________________

File system: Extended Partition Boot sector type: - Boot sector info:

sdb5: _________________________________________________________________________

File system: swap Boot sector type: - Boot sector info:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 120,0 GB, 120034123776 byte 255 huvuden, 63 sektorer/spår, 14593 cylindrar, totalt 234441648 sektorer Enheter = sektorer av 1 · 512 = 512 byte Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 * 63 221,761,259 221,761,197 7 HPFS/NTFS /dev/sda2 221,761,260 234,436,544 12,675,285 7 HPFS/NTFS

Drive: sdb ___________________ _____________________________________________________

Disk /dev/sdb: 120,0 GB, 120034123776 byte 255 huvuden, 63 sektorer/spår, 14593 cylindrar, totalt 234441648 sektorer Enheter = sektorer av 1 · 512 = 512 byte Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sdb1 * 63 224,829,674 224,829,612 83 Linux /dev/sdb2 224,829,675 234,436,544 9,606,870 5 Extended /dev/sdb5 224,829,738 234,436,544 9,606,807 82 Linux swap / Solaris

blkid -c /dev/null: ____________________________________________________________

Device UUID TYPE LABEL

/dev/sda1 72746DD9746DA099 ntfs OS /dev/sda2 2C88743C8874071C ntfs HP_RECOVERY /dev/sda: PTTYPE="dos" /dev/sdb1 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ext4 /dev/sdb2: PTTYPE="dos" /dev/sdb5 32898ee4-5c34-426e-aace-b9afceccc9f5 swap /dev/sdb: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

/dev/sdb1 / ext4 (rw,relatime,errors=remount-ro)

=========================== sdb1/boot/grub/menu.lst: ===========================

menu.lst - See: grub(8), info grub, update-grub(8)

grub-install(8), grub-floppy(8),

grub-md5-crypt, /usr/share/doc/grub

and /usr/share/doc/grub-doc/.

default num

Set the default entry to the entry number NUM. Numbering starts from 0, and

the entry number 0 is the default if the command is not used.

#

You can specify 'saved' instead of a number. In this case, the default entry

is the entry saved with the command 'savedefault'.

WARNING: If you are using dmraid do not use 'savedefault' or your

array will desync and will not let you boot your system.

default 0

timeout sec

Set a timeout, in SEC seconds, before automatically booting the default entry

(normally the first entry defined).

timeout 10

hiddenmenu

Hides the menu by default (press ESC to see the menu)

#hiddenmenu

Pretty colours

#color cyan/blue white/blue

password ['--md5'] passwd

If used in the first section of a menu file, disable all interactive editing

control (menu entry editor and command-line) and entries protected by the

command 'lock'

e.g. password topsecret

password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/

password topsecret

#

examples

#

title Windows 95/98/NT/2000

root (hd0,0)

makeactive

chainloader +1

#

title Linux

root (hd0,1)

kernel /vmlinuz root=/dev/hda2 ro

#

#

Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

BEGIN AUTOMAGIC KERNELS LIST

lines between the AUTOMAGIC KERNELS LIST markers will be modified

by the debian update-grub script except for the default options below

DO NOT UNCOMMENT THEM, Just edit them to your needs

## Start Default Options ##

default kernel options

default kernel options for automagic boot options

If you want special options for specific kernels use kopt_x_y_z

where x.y.z is kernel version. Minor versions can be omitted.

e.g. kopt=root=/dev/hda1 ro

kopt_2_6_8=root=/dev/hdc1 ro

kopt_2_6_8_2_686=root=/dev/hdc2 ro

kopt=root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro

default grub root device

e.g. groot=(hd0,0)

groot=(hd1,0)

should update-grub create alternative automagic boot options

e.g. alternative=true

alternative=false

alternative=true

should update-grub lock alternative automagic boot options

e.g. lockalternative=true

lockalternative=false

lockalternative=false

additional options to use with the default boot option, but not with the

alternatives

e.g. defoptions=vga=791 resume=/dev/hda5

defoptions=splash

should update-grub lock old automagic boot options

e.g. lockold=false

lockold=true

lockold=false

Xen hypervisor options to use with the default Xen boot option

xenhopt=

Xen Linux kernel options to use with the default Xen boot option

xenkopt=console=tty0

altoption boot targets option

multiple altoptions lines are allowed

e.g. altoptions=(extra menu suffix) extra boot options

altoptions=(recovery) single

altoptions=(recovery mode) single

controls how many kernels should be put into the menu.lst

only counts the first occurence of a kernel, not the

alternative kernel options

e.g. howmany=all

howmany=7

howmany=2

specify if running in Xen domU or have grub detect automatically

update-grub will ignore non-xen kernels when running in domU and vice versa

e.g. indomU=detect

indomU=true

indomU=false

indomU=detect

should update-grub create memtest86 boot option

e.g. memtest86=true

memtest86=false

memtest86=true

should update-grub adjust the value of the default booted system

can be true or false

updatedefaultentry=false

should update-grub add savedefault to the default options

can be true or false

savedefault=false

## End Default Options ##

title Ubuntu karmic (development branch), kernel 2.6.31-13-generic root (hd1,0) kernel /boot/vmlinuz-2.6.31-13-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro splash initrd /boot/initrd.img-2.6.31-13-generic quiet

title Ubuntu karmic (development branch), kernel 2.6.31-13-generic (recovery mode) root (hd1,0) kernel /boot/vmlinuz-2.6.31-13-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro single initrd /boot/initrd.img-2.6.31-13-generic

title Ubuntu karmic (development branch), kernel 2.6.31-12-generic root (hd1,0) kernel /boot/vmlinuz-2.6.31-12-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro splash initrd /boot/initrd.img-2.6.31-12-generic quiet

title Ubuntu karmic (development branch), kernel 2.6.31-12-generic (recovery mode) root (hd1,0) kernel /boot/vmlinuz-2.6.31-12-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro single initrd /boot/initrd.img-2.6.31-12-generic

title Chainload into GRUB 2 root (hd1,0) kernel /boot/grub/core.img

title Ubuntu karmic (development branch), memtest86+ root (hd1,0) kernel /boot/memtest86+.bin quiet

END DEBIAN AUTOMAGIC KERNELS LIST

This is a divider, added to separate the menu items below from the Debian

ones.

title Other operating systems: root

This entry automatically added by the Debian installer for a non-linux OS

on /dev/sda1

title Windows Vista/Longhorn (loader) root (hd0,0) savedefault makeactive chainloader +1

=========================== sdb1/boot/grub/grub.cfg: ===========================

#

DO NOT EDIT THIS FILE

#

It is automatically generated by /usr/sbin/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 load_env fi set default="0" 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 } insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=640x480 insmod gfxterm insmod vbe if terminal_output gfxterm ; then true ; else # For backward compatibility with versions of terminal.mod that don't # understand terminal_output terminal gfxterm fi fi insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 set locale_dir=($root)/boot/grub/locale set lang=sv insmod gettext if [ ${recordfail} = 1 ]; then set timeout=-1 else set timeout=5 fi

END /etc/grub.d/00_header ###

BEGIN /etc/grub.d/05_debian_theme ###

set menu_color_normal=white/black set menu_color_highlight=black/light-gray

END /etc/grub.d/05_debian_theme ###

BEGIN /etc/grub.d/10_linux ###

menuentry "Ubuntu, med Linux 2.6.32-17-generic" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 linux /boot/vmlinuz-2.6.32-17-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro quiet splash initrd /boot/initrd.img-2.6.32-17-generic } menuentry "Ubuntu, med Linux 2.6.32-17-generic (återställningsläge)" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 echo Läser in Linux 2.6.32-17-generic ... linux /boot/vmlinuz-2.6.32-17-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro single echo Läser in initial ramdisk ... initrd /boot/initrd.img-2.6.32-17-generic } menuentry "Ubuntu, med Linux 2.6.32-16-generic" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 linux /boot/vmlinuz-2.6.32-16-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro quiet splash initrd /boot/initrd.img-2.6.32-16-generic } menuentry "Ubuntu, med Linux 2.6.32-16-generic (återställningsläge)" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 echo Läser in Linux 2.6.32-16-generic ... linux /boot/vmlinuz-2.6.32-16-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro single echo Läser in initial ramdisk ... initrd /boot/initrd.img-2.6.32-16-generic } menuentry "Ubuntu, med Linux 2.6.31-20-generic" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 linux /boot/vmlinuz-2.6.31-20-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro quiet splash initrd /boot/initrd.img-2.6.31-20-generic } menuentry "Ubuntu, med Linux 2.6.31-20-generic (återställningsläge)" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 echo Läser in Linux 2.6.31-20-generic ... linux /boot/vmlinuz-2.6.31-20-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro single echo Läser in initial ramdisk ... initrd /boot/initrd.img-2.6.31-20-generic }

END /etc/grub.d/10_linux ###

BEGIN /etc/grub.d/20_memtest86+ ###

menuentry "Memory test (memtest86+)" { insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 linux16 /boot/memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { insmod ext2 set root='(hd1,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 linux16 /boot/memtest86+.bin console=ttyS0,115200n8 }

END /etc/grub.d/20_memtest86+ ###

BEGIN /etc/grub.d/30_os-prober ###

menuentry "Windows Vista (loader) (on /dev/sda1)" { insmod ntfs set root='(hd0,1)' search --no-floppy --fs-uuid --set 72746dd9746da099 chainloader +1 } menuentry "Windows Vista (loader) (on /dev/sda2)" { insmod ntfs set root='(hd0,2)' search --no-floppy --fs-uuid --set 2c88743c8874071c chainloader +1 }

END /etc/grub.d/30_os-prober ###

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

=============================== sdb1/etc/fstab: ===============================

/etc/fstab: static file system information.

#

<file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0

/dev/sdb1

UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 / ext4 relatime,errors=remount-ro 0 1

/dev/sdb5

UUID=32898ee4-5c34-426e-aace-b9afceccc9f5 none swap sw 0 0 /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

=================== sdb1: Location of files loaded by Grub: ===================

106.3GB: boot/grub/core.img 73.0GB: boot/grub/grub.cfg 73.2GB: boot/grub/menu.lst 106.4GB: boot/initrd.img-2.6.31-20-generic 106.4GB: boot/initrd.img-2.6.32-16-generic 106.5GB: boot/initrd.img-2.6.32-17-generic 106.4GB: boot/vmlinuz-2.6.31-20-generic 106.4GB: boot/vmlinuz-2.6.32-16-generic 106.4GB: boot/vmlinuz-2.6.32-17-generic 106.5GB: initrd.img.old 106.4GB: vmlinuz.old From what I can see, the problem seems to manifest itself here :

Boot sector info: Grub 2 is installed in the boot sector of sda1 and

looks at sector 207620287 of the same hard drive for core.img, but core.img can not be found at this location. No errors found in the Boot Parameter Block. I e, the fact that «core.img» is not found. Any suggestions as to how this defect can be remedied ? Hope the above will suffice for you - or some other fellow user - to point me in the right direction !...

Henri

#384

drs305 said: You can take a more agressive approach by disabling the recordfail check in /etc/grub.d/00_header.

Thanks for the hint. I did that and commented out two more lines in 10_linux that did something with recordfail.

#recordfail=1
#if [ -n ${have_grubenv} ]; then save_env recordfail; fi

That works, i'd only like to find out why this is happening. I always shut down the vm with "sudo poweroff" before i do the same to the host.

#385

@mhenriday,

First I'll review what I see and make a few comments:

I can see here that grub2 is installed to the mbr of both drives (and that should be fine):

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in

partition #1 for /boot/grub. => Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in partition #1 for /boot/grub.

On both sda1 and sda2 you show:

Boot sector type: Grub 2

Boot sector info: Grub 2 is installed in the boot sector of sda1 and looks at sector 207620287 of the same hard drive for core.img, but core.img can not be found at this location. No errors found in the Boot Parameter Block.

So I assume at some point you tried to install grub2 to those partitions rather than an mbr. That may or may not cause a problem, I'm inclined to think NOT because your boot files/directories look alright on sda1:

Boot files/dirs: /bootmgr /boot/bcd /Windows/System32/winload.exe

Where I see the most obvious of problems is with your Lucid on sdb1:

sdb1: __________________________________________________ _______________________

File system: ext4 Boot sector type: Grub 2 Boot sector info: Grub 2 is installed in the boot sector of sdb1 and looks at sector 207620287 of the same hard drive for core.img, but core.img can not be found at this location. Operating System: Ubuntu lucid (development branch) Boot files/dirs: /boot/grub/menu.lst /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

Of course it shows the "core.img can not be found" error, I assume once again that you tried to install grub2 to that partition rather than an mbr, but having both a menu.lst and a grub.cfg really tends to hinder the performance of either legacy grub or grub2.

Just to clarify "menu.lst" is a component of legacy grub, whereas "grub.cfg" is a component of grub2. Further, just so you'll understand, both legacy grub and grub2 use the package "grub-common". The proper package name for grub2 is "grub-pc", and the package name for legacy grub is just "grub".

Anyway to clean up the most obvious problem you'll need to boot into Ubuntu and backup the old /boot/grub directory, create a new one, purge some packages and their configuration files, then reinstall and reconfigure the correct packages. No sweat, I'll give you the commands so you can just copy-n-paste.

But I wonder if it's possible for you to select whether drive sda (the Windows drive) or sdb (the Ubuntu drive) boots first? I can see that both drives are 120GB but don't know if they're both IDE, both SATA, or a mix of the two?

I'm always reluctant to send someone inside their computer changing cables and such, and it's really not necessary. But one way we could determine if Vista will boot under it's own power is restore a generic Windows mbr to sda and just see if Windows will boot.

Of course that may, or most probably will, leave Ubuntu unbootable, so i need to know that you have an Ubuntu Live CD. The version doesn't really matter just so long as you know it runs OK so we can restore grub2 to the mbr of sda if needed.

Have I confused you yet? For the most part make sure you have an Ubuntu Live CD that you know will run!

To fix the mixed grub2 and legacy grub files/directories boot into Ubuntu & run the following commands:

sudo mv /boot/grub /boot/grub_backup
sudo mkdir /boot/grub

Note: purging the following packages you may see "not installed so not removed", that's OK.

sudo apt-get --purge remove startupmanager
sudo apt-get --purge remove grub
sudo apt-get --purge remove grub-pc
sudo apt-get --purge remove grub-common

Now we reinstall & reconfigure:

sudo apt-get install grub-pc
sudo update-grub

Wait for it to say done! Then:

sudo grub-install /dev/sda
sudo grub-install /dev/sdb

Note: If either of the last two commands returns an error use the command "sudo grub-install --recheck /dev/sd[COLOR="Red"]X[/COLOR]", of course replacing [COLOR="Red"]X[/COLOR] with either "a" or "b" as appropriate.

Then just see if Windows will now boot. If not then I need to know for sure that you have a Live CD that works and we'll try a generic Windows mbr.

#386

Thanks for staying with me here, kansasnoob - and for your very pedagogical instructions, which even I could follow ! Interestingly enough, when I ran

sudo apt-get --purge remove grub

I got a message to the effect that GRUB not being installed, there was nothing to remove. Be that as it may, I opted to follow your instructions to the letter and remove and then reinstall «grub-pc» and «grub-common». As you can see from the RESULTS1.txt file which I reproduce below, this did indeed succeed in removing the «/boot/grub/menu.lst» path from the Boot files/dirs under /sdb1:

Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in partition #1 for /boot/grub. => Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in partition #1 for /boot/grub.

sda1: _________________________________________________________________________

File system: ntfs Boot sector type: Grub 2 Boot sector info: Grub 2 is installed in the boot sector of sda1 and looks at sector 207620287 of the same hard drive for core.img, but core.img can not be found at this location. No errors found in the Boot Parameter Block. Operating System: Windows Vista Boot files/dirs: /bootmgr /boot/bcd /Windows/System32/winload.exe

sda2: _________________________________________________________________________

File system: ntfs Boot sector type: Grub 2 Boot sector info: Grub 2 is installed in the boot sector of sda2 and looks at sector 207620287 of the same hard drive for core.img, but core.img can not be found at this location. No errors found in the Boot Parameter Block. Operating System: Boot files/dirs: /bootmgr /boot/BCD

sdb1: _________________________________________________________________________

File system: ext4 Boot sector type: Grub 2 Boot sector info: Grub 2 is installed in the boot sector of sdb1 and looks at sector 207620287 of the same hard drive for core.img, but core.img can not be found at this location. Operating System: Ubuntu lucid (development branch) Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sdb2: _________________________________________________________________________

File system: Extended Partition Boot sector type: - Boot sector info:

sdb5: _________________________________________________________________________

File system: swap Boot sector type: - Boot sector info:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 120,0 GB, 120034123776 byte 255 huvuden, 63 sektorer/spår, 14593 cylindrar, totalt 234441648 sektorer Enheter = sektorer av 1 · 512 = 512 byte Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 * 63 221,761,259 221,761,197 7 HPFS/NTFS /dev/sda2 221,761,260 234,436,544 12,675,285 7 HPFS/NTFS

Drive: sdb ___________________ _____________________________________________________

Disk /dev/sdb: 120,0 GB, 120034123776 byte 255 huvuden, 63 sektorer/spår, 14593 cylindrar, totalt 234441648 sektorer Enheter = sektorer av 1 · 512 = 512 byte Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sdb1 * 63 224,829,674 224,829,612 83 Linux /dev/sdb2 224,829,675 234,436,544 9,606,870 5 Extended /dev/sdb5 224,829,738 234,436,544 9,606,807 82 Linux swap / Solaris

blkid -c /dev/null: ____________________________________________________________

Device UUID TYPE LABEL

/dev/sda1 72746DD9746DA099 ntfs OS /dev/sda2 2C88743C8874071C ntfs HP_RECOVERY /dev/sda: PTTYPE="dos" /dev/sdb1 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ext4 /dev/sdb2: PTTYPE="dos" /dev/sdb5 32898ee4-5c34-426e-aace-b9afceccc9f5 swap /dev/sdb: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

/dev/sdb1 / ext4 (rw,relatime,errors=remount-ro)

=========================== sdb1/boot/grub/grub.cfg: ===========================

#

DO NOT EDIT THIS FILE

#

It is automatically generated by /usr/sbin/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 load_env fi set default="0" 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 } insmod ext2 set root='(/dev/sdb,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=640x480 insmod gfxterm insmod vbe if terminal_output gfxterm ; then true ; else # For backward compatibility with versions of terminal.mod that don't # understand terminal_output terminal gfxterm fi fi insmod ext2 set root='(/dev/sdb,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 set locale_dir=($root)/boot/grub/locale set lang=sv insmod gettext if [ ${recordfail} = 1 ]; then set timeout=-1 else set timeout=10 fi

END /etc/grub.d/00_header ###

BEGIN /etc/grub.d/05_debian_theme ###

set menu_color_normal=white/black set menu_color_highlight=black/light-gray

END /etc/grub.d/05_debian_theme ###

BEGIN /etc/grub.d/10_linux ###

menuentry "Ubuntu, med Linux 2.6.32-17-generic" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(/dev/sdb,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 linux /boot/vmlinuz-2.6.32-17-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro quiet splash initrd /boot/initrd.img-2.6.32-17-generic } menuentry "Ubuntu, med Linux 2.6.32-17-generic (återställningsläge)" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(/dev/sdb,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 echo Läser in Linux 2.6.32-17-generic ... linux /boot/vmlinuz-2.6.32-17-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro single echo Läser in initial ramdisk ... initrd /boot/initrd.img-2.6.32-17-generic } menuentry "Ubuntu, med Linux 2.6.32-16-generic" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(/dev/sdb,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 linux /boot/vmlinuz-2.6.32-16-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro quiet splash initrd /boot/initrd.img-2.6.32-16-generic } menuentry "Ubuntu, med Linux 2.6.32-16-generic (återställningsläge)" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(/dev/sdb,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 echo Läser in Linux 2.6.32-16-generic ... linux /boot/vmlinuz-2.6.32-16-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro single echo Läser in initial ramdisk ... initrd /boot/initrd.img-2.6.32-16-generic } menuentry "Ubuntu, med Linux 2.6.31-20-generic" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(/dev/sdb,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 linux /boot/vmlinuz-2.6.31-20-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro quiet splash initrd /boot/initrd.img-2.6.31-20-generic } menuentry "Ubuntu, med Linux 2.6.31-20-generic (återställningsläge)" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(/dev/sdb,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 echo Läser in Linux 2.6.31-20-generic ... linux /boot/vmlinuz-2.6.31-20-generic root=UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 ro single echo Läser in initial ramdisk ... initrd /boot/initrd.img-2.6.31-20-generic }

END /etc/grub.d/10_linux ###

BEGIN /etc/grub.d/20_memtest86+ ###

menuentry "Memory test (memtest86+)" { insmod ext2 set root='(/dev/sdb,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 linux16 /boot/memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { insmod ext2 set root='(/dev/sdb,1)' search --no-floppy --fs-uuid --set 49d4a93f-e82b-4e1b-b84b-6012ae4d9854 linux16 /boot/memtest86+.bin console=ttyS0,115200n8 }

END /etc/grub.d/20_memtest86+ ###

BEGIN /etc/grub.d/30_os-prober ###

menuentry "Windows Vista (loader) (on /dev/sda1)" { insmod ntfs set root='(/dev/sda,1)' search --no-floppy --fs-uuid --set 72746dd9746da099 chainloader +1 } menuentry "Windows Vista (loader) (on /dev/sda2)" { insmod ntfs set root='(/dev/sda,2)' search --no-floppy --fs-uuid --set 2c88743c8874071c chainloader +1 }

END /etc/grub.d/30_os-prober ###

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

=============================== sdb1/etc/fstab: ===============================

/etc/fstab: static file system information.

#

<file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0

/dev/sdb1

UUID=49d4a93f-e82b-4e1b-b84b-6012ae4d9854 / ext4 relatime,errors=remount-ro 0 1

/dev/sdb5

UUID=32898ee4-5c34-426e-aace-b9afceccc9f5 none swap sw 0 0 /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

=================== sdb1: Location of files loaded by Grub: ===================

106.3GB: boot/grub/core.img 72.7GB: boot/grub/grub.cfg 106.4GB: boot/initrd.img-2.6.31-20-generic 106.4GB: boot/initrd.img-2.6.32-16-generic 106.5GB: boot/initrd.img-2.6.32-17-generic 106.4GB: boot/vmlinuz-2.6.31-20-generic 106.4GB: boot/vmlinuz-2.6.32-16-generic 106.4GB: boot/vmlinuz-2.6.32-17-generic 106.5GB: initrd.img.old 106.4GB: vmlinuz.old So far so good, but alas, just as previously, when I attempt to boot into the Vista loader, the machine reboots and GRUB displays again. So can it go !...

I have - I think ! - a live CD for 64-bit Karmic (I usually wait for the stable version of a new Ubuntu upgrade before burning a CD) and if not I can always burn one, so reconstructing Lucid by upgrading from Karmic would be no problem. Otherwise, I could always try re-installing Vista on sda from my three Vista CDs (thanks, Microsoft !), which would, of course, install that generic Windows MBR that you mention and disable GRUB2 (thanks again, Microsoft !), but it should be possible to recover the latter (I've previously done so for the older version in similar circumstances). Naturally, I'd prefer to resolve the current problem in such a way as to avoid re-installations, but as this laptop is not my main computer (I haven't dared to try upgrading to Lucid on the big box !), loss of data wouldn't constitute an insurmountable problem. So lay on, Macduff ; I'm ready for your suggestions !...

Henri

#387

OK, look what Meierfra wrote here:

http://ubuntuforums.org/showpost.php?p=8929988&postcount=357

Basically the same as here:

http://support.microsoft.com/kb/927392

Once you know that repairing the Vista bootsector was successful you may need to restore grub2 to the mbr of sda (probably will) like this:

Boot your Ubuntu Live CD choosing to Try without changes then go to terminal and run the following:

sudo mount /dev/sdb1 /mnt && sudo mount --bind /dev /mnt/dev &&sudo mount --bind /proc /mnt/proc && sudo chroot /mnt
grub-install /dev/sda

If that shows any errors:

grub-install --recheck /dev/sda

Then just:

exit
sudo umount /mnt/dev && sudo umount /mnt/proc && sudo umount /mnt
#388

Thank you very much for the guide, it is very useful.

There is a small typo error in your original post, where you describe 'GRUB SAVEDEFAULT=' you missed a '_':

GRUB SAVEDEFAULT= - If set to *true* this setting will automatically set the last selected OS from the menu as the default OS on the next boot. No commands need be run to set the default OS.

#389

Gioby,

Thanks for the input. I've corrected the typo.

And welcome to Ubuntu and the Ubuntu Forums. :-)

#390

Can you please update your doc to indicate that GRUB_TIMEOUT does not work at this time. There is a bug report on PPA. Thank you.

#391

cmcginty said: Can you please update your doc to indicate that GRUB_TIMEOUT does not work at this time. There is a bug report on PPA. Thank you.

Can you give me the bug? Also, if it is from a ppa then you may be using the experimental version, which I try not to incorporate in the guides. My timeout with the standard Grub2 seems to work properly.

#392

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/420077 https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/462888 https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/512593

Here are the bugs however, I think I found my problem. I'm booting my OS root partition in read-only mode, so the script can not change the value in /boot/grub/grubenv. If I manually change it, I'm guess it will work.

#393

cmcginty said: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/420077

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/462888

Here are the bugs however, I think I found my problem. I'm booting my OS root partition in read-only mode, so the script can not change the value in /boot/grub/grubenv. If I manually change it, I'm guess it will work.

cmcginty,

I think you solved it for yourself. :-)

The first bug report is pretty old. The problems in both is not a timer problem but a problem generating a "recordfail" event. When Grub2 finds a problem, the default is to prevent automatic booting so the user has to make a decision as to what to do next. So the menu is displayed and Grub 2 awaits further input from the user.

Finding the cause of a "recordfail" event can be difficult, but if it's a one-time issue resetting the grubenv may solve things. In your case, the read-only mode may have been causing the problem.

For others with 'recordfail' events, the problem either has to be tracked down or, failing that, the 'recordfail' check has to be disabled. The second option of course isn't the desired one but can get a system booting again without the menu displaying.

#394

I ran into something interesting. Of course you know that grub2 now uses UUID's even for Windows partitions, whereas legacy grub only used the device name, eg: root (hd0,0).

Well here's someone that's cloned an XP and has two Win partitions with the same UUID:

http://ubuntuforums.org/showthread.php?t=1442606

I'm wondering if /etc/grub.d/30_os-prober can be edited in some manner to not use UUID's only for Windows????????????

#395

I wonder if there is an entry possible for MS like the symbolic entries I use for Debian based OS'. It calls for a particular partition. That might work if it is possible.

#396

Very helpful, thanks!

#397

cmcginty said: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/420077

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/462888 https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/512593

Here are the bugs however, I think I found my problem. I'm booting my OS root partition in read-only mode, so the script can not change the value in /boot/grub/grubenv. If I manually change it, I'm guess it will work.

Hi, this bug is still biting me. How can I prevent grub2 from writing to my partitions that are *supposed* to be read-only. I know grub2 is trying to do the "smart" thing here. But there should be some way to disable this.

Hmm. Just a thought.. if I make the grubenv file RO will grub2 observe it?

#398

cmcginty said: Hi, this bug is still biting me. How can I prevent grub2 from writing to my partitions that are *supposed* to be read-only. I know grub2 is trying to do the "smart" thing here. But there should be some way to disable this.

Hmm. Just a thought.. if I make the grubenv file RO will grub2 observe it?

I don't know the specifics of which partitions Grub2 is writing to on your system. Here are some options:

Create a custom script and disable the offending script file by removing the executable bit. For instance, if it's writing to a Windows partition, create a 40_custom menuentry for Windows, then disable /etc/grub.d/30_os-prober if you don't have any other OS's on your computer.

Some users use *only* a 40_custom script, in which case 10_ and 30_ can both be deactivated. In 40_ you can use "/vmlinuz" and "/initrd.img" so that it continues to use the most recent kernel without needing any updates.

If you tell us the target of the disk writes and which script is producing the inputs we might be able to give you more specific ways to alter the scripts.

#399

great guide to Grub 2! Problem is in the "saved" setting for grub_default in Lucid doesn't even work.....how did they screw that up? Linux Mint has Grub all decked out, and saved works....Ubuntu still can't even add graphics to grub, let alone even implement grub with a working SAVED OPTION!!!! I love Ubuntu, I just wish they would stop screwing up the packages, and concentrate on implementing them AS IS!!!!!

PS. Great Guide to Grub 2. Hope to see more updates in the future cuz I'll be watching :)

#400

lee8oi said: great guide to Grub 2! Problem is in the "saved" setting for grub_default in Lucid doesn't even work.....how did they screw that up? Linux Mint has Grub all decked out, and saved works....Ubuntu still can't even add graphics to grub, let alone even implement grub with a working SAVED OPTION!!!! I love Ubuntu, I just wish they would stop screwing up the packages, and concentrate on implementing them AS IS!!!!!

PS. Great Guide to Grub 2. Hope to see more updates in the future cuz I'll be watching :)

I am the first to agree that the "saved" function could only be designed by geeks.

As I understand it, "GRUB_DEFAULT=saved" only enables two commands to work: grub-set-default and "grub-reboot".

To get the last selected OS to be 'saved' and used on future boots, you have to use "GRUB_SAVEDEFAULT=true".

Have you tried that second setting?

Glad you like the guide. ;-)

#401

I'm trying to figure out how to do something very simple that isn't explicitly shown in any guide.

I have dual boot between Ubuntu 9.10 and Windows XP. I want it to: [*]Make XP the default (done)[*]not show any menu unless I hold shift That second one I cannot find out how to do, I'm guessing some script with 40_custom script but I don't know what.

Basically I just want the appearance that GRUB doesn't even exist, it boots to XP without any visual change (currently it shows the GRUB menu which made other users feel Windows did not shut down properly)

#402

Merk42 said: I'm trying to figure out how to do something very simple that isn't explicitly shown in any guide.

I have dual boot between Ubuntu 9.10 and Windows XP. I want it to: [*]Make XP the default (done)[*]not show any menu unless I hold shift That second one I cannot find out how to do, I'm guessing some script with 40_custom script but I don't know what.

Basically I just want the appearance that GRUB doesn't even exist, it boots to XP without any visual change (currently it shows the GRUB menu which made other users feel Windows did not shut down properly)

EDIT: **Go to post #408 for a workaround on a dual-boot system to allow no menu *with* the capability to interrupt the boot using the SHIFT key.**

There should be no # symbol at the start of the line: GRUB_HIDDEN_TIMEOUT=0 line. "0" will boot the system without a timeout.

In your current situation, does the system boot eventually without your intervention? If not, and you must press ENTER, you may have a "recordfail" event that is preventing automatic boot. If it currently boots but displays the menu for a while before proceeding without your input, the above setting should allow it to boot without the menu.

#403

drs305 said: There should be no # symbol at the start of the line: GRUB_HIDDEN_TIMEOUT=0 line. "0" will boot the system without a timeout.

In your current situation, does the system boot eventually without your intervention? If not, and you must press ENTER, you may have a "recordfail" event that is preventing automatic boot. If it currently boots but displays the menu for a while before proceeding without your input, the above setting should allow it to boot without the menu.

There is no # in front of GRUB_HIDDEN_TIMEOUT=0

Currently it shows GRUB, with Windows XP selected by default, counts down, then boots XP.

I do want XP as default, I'd just like the GRUB menu to not show at all (unless I actively hold SHIFT during boot)

#404

Merk42 said: There is no # in front of GRUB_HIDDEN_TIMEOUT=0

Currently it shows GRUB, with Windows XP selected by default, counts down, then boots XP.

I do want XP as default, I'd just like the GRUB menu to not show at all (unless I actively hold SHIFT during boot)

I forgot that on multi-system computers the GRUB_HIDDEN_TIMEOUT feature doesn't work (as you have found). Leave it set at 0 however, and set the GRUB_TIMEOUT to 0 and it should boot without hesitation.

One problem is that it also won't allow the SHIFT key to be active if 30_os-prober is deactivated, as the SHIFT keystatus check is part of the 30_os-prober script. If you want to bypass 30_os-prober and use a custom entry you can modify the scripts to re-add this feature back which is a good idea since otherwise you can't manually override the automatic boot.

In your case, as long as 30_os-prober is executable, setting GRUB_TIMEOUT=0 should be sufficient.

#405

drs305 said: One problem is that it also won't allow the SHIFT key to be active if 30_os-prober is deactivated, as it bypasses this part of the 30_os-prober script. If you want to bypass 30_os-prober and use a custom entry you can modify the scripts to re-add this feature back which is a good idea since otherwise you can't manually override the automatic boot.

In your case, as long as 30_os-prober is executable, setting GRUB_TIMEOUT=0 should be sufficient.

How do I do this?

#406

Merk42 said: How do I do this?

To be clear, copying the keystatus check is only necessary if you plan on not using /etc/grub.d/30_os-prober. But if you *do* plan on using a custom script and disabling 30_os-prober, here is the section which activates the keystatus check for a depressed SHIFT key:

if [ \${timeout} != -1 ]; then if keystatus; then if keystatus --shift; then set timeout=-1 else set timeout=0 fi else if sleep$verbose --interruptible 3 ; then set timeout=0 fi fi fi

You could add this section to another script which would be run, such as 00_header or even your custom script. Start the new section with: cat << EOF and end the section with: EOF

#407

Welp, added the timeout 0 and now it won't boot to Ubuntu at all. Tried to run a LiveCD to increase the timeout but I can't run 'sudo update-grub' because "grub-probe: error: cannot find a device for /"

Why would I not use "/etc/grub.d/30_os-prober"? I don't even understand what that is!

All I did was set the default to XP and then try and get the menu to not show up unless I hold shift. Apparently that's far toooo complicated of a suggestion to do for this GRUB2. Since now I can't even boot Ubuntu, I guess I'm stuck with installing it all over again.

#408

Updating this post: The problem appears to be that the keystatus check is embedded in the /etc/grub.d/30_os-prober script. If the first conditional isn't met, the keystatus check is not run.

The solution is to comment out the first condition, which checks to see if another OS is located. If you disable the first conditional the keystatus check will work and SHIFT will interrupt the boot. Find the section below in /etc/grub.d/30_os-prober and place a comment where indicated. On both my Grub 1.97~beta and 1.98 versions, the lines to change are currently lines 28 and 62.

gksu gedit +27 /etc/grub.d/30_os-prober

adjust_timeout () { [COLOR="Red"]#[/COLOR] if [ "x${found_other_os}" = "x" ] ; then if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then verbose= else verbose=" --verbose" fi

if [ "x${GRUB_HIDDEN_TIMEOUT}" = "x0" ] ; then cat <<EOF if [ \${timeout} != -1 ]; then if keystatus; then if keystatus --shift; then set timeout=-1 else set timeout=0 fi else if sleep$verbose --interruptible 3 ; then set timeout=0 fi fi fi EOF else cat << EOF if [ \${timeout} != -1 ]; then if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then set timeout=0 fi fi EOF fi fi [COLOR="Red"]#[/COLOR] fi }

Save the file and then run "sudo update-grub" to put the changes into grub.cfg

#409

drs305 said: I don't know the specifics of which partitions Grub2 is writing to on your system. Here are some options:

I fixed this by removing the /boot/grub/grubenv file.

#410

Been busy, but that did indeed work drs305

#411

cmcginty said: I fixed this by removing the /boot/grub/grubenv file.man grub-editenv

#412

That worked! Gee if they could have just put that in there in the first place I wouldn't have to rant about it! Thanks again. Next I'll be exploring the graphical aspect of grub2.

drs305 said: I am the first to agree that the "saved" function could only be designed by geeks.

As I understand it, "GRUB_DEFAULT=saved" only enables two commands to work: grub-set-default and "grub-reboot".

To get the last selected OS to be 'saved' and used on future boots, you have to use "GRUB_SAVEDEFAULT=true".

Have you tried that second setting?

Glad you like the guide. ;-)

#413

Nice guide, overengineered software. I will kill the xxxxxxx Koala and install Debian instead tonight. Grub2! Not even the man pages are correct.

/Sid

#414

see below

#415

cmcginty said: Hi, this bug is still biting me. How can I prevent grub2 from writing to my partitions that are *supposed* to be read-only. I know grub2 is trying to do the "smart" thing here. But there should be some way to disable this.

zika said: man grub-editenv

Zika, I don't see how grub-editenv will stop grub from writing to the partition. Is there a variable that will prevent this?

#416

I've got the resolution to work. I've also edited the 05_debian_theme correctly (update-grub finds the correct image file) however the image still does not appear for me. I was wondering if "use_bg = false" should be "use_bg = true" because right now both instances that call "use_bg =" is "use_bg = true" I was wondering if that messed up the loops within the code.

Edit: Just tried it after setting the first "use_bg = true" to "use_bg = false". This is the one right before the for loop where we enter the image file name and directory. No dice. I don't think its the "use_bg"

#417

ghostier said: I've got the resolution to work. I've also edited the 05_debian_theme correctly (update-grub finds the correct image file) however the image still does not appear for me. I was wondering if "use_bg = false" should be "use_bg = true" because right now both instances that call "use_bg =" is "use_bg = true" I was wondering if that messed up the loops within the code.

Edit: Just tried it after setting the first "use_bg = true" to "use_bg = false". This is the one right before the for loop where we enter the image file name and directory. No dice. I don't think its the "use_bg" Mine works fine like this:


#!/bin/bash -e

source /usr/lib/grub/grub-mkconfig_lib

# this allows desktop-base to override our settings
f=/usr/share/desktop-base/grub_background.sh
if test -e ${f} ; then
  source ${f}
else
  WALLPAPER="/usr/share/images/desktop-base/menu.png"
  COLOR_NORMAL="white/black"
  COLOR_HIGHLIGHT="black/white"
fi

set_mono_theme()
{
  cat << EOF
set menu_color_normal=black/black
set menu_color_highlight=red/white
EOF
}

# check for usable backgrounds
use_bg=false
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
  for i in /boot/grub/`basename ${WALLPAPER}` ${WALLPAPER} ; do
    if is_path_readable_by_grub $i ; then 
      bg=$i
      case ${bg} in
        *.png)        reader=png ;;
        *.tga)        reader=tga ;;
        *.jpg|*.jpeg)    reader=jpeg ;;
      esac
      if test -e /boot/grub/${reader}.mod ; then
        echo "Found background image: `basename ${bg}`" >&2
        use_bg=true
        break
      fi
    fi
  done
fi

# set the background if possible
if ${use_bg} ; then
  prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
  cat << EOF
insmod ${reader}
if background_image `make_system_path_relative_to_its_root ${bg}` ; then
  set color_normal=${COLOR_NORMAL}
  set color_highlight=${COLOR_HIGHLIGHT}
else
EOF
fi

# otherwise, set a monochromatic theme for Ubuntu
if ${use_bg} ; then
  set_mono_theme | sed -e "s/^/  /g"
  echo "fi"
else
  set_mono_theme
fi

I am wondering if you downloaded the images package and if that is screwing with it. The default file is /usr/share/images/desktop-base (there is a package called desktop-base that will give you the image called for by default if you like people to think that you are booting Debian).

I believe the "bg=false" is in reference to not finding the image.

If you have the images package installed leave the selected image in the .../images/grub file but copy it to the .../images/desktop-base file too.

I had to do that early on in 9.10-testing but I thought that was ironed out back then. Might be worth a try.

I never liked the images anyway so I edit my own with gimp and just put them in the desktop-base file with, as you can see, complex names.

#418

hmm I dont think moving the images from 05_debian_theme installation will be useful because I am using my own images which I've put in both folders. Just tried your code and edited your image path to my own, updated grub, terminal says it found the image then reboot to check but still monochrome. =/

EDIT: Just took a closer look at your code. "f=/usr/share/desktop-base/grub_background.sh" from line 6 caught my eye. I don't have such directory. What is that path for? In fact, I just searched my file system for grub_background.sh and couldn't find it.

#419

I am headed to bed and am not on that platform now. I will see where that bugger is tomorrow.

#420

ghostier said: EDIT: Just took a closer look at your code. "f=/usr/share/desktop-base/grub_background.sh" from line 6 caught my eye. I don't have such directory. What is that path for? In fact, I just searched my file system for grub_background.sh and couldn't find it.

In the default G2 install, the path is "/usr/share/images/desktop-base/" and there is no "grub_background.sh" file.

Since G2 is now finding your image, it might be time for you to post your 05_debian_theme and /etc/default/grub files for us to see if we can find the problem.

#421

Yup, the file /user/share/desktop-base/grub_background.sh is not install on Ubuntu unless you get the "desktop-base" package installed. If you do that you will have the image called for in the script and look like you are using Debian.

I actually have that on an installation. Ugly image and the others in the file are not any better.

#422

Currently not at home, I will post my files as soon as i get home. EDIT: Here is my current 05_debian theme its exactly like ranch hand's except the file name


#!/bin/bash -e

source /usr/lib/grub/grub-mkconfig_lib

# this allows desktop-base to override our settings
f=/usr/share/desktop-base/grub_background.sh
if test -e ${f} ; then
  source ${f}
else
  WALLPAPER="/usr/share/images/grub/wallpapers_Katekyo-Hitman-Reborn_Akushiro.png"
  COLOR_NORMAL="white/black"
  COLOR_HIGHLIGHT="red/black"
fi

set_mono_theme()
{
  cat << EOF
set menu_color_normal=black/black
set menu_color_highlight=red/white
EOF
}

# check for usable backgrounds
use_bg=false
if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
  for i in /boot/grub/`basename ${WALLPAPER}` ${WALLPAPER} ; do
    if is_path_readable_by_grub $i ; then 
      bg=$i
      case ${bg} in
        *.png)        reader=png ;;
        *.tga)        reader=tga ;;
        *.jpg|*.jpeg)    reader=jpeg ;;
      esac
      if test -e /boot/grub/${reader}.mod ; then
        echo "Found background image: `basename ${bg}`" >&2
        use_bg=true
        break
      fi
    fi
  done
fi

# set the background if possible
if ${use_bg} ; then
  prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
  cat << EOF
insmod ${reader}
if background_image `make_system_path_relative_to_its_root ${bg}` ; then
  set color_normal=${COLOR_NORMAL}
  set color_highlight=${COLOR_HIGHLIGHT}
else
EOF
fi

# otherwise, set a monochromatic theme for Ubuntu
if ${use_bg} ; then
  set_mono_theme | sed -e "s/^/  /g"
  echo "fi"
else
  set_mono_theme
fi

Here is my /etc/default/grub


# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=1280x800

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entrys
GRUB_DISABLE_LINUX_RECOVERY="true"
#423

I have an encrypted Windows 7 partition (truecrypt) on my system and I'm trying to enable GRUB to chainload to it. Unfortunately copying the truecrypt mbr to a file and trying to load it only produced a "Bootloader corrupted" error, and GRUB won't boot the ISO for the Rescue CD.

Is there any way I can get it so GRUB loads first, then when I select 'Windows 7', it asks me for my password?

Thanks!

#424

and why is this better? we should have a choice I thought that is what open source was about grub2 is a pain in the a** and at this point I have had to give up on Linux I need a multi-boot system for my work and I cannot seem to get it going with this :evil::evil::evil::evil::evil::evil::evil:

#425

sparkythewondersquid said: and why is this better? we should have a choice I thought that is what open source was about grub2 is a pain in the a** and at this point I have had to give up on Linux I need a multi-boot system for my work and I cannot seem to get it going with this :evil::evil::evil::evil::evil::evil::evil:

I think you should do some checking on how popular grub-legacy was when it was introduced.

You have plenty of choice. You could install lilo.

You could also do this;

http://ubuntuforums.org/showthread.php?t=1298932

#426

I have installed Ubuntu 9.10 in a new partition, and have a Ubuntu 8.04 installation.

I am unable to boot Ubuntu 8.04 from grub2 and get the following:-

[B]error: You need to load kernel first [/B] Although I can boot from a grub floppy.

Ubuntu 8.04 has separate / and /boot partitions as per the extract from its fstab

# /etc/fstab: static file system information.
#
# /dev/sda6
UUID=59a509ce-4a45-443e-9f51-e68d014fc121 /               ext3    defaults,noatime,errors=remount-ro 0       1
# /dev/sda7
UUID=97fb9db7-27d1-4764-a21a-cadc09582933 /home           ext3    defaults        0       2
# /dev/sda8
UUID=15678f38-837e-48a8-875e-72101b85961a /boot           ext3    defaults        0       2

The grub.cfg contains the following

menuentry "Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic (on /dev/sda6)" {
	saved_entry=${chosen}
	save_env saved_entry
	insmod ext2
	set root=(hd0,6)
	search --no-floppy --fs-uuid --set 59a509ce-4a45-443e-9f51-e68d014fc121
	linux /boot/vmlinuz-2.6.24-24-generic root=UUID=59a509ce-4a45-443e-9f51-e68d014fc121 ro quiet splash
	initrd /boot/initrd.img-2.6.24-24-generic
}

I have tried custom entries, changing set root=(hd0,8) and substituting UUID, but to no avail.

I would be grateful for any guidance.

PS it would help if I could find descriptions for the grub commands, but the wiki does not go far enough.

#427

I have installed Ubuntu 9.10 in a new partition, and have a Ubuntu 8.04 installation.

I am unable to boot Ubuntu 8.04 from grub2 and get the following:-

error: You need to load kernel first

Ubuntu 8.04 has separate / and /boot partitions as per the extract from its fstab

The grub.cfg contains the following

menuentry "Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic (on /dev/sda6)" {
	saved_entry=${chosen}
	save_env saved_entry
	insmod ext2
	set root=(hd0,6)
	search --no-floppy --fs-uuid --set 59a509ce-4a45-443e-9f51-e68d014fc121
	linux /boot/vmlinuz-2.6.24-24-generic root=UUID=59a509ce-4a45-443e-9f51-e68d014fc121 ro quiet splash
	initrd /boot/initrd.img-2.6.24-24-generic
}

After posting the above, it suddenly struck me that without mounting grub would have no idea where to find /boot

The following is my working entry. Two changes were required from the generated grub.cfg

  1. set root=(hd0,8) to the boot partition
  2. Remove /boot from the kernel path
menuentry "Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic" {
	saved_entry=${chosen}
	save_env saved_entry
	insmod ext2
	set root=(hd0,[COLOR="Red"]8[/COLOR])
	linux [COLOR="Red"]/vmlinuz-2.6.24-24-generic[/COLOR] root=UUID=59a509ce-4a45-443e-9f51-e68d014fc121 ro quiet splash
	initrd [COLOR="Red"]/initrd.img-2.6.24-24-generic[/COLOR]
}
#428

Just wanted to say thankyou very much for this guide. I finally just moved to GRUB 2 and I had a ton of old kernels and the memtest entries were super annoying. I now just have two custom entries, so thanks an absolute ton!

#429

ranch hand said: I think you should do some checking on how popular grub-legacy was when it was introduced.

You have plenty of choice. You could install lilo.

You could also do this;

http://ubuntuforums.org/showthread.php?t=1298932

I'd also add that from clicking on your username and searching "other posts" I see no request for help with grub2 problems :confused:

Even Debian Squeeze now uses grub2 so there will soon be no getting away from it :)

Once you learn it you'll actually love it!

#430

@ Milliways, would you please post the full output of the Boot Info Script as described here:

http://bootinfoscript.sourceforge.net/

Multi-boots with separate /boot partitions can be a hassle :(

#431

Why is there no simple graphical editor for GRUB 2 like there is for GRUB. This makes it impossible for non software savvy people to use any of the newer versions of Ubuntu.

#432

rtuinila said: Why is there no simple graphical editor for GRUB 2 like there is for GRUB. This makes it impossible for non software savvy people to use any of the newer versions of Ubuntu.

I wonder the same thing...

Allegedly there kind of is. When I was researching how to use Grub 2, there are a few places buried in the documentation that say a few existing editors can do some of the basics but I have never tried it.

That being said, if the documentation were organized better, the entire process of switching to Grub2 would have been much easier. The first time I did it, it took me a few hours. The second time, 6 months later, took me literally 5 minutes.

#433

rtuinila said: Why is there no simple graphical editor for GRUB 2 like there is for GRUB. This makes it impossible for non software savvy people to use any of the newer versions of Ubuntu.

Because it's free and nobody has taken the time to create one yet. :-( I agree a GUI app would be most welcome.

The creator of StartUp-Manager made a few changes to his original app and some of the really common tasks such as changing the timeout and default OS are still available. I believe he was going to work on a "Version 2" but I haven't heard anything lately. The app is called 'startupmanager' and is in the "universe" repository.

If you tell us what you would like to do with Grub 2 there are plenty of people around these forums who can help you accomplish your goal.

#434

I have just installed 10.04. I've come straight from 8.04, so this guide has been invaluable to me today. It's very clear and logical. Many, many thanks for this drs305, I owe you a beer.

#435

muteXe said: Many, many thanks for this drs305, I owe you a beer.

By that logic, I owe a brewery to all those who came before me.

Welcome to Lucid!

#436

Hello,

I am a bit lost to how to solve my issue : I have 2 hard drives sda and sdb sda host Win 7 and ubuntu.

I wanted to have a test Win 7, so from ubuntu, I created sdb1 and manually copied all the Win 7 partition from sda to sdb1. (partition size identical).

How can I modify grub to have the possibility to boot the second Win 7 ?

Thank you

Moiyug

#437

moiyug said: How can I modify grub to have the possibility to boot the second Win 7 ?

moiyug,

Welcome to Ubuntu and the Ubuntu forums. :-)

I can't speak to whether Windows will work by doing what you are trying, but as far as Grub2 goes:

First, just run "sudo update-grub" and see if G2 recognizes the new OS. You can either reboot to see if it shows up on the menu or you can open /boot/grub/grub.cfg to inspect the menuentries. You could also run this to check the choices that will be shown in the Grub 2 menu:

cat /boot/grub/grub.cfg | grep menuentry

If G2 doesn't find it, the easiest thing would probably to make an entry in the /etc/grub.d/40_custom menu.

Open it for editing:

gksu gedit /etc/grub.d/40_custom  /boot/grub/grub.cfg

Then copy the original menuentry for Windows to the 40_custom file. Add it below any existing lines in 40_custom. Modify the UUID, hdXY and "/dev/sdXY" entries to match your *new* install.

Save the file and then run "sudo update-grub".

If you need more help, post the contents of your current Windows entry in /boot/grub/grub.cfg and then tell us where the new OS is installed, which partition, and the UUID.

#438

Not sure if this has been brought up before, but I have a super nice customized grub2 screen in 1920 x 1200 resolution. The text is a little small, but it is pretty much expected and it is OK for me, but I just wanted to change the picture.

I got the image from right clicking on the desktop and down to change desktop resolution and clicked on "Get more backgounds online". Then I clicked on Themes tab on the right and then Splash screens. The picture was black and white and only 500px × 330px big.

So I edited in with Gimp and made it 1920 x 1200 and saved it as a TGA file. Thinking that was good to go, I changed the permissions on the file with "sudo chmod newpicture.tga =reference otherpicture.tga". Of course I had to move it to /usr/share/images/grub/ and ran "sudo update-grub".

It appeared to work from the displayed output of update-grub, but upon rebooting, it was a black screen with white text. Which indicated it really did not find it.

Upon doing more research comparing the one that worked great and the new one, I found that the one that worked was RGB color and the one that did not was in grayscale.

I edited it again with Gimp and set it the same as the one that worked and viola it looked magnificent! So, [COLOR=Red]it had to be a color picture to work[/COLOR].

Well, that is my 2 cents on the subject. In my sig. is a link to some updated info. on GRUB2 and down a ways a link to making splash screens.

I certainly am no expert, but was at least able to figure this part out.:-k Just thought I would mention it here and hopefully it will benefit someone.

I also wanted to say that this is a super tutorial and thanks for putting it up!!!

#439

You will find .png to be more flexible in grub. I use both color and black and white and never have a problem.

#440

ranch hand said: You will find .png to be more flexible in grub. I use both color and black and white and never have a problem.

Thank you for that info! :-D I don't know why, but I have always used TGA, but I'll try PNG the next time I want to change the splash screen. There has always seemed to be something magical about the grub splash. It seemed like magic when my changes worked and it seemed like black magic when I thought that it should work, but would not work even though everything looked like it should. :-D

#441

Hi all,

I posted this in the Installation & Upgrade section but then found this thread and though my problem would better fit here:

I accidentally pressed the power button when my laptop was booting which resulted in a forced shut-down. Now when I power-up I'm presented with Grub2 recovery options (see attachment for an example). The problem I'm having is that I can not use the keyboard at this point in the boot-process so I can not select the OS nor boot a OS by pressing enter. For some reason my keyboard only works once the OS has booted. I can not get into BIOS either. Neither with the build-in keyboard (in my laptop) nor with an external keyboard.

It has been this way for a couple of months and has never been a problem before (keyboard works fine when Ubuntu has booted).

I can boot a Ubuntu LiveCD (typing this message on the affected laptop booted using Ubuntu 9.10 LiveCD).

So...how do I get rid of this recovery-console and boot Ubuntu?

Tech info: Ubuntu 9.10 Asus A6VM laptop Single hard disk divided into 3 partitions (/dev/sda1, /dev/sda2 attached to /home and /dev/sda3 as a swap partition.

#442

Ha!

Never mind, I managed to get it fixed thanks to this post. Mine seems to survive "sudo update-grub" :)

After "sudo update-grub" grub.cfg still contains the "recordfail=1" and if [ ${recordfail} = 1 ]; then set timeout=-1 else set timeout=10 fi entries but somehow Ubuntu now boots just fine.

#443

I was unimpressed by the boot speed in Ubuntu 9.10 with its new grub2 boot loader.But I could configure it with some eye candy and hope for an speed improvement in 10.04 Boot speed is not big deal if you only boot once every other day.

But What impressed mi more is the boot speed for ubuntu 10.04 and it's cute new interface:

Error; no such device: b013b813-3a6a-4f1e-8809-c445cce87676.

I know this cute number identifies a partition which can have other aliases such /dev/hda1 or /dev/sda1 or some times /dev/sdb1 /dev/hb1 o (hd0,0). Very nice! Specially if you have a system with several disks and partitions.

I know that sometime in the future, this system will be better than sliced bread. But today my system does not boot.

I have tried to reinstall 10.4 and install 8.04 but I still have the same result.

Error; no such device: b013b813-3a6a-4f1e-8809-c445cce87676.

I could take my hard disks and install them in my other computer so I can read them while I study to find a solution. But they are sata and the old computer is pata :-((

Should I buy a new hard disk, install some distro which boots and then start recovering my data.

While looking for a solution I found there are many people with exactly the same problem Is all this mess necessary?

Does any body know a solution. I tried several, including reinstall but they did not work.

#444

There is, I am sorry to say, little information of use in your post.

How about booting to a Live CD and running this boot info script and posting the resulting text?

http://bootinfoscript.sourceforge.net/

#445

As a follow-up to the discussion we had on pp 38 and 39 of this thread regarding the problems I had in accessing the Windows loader from GRUB2 after upgrading from Karmic to Lucid beta 1 (problems which persisted through beta 2 and into the present stable release), I'd like to report that, thanks to Takkat, who kindly posted to the Launchpad bug I filed (#571893), I have been now able to resolve the problem. In my opinion, however, it must still be deemed a serious bug in the Karmic &#8594; Lucid upgrade on multi-boot computers ; users of such boxes shouldn't have to jump through these hoops in order to get a simple upgrade to work properly ! In any event, thanks are due dino99, ranchhand, and in particular, kansasnoob, for their gracious suggestions in this regard....

Henri

#446

Lechatelier said: I was unimpressed by the boot speed in Ubuntu 9.10 with its new grub2 boot loader.But I could configure it with some eye candy and hope for an speed improvement in 10.04 Boot speed is not big deal if you only boot once every other day.

But What impressed mi more is the boot speed for ubuntu 10.04 and it's cute new interface:

Error; no such device: b013b813-3a6a-4f1e-8809-c445cce87676.

I know this cute number identifies a partition which can have other aliases such /dev/hda1 or /dev/sda1 or some times /dev/sdb1 /dev/hb1 o (hd0,0). Very nice! Specially if you have a system with several disks and partitions.

I know that sometime in the future, this system will be better than sliced bread. But today my system does not boot.

I have tried to reinstall 10.4 and install 8.04 but I still have the same result.

Error; no such device: b013b813-3a6a-4f1e-8809-c445cce87676.

I could take my hard disks and install them in my other computer so I can read them while I study to find a solution. But they are sata and the old computer is pata :-((

Should I buy a new hard disk, install some distro which boots and then start recovering my data.

While looking for a solution I found there are many people with exactly the same problem Is all this mess necessary?

Does any body know a solution. I tried several, including reinstall but they did not work.

I'm having a similar problem with 10.04. I get this error message:

ALERT: /dev/disk/by-uuid/"long-string-of-leters-and-numbers" does not exist. Dropping to shell! 

The only way I can get around it, is by typing "exit" into initramfm which will continue boot up. It's really quite annoying. Grub 2 has seriously been nothing but a hassle for me, since it was introduced into Ubuntu. I generally just uninstall it and replace it with legacy Grub, but I can't seem to figure out how to do that in 10.04. :confused:

#447

Just installed 10.4 All my efforts to make Windows the default and change colors for the boot menu using the recommended techniques failed. For whatever reason, the change to the default did not take.When I edited the colors in the 05_Debian_theme file, there were 2 entries for that file in grub2.cfg. Finally, opened grub2.cfg using sudo gedit, moved the O/S (file 30.os_prober) above the Linux (10_Linux), commented out the color scheme that I did not want, saved the file and rebooted. Menu had the desired color scheme, and Windows is now the default, and appears first on the menu.

I know they say not to edit this file, but it worked (I made a backup first, just in case), and yes, I did run sudo update-grub after changing the files in etc/grub.d.

#448

Well, Linux is still a work in progress, no matter what anyone says. This is why I still use Windows 7 for any mission critical work (finances, photo editing, important correspondence...etc.I have been lucky, my install worked. Are you installing on a dual boot computer with Windows? What I would say is that you might try deleting the Linux partitions in Windows. This will leave use the unallocated/free space. Try reinstalling Uuntu using the option for it to install in the free space. Another option would be to install using wubi.exe, which will perform the install inside of Windows.

If you are not installing along side of Windows, you might look for a app that you can boot to from a CD that will enable you to copy any data files to a USB drive. Once you have done that, do a total reformatting of your hard disk, if possible, making one large unformatted partition (there should e some freeware that will enable you to do that), and reinstalling from there.

There do not seem to be any good alternatives - hopefully, your important data resides on another PC, or has at least been backed up to one.

This does highlight the importance of backing data up to an external source, and of being careful in choosing an O/S for critical business data or home finances and pictures...etc.

Lechatelier said: I was unimpressed by the boot speed in Ubuntu 9.10 with its new grub2 boot loader.But I could configure it with some eye candy and hope for an speed improvement in 10.04 Boot speed is not big deal if you only boot once every other day.

But What impressed mi more is the boot speed for ubuntu 10.04 and it's cute new interface:

Error; no such device: b013b813-3a6a-4f1e-8809-c445cce87676.

I know this cute number identifies a partition which can have other aliases such /dev/hda1 or /dev/sda1 or some times /dev/sdb1 /dev/hb1 o (hd0,0). Very nice! Specially if you have a system with several disks and partitions.

I know that sometime in the future, this system will be better than sliced bread. But today my system does not boot.

I have tried to reinstall 10.4 and install 8.04 but I still have the same result.

Error; no such device: b013b813-3a6a-4f1e-8809-c445cce87676.

I could take my hard disks and install them in my other computer so I can read them while I study to find a solution. But they are sata and the old computer is pata :-((

Should I buy a new hard disk, install some distro which boots and then start recovering my data.

While looking for a solution I found there are many people with exactly the same problem Is all this mess necessary?

Does any body know a solution. I tried several, including reinstall but they did not work.

#449

Hey,

does anyone know if within the grub2 config files if something like an 'includes' can be used to add the content of another file, this is so that I can outlay all the general settings in one file, and use it across several sub-menus I'm using.

e.g. at the top of each /boot/grub/grub_##.cfg file I have a line like includes /boot/grub/grub_menu.cfg

cheers

#450

I do not know if that will work but I would try adding everything you want to the /etc/default/grub file.

I would also check all the links at the bottom of the first post. There is some real handy info in every one of the threads by drs305.

#451

I tried upgrade my karmic to lucid but when I restart the PC appear the following error mensage in a prompt:

[B]GRUB loading. error: the symbol 'grub_puts_' Not Found grub rescue>[/B]

I already tried many things that saw in many forums, but nothing work. Include somethings of this forum.

An other problem is that I'm not getting to do the boot with the ubuntu 10.04 live cd,to access the terminal.

#452

armandozumpi said: I tried upgrade my karmic to lucid but when I restart the PC appear the following error mensage in a prompt:

[B]GRUB loading. error: the symbol 'grub_puts_' Not Found grub rescue>[/B]

I already tried many things that saw in many forums, but nothing work. Include somethings of this forum.

An other problem is that I'm not getting to do the boot with the ubuntu 10.04 live cd,to access the terminal.

Do you have dual monitors? If so, you won't be able to boot into live CD with both of them attached.

#453

All that business about fools rushing in does seem indeed to be the case ; despite my experience with the difficulties that GRUB2 carries in its train, I took the liberty of reinstalling a (32--bit) Windows Server 2008, from which I had been locked out and for which all attempts to blank/reset the password had failed, on my multi-boot main box which boots to 64-bit Lucid by default. I was, of course, aware that doing so would allow Windows to hijack the MBR so that only the Windows bootloader would be accessible, but I hoped to be able to restore GRUB2 using the [_[COLOR="Blue"] same procedures[/COLOR]_]("https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows") with which I had previously been able to restore legacy GRUB in similar situations. While the documentation hasn't been updated to correspond with Lucid, the situation looked similar enough that I was reasonably sure that using the Lucid[/B] Live CD would work. Here below the results of my attempt to implement the standard solution in a terminal :> ubuntu@ubuntu:~$ mount | tail -l none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) none on /dev/shm type tmpfs (rw,nosuid,nodev) tmpfs on /tmp type tmpfs (rw,nosuid,nodev) none on /var/run type tmpfs (rw,nosuid,mode=0755) none on /var/lock type tmpfs (rw,noexec,nosuid,nodev) none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) gvfs-fuse-daemon on /home/ubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=ubuntu) /dev/sdb1 on /media/bc560bbd-c79d-4e82-8dbd-677d3ed7af4a type ext4 (rw,nosuid,nodev,uhelper=udisks) ubuntu@ubuntu:~$ ls /media/bc560bbd-c79d-4e82-8dbd-677d3ed7af4a/boot abi-2.6.32-21-generic memtest86+.bin abi-2.6.32-22-generic System.map-2.6.32-21-generic config-2.6.32-21-generic System.map-2.6.32-22-generic config-2.6.32-22-generic vmcoreinfo-2.6.32-21-generic grub vmcoreinfo-2.6.32-22-generic initrd.img-2.6.32-21-generic vmlinuz-2.6.32-21-generic initrd.img-2.6.32-22-generic vmlinuz-2.6.32-22-generic ubuntu@ubuntu:~$ sudo grub-install --root-directory=/media/bc560bbd-c79d-4e82-8dbd-677d3ed7af4a /dev/sdb Installation finished. No error reported. Not exactly those shown in the documentation, but, I hoped, close enough ! Alas, when I rebooted, GRUB2 still failed to load, leaving only the [B]Windows[/B] partitions accessable. I've repeated the procedure several times, hoping against hope, but no joy. Any suggestions as to where I've gone wrong, and more importantly, how I might be able to correct the situation. I'd very much like to avoid having to re-install Lucid !...

Henri

#454

How about just trying;

https://wiki.ubuntu.com/Grub2#Recover%20Grub%202%20via%20LiveCD

Can't hurt.

If that does not work I would chroot in and remove grub-pc and grub-common and then reinstall them. This should install grub on the MBR just as the installation of Ubuntu would do.

I realize it is not elegant. It is fast and easy.

#455

Thanks, ranch hand, for your response ! I've tried to follow the instructions to which you refer in a terminal with the following results :> ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xcab10bee

Device Boot Start End Blocks Id System /dev/sda1 * 1 14744 118431148+ 7 HPFS/NTFS /dev/sda2 14745 29489 118439212+ 7 HPFS/NTFS /dev/sda3 29490 30401 7325640 c W95 FAT32 (LBA)

Disk /dev/sdb: 250.1 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x480be465

Device Boot Start End Blocks Id System /dev/sdb1 * 1 29649 238155561 83 Linux /dev/sdb2 29650 30401 6040440 5 Extended /dev/sdb5 29650 30401 6040408+ 82 Linux swap / Solaris ubuntu@ubuntu:~$ sudo mount /dev/sdb1 /mnt mount: /dev/sdb1 already mounted or /mnt busy mount: according to mtab, /dev/sdb1 is already mounted on /mnt ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt/boot fuse: mount failed: Device or resource busy ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt/boot fuse: mount failed: Device or resource busy ubuntu@ubuntu:~$ sudo mount --bind /dev /mnt/dev ubuntu@ubuntu:~$ sudo mount --bind /proc /mnt/proc ubuntu@ubuntu:~$ sudo mount --bind /sys /mnt/sys ubuntu@ubuntu:~$ sudo chroot /mnt root@ubuntu:/# So far so good ! But when I perform 'nano /etc/default/grub', I see the following :> GNU nano 2.2.2 Fil: /etc/default/grub

This file is sourced by update-grub, and its variables are propagated

to its children in /etc/grub.d/

GRUB_DEFAULT=0 GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL=console

Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

#GRUB_DISABLE_LINUX_UUID=true

which unfortunately doesn't give me any idea as to what it is that needs to be edited. Thus, for the moment I'm stuck and don't know quite how to continue. In any event, there's a delicious irony in the whole process - first an upgrade from Karmic to Lucidthat rendered the Windows loader inaccessable, now a re-installation of Windows Server 2008 that makes GRUB2 inaccessible. Revenge ?...

Henri

#456

Normally you d onot need to edit that file at all. I would check to make sure that it looks like this;


GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0

I lest that top line there to show where that is in the file. If that # is not there you will have a hidden menu.

I am hoping that you edited that out of your post. It should be in your /etc/default/grub file either commented (as above) or uncommented.

If it is not there I would put it in and if you have success booting in I would remove grub-pc and grub-common (the real problem here if that is not in there) and then reinstall them.

If the menu does not come up hit the "shift" key and hold it down and the menu should appear.

I never have a problem with grub and MS OS'. I do not have any of that crap on any boxes. It is not permitted in the house.

That said, MS boot loaders have a history of not playing nice with others. I think that the main problem here is the instructions on the istallation of grub. You generally get a box that asks where you want it installed and then are told that if you do not know just install it on all the options. This is bad. The only place you want the bugger is on the drive and not on any of the partitions. By selecting "all" you over write the MS boot loader with rather unwanted effect if you want to boot to it.

Other editing of files can be done easier, if needed, once you are in Ubuntu.

It is the commands "update-grub" and "grub-install /dev/sda" that you need to run to get the thing working. I would also run "grub-mkconfig". Update-grub is being depreciated more with every version of grub in favor of grub-mkconfig. This is a good thing but confusing. Running both gets you in the habit and makes sure that the job is actually done.

It also lets you see exactly what is going on with the grub.cfg file.

#457

update-grub is a stub for running grub-mkconfig -o /boot/grub/grub.cfg to generate a grub2 config file :)

#458

Are there any graphical interfaces for Grub 2 available to set various parameters for the menu screen such as background color, OS and kernel choices, menu color, splash screen, without having to modify the appropriate files directly and running update-grub? Thanks!

#459

Nope.

You might want to look at burg. It has more themes and icon style menus.

#460

I have my Grub screen looking so good I almost want to restart my PC every once in a while just to look at it! :P

I have light-cyan as my normal color and white for my highlight color. And I hadn't noticed that the normal color is what is displayed for the box, etc.

For the picture I have, this is beautiful and shows very cleanly! I have noticed that different pictures need different normal and highlight colors.

Windows 7, etc. could not touch the bootup screen I have on my PC! :popcorn: PS I am soooo sick of hearing those commercials "I'm a PC and windows 7 was my idea" that I am talking to Ralf about buying a Buick!

#461

I'm having problem with the grub menu resolution which I've explained here and was hoping someone might solve it.....:(

#462

In section 6, it states In order to enable the "saved default" option with which Grub 2 preselects the last successfully-used option at boot, the "DEFAULT=save" option must be entered in /etc/default/grub and the 40_custom file must be modified.

Problem I have is that it doesn't explain HOW the 40_custom file must be modified.

I've edited /etc/default/grub as explained. What do I need to add to the 40_custom file? Please be specific, writing script files is not something I've got experience at. Thanks.

#463

Did you do sudo update-grub? That has to be done for the changes to "stick".

#464

Yes.

#465

wgn said: Problem I have is that it doesn't explain HOW the 40_custom file must be modified.

I've edited /etc/default/grub as explained. What do I need to add to the 40_custom file? Please be specific, writing script files is not something I've got experience at. Thanks.

The reference to the 40_custom file is only because that quote is taken from a section on creating a 40_custom file. If you aren't using one, modifying /etc/default/grub is all that is required.

Take a look at the section "/etc/grub/default" and read the information under the "GRUB_DEFAULT" option. See if that explains it sufficiently. If not, let me know what's not clear and I'll be glad to clarify it.

For help on making a 40_custom file, *meierfra* has a good page: http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Custom_Menu

#466

The part of section 5 that deals with /etc/default/grub said I could set "GRUB_SAVEDEFAULT=true" but there is no "GRUB_SAVEDEFAULT=" in the default file. Can I just add the line to file, and if so does it matter where I add it to the file?

Should it be right under "GRUB_DEFAULT=saved"?

#467

wgn said: The part of section 5 that deals with /etc/default/grub said I could set "GRUB_SAVEDEFAULT=true" but there is no "GRUB_SAVEDEFAULT=" in the default file.

Can I just add the line to file, and if so does it matter where I add it to the file?

Should it be right under "GRUB_DEFAULT=saved"?

Yes, you merely add the line to /etc/default/grub.

Note: GRUB_SAVEDEFAULT=true is the setting to use if you want to always set the default entry to what you used *last*.

Note 2: Since you mentioned the 40_custom file, the version of Grub2 which now ships with Lucid Lynx (10.04) no longer requires any special lines in /etc/grub.d/40_custom for the GRUB_SAVEDEFAULT function to work. As long as the *GRUB_DEFAULT=saved* and *GRUB_SAVEDEFAULT=true* lines exist in /etc/default/grub any entry in a 40_custom which is selected will become the default for the next boot. I have removed the DEFAULT=saved paragraph from the first post's 40_custom section to avoid confusion.

#468

Thanks! Works perfectly.

I like to configure it this way so that when XP needs to restart (which it needs to do fairly often) I can just push the button and walk away, and when I come back it's ready to re-login.

Maybe you could clarify in the first post that the GRUB_SAVEDEFAULT= command isn't part of the default /etc/default/grub and needs to be added, if necessary.

Thanks again!

#469

wgn said: Maybe you could clarify in the first post that the GRUB_SAVEDEFAULT= command isn't part of the default /etc/default/grub and needs to be added, if necessary.

I've added an asterisk ([SIZE=4]**[COLOR="Blue"]*[/COLOR]**[/SIZE]) to lines which are not included in the default file.

Thanks for the input.

#470

I need to create 2 custom bootable grub2 iso files. One will boot my windows7 located on my Disk0 Partition1 only and one will boot my ubuntu only on my Disk0 Partition3.

Anyone would like to help me with the required steps? Even though I read the first page and some other documentation, Im not able to figure out how to do it on my own; tried a couple of things which didnt work.

Thanks...

#471
#472

Alright, this is what worked for me.

1- I have created an bootable Grub2 iso file...

grub-mkrescue --output=rescue.iso /boot/grub

http://members.iinet.net/~herman546/p20/GRUB2%20Bash%20Commands.html#GRUB2_CD-ROM

2- Using one of the Iso editing software I have altered the "grub.cfg" file. You can use Iso Master on Ubuntu (thx Peter) or UltraIso on windows, or whatever your choice of utility to edit the files inside the Iso image without altering its structure and bootable status.

I used a very simple and basic "grub.cfg" file sample and edited it to my needs and according to my setup. http://grub.enbug.org/grub.cfg

3- Now the most important part, where I have wasted too much time myself. Which "grub.cfg" file needs to be altered inside the iso?

In the Iso image structure there is one at the root of the image "/" and one another on the "boot/grub/i386-pc/" path. The answer is "None" of them. You dont edit those "grub.cfg" files but you place a new one on the path of "boot/grub/"

Thats about it...

#473

3- Now the most important part, where I have wasted too much time myself. Which "grub.conf" file needs to be altered inside the iso? Thats about it...

Is it grub.conf or *grub.cfg*, which is the normal configuration file for Grub 2? If the latter, just edit your previous post rather than make a correction in a new one.

#474

hello!

how do you make linux with grub2 boot with the option [FONT="Courier New"]acpi_sleep=old_ordering[/FONT]?

I mean I could write it into the Grub menu.lst, but I don't know where to write it in the grub2 settings.

and without this line my PC is not able to suspend/hibernate normally.

thanks in advance!

#475

altima said: hello!

how do you make linux with grub2 boot with the option [FONT="Courier New"]acpi_sleep=old_ordering[/FONT]?

I mean I could write it into the Grub menu.lst, but I don't know where to write it in the grub2 settings.

and without this line my PC is not able to suspend/hibernate normally.

thanks in advance!

That would be added to end of the following line in /etc/default/grub:> GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_sleep=old_ordering"

After saving the file, run "sudo update-grub"

#476

thank you so much! it helped and I got the idea =)

#477

ranch hand said: Normally you d onot need to edit that file at all. I would check to make sure that it looks like this;


GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0

I lest that top line there to show where that is in the file. If that # is not there you will have a hidden menu.

I am hoping that you edited that out of your post. It should be in your /etc/default/grub file either commented (as above) or uncommented.

If it is not there I would put it in and if you have success booting in I would remove grub-pc and grub-common (the real problem here if that is not in there) and then reinstall them

...

Thanks again, ranchhand, for your response ! A problem - perhaps _the_ problem ? - is that I find myself unable to comment the line «GRUB_TIMEOUT=5» ; I have no problem inserting a «#», but I can't save it. When I try, I'm asked what the file is to be called and where it is to be saved. If I they attempt to save it under, e g, the «Files» folder with the name «/etc/default/grub», I see the following error message> Could not save contents Error opening file '/etc/default/grub': Permission deniedAs a matter of fact, I can't do any editing at all, nor are commands of the type``` grub-mkconfig


The above seems to have to do with the fact that I'm running the terminal from the **Lucid** Live CD rather than a version installed to my harddisk. Previously, as noted above, one could use the Live CD to recover **GRUB**, but hitherto all my attempts to do so with **GRUB2** have failed. I've done a backup of my most important files to an external harddisk, but I'd really rather avoid having to re-install the OS....

Henri
#478

mhenriday said: The above seems to have to do with the fact that I'm running the terminal from the Lucid Live CD rather than a version installed to my harddisk. Previously, as noted above, one could use the Live CD to recover GRUB, but hitherto all my attempts to do so with GRUB2 have failed. I've done a backup of my most important files to an external harddisk, but I'd really rather avoid having to re-install the OS....

Henri

Henri,

It sounds like you are either not running as root or did not "chroot" successfully. If you are trying to reinstall Grub2, follow the procedures here (as RanchHand linked). https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD

If you continue to have problems, I would suggest starting a thread of your own, describe the problem, and then run and post the results of the boot info script found here: http://bootinfoscript.sourceforge.net/

More people will be likely to look at a new thread, and RanchHand will no doubt find it. I'll continue to watch for it as well if the above doesn't fix things.

#479

Drs305, thanks for your suggestion ! I doubt, however, that the problem is a failure to run as root - as can be seen from my post on p 46 of this thread, entering``` sudo chroot /mnt


Henri
#480

mhenriday said: Drs305, thanks for your suggestion ! I doubt, however, that the problem is a failure to run as root - as can be seen from my post on p 46 of this thread, entering```

sudo chroot /mnt


Henri

Yes, if you were getting the "root@ubuntu:/# " then you should have been operating as root. I'll watch for your new thread.
#481

[edit] Nevermind. It's working now. There was a "GRUB_SAVEDEFAULT=1" entry remaining after the "GRUB_SAVEDEFAULT=true". I only noticed it after posting here. ^^' [/edit]

I just can't get grub 2 to save the last booted entry. :( Here's my /etc/default/grub:


# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=saved
#GRUB_DEFAULT="Windows Vista (loader) (on /dev/sda1)"
#GRUB_DEFAULT=0

GRUB_SAVEDEFAULT=true

#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
#482

Love Ubuntu.

Hit a logjam on another machine.

I've got a Windows box that freezes during wubi, live cd or USB install of Ubuntu.

Any thoughts / suggestions?

Thanx

#483

budlyapi said: Love Ubuntu.

Hit a logjam on another machine.

I've got a Windows box that freezes during wubi, live cd or USB install of Ubuntu.

Any thoughts / suggestions?

Thanx

I'd recommend starting a new thread if you can't find a solution already posted. Be a bit more descriptive about where in the process the system freezes and what kind of computer you are trying to install it on (especially if the specs are suspect/older machine).

The first advice you are likely to get is do an MD5SUM check to make sure the CD isn't corrupted, and next will be to burn the ISO at a slower speed. The third will probably be to try the Alternate CD, which is a bit more forgiving during the installation process.

;-) Good luck.

#484

I entered "sudo fdisk -f", logged in under Ubuntu 8.04 live cd in "try without installing mode". Got this"

Disk /dev/sda: 160.0 GB, 160000000000 bytes 255 heads, 63 sectors/track, 19452 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x17921791

Device Boot Start End Blocks Id System /dev/sda1 * 1 18702 150215680 83 Linux /dev/sda2 18702 19453 6031361 5 Extended /dev/sda5 18702 19453 6031360 82 Linux swap / Solaris

Disk /dev/sdb: 160.0 GB, 160000000000 bytes 255 heads, 63 sectors/track, 19452 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00045f69

Device Boot Start End Blocks Id System /dev/sdb1 1 18702 150223783+ 83 Linux /dev/sdb2 18703 19452 6024375 5 Extended /dev/sdb5 18703 19452 6024343+ 82 Linux swap / Solaris

#485

Randy Schilling is online now Reply With Quote

pls confirm,

This is to confirm that you have the output to my fdisk command

#486

I had (still have, actually) Vista installed on one of my HDDs and installed 10.04 on one of my other HDDs (both SATA).

Now, I can't boot into Vista. Whenever I do update-grub I get the following output:

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-22-generic
Found initrd image: /boot/initrd.img-2.6.32-22-generic
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /boot/memtest86+.bin
done

I've tried reading through the grub2 tutorial stuff and holy crap it's confusing... Can anyone help me figure out why my Vista partition isn't being picked up by Grub?

Thanks!

#487

I ran Boot Info Script, in the event that this information can help someone give me info on how to get GRUB to properly see my Vista partition.

                Boot Info Script 0.55    dated February 15th, 2010                    

============================= Boot Info Summary: ==============================

 => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
    partition #2 for /boot/grub.
 => Windows is installed in the MBR of /dev/sdb
 => Windows is installed in the MBR of /dev/sdc
 => Windows is installed in the MBR of /dev/sdd

sda1: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info:  

sda5: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

sda2: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Ubuntu 10.04 LTS
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda3: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files/dirs:   

sdb1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

sdc1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

sdd1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows Vista
    Boot files/dirs:   /Windows/System32/winload.exe

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders, total 156250000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sda1               2,046    15,624,191    15,622,146   5 Extended
/dev/sda5               2,048    15,624,191    15,622,144  82 Linux swap / Solaris
/dev/sda2    *     15,624,192    44,920,831    29,296,640  83 Linux
/dev/sda3          44,920,832   156,248,063   111,327,232  83 Linux


Drive: sdb ___________________ _____________________________________________________

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdb1                  63   976,768,064   976,768,002   7 HPFS/NTFS


Drive: sdc ___________________ _____________________________________________________

Disk /dev/sdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdc1    *             63   156,296,384   156,296,322   7 HPFS/NTFS


Drive: sdd ___________________ _____________________________________________________

Disk /dev/sdd: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders, total 156250000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdd1    *             63   156,232,124   156,232,062   7 HPFS/NTFS


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda1: PTTYPE="dos" 
/dev/sda2        77ddb452-3a4d-48fb-8f67-a7c4e0da87a0   ext4                                     
/dev/sda3        7e619c5d-ce45-43d4-bb27-f2fe19baf767   ext4                                     
/dev/sda5        74778471-e238-4c1d-8890-67967d7f009b   swap                                     
/dev/sda: PTTYPE="dos" 
/dev/sdb1        729C56339C55F259                       ntfs       magrathea                     
/dev/sdb: PTTYPE="dos" 
/dev/sdc1        ECB89E61B89E29DA                       ntfs       Games                         
/dev/sdc: PTTYPE="dos" 
/dev/sdd1        32CECA2CCEC9E865                       ntfs                                     
/dev/sdd: PTTYPE="dos" 

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

/dev/sda2        /                        ext4       (rw,errors=remount-ro)
/dev/sda3        /home                    ext4       (rw)
/dev/sdb1        /media/magrathea         fuseblk    (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)


=========================== sda2/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/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
  load_env
fi
set default="0"
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
}
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 77ddb452-3a4d-48fb-8f67-a7c4e0da87a0
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=1600x1200
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 77ddb452-3a4d-48fb-8f67-a7c4e0da87a0
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,2)'
	search --no-floppy --fs-uuid --set 77ddb452-3a4d-48fb-8f67-a7c4e0da87a0
	linux	/boot/vmlinuz-2.6.32-22-generic root=UUID=77ddb452-3a4d-48fb-8f67-a7c4e0da87a0 ro   quiet splash
	initrd	/boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,2)'
	search --no-floppy --fs-uuid --set 77ddb452-3a4d-48fb-8f67-a7c4e0da87a0
	echo	'Loading Linux 2.6.32-22-generic ...'
	linux	/boot/vmlinuz-2.6.32-22-generic root=UUID=77ddb452-3a4d-48fb-8f67-a7c4e0da87a0 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,2)'
	search --no-floppy --fs-uuid --set 77ddb452-3a4d-48fb-8f67-a7c4e0da87a0
	linux	/boot/vmlinuz-2.6.32-21-generic root=UUID=77ddb452-3a4d-48fb-8f67-a7c4e0da87a0 ro   quiet splash
	initrd	/boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,2)'
	search --no-floppy --fs-uuid --set 77ddb452-3a4d-48fb-8f67-a7c4e0da87a0
	echo	'Loading Linux 2.6.32-21-generic ...'
	linux	/boot/vmlinuz-2.6.32-21-generic root=UUID=77ddb452-3a4d-48fb-8f67-a7c4e0da87a0 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod ext2
	set root='(hd0,2)'
	search --no-floppy --fs-uuid --set 77ddb452-3a4d-48fb-8f67-a7c4e0da87a0
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod ext2
	set root='(hd0,2)'
	search --no-floppy --fs-uuid --set 77ddb452-3a4d-48fb-8f67-a7c4e0da87a0
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

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

=============================== sda2/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda2 during installation
UUID=77ddb452-3a4d-48fb-8f67-a7c4e0da87a0 /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda3 during installation
UUID=7e619c5d-ce45-43d4-bb27-f2fe19baf767 /home           ext4    defaults        0       2
# swap was on /dev/sda5 during installation
UUID=74778471-e238-4c1d-8890-67967d7f009b none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

=================== sda2: Location of files loaded by Grub: ===================


  10.3GB: boot/grub/core.img
  15.2GB: boot/grub/grub.cfg
  10.4GB: boot/initrd.img-2.6.32-21-generic
  10.6GB: boot/initrd.img-2.6.32-22-generic
  10.3GB: boot/vmlinuz-2.6.32-21-generic
   8.2GB: boot/vmlinuz-2.6.32-22-generic
  10.6GB: initrd.img
  10.4GB: initrd.img.old
   8.2GB: vmlinuz
  10.3GB: vmlinuz.old

Thanks

#488

It is really best if you start your own thread.

It is easier for you to keep track of and also for anyone trying to help you.

It is easier for someone with the same type of problem to find it by funning a search.

Why don't you do that, and post a link here?

#489

ranch hand said: It is really best if you start your own thread.

It is easier for you to keep track of and also for anyone trying to help you.

It is easier for someone with the same type of problem to find it by funning a search.

Why don't you do that, and post a link here?

I went ahead and started my own thread here.

Sorry for the clutter.

PS: to make matters worse, my wireless is completely flaky in ubuntu...

#490

I'm having a little trouble with my attempt to boot a number of iso files using grub2, including a live clonezilla, gparted, ubuntu, and once I figure everything else out, I'd like to add my copy of spinrite and other utilities. I have posted a more detailed thread about this here if anybody would like to take a look. Thank you very much for your help.

#491

Hello ! Even with the solution done a few messages above the saved option still doesn't work for me ! I change the /etc/default/grub as you can see below. Made an update with ``` sudo update-grub

grub version1.98.1

any idea ?


my /etc/default/grub

If you change this file, run 'update-grub' afterwards to update

/boot/grub/grub.cfg.

GRUB_DEFAULT=saved GRUB_SAVEDEFAULT=true #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=false GRUB_TIMEOUT="8" GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""

Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL=console

The resolution used on graphical terminal

note that you can use only modes which your graphic card supports via VBE

you can see them in real GRUB with the command `vbeinfo'

GRUB_GFXMODE=1024x768

Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

#GRUB_DISABLE_LINUX_UUID=true

Uncomment to disable generation of recovery mode menu entrys

#GRUB_DISABLE_LINUX_RECOVERY="true"

cat /boot/grub/grub.cfg #

DO NOT EDIT THIS FILE

#

It is automatically generated by /usr/sbin/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 load_env fi set default="${saved_entry}" 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 } insmod ext2 set root='(hd0,7)' search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2 if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=1024x768 insmod gfxterm insmod vbe if terminal_output gfxterm ; then true ; else # For backward compatibility with versions of terminal.mod that don't # understand terminal_output terminal gfxterm fi fi insmod ext2 set root='(hd0,7)' search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2 set locale_dir=($root)/boot/grub/locale set lang=fr insmod gettext if [ ${recordfail} = 1 ]; then set timeout=-1 else set timeout=8 fi

END /etc/grub.d/00_header ###

BEGIN /etc/grub.d/05_debian_theme ###

set menu_color_normal=white/black set menu_color_highlight=black/light-gray

END /etc/grub.d/05_debian_theme ###

BEGIN /etc/grub.d/10_linux ###

menuentry 'Ubuntu, avec Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail savedefault insmod ext2 set root='(hd0,7)' search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2 linux /boot/vmlinuz-2.6.32-22-generic root=UUID=1cc43d08-4c75-41f1-ad23-7681465167a2 ro quiet splash initrd /boot/initrd.img-2.6.32-22-generic } menuentry 'Ubuntu, avec Linux 2.6.32-22-generic (mode de récupération)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail savedefault insmod ext2 set root='(hd0,7)' search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2 echo 'Chargement de Linux 2.6.32-22-generic ...' linux /boot/vmlinuz-2.6.32-22-generic root=UUID=1cc43d08-4c75-41f1-ad23-7681465167a2 ro single echo 'Chargement du disque mémoire initial...' initrd /boot/initrd.img-2.6.32-22-generic } menuentry 'Ubuntu, avec Linux 2.6.31-20-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail savedefault insmod ext2 set root='(hd0,7)' search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2 linux /boot/vmlinuz-2.6.31-20-generic root=UUID=1cc43d08-4c75-41f1-ad23-7681465167a2 ro quiet splash initrd /boot/initrd.img-2.6.31-20-generic } menuentry 'Ubuntu, avec Linux 2.6.31-20-generic (mode de récupération)' --class ubuntu --class gnu-linux --class gnu --class os { recordfail savedefault insmod ext2 set root='(hd0,7)' search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2 echo 'Chargement de Linux 2.6.31-20-generic ...' linux /boot/vmlinuz-2.6.31-20-generic root=UUID=1cc43d08-4c75-41f1-ad23-7681465167a2 ro single echo 'Chargement du disque mémoire initial...' initrd /boot/initrd.img-2.6.31-20-generic }

END /etc/grub.d/10_linux ###

BEGIN /etc/grub.d/20_memtest86+ ###

menuentry "Memory test (memtest86+)" { insmod ext2 set root='(hd0,7)' search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2 linux16 /boot/memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { insmod ext2 set root='(hd0,7)' search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2 linux16 /boot/memtest86+.bin console=ttyS0,115200n8 }

END /etc/grub.d/20_memtest86+ ###

BEGIN /etc/grub.d/30_os-prober ###

menuentry "Microsoft Windows XP Professionnel (on /dev/sda1)" { savedefault insmod ntfs set root='(hd0,1)' search --no-floppy --fs-uuid --set 5aa492ada4928ae1 drivemap -s (hd0) ${root} chainloader +1 }

END /etc/grub.d/30_os-prober ###

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

#492

drs305 said: [COLOR=DarkRed]External Drive Installs - Bug [/COLOR]bug/496435

Installs of Ubuntu on external drives can cause problems as *grub-install* uses device names (e.g. sda, sdb) rather than UUIDs in certain circumstances. If connected to another machine when an update of grub-pc is made, the upgrade may be written to the incorrect device and make the computer unbootable.

A workaround is posted on the bug link above.

The workaround (run "sudo dpkg-reconfigure grub-pc") does NOT work. Please tell me how to boot Ubuntu from my external disk. Now I am forced to use only on the pc I have installed it.

#493

saccard said: The workaround (run "sudo dpkg-reconfigure grub-pc") does NOT work. Please tell me how to boot Ubuntu from my external disk. Now I am forced to use only on the pc I have installed it.

First, subscribe to the bug report if you believe that bug is what is causing your problems. You can then get emails when others offer solutions within the bug report thread.

Secondly, please start a thread of your own restating what you have done and what your problem is. You are more likely to have success in a new thread.

Post the results of meierfra's boot info script. Place the results between "code" tags by selecting the "#" icon in the post's menu. Run the script with your external drive connected so the script will see it. http://bootinfoscript.sourceforge.net/

With that information someone familiar with booting with an external drive will hopefully be able to help with this issue.

#494

Callius said: I had (still have, actually) Vista installed on one of my HDDs and installed 10.04 on one of my other HDDs (both SATA).

Now, I can't boot into Vista. Whenever I do update-grub I get the following output:

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-22-generic
Found initrd image: /boot/initrd.img-2.6.32-22-generic
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /boot/memtest86+.bin
done

I've tried reading through the grub2 tutorial stuff and holy crap it's confusing... Can anyone help me figure out why my Vista partition isn't being picked up by Grub?

Thanks!

Callius, the problem seems to be the manner in which the update rewrites your machine's MBR file. You might want to take a look at [_[COLOR="Blue"]the testdisk workaround[/COLOR]_]("http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:Boot_Sector"), which repairs the file. This has worked for me in a situation similar to yours, as well as for many others....

Henri

#495

Thanks for the tip on removing entries. As the latest version of StartUp-Manager won't do that I'll have to do it via Synaptic.

#496

@drs305

hello,

scenario - karmic on sda8 with grub2 v197 lucid on sda10 with 198 ubuntu6 grub2. after lucid install 298 became the bootloader w afferent menu.

problem/issue - as usual during update procedure grub.cfg on karmic was updated; the procedure could 'see' the new ...-22 kernel as well as lucid. but, upon the mandatory restart grub2 197 became active all of a sudden and displayed ONLY the old kernel ...-20 version AND NO lucid boot option, contrary to what was presented during update.

rebooted again and edited 197 entry asking to boot ...-22 kernel - t did it with no problem then grub.cfg was checked - all entries are exactly as displayed during update.

then I booted up with a backup floppy - it booted 198 as it was before karmic update; grub.cfg in lucid intact.

I tried several time to recover 198 in lucid using live CD chroot procedure - no joy, every time I was informed that grub2 was installed and upom reboot the karmic crippled 197 keeps on displaying regardless.

no update-grub command could do any good neither in karmic nor in lucid.

do have any idea/solutions as to how to get 198 menu displayed again ? do I miss any entries in /etc/default/grub on either karmic or lucid ? quie possible maybe with all those rapid upgrades from 197 to 198.

thank you and best regards.

#497

sorry drs305, correction pls ....'lucid install 298'... should read ...'lucid install 198'...

#498

peter b, Are these installs on different drives or did you install Grub2 to specific partitions?

You can try running the following command from your Lucid install:

sudo dpkg-reconfigure grub-pc

You can accept the defaults for the entries on the Linux lines (tab to "OK"). If asked if you want to keep the local version or use the maintainer's version, I'd recommend the maintainer's version to get any changes to Grub2. (If you have made a lot of customizations you could back up your /etc/default/grub file and the /etc/grub.d folder).

When the command gets to the drives/partitions, select only your primary Lucid drive and deselect any *partitions* which may be designated by an asterisk. Deselect them with the space bar, then tab to OK.

If this doesn't resolve things, post the results of the following script between 'code' tags (click the # icon in the post's menu). http://bootinfoscript.sourceforge.net

#499

First I would boot to 10.04 (known to me as Lounge Lizard) and run;


sudo update-grub
[/code/
Then;
[code]
sudo grub-mkconfig

this will read out your /boot/grub/grub.cfg file and you can see if the right kernel shows up. If it does great. If not, not so great.

In either case I would then run;


sudo grub-install /dev/sda

because that version of grub is better.

Boot to 9.10 and, if you are not running on the new kernel, go to synaptic and make sure the bugger is installed.

You can see what it is running on by;


uname -a

If it is not on the new kernel and the kernel is installed put this in your 10.04 /etc/grub.d/40_custom file;

echo "Adding Main on sda6" >&2 cat << EOF menuentry "Karmic on sda8" { set root=(hd0,8) linux /vmlinuz root=/dev/sda6 ro quiet splash initrd /initrd.img } EOF

and then run;


sudo update-grub

and;


sudo grub-mkconfig

make sure that is down toward the end of the read out and reboot and try that.

If none of that works start a new thread, with a link to it here, and post the entire results text from;

http://bootinfoscript.sourceforge.net/

#500

drs305.

re ...'Are these installs on different drives or did you install Grub2 to specific partitions?'...no on both accounts. grub2 on neither karmic nor lucid (at their respective install times) required any interventions/editing or customization - on both installs they are in a plain 'vanilla'state , in a pristine state as the os installed it. they worked to my satisfaction right off the box so to speak.

I'll try a reconfig of grub-pc in lucid as suggested and see how it goes; I was tempted to do it but hesitated because never did it before and was afraid of wrecking maybe both, the currently crippled 197 in karmic as well as 198 in lucid. before running it I'll try to document myself as far as I can with the inner workings of grub-pc reconfigure cmd.

@ranch hand

update-grub and grub-mkconfig cmd from what I could see 'sees' everything that was and is in the grub.cfg - I compared the backup with the newly created file - no diff at all.

sudo grub-install /dev/sda tells me 'Installation finished. No error reported.' in lucid. in karmic I did not do it because karmic option was always under grub 198 menu in lucid install. I do not really know whether it would be wise to try/attempt a karmic grub v197 repair if I can get eventually grub 198 under lucid repaired/installed/recovered that will see karmic too

re echo "Adding Main on sda6" >&2 cat << EOF menuentry "Karmic on sda8" { set root=(hd0, linux /vmlinuz root=/dev/sda6 ro quiet splash initrd /initrd.img } EOF

I think you meant sda8 above not sda6.

thank you both; I'll keep you posted how things developed either here or a new thread as suggested. interesting stuff though. in the meantime I'm getting the stuff that I care about backed up just in case - maybe I'll have to hose both and reinstall.

#501

I forgot to edit that line. It does nothing. It is what you see on the terminal output of update-grub. It goes no where else.

That said, I certainly should have changed it to avoid you having a heart attach.

That is a symbolic menu entry that will boot the newest kernel on the defined (between the { and }) partition (as long as it is a Debian based OS).

As for the ;"dpkg-reconfigure grub-pc" it should work too if you follow the instructions for where to install the bugger as given in drs305s post. You would do that while booted to 10.04.

#502

ranch hand said: I forgot to edit that line. It does nothing. It is what you see on the terminal output of update-grub. It goes no where else.

That said, I certainly should have changed it to avoid you having a heart attach.

That is a symbolic menu entry that will boot the newest kernel on the defined (between the { and }) partition (as long as it is a Debian based OS).

As for the ;"dpkg-reconfigure grub-pc" it should work too if you follow the instructions for where to install the bugger as given in drs305s post. You would do that while booted to 10.04.Your post is 500. You've deserved it ... :)

#503

no problem ranch hand, thanks. as said, I'm currently trying to get up to speed on the grub-pc reconfigure thing that was never on my radar to scrutinize, it did its thing well off the box, so if ain't broken don't fix it as the say goes.

the more I think about the overall situation - two releases installed that have major differences as far as key packages (grub2 booting related) in their good function are concerned - I can not help but ask myself a v valid and obvious question - what's the need of karmic being there, why do I need it now ? grub2 will be forever the 197 beta in karmic (it won't be upgraded the way I understand it) so just have it there to, maybe, cause further head aches in the future ? wouldn't it be better to cut it off/forget about it right now and reinstall just lucid ?

I just need a small spark to make me hose down karmic and, in my case unfortunately, lucid will have to go too and reinstall just lucid.

I'll keep you posted.

#504

peter b said: why do I need it now ? grub2 will be forever the 197 beta in karmic (it won't be upgraded the way I understand it) so just have it there to, maybe, cause further head aches in the future ? wouldn't it be better to cut it off/forget about it right now and reinstall just lucid ?

I just need a small spark to make me hose down karmic and, in my case unfortunately, lucid will have to go too and reinstall just lucid.

I'll keep you posted.

Looks like you've analyzed things pretty well. You might want to copy some of the config files just in case you haven't customized lucid yet.

Here's a spark for you.

:-({|=

Think of it as rubbing sticks or striking flints and not playing a violin.

#505

peter b said: no problem ranch hand, thanks. as said, I'm currently trying to get up to speed on the grub-pc reconfigure thing that was never on my radar to scrutinize, it did its thing well off the box, so if ain't broken don't fix it as the say goes.

the more I think about the overall situation - two releases installed that have major differences as far as key packages (grub2 booting related) in their good function are concerned - I can not help but ask myself a v valid and obvious question - what's the need of karmic being there, why do I need it now ? grub2 will be forever the 197 beta in karmic (it won't be upgraded the way I understand it) so just have it there to, maybe, cause further head aches in the future ? wouldn't it be better to cut it off/forget about it right now and reinstall just lucid ?

I just need a small spark to make me hose down karmic and, in my case unfortunately, lucid will have to go too and reinstall just lucid.

I'll keep you posted. I have had no trouble with the different versions of grub2 playing nicely with each other.

Ditching 9.10 is up to you but I will tell you that it runs fine with the newer version. I have it on on my wifes Sys76 box that came preinstalled with 9.10 and I just like the newer one better so I slapped it on there.

#506

yes, I agree, I had no problems whatsoever with any of them, both played nicely on their own that's to say karmic delivered well all the time it was the only kid, then took the back seat elegantly when the new kid, lucid, came on the block.

however, at what degree they 'understood' and played nicely with each other it's v hard to say. basically, in my case, karmic kind of took a back seat for extended periods; I thing that I booted into it maybe 3 times since lucid install and never updated anything until .... couple of days ago, when that furry one with little horns whispered in my ear and pushed me to update to the last ..-22 kernel. at the first boot after the update, karmic/grub2 197 decided that the time came to kick lucid aside; and, to top it all off, stubbornly refused to be consistent - there is one thing written on its grub.cfg and a totally diff thing presented on the boot menu; ...-22 new kernel and lucid appear in grub.cfg and were shown during update but they are absent in grub boot menu. well, that's life, learning all the time I guess.

@drs305

I welcome your spark - decision made, one of these days time permitting, karmic will be put to good rest and be off limits on this pc; lucid will become the only kid to be taken care of.

btw, the grub-pc dpkg-reconfigure did not help - still using grub2 floppy to boot. just a side note, believe it or not, floppy boot is extremely fast, the grub2 menu is displayed almost instantly, in the blink of an eye.

thank you and best regards.

#507

I have a dumb question. I avoid using a separate /boot like the plague so I know little about it but reading your "grub 2 reinstall" procedure shouldn't you include a line about unmounting "/mnt/boot"?

Maybe something like this (in red):

Reinstalling GRUB 2 from LiveCD

If you cannot boot from GRUB 2 and need to reinstall it, here is the simple method. For more details or for advanced options, refer to the Ubuntu community documentation here: Grub2 - Reinstalling GRUB 2:

* Boot the Karmic or Lucid LiveCD (Try without installing). * From the Desktop, open a terminal - Applications, Accessories, Terminal. * Determine your normal system partition - sudo fdisk -l (That is a lowercase L) * If you aren't sure, run df -Th. Look for the correct disk size and ext3 or ext4 format. * Mount your normal system partition: Code:

sudo mount /dev/sdXY /mnt

o Example: sudo mount /dev/sda1 /mnt o Note: The partition to mount is normally the partition on which Ubuntu was installed: sda1, sdb5, etc. If you have a separate /boot partition, use the device on which the /boot partition is located. Grub 2 works best when installed in the MBR of the drive to which BIOS boots. Also remember that you mount the partition (including the number) in this step, but you do not include the partition number when you run the "sudo grub-install" command later. o Note: GRUB 2 counts the first drive (X) as "0", but the first partition (Y) as "1" * Only if you have a separate boot partition: o Code:

sudo mount /dev/sdXY /mnt/boot

with sdXY being your /boot partition designation. * Reinstall GRUB 2: Code:

sudo grub-install --root-directory=/mnt /dev/sdX

* o Example: sudo grub-install --root-directory=/mnt /dev/sda o Note: Substitute the device on which Ubuntu was installed - sda, sdb, etc. Do not specify a partition number.

[COLOR="Red"]Now you need to unmount the root system but, if you have a separate boot partition which you mounted earlier, you should unmount this first, eg: "sudo umount /mnt/boot".[/COLOR]

* Unmount the partition: Code:

sudo umount /mnt

* Reboot.

I've just been studying about the potential problems of multi-booting with a separate /boot partition with a mixture of legacy grub and grub 2 :confused:

Tis making me crazy :p

#508

I have been looking at the /boot business too, just to figure out why. The idea just doesn't make much sense to me.

It is not, however, making me crazy. Few things can do that. This is one advantage off being nuts in the first place.

#509

kansasnoob said: ... reading your "grub 2 reinstall" procedure shouldn't you include a line about unmounting "/mnt/boot"?

Done. Thanks for the input.

#510

ranch hand said: I have been looking at the /boot business too, just to figure out why. The idea just doesn't make much sense to me.

It is not, however, making me crazy. Few things can do that. This is one advantage off being nuts in the first place.

Herman pretty much voices my concerns here:

http://members.iinet.net.au/~herman546/p15.html#How_to_make_a_separate_boot_partition

I would not recommend making a separate /boot partition for any reason than for overcoming GRUB error 18.

Don't do that.

The main disadvantage of having to use a separate /boot partition is that is you want to dual boot more than one Linux installation, it is a bit tricky to get two or more linuxes to share the same separate /boot partition. If you try, any files with the same name in the new system you might be installing will overwrite files belonging to your existing system and you will lose the boot of your existing Linux.

It never made much sense to me. I have run into both the 33.8 GB and 137 GB BIOS hard disk limits causing problems but I prefer just using separate / and /home partitions. An 8 GB to 10 GB root "/" is plenty in most cases and puts the kernel within the readable area of the hard drive.

I'm just trying to improve my knowledge base :p

#511

That is pretty much my attitude.

The link to the "dedicated boot partition" is something I need to study in depth though. That actually sounds like it may make sense in some of the situations I have seen on the forums.

I do wonder, in this head in the sand age, if improving your knowledge base is a real good idea. Ignorance seems much more popular than it used to be. It appears that being ignernt is cool. Cool, of course, is the thing to strive for.

#512

It appears that being ignernt is cool.

Wow, then I'm cool!

Maybe you're not old enough to have noticed but as I've aged I find I know much less than I thought I did when I was younger :)

#513

I was amazed at how much smarter my dad got the older I got. He is not getting any smarter that I can tell now.

He has gone off to the next adventure.

I am just a pup, born in '52.

#514

I have Ubuntu on my USB pendrive.... i dont want to install it to hard disk, just use it as is on the USB Drive.

I have Ubuntu 9.10 or Ubuntu-Mini-Remix running on the USB drive. How can i change the grub menu and Splash screen on the it. Is it the same steps follow as it is installed on hard disk?? Please let me know the steps or dir/files reference.

#515

Quick question: Single OS (10.10) install on laptop. How to make Grub2Menu visible on start-up by default (it works with Shift pressed)...?

Feel free to correct with [COLOR=Red]red[COLOR=Black]...[/COLOR][/COLOR]

GRUB_DEFAULT=0

GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""

#516

How do you extend the time(>10s) in the menu to choose?

#517

/etc/default/grub is the file that has the default line, timeout and resolution of GRUB2 boot screen.

"sudo gedit /etc/default/grub"

#518

Cavsfan said: /etc/default/grub is the file that has the default line, timeout and resolution of GRUB2 boot screen.

"sudo gedit /etc/default/grub" gksu gedit /etc/default/grub Using sudo with GUI apps could get You into trouble with permissions... Well known fact and reproducible...

#519

zika said: gksu gedit /etc/default/grub

Using sudo with GUI apps could get You into trouble with permissions... Well known fact and reproducible...

It's worked fine for me for a long time, but I will update my notes and thanks!

#520

This thread was a lifesaver to me the other day. I had installed 10.04 to dual boot on my netbook along side 9.10. There may have been some things go wrong in the install, and there was trouble installing new software and doing updates (I could apparently install and update, but was always told there was an error of some kind.) The other thing was that Lucid seemed to run 5 to 10 degrees C hotter than Karmic, and Lucid would usually crash after about 30 minutes or so. I decided to take Lucid off my machine.

Ok, I had removed an operating system before, I had removed Windows with no problem: just delete the partition. So, I did it.

My last install was Lucid. I think that grub needed that partition to boot . . . whatever . . . got a boot error "partition not found". I didn't panic, but got on another machine and went to the forums. I found an article in the Ubuntu wiki that had all the same information that I used from this thread, but I couldn't use it. The commands that post told me to use were the same, but . . . Because of the fonts in the wiki article, I couldn't see where the spaces were in the commands, When I found this thread, I could see the spaces, and magically (not really magic, just correct syntax) I reinstalled a working grub. First try with these instructions.

I did a pretty dumb thing, but was pretty proud of myself for being able to fix it. Thanks to this thread and the Ubuntu community.

#521

cloyd said: I did a pretty dumb thing, but was pretty proud of myself for being able to fix it. Thanks to this thread and the Ubuntu community.

Glad you were able to figure it out. The information in this thread is at least in part also reproduced in both the Ubuntu Grub 2 wiki and the community documentation. Each has differing format requirements and capabilities so I'm glad you were able to discern the differences and found a workable solution.

#522

Chame_Wizard said: How do you extend the time(>10s) in the menu to choose?

You can change the "grub timeout" from the default 10 seconds to anything you want. Make sure to run update-grub afterwards for the changes to take effect.


GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="" 
#523

hgurol said: Alright, this is what worked for me.

1- I have created an bootable Grub2 iso file...

grub-mkrescue --output=rescue.iso /boot/grub

http://members.iinet.net/~herman546/p20/GRUB2%20Bash%20Commands.html#GRUB2_CD-ROM

2- Using one of the Iso editing software I have altered the "grub.cfg" file. You can use Iso Master on Ubuntu (thx Peter) or UltraIso on windows, or whatever your choice of utility to edit the files inside the Iso image without altering its structure and bootable status.

I used a very simple and basic "grub.cfg" file sample and edited it to my needs and according to my setup. http://grub.enbug.org/grub.cfg

3- Now the most important part, where I have wasted too much time myself. Which "grub.cfg" file needs to be altered inside the iso?

In the Iso image structure there is one at the root of the image "/" and one another on the "boot/grub/i386-pc/" path. The answer is "None" of them. You dont edit those "grub.cfg" files but you place a new one on the path of "boot/grub/"

Thats about it...

wow, this looks great! im going to try it out as soon as i have some free time and i will let you know how it turns out, thanks!

#524

@drs305

going back to #496 and subsequent. as said last re this problem, it WAS my intention/decision to remove karmic and lucid and reinstall just lucid. well, lately I didn't find/think this solution, kind of gunshot approach, a fine, elegant solution- it is rather an amateurish kind of solution. I thought about other methods, specifically targeted at the crippled sda MBR that for whatever reason does not want to get fixed as explained in my posts.

given facts, - I have a perfectly good/working part table on sda (BUT there is a crippled MBR) AND I do have a perfectly good working grub2 198 floppy disk that I'm currently using to get the pc booted either on karmic or lucid.

so, in a few words, I said/asked myself, why not get the good floppy MBR (446 Bytes) to an image file, then, remove the sda MBR (less the part table) and, finally, get the floppy MBR image saved before to sda.

the details/commands that it is my intention to use in order to accomplish the above are spelled out on the attached MBR-restore.txt file.

drs305, and anyone that feels comfortable working with MBR in conjunction with grub2 198 kindly check this procedure out and give me your best opinion. any input greatly appreciated before implementation.

#525

zika said: Quick question:

Single OS (10.10) install on laptop. How to make Grub2Menu visible on start-up by default (it works with Shift pressed)...?

Feel free to correct with [COLOR=Red]red[COLOR=Black]...[/COLOR][/COLOR] I've got several minutes spare and this works...

GRUB_DEFAULT=0

[COLOR="Red"]#[/COLOR]GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=[COLOR="Red"]false[/COLOR] GRUB_TIMEOUT=[COLOR="red"]2[/COLOR] GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""

#526
GRUB_TIMEOUT=10

It's in seconds only?:confused:

#527

...

#528

Chame_Wizard said:

GRUB_TIMEOUT=10

It's in seconds only?:confused:

As far as I know yes.  If you want a minute put in 60 seconds or 180 for three minutes etc...
#529

I recently carried out several Ubuntu installs, all with dual boot in Vista / Win7, but unfortunately found the standard GRUB2 menu to be a confusing for the users, so wanted to update it to their requirements as I had easily achieved under legacy GRUB. However, I found GRUB2 to be quite a bit different and I've had to learn new procedures.

Like a lot of people, I'm impatient when it comes to my system and want to get to the end goal without spending inordinate amounts of time having to read manuals, especially when the manual seems to be considerably overwhelming.

I had hoped to fast-track and easily be able to customise my system's GRUB2 configuration for my own needs without putting in the required time and effort. I was wrong.

I therefore had to carry out some trial and error experiments and a lot of reading. So a massive thanks goes to drs305 for his very thorough _GRUB2 guide at the beginning of this thread_, and also the very useful _GNU GRUB2_ pages at the _Illustrated dual boot_ site.

Thankfully, all the installations I carried out are now working as required with the simple menu entries and personal splash screens. However, since I don't expect to be customising GRUB2 on a regular basis, I thought it a good idea to write up my notes and experiences in to the attached, extremely simple, 'recipes'.

This is not meant to bypass all the great work before me, but merely serve as an aide memoir for future reference.

Hopefully this will help others like me to achieve the simple GRUB2 customisations they require.

#530

derrickr said: This is not meant to bypass all the great work before me, but merely serve as an aide memoir for future reference.

Hopefully this will help others like me to achieve the simple GRUB2 customisations they require.

Derrick,

Thanks for taking time to put your efforts into a pdf file. You might consider creating a new thread with an appropriate title (Grub 2 Customizations, etc) to highlight your work. When threads such as this one get very long many users may not find it - and the length of the original post may put off many newbies as well.

I'm not a fan of reinventing the wheel, but there is always room for more documentation on Grub 2. ;-) Thanks again.

#531

@drs305 and anyone interested

I just noticed in the lucid repos a package called

mbr

does anyone know of any documentation/help/howto related to this package ? the only thing I could find so far is in synaptic that says

...'The MBR is used in booting operating systems from the hard disk. It runs first, then transfers control to the operating system's loader which transfers control to the kernel.'...

TU.

#532

peter b said:

does anyone know of any documentation/help/howto related to this package ? TU.

*mbr* is the linux package that replaced ms-sys and much of what was previously written about ms-sys now can be used with "mbr".

It can be used to run certain mbr repair functions, of which *install-mbr* is one. You can read about *install-mbr* via the man pages ("man install-mbr"). "mbr" can also used in conjunction with "lilo" to repair certain Windows boot problems. I don't have any good links on the use of "mbr" unfortunately.

#533

thank you drs305; yes, man install-mbr provided some help.

I'll search further based on install-mbr cmd. once again TU.

#534

Gday, I use ubuntu as a backup tool, and it has saved me a few times. But i normally use windows. I would like to disable the GRUB screen that comes up giving me the option of OS. I would like windows to boot first and not have the screen, maybe a button that i depress at start up that can boot ubuntu or something like that. I also want to be able to test HDD's without GRUB load failed Error 17 coming up... any support would be greatly appreciated.

#535

Terry19 said: Gday,

I use ubuntu as a backup tool, and it has saved me a few times. But i normally use windows. I would like to disable the GRUB screen that comes up giving me the option of OS. I would like windows to boot first and not have the screen, maybe a button that i depress at start up that can boot ubuntu or something like that. I also want to be able to test HDD's without GRUB load failed Error 17 coming up... any support would be greatly appreciated.

Terry19,

If you are getting "Error 17" messages then it is likely you are using Grub legacy and not Grub2. You can check by looking at the version number at the top of the grub menu during boot or by running the following command from a terminal:

grub-install -v

0.97 is Grub legacy. 1.96 or later is Grub2.11

If you are using Grub2, section 7 of this guide details how to hide the menu on multi-OS computers: http://ubuntuforums.org/showthread.php?t=1287602

If you are still using Grub legacy it would be best to start a new thread or search older posts which relate to Grub and not Grub2.

#536

So, you're here because maybe you tried doing what I did, which was a good idea, at first and at last, and should have worked, but didn't. Ahh, the best laid plans of mice and (well, linux makes babies of us all). Remember, don't panic and all will be well. I'm laying out the explicit path to my success, and no more (there was a lot of trying & failing in my process.)

First, what I tried to do was make my Seagate Freeagent USB disk drive fully bootable, so I'd have all my backup & restore stuff on one external drive, in case of varioius tragedies. It's to house a bootable Ubuntu 10.04, a partimage generated ISO of my filesystem, and a grsync generated set of files which are my periodic incremental backup. Like all good techies, I burned a 10.04 LiveCD from the most recent Ubuntu ISO download before I began. Since that was the only thing I could boot from when my toubles began, I was really glad to have it.

I booted to the LiveCD and choose the install option, following the menu sequence to install to my seagate drive. I choose to wipe the drive clean. The install reformated it to Ext4, complete with extended & swap partitions, and bootable with an MBR. All that went well and without incident. One note, should you attempt this:

Carry on working your way through the install until you get to Step 7 - Ready to install. Here click on the Advanced &#8230; button. Under Advanced Options make sure that Install boot loader is checked and from the Device for boot loader installation drop down box make sure to choose the correct drive to install the boot loader onto - this is of critical importance if you still have your hard drives fitted!" http://www.zdnet.com/blog/hardware/how-to-install-ubuntu-804-on-a-usb-flash-drive/1873

After successfully installing 10.04 from the LiveCD to the Seagate drive, I rebooted, interrupting the boot with F12, and booting the Seagate, which was listed because grub found all the drives with boot sectors on them. The boot happenned just fine as expected, I'm still in the happy zone. A note about Ubuntu 10.04 - it now comes with a nifty utility at System-->Administration-->Disk Utility which I found quite handy throught my subsequent ordeal. Its a great tool and allows visual inspection of all devices and partitions in play, allows mounting & unmounting, changing the filesystem label and other useful operations. Thank the redhat team!

So I've at this point booted to the Seagate and it looks great with the new Debian theme and all. I get an Update Manager with critical security updates, and so apply them. Oh, woe is me. The updates happen just fine and then prompts to reboot to finish that process. Which of course means leaving a thread for grub to handle. Rebooting I get: error: no such device: a9995eb3c-undecipherable-numeric-gobbly-gook-nonsense grub rescue> and hangs there waiting for my commands

What the Fuc%(*&^ do I know about grub or rescuing it? Nada, I say, and so begins a new linux journey. After much research, trial and error, here's what I put into that command line: linux /boot/vmlinuz-2.6.32-22-generic root=/dev/sda3 ro initrd /boot/initrd.img-2.6.32-22-generic boot

What you put in is dependent on lot's of factors, as previously explained on this post. Mostly, finding the correct root as well as vmlinuz and initrd files for the latest linux kernel on your filesystem. With correct commands, the boot happens, and glory-be, your filesystem gets booted, all configurations intact (it pays not to panic).

If these grub commands don't work, it may because the grub in operation is old, as it was for me, so first from a LiveCD boot: sudo grub-install --root-directory=/media/harddisk /dev/sda That may be the first step to take. Doing so will place a lightweight, know nothing grub on your harddisk, but with the necessary shell for a working command set. Figuring out this one step was the most time consuming and frustrating part of my ordeal.

But all that's not enough, because grub is still mucked up, so, once booted, open a terminal and start a repair: sudo update-grub --output=/media/harddisk/boot/grub/grub.cfg sudo grub-mkconfig sudo grub-install /dev/sda

Again, these are what worked for me on my machine - your root and device will be whatever is correct for your machine, so find out first. I believe the research & reading to likely be critical to success. Its just a few short commands, but commands issued to the write grub, with the correct syntax and device designations. FYI, after the grub-install, and with grub-mkconfig -v, I see I'm working with /usr/sbin/grub-mkconfig (GNU GRUB 1.98-1ubuntu6), the latest & greatest. Be aware that grub2, like linux and Ubuntu, are in a constant state of flux - its useful to have the latest versions.

I'm in the happy zone again. Good luck! :)

References: https://wiki.ubuntu.com/Grub2 http://grub.org/?q=en/node/2

#537

@drs305, further to previous posts re my crippled HD grub2 boot

when booting off floppy, lucid uses exclusively the data/modules present on the floppy and obviously on installed lucid /boot/grub ; the entries on MBR are totally by-passed/disregarded (see below reasons what determined this opinion/conclusion). the grub> ls set of commands properly identify, enumerates and list the contents on all HDD. the booting is successful doesn't matter whether the floppy uses msdos fs or isofs. example

grub> ls (host) (hd0) (hd0,10) (hd0,9) (hd0,8) (hd0,7) (hd0,6) (hd0,5) (hd0,1) (hd1) (hd1 ,2) (hd1,1) (hd2) (hd2,1) (hd3) (hd3,1) (hd4) (hd4,1) grub> ls (hd0,10) Partition hd0,10: Filesystem type ext2 - Label "lucid" - Last modificati on time 2010-06-23 16:51:07 Wednesday, UUID 1034fb62-c437-4b92-8ed8-51b45f116520

grub> ls (hd0,10)/boot System.map-2.6.32-16-generic vmlinuz-2.6.32-16-generic config-2.6.32-16-generic abi-2.6.32-16-generic grub/ vmlinuz-2.6.32-17-generic vmcoreinfo-2.6.32-16-gener ic initrd.img-2.6.32-16-generic memtest86+.bin System.map-2.6.32-17-generic conf ig-2.6.32-17-generic abi-2.6.32-17-generic config-2.6.32-21-generic grub.old/ vm coreinfo-2.6.32-17-generic initrd.img-2.6.32-17-generic vmlinuz-2.6.32-18-generi c config-2.6.32-18-generic abi-2.6.32-18-generic System.map-2.6.32-18-generic vm coreinfo-2.6.32-18-generic initrd.img-2.6.32-18-generic vmlinuz-2.6.32-19-generi c config-2.6.32-19-generic abi-2.6.32-19-generic System.map-2.6.32-19-generic vm coreinfo-2.6.32-19-generic initrd.img-2.6.32-19-generic abi-2.6.32-21-generic Sy stem.map-2.6.32-21-generic vmcoreinfo-2.6.32-21-generic System.map-2.6.32-22-gen eric initrd.img-2.6.32-21-generic vmlinuz-2.6.32-21-generic config-2.6.32-22-gen eric abi-2.6.32-22-generic vmcoreinfo-2.6.32-22-generic initrd.img-2.6.32-22-gen eric vmlinuz-2.6.32-22-generic grub>

and so on which is absolutely correct and in line with what other cmds show - (gparted, fdisk -l etc)

conversly

when booting off HD lucid displays the grub-rescue> prompt and the set of ls commands WRONGLY identify/enumerate the HD present. (hd0) is identified as (hd2) which is obviously a non-bootable HD. moreover, the MBR HD installed grub upon entering grub-install -v cmd refuses to identify its version. the partition table in the MBR of sda (hd0) upon inspection in a hex editor shows the first entry

at offset 01be - a 00 byte or Do not use for booting as correct - indeed it is a pri data partition. at offset 01ce - the second partition table entry, the byte is shown as 80 and at - 01d2 - it is identified as 0F or extended partition which is again correct.

conclusion - the partition table on MBR on sda (hd0) appears correct; the problem seems to be with grub installed on sda MBR that for sure enumerates wrongly the HD's and, maybe (not sure at this time), may have caused problems to the EBR too.

so, obviously some questions arise

  • why the grub-rescue (when pc booted off HD) identifies/enumerates wrongly the HD's - see above ? grub-install procedure when carried out either from lucid or via chroot with live CD always displays no error messages as reported on prev posts.
  • is there any way to remove the installed sda MBR grub so a new grub install procedure on a clean slate can be carried out with a live CD or after lucid is up booted off floppy ?
  • is there any way to use the proven good data/modules on either floppy or lucid in /boot/grub to rewrite a new grub code to sda MBR and write a new EBR if needed ?

I am quite sure that within the grub2 knowledge base there is something along removing cleanly grub from MBR (without disturbing the HD data and partitions); if need be I'm quite familiar with working with hex editors that can tackle such tasks (we're lucky that GUID GPT is not implemented yet in the current lucid).

thanks in advance for your help.

#538

peter b,

There are two ways I think you can accomplish what you want. I would use the first option - purging (completely removing) G2 and then reinstalling it. Do this without your external devices connected. Make sure you have a reliable power source and Internet connection, as you will be left with no bootloader for a minute or so.

Run these commands. They will uninstall grub-pc and grub-common and then reinstall them. Due to dependencies, both packages do not have to be included in the commands. Make sure you install Grub2 to the drive (sda, etc) and not a partition.

sudo apt-get purge grub-common
sudo apt-get install grub-pc

Note: You can use TestDisk to write (clear) the MBR of Grub2. TestDisk is in the "universe" repository.


sudo testdisk

No Log > Continue > Proceed > Continue > Intel > MBR Code. You don't need to do this if you use the first procedure. Of course, if you do run TestDisk you will have to reinstall Grub2 once you have overwritten the MBR.

#539

drs305,

thank you; I shall do that - first option on your reply - over the weekend time permitting with all this world cup action going on in South Africa.

yes, I'll remove all usb connected devices prior to purging and reinstalling grub.

btw, should the bootable floppy that I'm currently using be removed too ? will the proposed procedure affect the good bootable status of floppy in any way ?

this brings up another subject, namely, that for reasons unknown to me lucid decided to stop displaying the floppy device at all, neither as an applet on the upper panel or desktop when asked to be mounted nor when asked to mount it via CLI. example

sudo mount /dev/fd0 /media/floppy0 [sudo] password for peter: peter@lucidGIGAslow:~$ ls /media/floppy0 peter@lucidGIGAslow:~$

as you could see, no message displayed and nothing present on /media/floppy0 (floppy dr light lights up). if floppy removal prior to attempting a purge/rewrite of grub is mandatory then only a physical device removal possible until a solution can be found to this problem.

some bkgrd re floppy absence/inability to mount - everything was just fine, floppy device shown on the upper panel and could be mounted UNTIL an update was carried out that contained (from /var/log/apt/history.log)

Start-Date: 2010-06-21 13:48:12 Upgrade: libcupsppdc1 (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), libcupsimage2 (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), libcupscgi1 (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), libcupsdriver1 (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), cups-client (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), cups-common (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), libcups2 (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), cups (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), cups-bsd (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), libcupsmime1 (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2) End-Date: 2010-06-21 13:49:18

lsmod lists floppy and isofs modules. dmesg | tail shows

[ 4782.605787] ISO 9660 Extensions: RRIP_1991A [ 5060.543755] ISO 9660 Extensions: RRIP_1991A [ 7482.502125] ISO 9660 Extensions: RRIP_1991A

any idea what these msgs tell me ?. indeed this bootable floppy has isofs but this does not appear to be the problem, same occurs with floppy w msdos fs.

I'm fully aware that this thread pertains to G2 but I feel that given the problems I'm having and the only means available is boot successfully off floppy, maybe/hopefully I can find some answers to this floppy related problem. just a note drs305, a little digression, after years of using ubuntu releases I'm still amazed how little attention is paid to getting and making this v sharp tool/device called floppy drive the tool of choice when comes to rescuing a failed os boot; it is v easily and often dismissed as old/ancient tech that does not deserve attention any more and is equally forgotten that innumerable times made and gained top grades in rescuing one of the most nagging pc issues, booting. personally, I'm told that I'm of the old school when there were no CD's, pendrives etc. but this old school boy HAS ALWAYS without any delay made up a rescue floppy IMMEDIATELY after a new release installed, and how well did this served me! never been/happened to be shut out of accessing any os on my pc's. where would I be today without these rescue floppies ? personally, I would make an item under system>pref or admin called create bootable rescue media (w choices floppy, pendrive, etc) and give the user up front the tool/capability to get out of trouble.

thanks in advance for your help.

#540

I don't think the floppy will effect the installation of Grub2. Just use "sudo fdisk -l" to confirm your devices before you choose the device on which to install Grub 2.

Your description of the floppy situation was very well said but I can't offer much in the way of advice. When a thread gets this long, especially on a very specific topic, there are usually very few 'helpers' that read the new posts. It would probably be best to create a new thread on your floppy problem. I understand why you brought it up in a boot-related thread, but your chance of getting an answer would be much greater if it was placed in its own thread. Keep your Grub2 install posts in here for the time being.

#541

thank you drs305, - success! - I'm back to the good old days; the pc is again a happy camper on the MBR front but .....

less on the floppy business. as you indicated I did a little browsing to find out why -some answers- the floppy media on lucid can not be mounted or better said quit working out of the blue.

just a side note for your info - pls take a look at

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/441835?comments=all

I think that tells all, or most of it, the floppy sorry fate and state in various ubuntu releases. it is apparently an issue that, in my opinion, needs a v thorough review and coordination of various developer groups. one thing is crystal clear - floppy devices/drives are a component and key part of a pc like any other drives and as a consequence need to be treated as such; why is a floppy device status any lower than a HD or CD drive or an usb drive ? just because somebody blurts out that it is old tech ? or that the users that need it are of old computerize school and don't want to thing ahead ? and so on ?

drs305, your position for sure can open some doors that are not easily available to us the users at large. because of that I'm kindly asking you to try and impress on people of authority with ubuntu (I'm thinking of Colin and others) the need and urgency to bring to a head once and for all this issue. I can tell you that I know quite a few people that were either turned off and gave up on ubuntu because of lack of this v basic functionality or, pure and simple, don't want to give up on win because of this (I mean, how is it possible that in win the floppy devices and media function flawless while in ubuntu, well .... see above url).

pls try and help the community on this issue; forget for a minute about grub2 that I could see was v well managed, and give a helping hand to all affected. personally I have no doubt you'll succeed.

#542

just for your info drs305 and anyone interested on the floppy issue

yes, things appear to be back on the right track. in a nutshell - udisks (1.0.1-1build1) package - a regression of udisks (1.0.1-1ubuntu1) fixes the many concerns brought up by users. for more info re latest developments pls see

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/441835?comments=all

#543

peter b said: just for your info drs305 and anyone interested on the floppy issue

yes, things appear to be back on the right track. in a nutshell - udisks (1.0.1-1build1) package - a regression of udisks (1.0.1-1ubuntu1) fixes the many concerns brought up by users. for more info re latest developments pls see

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/441835?comments=all

That's good to hear. I've been on business trips most of the week and haven't really had time to properly respond to your ... plea? Anyway, I'm glad you have found progress is being made on this issue.

And please note that you ascribe influence to me that I simply don't have. I'm just a normal Ubuntu user like most on the forums. I know the IRC channel where the developers hang out and I know how to read and submit bug reports (which all users should learn how to do), but that's about it. 8-[

#544

I'm sure you covered it and I tried to find it but couldn't. I want grub to NOT look at an external drive while doing "update-grub" This external drive does not now and never will, hold any kernals or OS that I would want to boot from and it slows down the update even if the drive is removed.

don@don-desktop:~$ sudo update-grub
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
Generating grub.cfg ...
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
Found linux image: /boot/vmlinuz-2.6.32-22-generic-pae
Found initrd image: /boot/initrd.img-2.6.32-22-generic-pae
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
Found linux image: /boot/vmlinuz-2.6.32-21-generic-pae
Found initrd image: /boot/initrd.img-2.6.32-21-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
Found Microsoft Windows XP Home Edition on /dev/sda1
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
Found Ubuntu 9.10 (9.10) on /dev/sdb3
Found Fedora release 13 (Goddard) on /dev/sdb4
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
error: cannot open `/dev/sde' while attempting to get disk size.
done
don@don-desktop:~$
#545

Can anyone help with this?

Generating burg.cfg ...

burg-probe: error: /host/ubuntu/disks/root.disk is not a block device. Found linux image: /boot/vmlinuz-2.6.32-22-generic Found initrd image: /boot/initrd.img-2.6.32-22-generic Found linux image: /boot/vmlinuz-2.6.32-21-generic Found initrd image: /boot/initrd.img-2.6.32-21-generic Found Microsoft Windows XP Professional on /dev/sda1 done

I had installed burg already and emulation works great but after restart i see only normal grub2 . btw: How to find MBR ?? :)

#546

This is a tread about grub2. You will need to look elsewhere for help with burg (nice boot loader).

The MBR is the first little sector of your drive. When installing to the MBR on sda, for instance you would just enter "grub-install /dev.sda". If using burg it would be "burg-install /dev/sda". If you haven't done that it would explain your problem.

#547

Don1500 said: I'm sure you covered it and I tried to find it but couldn't. I want grub to NOT look at an external drive while doing "update-grub" This external drive does not now and never will, hold any kernals or OS that I would want to boot from and it slows down the update even if the drive is removed.

Actually, it isn't something I've covered. I have dealt with hiding a partition in the Title Tweaks thread, but in this case what you want is to prevent a drive from being read at all.

I've searched around a bit but haven't found the solution as yet. Since the error message first occurs before the "generating grub.cfg" message, the problem has to be dealt with before the scripts in /etc/grub.d are run. I assume it's buried in a /usr/lib/grub file such as grub-mkconfig_lib or update-grub_lib, or one of the others called during the update.

So at the moment I'll have to leave this as a challenge to others to solve. If I have some more free time I'll poke around some more.

#548

You fellers can keep fighting it if you want, I'll watch with great interest.

Myself, I would go with a custom menu with symbolic entries, turn off 30_os-prober and 10_linux and never have to worry about it again.

#549

I don't think turning off 30_os-prober will solve it since the errors are invoked even before the 30_os-prober script is run. But it's possible that Grub2 reads ahead, knows that it won't be run, and disregards it right from the start (which would be logical).

I'd be interested if elzix88 would like to try it. Disabling 30_os-prober can be accomplished with the following command or placing the second entry into /etc/default/grub and running "sudo update-grub".


sudo chmod -x /etc/grub.d/30_os-prober
sudo update-grub

or add this line to /etc/default/grub:

GRUB_DISABLE_OS_PROBER="true"

Of course, he will also lose Windows and Fedora but it would be nice to learn how it actually works.

And as you know, I'm a big fan of custom menus! ;-)

#550

@Don1500

would you check and confirm, or deny, whether there is indeed a /boot folder on /dev/sde that contains vmlinuz-2.6.32-22-generic-pae , initrd.img-2.6.32-22-generic-pae , vmlinuz-2.6.32-21-generic-pae , initrd.img-2.6.32-21-generic-pae please ?

would you also check your entries under hard disk ? for sure, the way I see it, there are 2 HDD and/plus some other HD devices. pls make sure that /dev/sda is the first entry in the hard disk entry/priority table (that's the HD where XP lives)

#551

correction pls,

...'would you also check your entries under hard disk ?'...

SHOULD READ

...'would you also check your entries IN BIOS under hard disk ?'...

#552

Peter, /sda is a 250 gig HD for windows. (Only one NTFS partition) /sdb is a 500 gig HD for Linux (four partitions ext4, 2 Ubuntu (/root, /home), Fedora 13, swap).

initrd.img-2.6.32-21-generic-pae is in the Ubuntu /root partition /sdb1, /sdb2 is the /home partition with no /boot folder, /sdb3 is the Fedora 13 partition (/root and /home). This set-up works very well and I can change out /sdb3 for whatever I feel like testing, It was Kubuntu at one time, and Puppy another. The problem I am having has been around for a while, but since update-grub eventually finishes and the boot menu works as advertised I didn't give it much thought.

After reading the posts it does look like an interesting project. I did come to the same conclusion regarding when the drive is first looked at, but didn't know what it meant. I am going to look at the .libs mentioned and see if I can see anything.

As for /sde I am now confused. I had g-parted open and what I thought was /sde is really /sdf (My 120 gig SS USB HD). /sde doesn't show in g-parted.

I have one CD-RW and one DVD-RW, and a Multi card/3.5 floppy drive. But these are empty (no media) so why would update-grub even look at them?

#553

Here is the output of fdisk -l

don@don-desktop:~$ sudo fdisk -l

Disk /dev/sda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000001

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       30515   245111706    7  HPFS/NTFS

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00092f15

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        6374    51199123+  83  Linux
/dev/sdb2           60144       60801     5285385   82  Linux swap / Solaris
/dev/sdb3            6375       55003   390612442+  83  Linux
/dev/sdb4           55004       60143    41287050   83  Linux

Partition table entries are not in disk order

Disk /dev/sdf: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x230be4c6

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1       14593   117218241    7  HPFS/NTFS

[COLOR="Magenta"][SIZE="3"]Notice that there is NO /sde!![/SIZE][/COLOR]

#554

@Don1500

I could see that /dev/sde is a SS drive; would you please do a

gksu gparted

and take a look at /dev/sde and see if it shows ok; does it have a /dev/sde1 ? without any exclamation mark besides it ? fat32 fs on SS hd is sometimes a proprietary fs.

btw, did you try booting with the SS HD disconnected ? what does sudo update-grub say in this situation ?

also, when lucid is up as well as when grub menu is up and at grub> prompt ls cmd is entered are the two outputs the same pls ? in other words, hd0 must be the same (must have the same contents) on both. same stands true for hd1 etc.

#555

you posted while I replying leisurely (having a coffee and snack)

it doesn't matter sde or sdf. try a boot with it disconnected and run sudo update-grub and see what it says. pls do also ls cmd at grub> and compare outputs as mentioned.

#556

You can also take a look at the contents of */boot/grub/device.map* and see which drives are listed therein.

#557

It was in the device.map! I removed it and...``` don@don-desktop:~$ sudo update-grub Generating grub.cfg ... Found linux image: /boot/vmlinuz-2.6.32-22-generic-pae Found initrd image: /boot/initrd.img-2.6.32-22-generic-pae Found linux image: /boot/vmlinuz-2.6.32-21-generic-pae Found initrd image: /boot/initrd.img-2.6.32-21-generic-pae Found memtest86+ image: /boot/memtest86+.bin Found Microsoft Windows XP Home Edition on /dev/sda1 Found Ubuntu 9.10 (9.10) on /dev/sdb3 Found Fedora release 13 (Goddard) on /dev/sdb4 done


It was just that easy! I knew it was something simple, just had to find it.

Thanks to DRS305 and Peter B. Good help, I'll mark this solved!
#558

Sorry about the duplicates

x

x

#559

Hello I was advised to post my problem from this thread http://ubuntuforums.org/showthread.php?p=9534696 in this thread by kansasnoob.

I've upgraded my Linux Karmic 9.10 Wubi install on a windows xp machine to Lucid During the installation I was asked to install the new grub and to the best of my knowledge answered every question with YES.

The upgrade went fine and Lucid was running but after rebooting my PC I got a GRUB prompt instead of bootmenu to boot Linux. Booting Windows was no problem.

I managed to get into Ubuntu Lucid now by using the following commands in the GRUB prompt:

insmod ntfs set root=(hd0,1) loopback loop0 /ubuntu/disks/root.disk set root=(loop0) linux /vmlinuz root=/dev/sda1 loop=/ubuntu/disks/root.disk ro initrd /initrd.img boot

After booting to Lucid I did the following steps: sudo grub-update

Generating grub.cfg ... Found linux image: /boot/vmlinuz-2.6.35-6-generic Found initrd image: /boot/initrd.img-2.6.35-6-generic Found linux image: /boot/vmlinuz-2.6.31-22-generic Found initrd image: /boot/initrd.img-2.6.31-22-generic Found linux image: /boot/vmlinuz-2.6.31-21-generic Found initrd image: /boot/initrd.img-2.6.31-21-generic Found linux image: /boot/vmlinuz-2.6.31-20-generic Found initrd image: /boot/initrd.img-2.6.31-20-generic Found linux image: /boot/vmlinuz-2.6.31-14-generic Found initrd image: /boot/initrd.img-2.6.31-14-generic Found Ubuntu on /dev/sda1 done

Then I did: sudo grub-install /dev/sda1 Installation finished. No error reported.

After I rebooted but I still go to the grub prompt... I checked boot/grub/grub.cfg and as far as I can see it should be good...

Here's a paste of my bootscript log:


                Boot Info Script 0.55    dated February 15th, 2010                    

============================= Boot Info Summary: ==============================

 => Windows is installed in the MBR of /dev/sda
 => Windows is installed in the MBR of /dev/sdb

sda1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows XP
    Boot files/dirs:   /boot.ini /ntldr /NTDETECT.COM /wubildr.mbr 
                       /ubuntu/winboot/wubildr.mbr /wubildr 
                       /ubuntu/winboot/wubildr /ubuntu/disks/root.disk 
                       /ubuntu/disks/swap.disk

sda1/Wubi: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Ubuntu maverick (development 
                       branch)
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab

sdb1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 80.0 GB, 80026361856 bytes
240 heads, 63 sectors/track, 10337 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sda1    *             63   156,295,439   156,295,377   7 HPFS/NTFS


Drive: sdb ___________________ _____________________________________________________

Disk /dev/sdb: 499.4 GB, 499405291520 bytes
255 heads, 63 sectors/track, 60715 cylinders, total 975400960 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdb1                  63   975,386,474   975,386,412   7 HPFS/NTFS


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/loop0       cc8922ed-667e-4e22-8134-04cdd95f78e2   ext4                                     
/dev/sda1        1208B92908B90CAB                       ntfs                                     
/dev/sda: PTTYPE="dos" 
/dev/sdb1        1143F61E14FB0EF2                       ntfs       Eckasha                       
/dev/sdb: PTTYPE="dos" 

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

/dev/loop0       /                        ext4       (rw,errors=remount-ro)
/dev/sda1        /host                    fuseblk    (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
/dev/sdb1        /media/Eckasha           fuseblk    (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)


================================ sda1/boot.ini: ================================

[boot loader] 
timeout=1 
default=C:\wubildr.mbr 
[operating systems] 
C:\wubildr.mbr="Ubuntu" 
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect 

======================== sda1/Wubi/boot/grub/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="0"
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
}
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 1208b92908b90cab
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
fi
if terminal_output gfxterm ; then true ; else
  # For backward compatibility with versions of terminal.mod that don't
  # understand terminal_output
  terminal gfxterm
fi
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 1208b92908b90cab
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=1
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_lupin ###
menuentry "Ubuntu, Linux 2.6.35-6-generic" {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set 1208b92908b90cab
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-2.6.35-6-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro splash quiet  quiet splash
    initrd /boot/initrd.img-2.6.35-6-generic
}
menuentry "Ubuntu, Linux 2.6.35-6-generic (recovery mode)" {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set 1208b92908b90cab
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-2.6.35-6-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro single splash quiet
    initrd /boot/initrd.img-2.6.35-6-generic
}
menuentry "Ubuntu, Linux 2.6.31-22-generic" {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set 1208b92908b90cab
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-2.6.31-22-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro splash quiet  quiet splash
    initrd /boot/initrd.img-2.6.31-22-generic
}
menuentry "Ubuntu, Linux 2.6.31-22-generic (recovery mode)" {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set 1208b92908b90cab
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-2.6.31-22-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro single splash quiet
    initrd /boot/initrd.img-2.6.31-22-generic
}
menuentry "Ubuntu, Linux 2.6.31-21-generic" {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set 1208b92908b90cab
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-2.6.31-21-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro splash quiet  quiet splash
    initrd /boot/initrd.img-2.6.31-21-generic
}
menuentry "Ubuntu, Linux 2.6.31-21-generic (recovery mode)" {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set 1208b92908b90cab
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-2.6.31-21-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro single splash quiet
    initrd /boot/initrd.img-2.6.31-21-generic
}
menuentry "Ubuntu, Linux 2.6.31-20-generic" {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set 1208b92908b90cab
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-2.6.31-20-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro splash quiet  quiet splash
    initrd /boot/initrd.img-2.6.31-20-generic
}
menuentry "Ubuntu, Linux 2.6.31-20-generic (recovery mode)" {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set 1208b92908b90cab
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-2.6.31-20-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro single splash quiet
    initrd /boot/initrd.img-2.6.31-20-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set 1208b92908b90cab
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-2.6.31-14-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro splash quiet  quiet splash
    initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set 1208b92908b90cab
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-2.6.31-14-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro single splash quiet
    initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_lupin ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Ubuntu (on /dev/sda1)" {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set 1208b92908b90cab
    drivemap -s (hd0) ${root}
    chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### 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  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

============================= sda1/Wubi/etc/fstab: =============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/host/ubuntu/disks/root.disk /               ext4    loop,errors=remount-ro 0       1
/host/ubuntu/disks/swap.disk none            swap    loop,sw         0       0

================= sda1/Wubi: Location of files loaded by Grub: =================


   4.5GB: boot/grub/grub.cfg
   2.4GB: boot/initrd.img-2.6.31-14-generic
   5.6GB: boot/initrd.img-2.6.31-20-generic
   5.3GB: boot/initrd.img-2.6.31-21-generic
  12.4GB: boot/initrd.img-2.6.31-22-generic
  14.3GB: boot/initrd.img-2.6.35-6-generic
   2.4GB: boot/vmlinuz-2.6.31-14-generic
   1.2GB: boot/vmlinuz-2.6.31-20-generic
   4.3GB: boot/vmlinuz-2.6.31-21-generic
   5.7GB: boot/vmlinuz-2.6.31-22-generic
  13.7GB: boot/vmlinuz-2.6.35-6-generic
  14.3GB: initrd.img
  13.7GB: vmlinuz
=============================== StdErr Messages: ===============================

mdadm: No arrays found in config file or automatically

I hope someone can help me out to fix this problem.

#560

I have just noticed that the bootinfo script says: Operating System: Ubuntu maverick (development branch) Is this normal for an Lucid Upgrade? When I go to System -> About Ubuntu I get: You are using Ubuntu 10.04 LTS - the Lucid Lynx - released in April 2010 and supported until April 2013.

If I go to the update manager and I look at the updates tab there is Maverick mentioned everywhere as well... Perhaps this has something to do with my problems?

#561

Yes it appears that you have upgraded to testing. The about info has not been changed. Those of us using 10.10 usually know this and do not look at the "about info" and as we are in development changing that is not a priority.

I know nothing of wubi as I have no MS OS. I do know that wubi support is usually a little behind.

I think I would get a clean install of 10.04 if I were you.

#562

Or you could look at this thread in the testing forum;

http://ubuntuforums.org/showthread.php?t=1520022

#563

Well basically now my Linux doesn't want to boot at all anymore cause of a root.disk error... Perhaps I could fix it with testdisk but im getting very tired of this so I put back my Karmic 9.10 backup and going to start the update again hopefully good this time.. Thanks

#564

Before letting anything upgrade check the /etc/apt/sources.list to see what version it is upgrading to.

#565

Here's a paste of my sources.list

Is this good?

# deb cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091028.5)]/ karmic main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://gb.archive.ubuntu.com/ubuntu/ karmic main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ karmic-updates main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://gb.archive.ubuntu.com/ubuntu/ karmic universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic universe
deb http://gb.archive.ubuntu.com/ubuntu/ karmic-updates universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://gb.archive.ubuntu.com/ubuntu/ karmic multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ karmic-updates multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://gb.archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse
# deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu karmic partner
# deb-src http://archive.canonical.com/ubuntu karmic partner

deb http://security.ubuntu.com/ubuntu karmic-security main restricted
deb-src http://security.ubuntu.com/ubuntu karmic-security main restricted
deb http://security.ubuntu.com/ubuntu karmic-security universe
deb-src http://security.ubuntu.com/ubuntu karmic-security universe
deb http://security.ubuntu.com/ubuntu karmic-security multiverse
deb-src http://security.ubuntu.com/ubuntu karmic-security multiverse

Any idea how I can upgrade my Karmic to Lucid now without getting the same problem with grub?

#566

Like I said, I know nothing about wubi. I have no idea how it works, or understand how the 2 OS' interact.

You should be able to upgrade to 10.04 using Update Mangler but I never use it either. I edit the sources.list file to go for the desired repos and run the upgrade from terminal using apt.

I do not recommend the way I do it for 2 reasons; 1>Ubuntu recommends UM 2>I have no idea how this works in a wubi installation

If you use UM you need to make sure what version you are upgrading to.

I do not know what sort of data you have no 9.10 but you might consider just backing that up and installing 10.04 from a CD. Right after you get all the partitioner and user name and password stuff there is a screen to OK installation. There is an "advanced" button in the lower right corner of that OK box.

If you click on it you can define where grub is to go. You should be able to tell where that is by how you are set up in 9.10. This is wubi, I haven't a clue.

Does grub handle the boot? Do you boot to MS and then to Ubuntu? I do not know and will not have MS in my house so am unlikely to find out.

Most problems right now, on normal installs that dual boot with MS, are caused by grub not only being installed on the MBR but in the MS boot sector and screwing it. Just make sure it is going to the right place for a wubi install. There should be documentation somewhere.

#567

Hi thanks for the reply.

A while ago the update manager asked me to updgrade but I said no.. Now I can't seem to find a way to upgrade by these means..

#568

to all interested

  • just found out while updating my rescue media floppies that sbm.bin in lucid live CD (it is under /install) supports and reads MBR with grub2. (sbm - Smart Boot Manager)
  • it creates v small content (approx 539 KB) boot floppies.

this package is around for a long time and a lot written about it. some howto's below

https://help.ubuntu.com/community/SmartBootManager

http://blogs.howtogeek.com/jatecblog/posts/make-a-floppy-boot-disk-for-ubuntu-from-linux/

for win users

http://www.ehow.com/how_2138434_ubuntu-boot-disk.html[PHP][/PHP]

#569

Good news on the documentation side. There is a new official "GNU GRUB Manual" - dated 2 July 2010.

It's available online, as well as in HTML and PDF formats.

http://www.gnu.org/software/grub/manual/

Edit Added: It isn't complete, but it's an improvement. I'd rate it 'excellent' if it had come out a year ago.

#570

Thanks for the link.

Haven't read it but just looking at the index it looks pretty good.

#571

I've been trying to get Ubuntu to be the default os instead of Windows XP. I've read many of the forum posts on making grub2 easier to read. My grub files, like 30_os_prober, look far, far different than the examples; notably all the examples have names, my stuff is full of variables and the variables are all set by scripting language which I'm having trouble following.

I found this post and used the settings described to change /etc/default/grub but there is a flaw.

I changed and added these lines then ran update-grub as sudo root

GRUBDEFAULT=saved GRUB_SAVEDEFAULT=true

When I rebooted I got Windows as the default, first entry, not Linux. When I chose the second entry, Ubuntu, I got the infamous, "Error need to load a kernel." when the list of versions came up. None of the versions worked. I edited the command list whose first entry was savedefault; just deleted the line (thankfully I still have some remnants of emacs in my blood). Removed the above changes, ran update-grub, rebooted and now I can boot Ubuntu.

I'm thinking the savedefault was probably empty but where would I set this to get things started? And it seems that would only affect which Linux to use instead of Linux over Windows.

I'm tempted to just edit the 30_os-prober and move the menuentry for Windows between the braces {} beneath the menuentry for Linux. Would this work? What about the chainloader statement at the bottom of the Windows menuentry? Is it safe to take that out of the original order?

Thanks

#572

I do not know how many OS' you have on your box. If it is just the two I would use a symbolic entry for Ubuntu;


echo "Adding Lubuntu on sda12" >&2 
cat << EOF
menuentry "Lubuntu on sda12" {
    set root=(hd0,12)
        linux /vmlinuz root=/dev/sda12 ro quiet
        initrd /initrd.img
}
EOF

Edit to fit your box. You can put anything you want between the quotation marks. The first one is what you see when you run update-grub and the second is what is in your screen menu.

Put that in your 40_custom file and then save it as 06_custom. This will put it first on your screen menu.

Copy your MS entry from /boot/grub/grub.cfg and put it in there too. Us the same header and the EOF at the end. Make sure that the { } s are in the right place.

Run;


sudo update-grub

Reboot and make sure both entries work.

If they do just edit the default number in /etc/default/grub to the entry number you want (counting starts at 0).

Remove the permission to be executable from 30_os-prober and 40_custom. Run update grub again.

#573

If you use the "GRUB_DEFAULT=saved" you must set the default by running the following for it to work:

sudo grub-set-default **X**

with X being an integer (0 would be your first menuentry, 1 the second, etc) or the exact title of the menuentry you desire to use (everything between the quotes in the menuentry from /boot/grub/grub.cfg).

Examples: sudo grub-set-default 2 sudo grub-set-default "Ubuntu, with Linux 2.6.32-22-generic"

#574

Thank you for the replies, drs305 and ranch hand...

My initial boot menu looks like this despite any efforts otherwise:

Windows XP Ubuntu Super Grub Something (not sure of the name but something I installed ages ago to change the default order that didn't work)

I pick Ubuntu and am presented with a second menu of Ubuntu choices. Changing the GRUB_DEFAULT=0 to '1' put the default to the second Ubuntu version on the second menu and left Windows as default on the first menu. I'm not attached to the savedefault scheme, just trying to find a way to turn my computer on and let it go without waiting for the boot menu.

The command grub-set-default isn't found despite the executable residing in /usr/sbin -- Problem with the code given by ranch hand is determining exactly what to replace, e.g. tracing the variables to determine the correct text. My 30_os-prober has stuff like the following. Plus, I suspect making my own custom file would still give me Windows as a first option with only the Ubuntu version changed.

[I][SIZE=1]menuentry "${LLABEL} (on ${DEVICE})" { EOF save_default_entry | sed -e "s/^/\t/" if [ -z "${prepare_boot_cache}" ]; then prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/")" fi printf '%s\n' "${prepare_boot_cache}" cat << EOF linux ${LKERNEL} ${LPARAMS} EOF if [ -n "${LINITRD}" ] ; then cat << EOF initrd ${LINITRD} EOF fi cat << EOF } [/SIZE][/I] [SIZE=1]. . .[/SIZE] where [SIZE=1]*LLABEL="${LONGNAME}"*[/SIZE] *[SIZE=1]LONGNAME="echo ${OS} | cut -d ':' -f 2 | tr '^' ' '"[/SIZE]* *[SIZE=1]DEVICE="echo ${OS} | cut -d ':' -f 1"[/SIZE]* [SIZE=1][I]OS is set in a for statement to OSPROBED="os-prober | tr ' ' '^' | paste -s -d ' '"

[/I][SIZE=2]You can see I don't have a *set root* statement and I'm not sure if this menuentry is for the multiple Linux kernels or what, heck I can't even trace what device this stuff is mounted on.[/SIZE][/SIZE]

#575

linbo,

I am assuming you have a Wubi install. Did you install Ubuntu within Windows? This would explain why Windows turned out to be first on the first menu. A Wubi install is treated as any Windows program. Windows still uses it's own bootloader and thus it will be listed first. I don't know a way around that in the first menu you see.

#576

Hi drs304,

Windows was on this computer then I installed Ubuntu. So yes, I guess that's a Wubi install. Thanks for the info; I can try to push this from the Windows side.

#577

linbo said: Hi drs304,

Windows was on this computer then I installed Ubuntu. So yes, I guess that's a Wubi install. Thanks for the info; I can try to push this from the Windows side.

That's not really what I meant. You can start with a Windows install, then install Ubuntu and have two completely separate OS's on different partitions. Grub is installed as the bootloader and handles the initial menu.

With a Wubi install, you install Ubuntu within Windows (and within the Windows partition). Ubuntu runs like an app in Windows - in fact you remove it with the Windows Add/Remove function. The Wubi install is just a large file within Windows. You boot to the Windows menu via the Windows bootloader, then elect to run Ubuntu from the Windows menu. It is only at that point that Grub starts working.

#578

Hello, is it possible force GRUB2 to store its settings not on any FS/partition ? How to force GRUB2 to store its settings in MBR or on Track 0??? If it is possible could Ubuntu automatic update such configuration (during kernel version update)?

#579

NewUse said: Hello, is it possible force GRUB2 to store its settings not on any FS/partition ?

How to force GRUB2 to store its settings in MBR or on Track 0??? If it is possible could Ubuntu automatic update such configuration (during kernel version update)?

I am not aware of this capability. The MBR has very limited space and thus points to another location where the Grub files are stored.

I am not familiar with some of the advanced capabilities of Grub 2 so someone else may have a solution for you that I am not familiar with.

#580

(Hopefully I am posting this in the right place, if not please correct me)

I am running both Ubuntu 10.04 (French) and Lubuntu 10.04 (Spanish), dual boot. I've followed the steps and edited Grub so that it presents me only with these two options. Firstly I did it within Ubuntu, which originally was the only system on the machine (I added Lubuntu later and it was what created Grub during installation.) This had no effect at all, so then I went into Lubuntu and made exactly the same changes. This time, Grub now does have the reduced list, but has reduced it so much that there is only one option appearing: the French Ubuntu, and I can't access the Spanish Lubuntu, it is literally just a single-item list. Here is what the *grub.cfg* file says from within Ubuntu:

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
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
}
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set 4d5cb90b-89d0-4d84-8323-ee5adcf900ac
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set 4d5cb90b-89d0-4d84-8323-ee5adcf900ac
set locale_dir=($root)/boot/grub/locale
set lang=fr
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set 4d5cb90b-89d0-4d84-8323-ee5adcf900ac
insmod tga
if background_image /usr/share/images/grub/img_0619.tga ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else
  set menu_color_normal=white/black
  set menu_color_highlight=black/light-gray
fi
### END /etc/grub.d/05_debian_theme ###

### 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.
menuentry 'Ubuntu 10.04 (Français)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,6)'
	search --no-floppy --fs-uuid --set 4d5cb90b-89d0-4d84-8323-ee5adcf900ac
	linux	/boot/vmlinuz-2.6.32-23-generic root=UUID=4d5cb90b-89d0-4d84-8323-ee5adcf900ac ro   quiet splash
	initrd	/boot/initrd.img-2.6.32-23-generic
}
menuentry "Lubuntu 10.04 (Español)" {
	insmod ext2
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 0b929c70-ddfd-458d-b76a-be6e8ebded0e
	linux /boot/vmlinuz-2.6.32-21-generic root=UUID=0b929c70-ddfd-458d-b76a-be6e8ebded0e ro quiet splash
	initrd /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/40_custom ###

I don't understand why I should be able to edit Grub within Ubuntu, and have *sudo update-grub* apparently work without errors, except that it didn't actually change Grub - and I also have no idea why Lubuntu has now disappeared. As it happens the Lubuntu isn't as important at the moment, but I would like to be able to shift between systems and languages if possible.

[Another minor issue is that I've got a .tga image which I'd like to use as a background, which does seem to be recognised by *update-grub* (it said "found img_0619.tga"), but it does not appear.]

#581

Belteshazzar,

Are you sure you are editing the correct 40_custom file (in the /etc/grub.d folder of the OS your system boots to)?

Is /etc/grub.d/40_custom executable? Check it's Properties with your file browser?

I added your 40_custom entry into mine and it showed correctly in the Grub2 menu.

It would probably be best to run the boot info script and post the results. http://bootinfoscript.sourceforge.net/

Added: Your splash image line is a bit different than the latest version of Grub 2, which uses a "WALLPAPER=" convention, and the earlier 1.97 which used a "for i in ...." expression. You might find an answer in the following section of the Grub 2 community doc: https://help.ubuntu.com/community/Grub2#GRUB%202%20Splash%20Images Since you are seeing a mention of it as grub updates, it could be the formatting of the image that is a problem, or a setting in /etc/default/grub. I'll look at that in the RESULTS.txt

#582

.tga first. convert to a .png and re-edit 05_debian-theme. You may find that using the /usr/share/images/desktop-base file is better than the images file. I like it because then I can store images in the /images file and swap them out in the /desktop-base file if I want too.

I would edit your custom file to look like this;


# 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 Fr on sda6" >&2 
cat << EOF
menuentry 'Ubuntu 10.04 (Français)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd0,6)'
    search --no-floppy --fs-uuid --set 4d5cb90b-89d0-4d84-8323-ee5adcf900ac
    linux    /boot/vmlinuz-2.6.32-23-generic root=UUID=4d5cb90b-89d0-4d84-8323-ee5adcf900ac ro   quiet splash
    initrd    /boot/initrd.img-2.6.32-23-generic
}
EOF

echo "Adding Lubuntu Es on sda1" >&2 
cat << EOF
menuentry "Lubuntu 10.04 (Español)" {
    insmod ext2
    set root='(hd0,1)'
    search --no-floppy --fs-uuid --set 0b929c70-ddfd-458d-b76a-be6e8ebded0e
    linux /boot/vmlinuz-2.6.32-21-generic root=UUID=0b929c70-ddfd-458d-b76a-be6e8ebded0e ro quiet splash
    initrd /boot/initrd.img-2.6.32-21-generic
}
EOF

run


sudo update-grub

then


sudo grub-mkconfig

this will output your /boot/grub/grub.cfg file so you can check it.

The language used in whatever version you are running should make no difference.

My entry for Lubuntu looks like this and never needs updating and will work for ANY Debian based OS on that partition. I change things on this drive a lot and it is nice that the menu entry, while labeled wrong, boots to what ever is on the partition called for.

You could edit it for your box and your 2 installs and it would work too;


echo "Adding Lubuntu on sda12" >&2 
cat << EOF
menuentry "Lubuntu on sda12" {
    set root=(hd0,12)
        linux /vmlinuz root=/dev/sda12 ro quiet
        initrd /initrd.img
}
EOF

In either menu entry type the stuff between the quotation marks is safe to fill with what ever you want. The first one (adding) is what you will see in terminal when running update-grub. The second is what you will see on your screen menu.

#583

Does anyone have the details of grub-install modifications under wubi (in package lupin-support)? I think these were introduced with 10.04 although there is some mention of it in the source modification notes under karmic (but clearly this didn't help with the karmic wubildr issue).

Basically it overrides the grub-install command with a wubi version. You can run the standard grub-install by using grub-install.real otherwise it uses the lupin-support version which does the following: grub-install --root-directory=xxx /dev/sda does not work. grub-install /dev/sda1 will attempt to rebuild the wubildr file under the windows partition. grub-install /dev/sda fails

It appears that when the wubi is not on the same partition as windows (in my tests I installed under an external drive) the grub-install acts normally.

I'm not sure if this belongs in the grub2 thread since it's to do with wubi, but since it's not widely known that there is an separate grub-install command out there, maybe it should be?

#584

bcbc,

I've put your post back in this thread since it was generating no interest on its own in the Installation forum. Give it a few days in here and if you get no answers try starting a post of your own in the General or ABT forum.

#585

bcbc said: Does anyone have the details of grub-install modifications under wubi (in package lupin-support)? I think these were introduced with 10.04 although there is some mention of it in the source modification notes under karmic (but clearly this didn't help with the karmic wubildr issue).

bcbc,

You might try asking the grub developers on the Freenode or Ubuntu Servers #grub IRC channel. You would probably have to get an Ubuntu dev to speak on the Wubi issue. The devs may or may not choose to answer you - it depends on their mood - but some of them are really helpful. ;-)

#586

drs305 said: bcbc,

You might try asking the grub developers on the Freenode or Ubuntu Servers #grub IRC channel. You would probably have to get an Ubuntu dev to speak on the Wubi issue. The devs may or may not choose to answer you - it depends on their mood - but some of them are really helpful. ;-)

OK thanks for the advice. I'll try the IRC.

Also, when I get the time I'll run some comparison tests again and then post them to a bug report, maybe this one: https://bugs.launchpad.net/ubuntu/+source/lupin/+bug/460192

I decided to create a new bug report: https://bugs.launchpad.net/ubuntu/+source/lupin/+bug/604417

#587

drs305 and ranch hand,

Thank you for your speedy replies - it's a great joy to know that there are always people to help with Linux! I ran the boot info script and got the following:

 Boot Info Script 0.55    dated February 15th, 2010                    

============================= Boot Info Summary: ==============================

 => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
    partition #1 for /boot/grub.

sda1: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Ubuntu 10.04 LTS
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda4: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  Unknown
    Boot sector info:  

sda5: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

sda6: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Ubuntu 10.04 LTS
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda7: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files/dirs:   

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disque /dev/sda: 120.0 Go, 120034123776 octets
255 têtes, 63 secteurs/piste, 14593 cylindres, total 234441648 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sda1    *          2,048    39,063,551    39,061,504  83 Linux
/dev/sda4          39,065,598   234,440,703   195,375,106   5 Extended
/dev/sda5         230,471,680   234,440,703     3,969,024  82 Linux swap / Solaris
/dev/sda6          39,065,600    87,891,967    48,826,368  83 Linux
/dev/sda7          87,894,016   230,467,583   142,573,568  83 Linux


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda1        0b929c70-ddfd-458d-b76a-be6e8ebded0e   ext4                                     
/dev/sda4: PTTYPE="dos" 
/dev/sda5        4f641bc6-5e2c-4e07-93e6-e059875ab2e7   swap                                     
/dev/sda6        4d5cb90b-89d0-4d84-8323-ee5adcf900ac   ext4                                     
/dev/sda7        0569357d-6774-47ed-b6f4-f59d7397c817   ext4                                     
/dev/sda: PTTYPE="dos" 

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

/dev/sda6        /                        ext4       (rw,errors=remount-ro)
/dev/sda7        /home                    ext4       (rw)


=========================== sda1/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/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
  load_env
fi
set default="0"
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
}
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 0b929c70-ddfd-458d-b76a-be6e8ebded0e
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 0b929c70-ddfd-458d-b76a-be6e8ebded0e
set locale_dir=($root)/boot/grub/locale
set lang=es
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### 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.
menuentry "Ubuntu 10.04 (Français) (on /dev/sda6)" {
	insmod ext2
	set root='(hd0,6)'
	search --no-floppy --fs-uuid --set 4d5cb90b-89d0-4d84-8323-ee5adcf900ac
	linux /boot/vmlinuz-2.6.32-23-generic root=UUID=4d5cb90b-89d0-4d84-8323-ee5adcf900ac ro quiet splash
	initrd /boot/initrd.img-2.6.32-23-generic
}
menuentry "Lubuntu 10.04 (Español) (on /dev/sda6)" {
	insmod ext2
	set root='(hd0,6)'
	search --no-floppy --fs-uuid --set 4d5cb90b-89d0-4d84-8323-ee5adcf900ac
	linux /boot/vmlinuz-2.6.32-21-generic root=UUID=0b929c70-ddfd-458d-b76a-be6e8ebded0e ro quiet splash
	initrd /boot/initrd.img-2.6.32-21-generic
}### END /etc/grub.d/40_custom ###

=============================== sda1/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=0b929c70-ddfd-458d-b76a-be6e8ebded0e /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=4f641bc6-5e2c-4e07-93e6-e059875ab2e7 none            swap    sw              0       0

=================== sda1: Location of files loaded by Grub: ===================


   8.8GB: boot/grub/core.img
   8.8GB: boot/grub/grub.cfg
   9.1GB: boot/initrd.img-2.6.32-21-generic
    .6GB: boot/vmlinuz-2.6.32-21-generic
   9.1GB: initrd.img
    .6GB: vmlinuz

=========================== sda6/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/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
  load_env
fi
set default="0"
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
}
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set 4d5cb90b-89d0-4d84-8323-ee5adcf900ac
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set 4d5cb90b-89d0-4d84-8323-ee5adcf900ac
set locale_dir=($root)/boot/grub/locale
set lang=fr
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod ext2
set root='(hd0,6)'
search --no-floppy --fs-uuid --set 4d5cb90b-89d0-4d84-8323-ee5adcf900ac
insmod png
if background_image /usr/share/images/desktop-base/img_0619.png ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else
  set menu_color_normal=white/black
  set menu_color_highlight=black/light-gray
fi
### END /etc/grub.d/05_debian_theme ###

### 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.


echo "Adding Ubuntu Fr on sda6" >&2 
cat << EOF
menuentry 'Ubuntu 10.04 (Français)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd0,6)'
    search --no-floppy --fs-uuid --set 4d5cb90b-89d0-4d84-8323-ee5adcf900ac
    linux    /boot/vmlinuz-2.6.32-23-generic root=UUID=4d5cb90b-89d0-4d84-8323-ee5adcf900ac ro   quiet splash
    initrd    /boot/initrd.img-2.6.32-23-generic
}
EOF

echo "Adding Lubuntu Es on sda1" >&2 
cat << EOF
menuentry "Lubuntu 10.04 (Español)" {
    insmod ext2
    set root='(hd0,1)'
    search --no-floppy --fs-uuid --set 0b929c70-ddfd-458d-b76a-be6e8ebded0e
    linux /boot/vmlinuz-2.6.32-21-generic root=UUID=0b929c70-ddfd-458d-b76a-be6e8ebded0e ro quiet splash
    initrd /boot/initrd.img-2.6.32-21-generic
}
EOF
### END /etc/grub.d/40_custom ###

=============================== sda6/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda6 during installation
UUID=4d5cb90b-89d0-4d84-8323-ee5adcf900ac /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda7 during installation
UUID=0569357d-6774-47ed-b6f4-f59d7397c817 /home           ext4    defaults        0       2
/dev/sda5       none            swap    sw              0       0

=================== sda6: Location of files loaded by Grub: ===================


  41.7GB: boot/grub/core.img
  42.1GB: boot/grub/grub.cfg
  41.7GB: boot/initrd.img-2.6.32-21-generic
  42.4GB: boot/initrd.img-2.6.32-22-generic
  43.1GB: boot/initrd.img-2.6.32-23-generic
  41.7GB: boot/vmlinuz-2.6.32-21-generic
  42.3GB: boot/vmlinuz-2.6.32-22-generic
  43.1GB: boot/vmlinuz-2.6.32-23-generic
  43.1GB: initrd.img
  42.4GB: initrd.img.old
  43.1GB: vmlinuz
  42.3GB: vmlinuz.old
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader  on sda4

00000000  c6 99 ad 22 3a a5 a6 e2  54 55 67 60 94 56 93 da  |...":...TUg`.V..|
00000010  ce b1 62 7f ab ed d6 aa  32 4d 6e ce 51 b9 9f 70  |..b.....2Mn.Q..p|
00000020  be 85 71 ea c2 6a 55 b4  87 c2 e7 8a dc ad e8 5b  |..q..jU........[|
00000030  7a 4b 6d 31 b7 60 89 ee  95 6c 5a 18 4e 0e ca fa  |zKm1.`...lZ.N...|
00000040  eb 98 76 ec 4b d6 e7 d1  52 77 3b 1d b7 c4 5b 6c  |..v.K...Rw;...[l|
00000050  0f 89 27 51 26 6e df 81  82 00 9e 6e 4b 67 92 68  |..'Q&n.....nKg.h|
00000060  89 e9 13 11 a3 19 ed 41  60 2f 55 56 b3 37 e0 52  |.......A`/UV.7.R|
00000070  68 b9 bb af 28 18 52 4f  69 2f fa f2 9c e7 f7 34  |h...(.ROi/.....4|
00000080  1d 95 72 66 32 a4 a0 a1  98 ea 40 48 2f 06 93 91  |..rf2.....@H/...|
00000090  70 bb a0 14 9a 01 51 2d  80 c0 12 94 05 a9 c4 dd  |p.....Q-........|
000000a0  58 f9 5f 56 2d 3f d0 a4  da 8f 45 c2 9e e3 e4 4e  |X._V-?....E....N|
000000b0  59 76 bc b2 03 04 14 a1  44 03 4b 07 b6 49 60 29  |Yv......D.K..I`)|
000000c0  eb f9 18 60 46 61 f3 53  8e 58 c6 2e 28 c8 ec 47  |...`Fa.S.X..(..G|
000000d0  14 71 b2 75 2e 24 b4 66  ba 89 c7 74 38 dc 0c f4  |.q.u.$.f...t8...|
000000e0  3a 9f ae 7e 27 be e2 e5  8e 69 56 17 55 7f 33 2b  |:..~'....iV.U.3+|
000000f0  6d 9a fb 13 d1 01 8a 58  8c 10 b8 e2 d5 08 a4 da  |m......X........|
00000100  a8 e7 c4 4c 10 19 c1 30  00 b3 c2 62 d2 1b f5 5c  |...L...0...b...\|
00000110  9f ff e4 b0 9c e0 c6 d5  3a 37 86 ed bc 3e f7 7e  |........:7...>.~|
00000120  86 78 0c 11 61 68 36 0d  3e 5a 9e d1 b0 45 04 40  |.x..ah6.>Z...E.@|
00000130  c3 da 20 85 75 f6 7a 71  4d e8 0f 77 fd f6 ae da  |.. .u.zqM..w....|
00000140  bf 85 7c 6d 6b ba b7 1e  59 b1 79 e9 fa 90 88 5a  |..|mk...Y.y....Z|
00000150  e1 a5 e3 8f 6f 66 b3 89  da 2d c9 fe 7f fe ff e3  |....of...-......|
00000160  f4 26 9b 30 26 08 2b 85  15 83 61 80 d8 50 36 24  |.&.0&.+...a..P6$|
00000170  0c 86 04 41 70 c0 d4 88  23 18 0d fe a6 af 92 e4  |...Ap...#.......|
00000180  ab 06 74 4b 17 7c 37 1a  ba cb 1e 2c 27 58 35 0e  |..tK.|7....,'X5.|
00000190  eb c0 79 61 97 90 f9 4f  69 ad 42 bf 15 3d 41 b5  |..ya...Oi.B..=A.|
000001a0  31 cc 7e 41 9e a1 5f 3c  44 f1 b4 ae 66 89 cd 60  |1.~A.._<D...f..`|
000001b0  4f d5 e6 37 ba 15 b5 b4  db c3 f3 d9 c7 2d 00 fe  |O..7.........-..|
000001c0  ff ff 82 fe ff ff 02 a0  68 0b 00 90 3c 00 00 fe  |........h...<...|
000001d0  ff ff 05 fe ff ff 01 00  00 00 01 08 e9 02 00 00  |................|
000001e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200

I have changed the */etc/grub.d/40_custom* file in both the Ubuntu and Lubuntu filesystems, firstly to what I had originally edited it to and then to what ranch hand suggested, and made sure I ran *update-grub*, but neither seemed to have any effect on what Grub presented me with.

I also changed the image to .png and put it in the *desktop-base* folder, but this also didn't seem to make a difference. (The image doesn't really matter but would be nice if I could get it to work.)

#588

Belteshazzar

According to your boot script out put the menu should be showing up. It is in your grub.cfg file and that is where your screen menu comes from.

However, taking another look at the output we see that the grub.cfg file is on sda6 and what is being looked for is sda1.

Boot to your Lubuntu install and run;


sudo grub-install /dev/sda

If you can't boot to Lubuntu just copy the 40_custom file to Ubuntu and run;


sudo update-grub

I use the same custom file in all my installs with a different background so that I know which one I am booting from. I use that OS' wallpaper resized to 640x480 and renamed menu.png and put in desktop-base.

I think that you are not seeing your image because you are not using the right grub install for your MBR.

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in partition #1 for /boot/grub.

#589

Another Grub 2 improvement is on the way. Colin Watson has proposed an update to the grub scripts to include an option to limit the number of displayed kernels. This would be similar to the "howmany" option in Grub legacy.

This is a welcome improvement and I'll update the main post when it is incorporated in Ubuntu's Grub 2.

For those that can't wait, you can check the Grub 2 Title Tweaks link in my signature line for a workaround which does the same thing until the devs approve the 'official' change.

#590

drs305 and ranch hand, thanks very much for your help - the Grub seems to be working now according to my specifications. Limiting the number of kernels displayed sounds like a great idea since after a while they can certainly pile up!

#591

My lab just purchased a new Mac Pro and we would like to be able to dual boot OS X and Ubuntu 10.04. Instead of installing the the OSs side by side on a single hard drive (which worked just fine for my personal laptop running Vista and Ubuntu), I have been asked to have one hard drive run OS X and a second internal drive run Ubuntu.

So - I created a LiveCd, ran it, and got to the section asking where I want to put Ubuntu. I selected the second, newly installed hard drive (which had nothing at all on it) from the drop down menu, and the text above changed to something like "There are no operating systems installed on this computer". Although I didn't think it was an issue at the time, I now fear this is a major part of my problem. I checked the Advanced settings, and saw that the boot loader was being installed to sda, the first hard drive, which I had no problems with. I installed Ubuntu and got the happy prompt saying the install was successfull. I restart, remove the disk, etc. and... No GRUB2 menu on reboot, just a straight jump to the Apple login screen.

I thought that maybe because GRUB2 default is to skip the menu if no second OS is found, that having GRUB2 and OS X on sda while Ubuntu is only on sdb might cause GRUB2 not to recognize the existence of Ubuntu, but I have been unable to force the menu to appear to even see if Ubuntu is an option on the menu. A few places have indicated to me that restarting while holding Shift would do the trick - it doesn't seem to.

Here's to hoping someone knows what I'm doing wrong... Thanks!

#592

ir926

When you boot to the Mac OS (I know know nothing about them) can you see the files for Ubuntu?

If you boot to the Live CD can you see both of the OS' and their files?

I do know that there are people dual booting Mac and Ubuntu. I am not sure what the menu entry looks like, don't think I have seen one.

It does seem like grub should detect it.

If you want the grub menu to show use the Live CD and edit the /etc/default/grub file so that it looks like this;


 GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

While there you can take a look at the /boot/grub/grub.cfg file and see if Mac is on there.

I find it a little hard to believe that grub is installed to the MBR of the first drive, sda I assume. It it was a grub menu from Ubuntu coming up I would expect to be booting to Ubuntu automatically. Also the default should be to show a menu as you have another OS on there. Third you say that the message was that there was no other OS on the box.

I think that you should make sure both OS' look OK. Make sure you know how to get the Mac bootloader back on the MBR. Follow these instructions;

https://wiki.ubuntu.com/Grub2#Recover%20Grub%202%20via%20LiveCD

to get grub on the MBR, ignoring the part about editing files. What you need is grub on the MBR of sda and, assuming you can then boot to Ubuntu, run from there;


sudo update-grub

this should, if it is not there, get the Mac menu entry on to your grub installation.

#593

ranch hand

Thanks for getting back to me. Sadly I can only access the Mac when I'm in the lab and I had the misfortune of posting my question the day before they closed the place for some IT security work, but now we're back in business.

I tried to run Ubuntu from the LiveCD and every little step was taking forever and a day. Is this because I burned the disk too fast and made it less "bootable"? I did manage to take a look at grub.cfg and OS X is there. I guess this means I didn't install grub to sda as I thought...

Before I try to install grub to sda I'm going to try to burn a new cd at a lower burn rate and hopefully I can have things work a little faster. I'll post again when I've tried to install grub.

#594

The live CD runs pretty slow, particularly booting up. You are working from the CD not a hard drive. It is slow. It does speed up some as more and more stuff gets onto the ram (if you have enough ram).

If you have an external and install on it you can work from it faster. The CD is safer as you will not be interfering with grub in any way.

It is good to hear that the Mac install is on the grub.cfg file. Did it look right? That would be my concern. If it is right and you know how to fix the Mac bootloader back onto the MBR, then I would put grub on there and find out if it works.

Have FUN.

#595

ranch hand

You were right about it starting to run faster as more gets on the RAM.

I'm not sure how to apply the instructions from the link you sent me to to this system... In particular, I am asked to remember which device is my Linux distribution - is that sdb2? Also, there is mention of /boot on a separate partition that needs to be mounted "if you have one". Do I need to worry about this?

ubuntu@ubuntu:/etc/default$ sudo fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000052ff

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      121602   976762583+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1           1        2047+  ee  GPT
/dev/sdb2   *           1      116680   937224192   83  Linux
/dev/sdb3          116680      121602    39535616   82  Linux swap / Solaris
#596

Is there a way to delete Grub 2 and use only Windows 7/Vista loader on a multi boot system? I like windows boot loader leaps and bounds more and I would love to be able to use it without grub 2. I delete it b4, but was unable to load Ubuntu without it. Is it even possible to delete grub 2 and use windows boot loader to load Ubuntu.

-My version is Ubuntu 10.04

Please keep your replies nice. I'm new to Ubuntu and I don't know where to start. Yes! A noob! So please respect me and I'll do the same.

#597

kepps03 said: Is there a way to delete Grub 2 and use only Windows 7/Vista loader on a multi boot system? I like windows boot loader leaps and bounds more and I would love to be able to use it without grub 2. I delete it b4, but was unable to load Ubuntu without it. Is it even possible to delete grub 2 and use windows boot loader to load Ubuntu.

-My version is Ubuntu 10.04

Please keep your replies nice. I'm new to Ubuntu and I don't know where to start. Yes! A noob! So please respect me and I'll do the same. This is a thread about grub2. You would probably get getter support in the Absolute Beginners Talk portion of the forums.

#598

ir926 said: ranch hand

You were right about it starting to run faster as more gets on the RAM.

I'm not sure how to apply the instructions from the link you sent me to to this system... In particular, I am asked to remember which device is my Linux distribution - is that sdb2? Also, there is mention of /boot on a separate partition that needs to be mounted "if you have one". Do I need to worry about this?

ubuntu@ubuntu:/etc/default$ sudo fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000052ff

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      121602   976762583+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1           1        2047+  ee  GPT
/dev/sdb2   *           1      116680   937224192   83  Linux
/dev/sdb3          116680      121602    39535616   82  Linux swap / Solaris

You have installed on one partition. I would have used 2 (/ and /home0 to make any future recovery easier.

Some folks use a /boot partition too. I do not think this is a good thing.

Because you did not do that you do not need to worry about it.

I do not know what this GPT bussiness on sdb is either but since you want to install grub on sda I do not think this should be a problem.

All you need to worry about, seeing you already checked your grub files, is the 2 commands; update-grub and grub-install /dev/sda

This will update grub again, probably not needed and install grub on the MBR of sda.

GPT bothers me so I looked it up;

http://www.search.com/reference/GUID_Partition_Table

I guess it is nothing to worry about, just something new to learn about.

#599

As I was trying to put grub on sda, I kept getting odd requests. When I went to update-grub, I was told no device was mounted. When I went to mount a device, I was told I needed to specify a filesystem type.

I decided to go a slightly less elegant, but perhaps simpler route. I opened the case, swapped the hard drives, and restarted...

For some reason, the Mac still jumps to OS X. However, I can force a manual selection by holding down the "Option" key during restart. This gives me an option between Mac and Windows.

Yes, Windows - which, when clicked, actually turns out to be Ubuntu, and grub opens up beautifully, recognizing Ubuntu and OS X. Equally importantly, it also recognizes that Ubuntu is on sda and OS X is on sdb. Oddly (or perhaps not, since grub is a way better piece of work than the Mac loader) I can then load OS X from grub with no difficulty.

Do you know if there is a way for me to make sure grub is the default selection without my having to go through the really rather aweful Mac interface?

#600

I guess I should add that now I can - even if I have to jump through a few hoops - run Ubuntu without the livecd, if that makes any steps easier...

#601

Yes it does make it easier, I hope.

Mac must have an interesting boot loader.

If Ubuntu is now on sda, I would try running;


sudo grub-install /dev/sda

and see what happens.

If it "takes" and will boot Mac, the default will be Ubuntu as that is the default setting.

Those settings are in /etc/default/grub. This is where your default OS is set and your time out on the screen menu and the hidden menu option which should be commented out because Ubuntu did detect a second OS (hides the bugger if only Ubuntu on the box).

For some reason the commands seem to have better effect when done from inside the OS.

The only thing I can see that could bugger this is the GPT business at the start of your drive. The only way I know to find out is to try it and see.

#602

ranch hand

The moment I read your comment that Mac must have an interesting bootloader, something clicked for me and I remembered that this was in fact a Mac and therefore must have some stupid difference that makes it incompatible with anything else in the world.

Of course, on this new generation of Mac using the Intel architecture, that difference is Intel's EFI boot system, which in fact isn't a bootloader at all, but a boot information protocal stored as variables in the nvram - which is accessed before the computer looks for any MBR partitions on the hard disks or anything, explaining why the computer automatically jumps to OS X even though it is installed on a slave drive. There are some boot managers around that work with this interface (i.e., rEFIt) but none of them yet support multiple OSs on separate internal hard disks.

I could probably find a way to eliminate this protocal, but now that I know I'd be messing around with the ram, I think I just prefer to leave it as is... It's inelegant, and messy, but I think safer since I am not the only person using the machine, and it will have to still be operable after I leave the lab in just 9 months or so.

That said, I am now selecting the OS before getting to the grub menu, so I would like for grub to just go ahead and load the default Ubuntu without the menu or anything. Do I do this by changing the GRUB_TIMEOUT to 0?

#603

ir926 said:

That said, I am now selecting the OS before getting to the grub menu, so I would like for grub to just go ahead and load the default Ubuntu without the menu or anything. Do I do this by changing the GRUB_TIMEOUT to 0?

Set the default OS in the "GRUB_DEFAULT=" line for the OS you want to boot.

Set the GRUB_HIDDEN_TIMEOUT=0 (uncommented). One suggestion before you set the GRUB_TIMEOUT to 0: Check to see if the boot process is interruptible with your desired settings. Reboot a working system and hold down the SHIFT key during the initial booting of GRUB 2 to ensure the menu will be displayed.

If you have disabled 30_os-prober, the keystatus check is not performed and you may not be able to display the menu. If the SHIFT interrupt doesn't work, you would probably want to set the GRUB_TIMEOUT to 1 so you can still access the menu if needed. You will momentarily see the boot menu, but it provides a bit of insurance if you need to access the menu.

If seeing the menu bothers you, of course you can live without the interrupt capability as long as you know how to get things running again without accessing the menu.

#604

The /etc/default/grub file has these entries in the section that you need to edit;


GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=100
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="

You can see that there is one line commented (#) out. Remove that comment and you should have a hidden menu.

You can also see that I have a long time out. I like to see the menu and have time to think (Lots of OS' on here). I believe the time out default is now 10. I would not go lower than 3 (or 5) because if you have problems booting you need time to hit the shift key to bring the menu up so you can edit it if that is where the problem is.

#605

ranch hand said: This is a thread about grub2. You would probably get getter support in the Absolute Beginners Talk portion of the forums.

My question WAS about grub2?! But none the less I'll re-post in ABT section. Thanks!

#606

drs305 - When I reboot, holding shift does nothing because the Apple EFI loader takes over and it doesn't look for depressed shift. It does look for depressed option, and if I hold that I get to a menu that allows me to choose to boot Ubuntu. If I hold down the shift key after selecting that, the grub menu does come up even when I tried it with the GRUB_TIMEOUT set to zero, so I guess that's as close as I can come to what you were expecting to happen...?

ranch hand - Since both you and drs305 recommended that I leave at least a short time on the menu in case I need it, I went with 3 seconds, which I figure is long enough for someone to react if they need to keep the menu up to get into recovery mode or whatever. Thanks for sticking with me through this. It may not be perfect, but at least we have a working system now. I really appreciate it.

#607

I am just glad it works.

Someday I may get a chance to actually see a Mac.

#608

to drs305 Your explanation of how to GRUB work it is masterpiece. My great thanks to you! You are a Master of GRUB!

#609

hi,

thx for the info, may you want to add

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" This line imports any entries to the end of the 'linux' line (Grub Legacy's "kernel" line). The entries are appended to the end of the normal mode only. This is similar to the "defoptions" line in menu.lst. For a black screen with boot processes displayed in text, remove "quiet splash". (to GRUB_CMDLINE_LINUX_DEFAULT="")

I removed the quotes also and had some issues. So you may can add this clarification.

#610

TiloBunt said: I removed the quotes also and had some issues. So you may can add this clarification.

The application of quotes in Grub 2 is a bit inconsistent. Some of the entries in /etc/default/grub were released with quotation marks around the variable, while others did not.

For the GRUB_CMDLINE_LINUX_DEFAULT, quotation marks are required (single or double) if the entry is more than one alphanumeric entry. For example, *quiet splash* requires single or double quotes, while an entry such as *quiet* would not.

I've updated the original post. Thanks for your observation TiloBunt.

#611

Where in flinderation do you find anything out about 20_linux_zen and 41_custom? It could well be that I am just dense but I can't figure the buggers out.

Can't figure out the purpose of them.

#612

ranch hand said: Where in flinderation do you find anything out about 20_linux_zen and 41_custom? It could well be that I am just dense but I can't figure the buggers out.

Can't figure out the purpose of them.

I've seen a stream of *zen emails come across the grub developers mailing list but haven't taken the time to find out what it's about. I've had my own "41_custom" menu for quite a while (when I'm not putting it at the top of the menu with 06_custom), but I guess mine is not the one you are referring to.

So I guess my post amounts to: I don't have a clue. ;-) This is all I've seen: http://www.xen.org/files/xensummit_intel09/xensummit-asia-2009-talk.pdf, which wasn't all that useful to me.

I'll try to post if I learn something useful though.

#613

Maybe they have not hit the stable releases yet.

20_linux_zen


#! /bin/sh
set -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=${prefix}/share/locale

CLASS="--class gnu-linux --class gnu --class os --class xen"

if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
  OS=GNU/Linux
else
  OS="${GRUB_DISTRIBUTOR} GNU/Linux"
  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/"`
  ;;
esac

if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
    || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
  LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
  LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi

linux_entry ()
{
  os="$1"
  version="$2"
  xen_version="$3"
  recovery="$4"
  args="$5"
  xen_args="$6"
  if ${recovery} ; then
    title="$(gettext_quoted "%s, with Linux %s and XEN %s (recovery mode)")"
  else
    title="$(gettext_quoted "%s, with Linux %s and XEN %s")"
  fi
  printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}" "${xen_version}"
  save_default_entry | sed -e "s/^/\t/"

  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}"
  cat << EOF
    echo    '$(printf "$(gettext_quoted "Loading Linux %s ...")" ${version})'
    multiboot    ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args}
    module    ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
EOF
  if test -n "${initrd}" ; then
    cat << EOF
    echo    '$(gettext_quoted "Loading initial ramdisk ...")'
    module    ${rel_dirname}/${initrd}
EOF
  fi
  cat << EOF
}
EOF
}

linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
        basename=$(basename $i)
    version=$(echo $basename | sed -e "s,^[^0-9]*-,,g")
        if grub_file_is_not_garbage "$i" && grep -qx "CONFIG_XEN_DOM0=y" /boot/config-${version} 2> /dev/null ; then echo -n "$i " ; fi
      done`
xen_list=`for i in /boot/xen*; do
        if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
      done`
prepare_boot_cache=

while [ "x${xen_list}" != "x" ] ; do
    list="${linux_list}"
    current_xen=`version_find_latest $xen_list`
    xen_basename=`basename ${current_xen}`
    xen_dirname=`dirname ${current_xen}`
    rel_xen_dirname=`make_system_path_relative_to_its_root $xen_dirname`
    xen_version=`echo $xen_basename | sed -e "s,.gz$,,g;s,^xen-,,g"`
    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"`
    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}" "${xen_version}" false \
        "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
    if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
        linux_entry "${OS}" "${version}" "${xen_version}" true \
        "single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}"
    fi

    list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
    done
    xen_list=`echo $xen_list | tr ' ' '\n' | grep -vx $current_xen | tr '\n' ' '`
done

41_custom


#!/bin/sh
cat <<EOF
if [ -f  \$prefix/custom.cfg ]; then
  source \$prefix/custom.cfg;
fi
EOF

Thanks for the pdf. Now that I think about it I have seen Xen mentioned a couple places. Know nothing about it.

#614

In case anyone wants to have a maintenance free GRUB2 screen, check out my tutorial on how to do so. Ranch Hand showed me everything contained in it, I am just sharing it with anyone that wants it.

drs305, there will still be plenty of need for your tutorial here as you probably forgot more than I'll ever know about GRUB2!

And I hope you don't mind me posting this here. I am kind of excited!

_http://ubuntuforums.org/showthread.php?t=1542338_

Thanks!

#615

I was redirected by Cavsfan on my issue, I heard people here can help out.

My preferred resolution is 1152 x 864, unfortunately it reverts to a different resolution and I have to manually change the resolution through the nvidia control panel after each restart session.

The "System - Preferences - Monitor" program isn't compatible with my graphic card, a GeForce 9800 GTX+, if it matters.

#616

Cavsfan said: In case anyone wants to have a maintenance free GRUB2 screen, check out my tutorial on how to do so.

Ranch Hand showed me everything contained in it, I am just sharing it with anyone that wants it.

drs305, there will still be plenty of need for your tutorial here as you probably forgot more than I'll ever know about GRUB2!

And I hope you don't mind me posting this here. I am kind of excited!

_http://ubuntuforums.org/showthread.php?t=1542338_

Thanks!

Cavsfan,

That's a nice howto and I'll link it in the original post. It will be an excellent place to point users to for a step-by-step method to customize things.

I've also moved some of the posts relating to yours to the correct thread.

Thanks again for your work.

#617

drs305 said: Cavsfan,

That's a nice howto and I'll link it in the original post. It will be an excellent place to point users to for a step-by-step method to customize things.

I've also moved some of the posts relating to yours to the correct thread.

Thanks again for your work.

You are very welcome! And thanks for linking it! I hope to see people using it and thought it was awesome when Ranch Hand first showed me how to do it.

I was chatting with him and said I had to go update my default line again on GRUB2 since the latest kernel update moved it down. That's when he showed me how to make it maintenance free. I didn't know if I was knowledgeable enough to actually do it. And it looked pretty ominous at first. But, after a few days of looking at the changes, I tried it and am glad I did. He made it pretty straight forward and simple and I have used his knowledge in my tutorial.

No more editing GRUB2 just because a kernel was added! When GRUB2 was updated recently I had to make a one line change, but have not had to touch it otherwise! I am excited about this! I try to steer people I find having trouble involving GRUB to you as I know you are the man when it comes to GRUB. Thanks again!

#618

Hi everyone, Cavsfan suggested I post a link to an unresolved post in this thread. I'm having a grub issue that I caused while trying to fix a kernel problem.

Here's the link: http://ubuntuforums.org/showthread.php?t=1543930

Thanks!

#619

@drs305 Thank you so much for such elaborative post about Grub2! It's like Grub2 Bible (and I'm actually using it a lot!) :D

And one quick yes/no question..

When I make grub-reboot # to remember option for next boot, is it somehow possible to also hide boot menu for just that one time, or reduce waiting time for just once?

I'm trying to make shutdown options in Ubuntu, so when you pick one, you'll automatically boot to OS you've chosen.

Once again, thanks a lot.

#620

Nikola.srb,

I'm not aware of a Grub2 way of doing what you want, but you could probably make a script, run as root, that would do it. Something along these lines:

  1. Use "sed" to replace the timeout in /etc/default/grub, changing it to 0.
  2. Run the grub reboot option for the next boot.
  3. Run the shutdown command you wish.
  4. Have a startup script that automatically resets the grub timeout to your desired normal setting.

You could use "zenity" to create a GUI list of the type of start you want to use for the next boot.

If that will work, I or someone else should be able to come up with something. I'll be off on vacation for a few weeks but will be checking in from time to time.

#621

I am still trying to get an ISO to boot. I am only interested in the live CDs so that is all I am trying.

The only thing I can get is "no such file" or whatever that error is.

The ISO is on the desktop. I have tried this with Ubuntu10.04 64bit, Lubuntu 10.10 64bit and now with 10.10 UNE 32bit.

This was the 10.04 entry that is edited for the UNE. Exactly the same response every time no matter what the OS.


menuentry "Unity ISO on /dev/sda10" {
loopback loop (hd0,10)/home/sam/Desktop/maverick-netbook-i386.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/home/sam/Desktop/maverick-netbook-i386.iso noprompt 
initrd (loop)/casper/initrd.lz
}

If anyone can straighten me out on this I will be very happy.

#622

Well, found the problem. It was sitting in the chair in front of the computer.

A>having the ISO on the desktop and trying to boot from it when you have a / and a /home partition is not going to work. B>The owner of the ISO needs to be "root". Grub is looking for a root owned file, in a root owned container.

Basically I created an /etc/aa directory for the ISO. Menu entry;


menuentry "Lounge Lizard ISO on /dev/sda10" {
loopback loop (hd0,10)/etc/aa/lucid-desktop-amd64.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/etc/aa/lucid-desktop-amd64.iso noprompt 
initrd (loop)/casper/initrd.lz
}

Works really great.

Yes, I do know that most folks refer to 10.04 as Lucid Lynx.

This is where you need to be looking for ISO booting info; http://ubuntuforums.org/showthread.php?t=1549847

#623

Based on our conversations I've added a section in the ISO post about the special requirements on partition designations when using a separate /home partition.

If you have an ISO within a separate /home folder, the location of the file according to Grub 2 will be the user's home partition/folder/ISO-name, with no reference to /home.

Example: The ISO is located in /home/username/iso/iso_filename. The / partition is sda5; the user *drs305*'s home folder is on sda10.

The Grub 2 entry will be: (hd0,10)/drs305/iso/iso_filename

As mentioned, this thread has more information on booting ISOs from the Grub 2 menu: ISO Booting with Grub 2

#624

I have two Windows entries and a Windows Vista entry that I never installed. How do I remove the second 7 entry (Which does the same as the first) and the Vista entry? Thanks

#625

corrytonapple said: I have two Windows entries and a Windows Vista entry that I never installed. How do I remove the second 7 entry (Which does the same as the first) and the Vista entry? Thanks

Altering the Grub2 scripts will allow you to hide a Windows recovery partition or any other partition. Take a look at sections 4, 5 & 9 of the following thread. It's a bit geeky, so if you need help, please post in that thread. Grub 2 Title Tweaks

#626

Thank you. My GRUB 2 is now almost perfected!:):KS:)

#627

corrytonapple said: Thank you. My GRUB 2 is now almost perfected!:):KS:)

If you haven't created a custom GRUB2 screen with a nice picture that is maintenance free check out the tutorial in my signature. It is also mentioned at the bottom of item 18 Links at the top of this thread. It is good if you are dual booting and you never have to edit GRUB2 to fix your default line when a new kernel is installed. drs305 is the one to ask about the hard GRUB2 stuff though.

#628

I remember saying I could not wait for your How-To. Then I cleaned out my subscribed threads and I now have yours to go by too. I will post a picture. I Have fonts and the picture there, now it has to be maintance free. When I say almost, I mean I have to get rid of my second 7 and Vista recovery. Then I want to change the names of the Loaders. Will use your guide.

#629

I have Ubuntu 10.04 and Windows XP set up to dual boot. I have tried repairing the Windows boot system with a Windows installation disk, but Windows is still failing to boot. I know I'm not supposed to be posting the same problem in multiple places, but someone from Grub/XP/Vista Bootloader suggested this thread might be more what I need.

#630

jctolton said: I have Ubuntu 10.04 and Windows XP set up to dual boot. I have tried repairing the Windows boot system with a Windows installation disk, but Windows is still failing to boot. I know I'm not supposed to be posting the same problem in multiple places, but someone from Grub/XP/Vista Bootloader suggested this thread might be more what I need.

The best thing you could do is start a new thread, with just your problem. Post here again and leave a link.

When you post please include the result text (complete) from this script;

http://bootinfoscript.sourceforge.net/

This is a safe script to run, you can find it many places in these forums by running a forum search at the top of the page.

It is handy as a pocket in a shirt when it comes to diagnosing boot problems.

Another thing that would be good is to explain what you did in repairing the MS boot system. Of particular interest would be if you tried reinstalling the MS bootloader on the MBR (grub can be put back quite easily).

#631

Follow this link to my thread.

#632

Grub is failing to install.

a clean install:

sudo apt-get purge grub-common grub-pc

sudo apt-get install grub-common grub-pc

Blue screen:

You chose not to install GRUB to any devices. If you continue, the boot loader may not be properly configured, and when your computer next starts up it will use whatever was previously in the boot sector. If there is an earlier version of GRUB 2 in the boot sector, it may be unable to load modules or handle the current configuration file.

If you are already running a different boot loader and want to carry on doing so, or if this is a special environment where you do not need a boot loader, then you should continue anyway. Otherwise, you should install GRUB somewhere.

Continue without installing GRUB?

No - this just causes this exact same dialog to reappear a second later. endless loop. Yes -

Setting up grub-common (1.98-1ubuntu7) ...

Setting up grub-pc (1.98-1ubuntu7) ...

Creating config file /etc/default/grub with new version Generating grub.cfg ... /usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/sda1. Check your device.map. dpkg: error processing grub-pc (--configure): subprocess installed post-installation script returned error exit status 1

AFAIK device.map should be created automagically

doing it manually: grub-mkdevicemap

just creates a blank /boot/grub/device.map file

I've spent 2 days now just trying to get it to ... nothing. just basic boot up the machine. this is a webserver, one OS, one simple drive. nothing fancy at all. seriously, do I even need a bootloader ? whatever is in /boot should run

thanks to anyone who can spot the issue :popcorn:

#633

I would manually edit the device.map.

Mine looks like this in 10.10


(hd0)    /dev/disk/by-id/usb-WDC_WD32_00AAJS-00VWA0_DCA035270188-0:0
(hd1)    /dev/disk/by-id/usb-WDC_WD32_00AAJS-00VWA0_DCA035270188-0:1

in 9.10


(hd0)    /dev/sda
(hd1)    /dev/sdb

For some reason 10.04 and the version of grub there in do not set that up. I think I would use the 9.10 style for the device.map.

Be sure to run " update-grub" after making any changes to grub.

If I were you I would get the package for what 10.10 is using for grub. It is a lot better version.

#634

drs305 said: I've seen a stream of *zen emails come across the grub developers mailing list but haven't taken the time to find out what it's about. I've had my own "41_custom" menu for quite a while (when I'm not putting it at the top of the menu with 06_custom), but I guess mine is not the one you are referring to.

So I guess my post amounts to: I don't have a clue. ;-) This is all I've seen: http://www.xen.org/files/xensummit_intel09/xensummit-asia-2009-talk.pdf, which wasn't all that useful to me.

I'll try to post if I learn something useful though. I haven't waded through all this yet myself but it appears that 41_custom is fixing grub so that it works better in some circumstance. http://www.mail-archive.com/grub-devel@gnu.org/msg15583.html What I have read just didn't make much sense to me. I am not that fluent in geek. All I get is that it has to do with update-grub and grub-mkconfig.

#635

I'm hoping someone can possibly provide an answer to something I recently encountered with the grub installation options in Maverick. It also turns out that the same thing exists in 10.04.1 so it's not a ubiquity problem as I'd first thought.

The options include all of the expected drive designations like /dev/sda, /dev/sdb, and all partitions like sda1, sda2, sdb1, etc.

But also included are /dev/sda-1 and /dev/sdb-1. I've never before seen a "-" used in any grub designations, any ideas.

I wish I were able to use IRC chat so I could simply ask on #grub :)

#636

kansasnoob said: I'm hoping someone can possibly provide an answer to something I recently encountered with the grub installation options in Maverick. It also turns out that the same thing exists in 10.04.1 so it's not a ubiquity problem as I'd first thought.

The options include all of the expected drive designations like /dev/sda, /dev/sdb, and all partitions like sda1, sda2, sdb1, etc.

But also included are /dev/sda-1 and /dev/sdb-1. I've never before seen a "-" used in any grub designations, any ideas.

I've seen some posts about this before, but I don't recall ever seeing it myself. My suspicion is that it's not a GRUB issue, but a udev issue. The udev system enables the computer to give new device filenames to particular hardware. For instance, this MythTV wiki page describes using udev to give consistent device filenames to particular TV tuner cards. Most modern Linux systems, including Ubuntu, use udev to help manage device files. It's easy to write a udev rule that creates duplicate device filenames for specific devices (say, the first partition on a particular model of Seagate hard disk) or to a whole class of devices (say, all disk partitions). My suspicion is that there's a new udev rule in recent versions of Ubuntu that is causing, intentionally or not, duplicate partition device identifiers to be created. This is, however, just a suspicion. I've not looked into the issue in depth. You could try typing "ls -l /dev/sd*" to view all the disk device filenames on an affected system. If you see that the /dev/sd?-* filenames are links to like-named /dev/sd?* filenames, then chances are my hypothesis is correct. If not, then there could be something else going on.

#637

kansasnoob said: But also included are /dev/sda-1 and /dev/sdb-1. I've never before seen a "-" used in any grub designations, any ideas.

I wish I were able to use IRC chat so I could simply ask on #grub :)

I just returned from vacation and found the posts regarding the "-" entries. I just logged on to #grub and asked. *phcoder* initially hadn't heard of it before but then responded that it's a result of /dev/disk/by-id - so perhaps something changed there. He says it is to "fight against sdX names stability".

When I asked why it only showed certain devices, another IRC user stated that it only displays that way for devices hosting /boot or /boot/grub and RAID devices. *phcoder* added that the new designations may be shown that way for new partitions.

Of course, I can't verify any of this...

#638

srs5694 said: I've seen some posts about this before, but I don't recall ever seeing it myself. My suspicion is that it's not a GRUB issue, but a udev issue. The udev system enables the computer to give new device filenames to particular hardware. For instance, this MythTV wiki page describes using udev to give consistent device filenames to particular TV tuner cards. Most modern Linux systems, including Ubuntu, use udev to help manage device files. It's easy to write a udev rule that creates duplicate device filenames for specific devices (say, the first partition on a particular model of Seagate hard disk) or to a whole class of devices (say, all disk partitions). My suspicion is that there's a new udev rule in recent versions of Ubuntu that is causing, intentionally or not, duplicate partition device identifiers to be created. This is, however, just a suspicion. I've not looked into the issue in depth. You could try typing "ls -l /dev/sd*" to view all the disk device filenames on an affected system. If you see that the /dev/sd?-* filenames are links to like-named /dev/sd?* filenames, then chances are my hypothesis is correct. If not, then there could be something else going on.

They don't appear here:

lance@lance-desktop:~$ ls -l /dev/sd*
brw-rw---- 1 root disk 8,  0 2010-09-05 16:14 /dev/sda
brw-rw---- 1 root disk 8,  1 2010-09-05 16:14 /dev/sda1
brw-rw---- 1 root disk 8, 10 2010-09-05 16:14 /dev/sda10
brw-rw---- 1 root disk 8, 11 2010-09-05 16:14 /dev/sda11
brw-rw---- 1 root disk 8, 12 2010-09-05 16:14 /dev/sda12
brw-rw---- 1 root disk 8, 13 2010-09-05 16:14 /dev/sda13
brw-rw---- 1 root disk 8, 14 2010-09-05 16:14 /dev/sda14
brw-rw---- 1 root disk 8,  2 2010-09-05 16:14 /dev/sda2
brw-rw---- 1 root disk 8,  3 2010-09-05 16:14 /dev/sda3
brw-rw---- 1 root disk 8,  4 2010-09-05 16:14 /dev/sda4
brw-rw---- 1 root disk 8,  5 2010-09-05 16:14 /dev/sda5
brw-rw---- 1 root disk 8,  6 2010-09-05 16:14 /dev/sda6
brw-rw---- 1 root disk 8,  7 2010-09-05 16:14 /dev/sda7
brw-rw---- 1 root disk 8,  8 2010-09-05 16:14 /dev/sda8
brw-rw---- 1 root disk 8,  9 2010-09-05 16:14 /dev/sda9
brw-rw---- 1 root disk 8, 16 2010-09-05 16:14 /dev/sdb
brw-rw---- 1 root disk 8, 17 2010-09-05 16:14 /dev/sdb1
brw-rw---- 1 root disk 8, 18 2010-09-05 16:14 /dev/sdb2
brw-rw---- 1 root disk 8, 21 2010-09-05 16:14 /dev/sdb5

But they appear in the grub-install options using ubiquity in either Maverick or Lucid like it shows here:

[ATTACH]168602[/ATTACH]

I haven't tried the alternate (Debian-installer) lately.

#639

I'm butting my head up against a wall somewhat with a non-working os-prober and I suspect some old BURG files may be the culprit.

http://ubuntuforums.org/showthread.php?p=9818698#post9818698

I do now have him able to boot both Ubuntu and Win 7 with a custom entry in "/etc/grub.d/40_custom", but oddly the menu is still hidden even though the entry shows up (and works) in /grub.cfg.

I thought if /grub.cfg found an entry in /40_custom the menu should be automatically "unhidden"?

Ultimately we need to get rid of this error:

ls: cannot access /var/lib/os-prober/mount/boot

Boot: No such file or directory

So os-prober will add Win to 30_os-prober, but I'm stumped. As I said I have him booting both Ubuntu Lucid and Win 7 with a custom entry for Win, but the menu is still hidden :(

Hoping Dave is available. Or I'm thinking Ranch Hand has fiddled with BURG so he might know what files to need to be dumped.

#640

I have not fooled with burg that much. I admire the work, think it is great. It just is not appealing to me. It is, however, about the same as grub as far as the files are concerned.

Are you using burg or just worried about left over files?

As far as the hidden menu goes, I would make sure that both /etc/default/grub and /burg match with the;


GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true

commented line there commented in both and nothing else in that section commented.

That should give you a visible menu.

The auto unhiding of the menu is is done not when another entry is discovered but when os-prober detects the presence of one or more additional OS'. That is what triggers the generation of the extra menu entries too.

One thing you might try, before editing that stuff manually is to change the default OS to some OS in the 40_custom file. Run update-grub and update-burg, then check the /default/grub and /burg files and see if they are fixed.

I don't know if that will work or not so I thought you could test it.

#641
  1. Testing Lucid with a VM, it appears that having a 40_custom menu (on the same partition) without another OS on the machine is not enough to trigger the menu display.
  1. If a comment symbol (#) is placed at the start of the following line in /etc/default/grub and grub is updated I believe the menu will display for the value in GRUB_TIMEOUT.

[COLOR="DarkRed"]#[/COLOR]GRUB_HIDDEN_TIMEOUT=0

Neither (1) nor (2) seems intuitive to me, but I think that is how it is going to work in this instance.

#642

Sorry, not sure if this has been shared before, but I needed to boot a remote server off the Seagate Tools boot image which I extracted from the ISO. I suppose one could just boot from the ISO, but booting from a disk .img was something I wanted to do (since I had a bunch of other images which if I got this to work, would greatly simplify remote management in future).

So after some Googling and finding the below 2 threads... http://www.hak5.org/forums/index.php?showtopic=14164 http://machine-cycle.blogspot.com/2009/09/boot-pc-from-floppy-image-w-grub2-and.html

I realised it was quite simple - just need to add the following lines to the 40_custom section in /boot/grub/grub.cfg

menuentry "Boot IMG" {
    linux16 /memdisk bigraw
    initrd16 /SeaTools.img
}

Grub2 really simplifies things. In case anyone needed the memdisk file (which I grabbed off a Finnix/Slax USB boot drive I customised), I've attached it. Simply place it (and the disk .img file) in /boot/

#643

YorYor said: Sorry, not sure if this has been shared before, but I needed to boot a remote server off the Seagate Tools boot image which I extracted from the ISO. I suppose one could just boot from the ISO, but booting from a disk .img was something I wanted to do (since I had a bunch of other images which if I got this to work, would greatly simplify remote management in future).

YorYor,

Thanks for sharing this. I will include this information in my thread on ISO Booting with Grub 2, with attribution of course. ;-)

#644

Thank you for the help. Changed the wording from headers to image and it worked and all the old stuff has been removed. Things were begining to look a little untidy. Oh and that was a little more straight forward then editing the old menu.lst that I had gotten used to.

#645

Grub2 is great however,

the auto discover on my system finds old leftover stuff I wish to remove.

Sure, I can delete it in /boot/grub/menu.lst but I'm told not to edit that file.

... so I look at /etc/grub.d/ and see I'm supposed to edit those files... which don't look at all user editable to me.

All of this is a pain.

I hope it can be made clearer for people. I think there should be some kind of settings file that's easy to change. I mean, how do I change the default entry? I've been at this for year but even reading https://help.ubuntu.com/community/Grub2#Custom%20Menu%20Entries it's a steep learning curve. So steep I can't be bothered enough to hope someone comes out with a GUI/curses app to help me do it.

Anyone else find this?

#646

jago25_98 said: Grub2 is great however,

the auto discover on my system finds old leftover stuff I wish to remove.

Sure, I can delete it in /boot/grub/menu.lst but I'm told not to edit that file.

... so I look at /etc/grub.d/ and see I'm supposed to edit those files... which don't look at all user editable to me.

All of this is a pain.

I hope it can be made clearer for people. I think there should be some kind of settings file that's easy to change. I mean, how do I change the default entry? I've been at this for year but even reading https://help.ubuntu.com/community/Grub2#Custom%20Menu%20Entries it's a steep learning curve. So steep I can't be bothered enough to hope someone comes out with a GUI/curses app to help me do it.

Anyone else find this?

Check the Tutorial in my signature. It does some pretty cool things with GRUB2 and you will probably understand it a little better after looking at/doing it. Don't be intimidated, It is not hard if you just follow the instructions. And just don't make the files unexecutable in step 6 until you are perfectly comfortable with it.

#647

jago25_98 said: I think there should be some kind of settings file that's easy to change. I mean, how do I change the default entry? ... So steep I can't be bothered enough to hope someone comes out with a GUI/curses app to help me do it.

Anyone else find this?

Lots of people agree with you.

For changing the default OS, you can still use StartUp-Manager - a GUI app. See the "SUM" link in my signature line. I don't know the current status, but the creator of StartUp-Manager at one time intended on expanding it to include many more of the G2 features.

There is also "G2-Tasks", which gives instructions on how to accomplish the most basic tasks.

#648

re Section 14: Booting Live CD's and other ISOs

I'd like to have an option to boot the Live CD and the Recovery CD on the grub menu. I have no difficulty adding the menu options to grub. But when I try to boot them they do not work. I have followed the instructions from page 1 of this thread and I get errors: "file not found", "no such disk", and "you need to load a kernel first" and the ISO does not boot.

My ubuntu 10.04 install on hd1,1. The file I want to boot (ubuntu-10.04.1-desktop-i386.iso) is on hd1,2 which is mounted as /home, in the directory /mike/os_backup/. I am pretty sure I do, but can someone check that I have the right path in the code (below).

After update-grub the my changes are included in /boot/grub/grub.cfg, the relevant portion of which is shown below.


### 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.
    menuentry "Lucid ISO" {
    loopback loop (hd1,1)/home/mike/os_backup/ubuntu-10.04.1-desktop-i386.iso
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/home/mike/os_backup/ubuntu-10.04.1-desktop-i386.iso noprompt
    initrd (loop)/casper/initrd.lz
}

### END /etc/grub.d/40_custom ###
#649

loopback loop [COLOR="DarkRed"](hd1,1)[/COLOR]/home/mike/os_backup/ubuntu-10.04.1-desktop-i386.iso

I think this should be [COLOR="DarkRed"](hd1,2)[/COLOR]

#650

drs305 said: I think this should be [COLOR=DarkRed](hd1,2)[/COLOR]

Thanks for the suggestion but it didn't work, same errors.

#651

Ok, I believe it's because you have a separate /home and it is mounted on its own. In this case, you don't specify the /home folder. So the entry becomes:

loopback loop (hd1,2)/mike/os_backup/ubuntu-10.04.1-desktop-i386.iso

#652

jago25_98 said: how do I change the default entry? I've been at this for year

Anyone else find this?

I share your frustration, maybe I can help. To change the default entry,

gksudo gedit /etc/default/grub

GRUB_DEFAULT=???
GRUB_HIDDEN_TIMEOUT=????
GRUB_HIDDEN_TIMEOUT_QUIET=???
GRUB_TIMEOUT=????

1) by number in the list, When booting, pay attention to which line you want to be the default. Note that the numbering starts at zero. So if you want the third line to be the default option,

GRUB_DEFAULT=2

When booting, write down (exactly) the name of the menu entry you want to be default. If the menu entry you want as default is "Ubuntu Linux with xx.zz.y.x.y.zzz-generic-pae-blah blah whatever" then

GRUB_DEFAULT="Ubuntu Linux with xx.zz.y.x.y.zzz-generic-pae-blah blah whatever"
sudo update-grub
#653

drs305 said: Ok, I believe it's because you have a separate /home and it is mounted on its own. In this case, you don't specify the /home folder. So the entry becomes:

loopback loop (hd1,2)/mike/os_backup/ubuntu-10.04.1-desktop-i386.iso

Thanks again, Still no effect, same errors. =/ My grub.cfg shows the change (note I have changed 2 lines):

### 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.
    menuentry "Lucid ISO" {
    [COLOR=Red]loopback loop (hd1,2)/mike/os_backup/ubuntu-10.04.1-desktop-i386.iso [/COLOR]
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=[COLOR=Red]/mike/os_backup/ubuntu-10.04.1-desktop-i386.iso[/COLOR]  noprompt
    initrd (loop)/casper/initrd.lz
}
### END /etc/grub.d/40_custom ###

I have double and triple checked, I am certain that the iso and pathname do not contain any typos. I notice the grub menu has an option to edit the commands before boot. It'd be simpler to just edit the pathname as I try to boot, until I get it right but after my edits, CTRL-X (to boot) does nothing - the screen flickers, that's about it.

I have a custom menu, but am adding this entry as per the instructions and holding the shift key to bring up the non-custom menu. It appears in the non-custom menu. I can select it, I can try to edit it with the 'e' key, all the lines are there. Strange. Maybe I missing something else, maybe some software? What is this "casper" stuff? I installed something called casper through the software center but it doesn't seem to have any effect. Do I have to mount this ISO within linux before trying to do this? When setting up my custom menu, the last line instructs to load initrd.[COLOR=Red]img[COLOR=Black] (vs [/COLOR][/COLOR]initrd.lz)[COLOR=Red][COLOR=Black], could the mistake be there? Scratching my head. [/COLOR][/COLOR]

#654

misterbiskits,

The initrd.lz is correct.

Are you sure the home partition with the ISO is (hd1,2) - sdb2 ?

I created the following menuentry which works fine. I placed the ISO in my home directory in a subfolder called os_backup.

Home: /home/drs305 Partition: sda5 ISO file: /home/drs305/os_backup/ubuntu-10.04.1-desktop-i386.iso

menuentry "ISO Lucid" { loopback loop (hd0,5)/drs305/os_backup/ubuntu-10.04.1-desktop-i386.iso linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/drs305/os_backup/ubuntu-10.04.1-desktop-i386.iso noprompt noeject initrd (loop)/casper/initrd.lz }

You should be able to explore your filesystem via the "ls" command at the grub prompt. I found the file listed when I used "ls (hd0,5)/drs305/os_backup/"

#655

Do you have the ISO permissions set to be owned by root?

I boot mine from my / partition. I created a /etc/aa directory for the ISOs I want to boot. Entry for 10.10 looks like this;


echo "Adding Mangy Moose ISO on sda10" >&2 
cat << EOF
menuentry "Mangy Moose ISO on /dev/sda10" {
loopback loop (hd0,10)/etc/aa/maverick-desktop-amd64.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/etc/aa/maverick-desktop-amd64.iso noprompt 
initrd (loop)/casper/initrd.lz
}
EOF
#656

Are you sure the home partition with the ISO is (hd1,2) - sdb2 ?*Facepalm* You have found the problem, and of course it is my own doing: the /home partition is located at [COLOR=DarkRed]sdb3[/COLOR][COLOR=Black].

Using the ls command I was able to determine that it translates to (hd0,3) which I am not entirely sure I understand (why hd0? I would think sdb would be hd1).

after an update my grub.cfg contains

[/COLOR]> loopback loop (hd0,3)/mike/os_backup/ubuntu-10.04.1-desktop-i386.iso And of course it is working and the Live CD boots up very nicely (and much more quickly I might add) Thanks a lot for your time and for helping a newbie with such a silly problem. I've learned a few new things by this. I will one day become a master of the grub. Cheers and thanks again!

#657

deleted

#658

drs305 - thanks very much for the info. I downloaded and used Ubuntu Tweak to remove old kernels.

#659

On one desktop machine I have set Grub2/Ubuntu 10.04 to display a splash imagey. This persisted after an dist-upgrade to 10.10. Alongside, I did a fresh install of 10.10 netbook edition on a Samsung NC10 plus netbook. There, I can not set up a splash image. Whatever I change in /etc/grub.d/05_debian_theme, after update grub nothing is written into the 05 section of grub.cfg. Even after I commented out some tests in 05_debian_theme so that the stuff was written into grub.cfg, no splash screen appeared. Is grub splash on netbooks diabeled by default or not possible? How to enable, if possible? Or is this a bug?

#660

ranch hand said: ...We miss You at http://ubuntuforums.org/showthread.php?t=1593270 ... :)

#661

Micha401 said: On one desktop machine I have set Grub2/Ubuntu 10.04 to display a splash imagey. This persisted after an dist-upgrade to 10.10.

Alongside, I did a fresh install of 10.10 netbook edition on a Samsung NC10 plus netbook. There, I can not set up a splash image. Whatever I change in /etc/grub.d/05_debian_theme, after update grub nothing is written into the 05 section of grub.cfg. Even after I commented out some tests in 05_debian_theme so that the stuff was written into grub.cfg, no splash screen appeared. Is grub splash on netbooks diabeled by default or not possible? How to enable, if possible? Or is this a bug?

I'm not familiar with netbooks so I don't know their policy. I do know that there have been posts indicating the inability to change menu bars so it's possible the boot image is locked as well.

For normal Ubuntu installs, the most common problem is not having the proper address or filename in the "WALLPAPER" line of /etc/grub.d/05_debian_theme. Also make sure the file extension is correct for the file you want to use (png vs jpg, etc).

And as a hint, if you are running "update-grub" and don't see "Found background image: ..." as the first line after "Generating grub" you aren't going to get a new image - none was found from the information provided in 05_debian...

Hopefully a netbook user can shed some light on whether it's a netbook limitation.

#662

drs305 said:

And as a hint, if you are running "update-grub" and don't see "Found background image: ..." as the first line after "Generating grub" you aren't going to get a new image - none was found from the information provided in 05_debian...

Thanks for your help. To clarify further: If I comment out some tests in 05_ the picture file is found and a splash image grub.cfg is build. But, no splash image appears. So, the problem is in 00_ or in the netbook install. No big problem at all, but a pity not to show other OS users a nice boot splash. Kind regards,

#663

Micha401 said: Thanks for your help.

To clarify further: If I comment out some tests in 05_ the picture file is found and a splash image grub.cfg is build. But, no splash image appears. So, the problem is in 00_ or in the netbook install. No big problem at all, but a pity not to show other OS users a nice boot splash. Kind regards,

I have had to take my picture into Gimp and Click on Image and then Scale Image and make sure it is the correct size. Then save it and it goes through a conversion process. That always has fixed it for me so that it works with Grub. Hope this helps.

#664

Micha401 said: Thanks for your help.

To clarify further: If I comment out some tests in 05_ the picture file is found and a splash image grub.cfg is build. But, no splash image appears. So, the problem is in 00_ or in the netbook install. No big problem at all, but a pity not to show other OS users a nice boot splash. Kind regards,

If you would like to post your 05_debian_theme file we can take a look at it. At least we may be able to see which sections you are having to comment out and why that might be.

#665

After trying to change menu resolution with Startup Manager I'm getting error messages at boot just prior to the GRUB menu coming up. It's too quick for me to see.

I got rid of the "771 VGA deprecated" dialogue (or message to that effect) but have a recordfail that won't reset in the GRUB.cfg and as a result no time period until the default menu item starts any more.

I've purged and re-installed GRUB with no effect. I also don't remember the XP disk being described as "msdos" - it was usually the sequential disk number.

Bump! And Boot info script list below: - I'm worried about the top info where GRUB seems to be in two MBRs - is that an issue? Thanks in advance.

                Boot Info Script 0.55    dated February 15th, 2010                    

============================= Boot Info Summary: ==============================

 => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
    partition #1 for (,msdos1)/boot/grub.
 => Windows is installed in the MBR of /dev/sdb
 => Grub 2 is installed in the MBR of /dev/sdc and looks on the same drive in 
    partition #1 for (,msdos1)/boot/grub.

sda1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows XP
    Boot files/dirs:   /boot.ini /ntldr /NTDETECT.COM

sdb1: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info:  

sdb5: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  According to the info in the boot sector, sdb5 starts 
                       at sector 63.
    Operating System:  
    Boot files/dirs:   

sdc1: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Ubuntu 10.10
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sdc2: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files/dirs:   

sdc3: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info:  

sdc5: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sda1    *             63   234,436,544   234,436,482   7 HPFS/NTFS


Drive: sdb ___________________ _____________________________________________________

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdb1              16,065   234,436,544   234,420,480   f W95 Ext d (LBA)
/dev/sdb5              16,128   234,436,544   234,420,417   7 HPFS/NTFS


Drive: sdc ___________________ _____________________________________________________

Disk /dev/sdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdc1    *             63    21,029,084    21,029,022  83 Linux
/dev/sdc2          21,029,085   300,495,824   279,466,740  83 Linux
/dev/sdc3         300,495,825   312,581,807    12,085,983   f W95 Ext d (LBA)
/dev/sdc5         300,495,888   312,581,807    12,085,920  82 Linux swap / Solaris


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda1        01C3D871F965AC80                       ntfs       DSK1_VOL1                     
/dev/sda: PTTYPE="dos" 
/dev/sdb1: PTTYPE="dos" 
/dev/sdb5        A83CB1173CB0E18C                       ntfs       Disk 2                        
/dev/sdb: PTTYPE="dos" 
/dev/sdc1        b362ac08-3495-40da-8589-20eb502bca5d   ext4                                     
/dev/sdc2        45d7a870-5993-4a9d-8380-5bffe691aa1c   ext4       home                          
/dev/sdc3: PTTYPE="dos" 
/dev/sdc5        27179ee5-e990-4dcb-9fc8-a5857a0f1b37   swap                                     
/dev/sdc: PTTYPE="dos" 

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

/dev/sdc1        /                        ext4       (rw,errors=remount-ro,commit=0)
/dev/sdc2        /home                    ext4       (rw,commit=0)
/dev/sda1        /media/DSK1_VOL1         fuseblk    (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
/dev/sdb5        /media/Disk 2            fuseblk    (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)


================================ sda1/boot.ini: ================================

[boot loader]

timeout=30

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /NoExecute=OptIn


=========================== sdc1/boot/grub/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
  load_env
fi
set default="0"
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
}
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set b362ac08-3495-40da-8589-20eb502bca5d
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
set gfxpayload=keep
  insmod gfxterm
  insmod 
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod part_msdos
insmod ext2
set root='(hd2,msdos1)'
search --no-floppy --fs-uuid --set b362ac08-3495-40da-8589-20eb502bca5d
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod part_msdos
	insmod ext2
	set root='(hd2,msdos1)'
	search --no-floppy --fs-uuid --set b362ac08-3495-40da-8589-20eb502bca5d
	linux	/boot/vmlinuz-2.6.35-22-generic root=UUID=b362ac08-3495-40da-8589-20eb502bca5d ro   quiet splash
	initrd	/boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod part_msdos
	insmod ext2
	set root='(hd2,msdos1)'
	search --no-floppy --fs-uuid --set b362ac08-3495-40da-8589-20eb502bca5d
	echo	'Loading Linux 2.6.35-22-generic ...'
	linux	/boot/vmlinuz-2.6.35-22-generic root=UUID=b362ac08-3495-40da-8589-20eb502bca5d ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-25-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod part_msdos
	insmod ext2
	set root='(hd2,msdos1)'
	search --no-floppy --fs-uuid --set b362ac08-3495-40da-8589-20eb502bca5d
	linux	/boot/vmlinuz-2.6.32-25-generic root=UUID=b362ac08-3495-40da-8589-20eb502bca5d ro   quiet splash
	initrd	/boot/initrd.img-2.6.32-25-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-25-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod part_msdos
	insmod ext2
	set root='(hd2,msdos1)'
	search --no-floppy --fs-uuid --set b362ac08-3495-40da-8589-20eb502bca5d
	echo	'Loading Linux 2.6.32-25-generic ...'
	linux	/boot/vmlinuz-2.6.32-25-generic root=UUID=b362ac08-3495-40da-8589-20eb502bca5d ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-25-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='(hd2,msdos1)'
	search --no-floppy --fs-uuid --set b362ac08-3495-40da-8589-20eb502bca5d
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(hd2,msdos1)'
	search --no-floppy --fs-uuid --set b362ac08-3495-40da-8589-20eb502bca5d
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Home Edition (on /dev/sda1)" {
	insmod part_msdos
	insmod ntfs
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set 01c3d871f965ac80
	drivemap -s (hd0) ${root}
	chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### 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  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

=============================== sdc1/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc                                       /proc        proc  nodev,noexec,nosuid      0  0  
# / was on /dev/sdc1 during installation
UUID=b362ac08-3495-40da-8589-20eb502bca5d  /            ext4  errors=remount-ro        0  1  
# /home was on /dev/sdc2 during installation
UUID=45d7a870-5993-4a9d-8380-5bffe691aa1c  /home        ext4  defaults                 0  2  
# swap was on /dev/sdc5 during installation
UUID=27179ee5-e990-4dcb-9fc8-a5857a0f1b37  none         swap  sw                       0  0

=================== sdc1: Location of files loaded by Grub: ===================


   6.5GB: boot/grub/core.img
   7.0GB: boot/grub/grub.cfgUnable to find mountpoint
  10.0GB: boot/initrd.img-2.6.32-25-generic
   1.2GB: boot/initrd.img-2.6.35-22-generic
   5.9GB: boot/vmlinuz-2.6.32-25-generic
   5.6GB: boot/vmlinuz-2.6.35-22-generic
   1.2GB: initrd.img
  10.0GB: initrd.img.old
   5.6GB: vmlinuz
   5.9GB: vmlinuz.old
#666

boot error: "lvm device name does not begin with /dev/mapper/ I was offline a few months and recently ran all the updates since July. I have two kernels in my boot menu, realtime and lowlatency. Since running updates, including updates to grub, I can boot the realtime kernel (it is first on the menu) but when I try to run the lowlatency kernel, I get the following error:

cryptsetup: lvm device name (/dev/disk/by-uuid/.......) does not begin with /dev/mapper/

I am especially curious why I don't get this error when booting the first item in the menu, but do when booting the third item. Also, the boot splash has disappeared; I get the magenta screen.

I usually run the realtime kernel only when recording stuff, and the lowlatency otherwise, since I have fewer problems running Skype with the latter.

Is there a way I can fix this? All my drives are encrypted lvms, and /home is also on a RAID 5 array (lvm, encrypted). I remember having to tweak some things in grub and maybe fstab when I first set it up, but I haven't been able to fix this particular problem since the updates ran. It has been four or five months since I modified those files, and I can't remember exactly what to do, or what to look for.

I haven't been able to locate this problem on any other threads, either. I did post it in general help, but only got a suggestion to get rid of the lvm raid, which is not an option. It seems unnecessary, anyway, since the problem must be with grub, not with the lvm, since the realtime kernel will boot.

Any help will be greatly appreciated!

#667

@ JayRobert,

Unfortunately I know very little about how G2 interacts with any of your topics you mention.

I did do a bug search and found one that might apply to your situation: https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/577239

#668

Thanks for the quick reply and the link! I will try the solutions in that thread a little later, when I have some uninterrupted time to work on it.

#669

I still can't get the menu to have a time countdown as described in the post above Everything else seems fine, with the boot into either Maverick or XP having no probs.

Boot info in that post, appreciate any pointers.

#670

von Stalhein said: I still can't get the menu to have a time countdown as described in the post above

Everything else seems fine, with the boot into either Maverick or XP having no probs.

Boot info in that post, appreciate any pointers. I hope I am not butting in on drs305's thread, but to edit the countdown enter : gksu gedit /etc/default/grub

and you should see something like this at the top:

GRUB_DEFAULT=2
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=60

Make sure the 2nd line above is commented out with a #. Not real sure what the 3rd line does, but this is what mine is set to. The 4th line is the timeout line. I have mine set to 60 seconds as I am kind of slow and need the extra time.

If you edit this file, make sure you enter sudo update-grub2 or you changes will not stick. (sudo update-grub is the same thing)

I Hope this helps and once again I hope I am not butting in! :) And if you want, you could check out my signature for making a nice background and maintenance free GRUB2 screen. It's really good if you are dual booting 2 OSs. There are some example pictures at the bottom. It is listed on step 19 of this tutorial.

#671

Cavsfan,

Anyone is free to post in this thread as far as I'm concerned. Ideally a user would read a tutorial here and then make a new thread in General or Absolute Beginner or elsewhere describing their specific problem. But we are at almost post #700, so I have a suspicion this isn't going to happen. ;-)

#672

Cavsfan said: I hope I am not butting in on drs305's thread, but to edit the countdown enter :

gksu gedit /etc/default/grub

and you should see something like this at the top:

GRUB_DEFAULT=2
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=60

Make sure the 2nd line above is commented out with a #. Not real sure what the 3rd line does, but this is what mine is set to. The 4th line is the timeout line. I have mine set to 60 seconds as I am kind of slow and need the extra time.

If you edit this file, make sure you enter sudo update-grub2 or you changes will not stick. (sudo update-grub is the same thing)

I Hope this helps and once again I hope I am not butting in! :) And if you want, you could check out my signature for making a nice background and maintenance free GRUB2 screen. It's really good if you are dual booting 2 OSs. There are some example pictures at the bottom. It is listed on step 19 of this tutorial.

aaarrrgghhh :)

Thanks for that advice, unfortunately it didn't change.

The top part of my grub looks like this:

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=30
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

Keep butting in, I'm hoping to get it working as it's supposed to :-)

Sorry drs305, happy to take it to a separate thread if that's the right thing.

#673

von Stalhein,

Does your menu just appear and waits for you to make a selection? You stated that you have a recordfail event. You can try to clear what's stored in the /boot/grub/grubenv file just in case there is something there that triggers the failure:

sudo grub-editenv create

If you want to allow the menu to continue to boot after a specified period even with a recordfail it's possible. This is not an ideal situation, since it bypasses the failure mode, but you can disable the "recordfail" event.

I'll study the RESULTS.txt but probably won't be able to determine the specific pause of what triggers the recordfail.

If you want to disable the recordfail capability (which freezes the G2 menu until a selection is made) post here and I'll detail the changes you can make to the G2 scripts.

#674

In my case, situations like that I solve by removing /boot/grub/grubenv file. But, that is just me... :)

sudo mv /boot/grub/grubenv ~/grubenv

and, after I am sure it is OK,

sudo rm ~/grubenv
#675

drs305 said: Cavsfan,

Anyone is free to post in this thread as far as I'm concerned. Ideally a user would read a tutorial here and then make a new thread in General or Absolute Beginner or elsewhere describing their specific problem. But we are at almost post #700, so I have a suspicion this isn't going to happen. ;-)

Thanks! I thought it was something simple that I could help with, but I am out of my league I believe as it was not as simple as I thought. I should (and will try to) resist the temptation to post because you know way more than I ever will about GRUB2! Have a great weekend! :)

#676

drs305 said: von Stalhein,

Does your menu just appear and waits for you to make a selection? You stated that you have a recordfail event. You can try to clear what's stored in the /boot/grub/grubenv file just in case there is something there that triggers the failure:

sudo grub-editenv create

If you want to allow the menu to continue to boot after a specified period even with a recordfail it's possible. This is not an ideal situation, since it bypasses the failure mode, but you can disable the "recordfail" event.

I'll study the RESULTS.txt but probably won't be able to determine the specific pause of what triggers the recordfail.

If you want to disable the recordfail capability (which freezes the G2 menu until a selection is made) post here and I'll detail the changes you can make to the G2 scripts. Thanks. Yes, it just sits there until I make a choice. And I agree, I don't want to disable the "recordfail", it's obviously an issue that needs repairing.

There is nothing in the grubenv file except a heap of # marks in a single line.

Before the stuff-up with the Startup Manager, I'm sure nothing was referred to as "msdos1", rather as "hdX" - I wonder whether it's buggered up a path link or something.

#677

von Stalhein said: Thanks.

Yes, it just sits there until I make a choice. And I agree, I don't want to disable the "recordfail", it's obviously an issue that needs repairing.

There is nothing in the grubenv file except a heap of # marks in a single line.

Before the stuff-up with the Startup Manager, I'm sure nothing was referred to as "msdos1", rather as "hdX" - I wonder whether it's buggered up a path link or something. I am a bit surprised that purging/reinstalling grub-common/grub-pc didn't fix the problem. Sometimes Grub is just stubborn I guess.

The "msdos*" designation is the new way Grub2 reports the partitions, so that shouldn't be the issue. The only thing I see in your RESULTS.txt that is in the least odd is that G2 is also installed in sda and doesn't point to a linux partition. Since you are booting to sdc it shouldn't make a difference, but perhaps somewhere it is still noticing this.

You could try installing lilo, another bootloader, to sda just to get rid of Grub in the sda MBR. It won't change the boot since the BIOS isn't looking at sda on the initial boot anyway. You will get some lilo warning messages about not being completely installed, but that's ok.

sudo apt-get install lilo
sudo lilo -M /dev/sda mbr
sudo update-grub

If you wanted to confirm that the behavior is being caused by a recordfail event, you could add a line temporarily to bypass it:

gksu gedit +56 /boot/grub/grub.cfg

set lang=en insmod gettext [COLOR="DarkRed"]recordfail=0[/COLOR] if [ "${recordfail}" = 1 ]; then set timeout=-1 else set timeout=10 fi

END /etc/grub.d/00_header ###

To clear the override after testing it, just run "sudo update-grub".

#678

drs305 said: I am a bit surprised that purging/reinstalling grub-common/grub-pc didn't fix the problem. Sometimes Grub is just stubborn I guess...............

Eureka!

Your comment made me start thinking (it was bound to happen eventually) and as in my experience it's usually something I've done/not noticed I gave that another try.

I noticed in the terminal that as part of the purge process, grub-pc was being removed/purged, but grub-common was actually being installed - therefore (I think) I was not starting with a clean slate. Obviously something I'd stuffed up previously.

After some minor issues with something called "whiptail" locking the package process - "sudo killall whiptail" - I purged grub-common and then re-installed.

It's back where it was prior to the Maverick upgrade - thanks again for your awesome help and patience.

#679

Grub2 1.99-20101126-1ubuntu1 (natty): How can I choose, again, to boot (automatically) with kernel any other than the first in the list...? If I set GRUB_DEFAULT=2 I get, only, that set of "older" kernels...

#680

zika said: Grub2 1.99-20101126-1ubuntu1 (natty):

How can I choose, again, to boot (automatically) with kernel any other than the first in the list...? If I set GRUB_DEFAULT=2 I get, only, that set of "older" kernels...

I'm not sure I understand your last statement, but I'll try to answer. First, run this command. It's just going to give us a shortened, numbered list of your menu entries.

grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0

Remember that GRUB_DEFAULT starts with 0, and not 1. Your system should be booting to what shows as #2 in the list (the third entry). Change the number in GRUB_DEFAULT to the number displayed in the terminal output and be sure to run 'sudo update-grub'.

There are several other ways to accomplish what you want. I'll describe one of them here.

You can change the /etc/default/grub setting for the default OS to 'saved':> GRUB_DEFAULT=saved Then run the following command to set which one you want selected by default, using the numbers presented in the terminal output above (starting with 0):

sudo grub-set-default=**[COLOR="DarkRed"]X[/COLOR]**

Example: sudo grub-set-default=2 You can also use the exact title taken from /boot/grub/grub.cfg. Example: sudo grub-set-default "Ubuntu, with Linux 2.6.35-23-generic-pae"

Again, update grub before rebooting ( sudo update-grub ).

If I haven't answered your question please ask again in a different way.

#681

I've reiterated in http://ubuntuforums.org/showpost.php?p=10169037&postcount=3

:~$ grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0
     0	Ubuntu, with Linux 2.6.37-999-generic
     1	Ubuntu, with Linux 2.6.37-999-generic (recovery mode)
     2	Ubuntu, with Linux 2.6.37-6-generic
     3	Ubuntu, with Linux 2.6.37-6-generic (recovery mode)
     4	Ubuntu, with Linux 2.6.36-1.dmz.1-liquorix-amd64
     5	Ubuntu, with Linux 2.6.36-1.dmz.1-liquorix-amd64 (recovery mode)
     6	Windows Vista (loader) (on /dev/sda1)

I see what is the idea of Your solution and I kind of like it. I'll try it now... It makes sense and it is, even, more "legal" than our edititing /etc/default/grub... OK. Off to try... Thank You!

It is, now, sudo grub-set-default 2

No, either one does not work... set-default does not work at all. Saved works but: Either way it points to REAL #2 and that is, now, Previous_Linux_versions... If You choose that one, You go to another menu with other kernels...

Problem, as far as I can see, lies in /etc/grub.d/10_linux ... This submenu is making unnecessary waves...

Submenu makes every ordinary path unusable. I've comment-ed out two lines in /boot/grub/grub.cfg (that creates submenu) and... Next step is to tackle /etc/grub.d/10_linux but I need spare time to do that... Nice idea but not well-thought before implemented... :)

Edit in /etc/grub/10_linux: ... if [ "$list" ] && ! $in_submenu; then [COLOR="Red"]#[/COLOR] echo "submenu \"Previous Linux versions\" {" in_submenu=: fi done

[COLOR="Red"]#[/COLOR]if $in_submenu; then [COLOR="red"]#[/COLOR] echo "}" [COLOR="red"]#[/COLOR]fi

All is back to "normal"...

#682

zika,

I saw the grub developers just the other day were talking about creating sublists in the Grub2 menu. I think their plan was to display the latest kernel and older kernels would be accessed via a link somehow. Looks like it may still need some adjusting...

I haven't taken the time to explore it thoroughly, but if you have and wish to, you can file a bug report (ubuntu-bug grub-pc).

#683

drs305 said: zika,

I saw the grub developers just the other day were talking about creating sublists in the Grub2 menu. I think their plan was to display the latest kernel and older kernels would be accessed via a link somehow. Looks like it may still need some adjusting...

I haven't taken the time to explore it thoroughly, but if you have and wish to, you can file a bug report (ubuntu-bug grub-pc).It is not a critical bug... I've "solved" it, for now, and I can wait until it is polished. My machine is working as usual, with a little edit in file mentioned... Not a big deal. Interesting and good way to learn couple of new things. Nice thing for Saturday... :)

#684

New version, same problem with selecting non-first kernel...

#685

Question: I want to remove the choice of "Vista" Loader (sda1) from the grub menu. I have a dual boot laptop with W7 being the Windoze OS (sda2) and Ubuntu 10.10 being the Linux OS (sda4).

The sda1 partition is for Acer recovery (PQSERVICE) of the factory setup. I don't want to boot into that, due to the fear that it would reformat my HD and zap all my data, and my Ubuntu OS as well.

I do not know why Ubuntu setup recognised it as a "Vista loader" since the computer came with W7 installed. Also sda1 is a "hidden" partition in Windows, but not in Linux of course.

excerpt from my grub.d file

BEGIN /etc/grub.d/30_os-prober ###

menuentry "Windows Vista (loader) (on /dev/sda1)" { insmod part_msdos insmod ntfs set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set 0ca20080a200708e chainloader +1 } menuentry "Windows 7 (loader) (on /dev/sda2)" { insmod part_msdos insmod ntfs set root='(hd0,msdos2)' search --no-floppy --fs-uuid --set f07602097601d0f0 chainloader +1 }

END /etc/grub.d/30_os-prober ###

#686

jlh68 said: Question: I want to remove the choice of "Vista" Loader (sda1) from the grub menu.

Take a look at the G2-Title Tweaks link in my signature line. It's a very geeky thread but you can find your answer there. Take a look at section 6 and 7. If you have questions about how to do it, post in that thread.

#687

Greetings, I've spent a while looking through the forums and this thread seems to come the closest to my problem after upgrading online from Lucid 10.04.1 to Meerkat 10.10 on my iMac (see signature below for more details).

As happened in my previous attempts to either upgrade or install from a CD, the system hangs/gets stuck when it boots in the normal mode to the log-in screen. At first I thought it had something to do with my wireless "Magic Mouse" and keyboard, but I discovered that I can boot in the recovery mode with no problem. Since I upgrade only several days ago, I assume that I have the latest kernel.

Please advise.

#688

Old Codger said: As happened in my previous attempts to either upgrade or install from a CD, the system hangs/gets stuck when it boots in the normal mode to the log-in screen.

I have no experience with iMacs. It could be a video driver issue. At the Grub menu, press "e" to edit the selected menuentry.

Find the "linux" line and go to the end. The last two entries are probably quiet splash. Add nomodeset to the end of the line so it ends with quiet splash nomodeset

Press CTRL-x to boot. If it boots to the Desktop, go to System, Administration, Additional Drivers and see if there is a video driver available for your system.

Note: Adding 'nomodeset' via the Grub menu is not persistent (it won't be there the next time you boot). If this solved your problem but you weren't able to add a driver and continue to need to add 'nomodeset', edit the /etc/default/grub file and add nomodeset to the "GRUB_CMDLINE_LINUX_DEFAULT=" line. Save the file, then run "sudo update-grub" to update the menu.

#689

Old Codger said: Greetings, I've spent a while looking through the forums and this thread seems to come the closest to my problem after upgrading online from Lucid 10.04.1 to Meerkat 10.10 on my iMac (see signature below for more details).

As happened in my previous attempts to either upgrade or install from a CD, the system hangs/gets stuck when it boots in the normal mode to the log-in screen. At first I thought it had something to do with my wireless "Magic Mouse" and keyboard, but I discovered that I can boot in the recovery mode with no problem. Since I upgrade only several days ago, I assume that I have the latest kernel.

Please advise.Try this: On Grub menu "E" Add "text" to "quiet splash" on kernel line Ctrl-X to boot Log-in sudo nano /etc/default/grub add GRUB_GFXPAYLOAD_LINUX=text save (Ctrl-X) sudo update-grub reboot Hopefully, enjoy...

#690

Greetings drs305 and zika,

Thank you for your helpful suggestions.

First, I'm not savvy enough about Linux to know if the Nvidia driver might be causing a problem, but it wasn't a problem with Ubuntu 9.10 or 10.04.

Second, when I edited the grub kernel line and booted (ctrl x), I was unable to log-in. The log-in screen didn't respond. :confused: That route appears to be a dead end.

Is there a way to resolve the problem perhaps using command lines in terminal?

#691

Old Codger said: Is there a way to resolve the problem perhaps using command lines in terminal?

Old Codger,

I'm not an expert on these issues. I was hoping a quick option added to the boot line might help but apparently not. Since many users aren't going to look at a Grub thread, I'd recommend starting a new post describing your problems. I think you'd get a better response.

Even though not as many readers view it, those that participate in Installations and Upgrades will have a much better idea of how to solve this problem than us 'grub' slugs.... Hope you get it resolved quickly.

#692

Old Codger said: Greetings drs305 and zika,

Thank you for your helpful suggestions.

First, I'm not savvy enough about Linux to know if the Nvidia driver might be causing a problem, but it wasn't a problem with Ubuntu 9.10 or 10.04.

Second, when I edited the grub kernel line and booted (ctrl x), I was unable to log-in. The log-in screen didn't respond. :confused: That route appears to be a dead end.

Is there a way to resolve the problem perhaps using command lines in terminal?

Just a note: I don't have a Mac, but I have an Nvidia card and I too did an upgrade from Lucid to Maverick and experienced a whole lot of problems with GRUB2. I ended up backing stuff up and doing a clean install and I believe that was the only way to fix my problem. This is just my opinion though and drs305 probably forgot more about GRUB than I'll ever know.

#693

Old Codger said: Greetings drs305 and zika,

Thank you for your helpful suggestions.

First, I'm not savvy enough about Linux to know if the Nvidia driver might be causing a problem, but it wasn't a problem with Ubuntu 9.10 or 10.04.

Second, when I edited the grub kernel line and booted (ctrl x), I was unable to log-in. The log-in screen didn't respond. :confused: That route appears to be a dead end.

Is there a way to resolve the problem perhaps using command lines in terminal? When I wrote Log-in, I meant log-in in CLI... That is the only stuff You'll get with „text“... You will not see Your pass echoed... The rest of receipe is for "command line" in tty You logged in...

#694

Zika, thanks again for your suggestions. I typed in the command lines you provided, ran sudo update-grub and rebooted, but the log-in screen in the normal mode still freezes. At least I can still run Meerkat in the failsafe mode until I find a fix. :)

drs305, thank you as well for your suggestion to post this problem elsewhere. I'll probably do that on the Apple users forum since I suspect that my problem is a Mac issue. I've tried to install Ubuntu 10.10 a few times from a live CD, as well as upgrading online via 9.10, and the same thing happens.

Ironically, I've had no significant problems upgrading to 10.10 with my older MacBook. Save the usual minor tweaking, the install was nearly flawless. :popcorn:

#695

Cavsfan said: Just a note: I don't have a Mac, but I have an Nvidia card and I too did an upgrade from Lucid to Maverick and experienced a

whole lot of problems with GRUB2. I ended up backing stuff up and doing a clean install and I believe that was the only way to fix my problem. This is just my opinion though and drs305 probably forgot more about GRUB than I'll ever know.

Hi Cavsfan, as you can see from my reply to both Zika and drs305, I've already tried a clean install, which didn't work either. I think it's a iMac issue because I had no problem upgrading to Meerkat on the MacBook.

#696

Old Codger said: Hi Cavsfan, as you can see from my reply to both Zika and drs305, I've already tried a clean install, which didn't work either. I think it's a iMac issue because I had no problem upgrading to Meerkat on the MacBook.

Thanks for the reply! Yes, you'd probably have better luck in the Mac thread. I don't know anything about Macs, but these guys are the grub gurus around here. I only know about 1/100 of what drs305 knows! Good luck and I am hopeful someone in the Mac section can help you.

#697

HELP NEEDED! :D

My specific problem is this:

I install ubuntu (10.04lts) to a logical partition. I specify (from gui installer advanced option) that I want grub2 in the bootsec of a small primary partition - I am chaining to it from another bootloader (not MS) in MBR... this all works fine... until I add or remove another logical partition in the extended partition chain; before that is, after is no prob; obviously this shifts the index for the logical partition ie what was logical 4 becomes logical 3 or 5 as the case may be that grub uses to find.

When this has been done grub can no longer find the install and comes up with an error (and a very unhelpful repair prompt). If I then add or remove logical partitions to restore index position then all boots OK. It is akin to changing primary partition position with windozzze but in that case a simple edit of (win) boot.ini fixes the problem.

How do I point grub2 at the logical partition when its index location has changed?

Help much appreciated

#698

linux-dummy,

The command to force Grub2 to install on a partition (PBR), assuming the Ubuntu partition already has the standard Grub 2 files, is:

sudo grub-install --force /dev/sdXY
#699

Thankyou DRS305 for your prompt reply,

but from where do I issue that command, from the repair prompt seems to do nothing, the boot process stops at that point, so do I boot from live cd and then go to terminal command prompt, and if so, do I just issue that command or do I have to use the chroot command (which I have heard of but never used and not 100% sure how to), and how do I determine at that point the new XY for my relevant hdd partition.

Sorry to be asking such basic questions, but while I have a very good knowledge from an MSdos standpoint, from Linux I really am a DUMMY!!!! A mr-men step by step set of instructions would be very helpful to me if thats possible. I have read the posts, but end up a little confused.

Thanks

linux-dummy :redface:

#700

linux-dummy said: but from where do I issue that commandhat point, so do I boot from live cd and then go to terminal command prompt, and if so, do I just issue that command or do I have to use the chroot command (which I have heard of but never used and not 100% sure how to), and how do I determine at that point the new XY for my relevant hdd partition.

Sorry to be asking such basic questions, but while I have a very good knowledge from an MSdos standpoint, from Linux I really am a DUMMY!!!! A mr-men step by step set of instructions would be very helpful to me if thats possible. I have read the posts, but end up a little confused.

Thanks

linux-dummy :redface:

If you already have Grub installed but just need to put it on the PBR (partition boot record), you can run that command from a LiveCD. The XY is the drive & partition (for example sda5). You can run "fdisk -l" (lowercase L) and can probably figure out which one is your Ubuntu install. Look for the "Linux" partition and if you have multiple Linux partitions look at the size to determine which one it is.

If you need to reinstall grub, you need to chroot into your Linux partition using the procedures in the "G2-Chroot" link below.

Since it's misleading, the "grub-install" command mainly writes to the MBR or PBR and points to your Grub files. It adds the modules to /boot/grub and writes the core.img file, but it doesn't really install Grub2. For that you need to install grub-pc via chroot if you can't boot into your Ubuntu OS normally.

When you are installing G2 to a partition(PBR), the command will generate messages saying it's not a good idea. If you use the "--force" option as I described in an earlier post, it will still give the warnings and may not look like it installed. You can use the boot info script from _http://bootinfoscript.sourceforge.net_ to ensure it was written to the partition.

#701

Thankyou drs305

sudo grub-install --force /dev/sdXY fixed the problem, very grateful. I used Grub2 super boot disk from a floppy to get into my installation to do it - I can highly recommend that utility to anyone with this problem.

Cheers.

#702

I am new to linux and I have been trying to install ubuntu alongside my Windows 7... (both 64 bits, mainly for RAM)... Anyway, I started with a clean install, I first installed Win 7 and left 150 GB of space in a HDD for a partition for linux.. I ran linux and installed it, everything went as smooth as silk... everything worked fine, when the installation ended it asked me to reboot so I can start using ubuntu... I rebooted but the problem is that it loads directly Windows 7, there is no boot menu, its like GRUB never kicks in.... Any ideas??

I am running Intel Core i7 3.0 GHz Asus Sabertooth motherboard 12 GB RAM 1333 Nvidia Geforce GTX 470 1 WD HD (1.5 TB) 1 WD HD (1.0 TB) 1 SM HD (1.0 TB)

I am guessing is because I have 3 HDDs and sda is not the one I installed neither Windows nor Ubuntu?? they are both in sdb... But I really have no idea... It only boots Windows 7 and I can't seem to find anything that might help... so please, a little help! :)

#703

Maundler said: I am new to linux and I have been trying to install ubuntu alongside my Windows 7... (both 64 bits, mainly for RAM)... Anyway, I started with a clean install, I first installed Win 7 and left 150 GB of space in a HDD for a partition for linux.. I ran linux and installed it, everything went as smooth as silk... everything worked fine, when the installation ended it asked me to reboot so I can start using ubuntu... I rebooted but the problem is that it loads directly Windows 7, there is no boot menu, its like GRUB never kicks in.... Any ideas??

I am running Intel Core i7 3.0 GHz Asus Sabertooth motherboard 12 GB RAM 1333 Nvidia Geforce GTX 470 1 WD HD (1.5 TB) 1 WD HD (1.0 TB) 1 SM HD (1.0 TB)

I am guessing is because I have 3 HDDs and sda is not the one I installed neither Windows nor Ubuntu?? they are both in sdb... But I really have no idea... It only boots Windows 7 and I can't seem to find anything that might help... so please, a little help! :) Maundler, I am NO expert and no doubt drs305 will post something much more useful, but download grub2superdisk provided your ubuntu is recent version.

http://www.supergrubdisk.org/

it is a 1.4 MB iso and will fit on floppy or can be put on cd or usb. It will show you where grub installed and where your linux install is and allow you to boot ubuntu, but it sound like grub did not install to mbr of sda. Note that windozzze 7 has a nasty habit of overwriting mbr if you go into repair even if you click cancel ! it will then happily think that your world only has Windows and Gates. I use a hexeditor to look at mbr and see what is going on. Hope that is a little help. (its worth having that superdisk on the shelf anyhow)

#704

Maundler,

Welcome to the Ubuntu forums. We need to see the status of your boot files. From the LiveCD Desktop, go to the following link and download the boot info script. Post the contents of the RESULTS.txt and we can see what happened during the install. http://bootinfoscript.sourceforge.net

#705

Thanks dsr.. I have always wanted to migrate to Linux, but I honestly never had the time to do it until now... This is my RESULTS.txt file.. Its a bit long and I didn-t know if I should paste the whole file, but here it is... As I said earlier before, it seems ubuntu installed Grub into another HDD while Windows installed a boot in another HDD... Still don-t know what this means... LOL...


                Boot Info Script 0.55    dated February 15th, 2010                    

============================= Boot Info Summary: ==============================

 => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
    partition #5 for (,msdos5)/boot/grub.
 => Windows is installed in the MBR of /dev/sdb
 => Windows is installed in the MBR of /dev/sdc

sda1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

sda2: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

sda3: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

sdb1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   /bootmgr /Boot/BCD /grldr

sdb2: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows 7
    Boot files/dirs:   /Windows/System32/winload.exe

sdb3: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

sdb4: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info:  

sdb5: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Ubuntu 10.10
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sdb6: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

sdc1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

sdc2: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sda1    *          2,048   882,274,303   882,272,256   7 HPFS/NTFS
/dev/sda2         882,274,304 1,906,274,303 1,024,000,000   7 HPFS/NTFS
/dev/sda3       1,906,274,304 2,930,272,255 1,023,997,952   7 HPFS/NTFS


Drive: sdb ___________________ _____________________________________________________

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdb1    *          2,048       206,847       204,800   7 HPFS/NTFS
/dev/sdb2             206,848   737,282,047   737,075,200   7 HPFS/NTFS
/dev/sdb3       1,024,002,048 1,953,521,663   929,519,616   7 HPFS/NTFS
/dev/sdb4         737,284,094 1,024,002,047   286,717,954   5 Extended
/dev/sdb5         737,284,096 1,010,718,719   273,434,624  83 Linux
/dev/sdb6       1,010,720,768 1,024,002,047    13,281,280  82 Linux swap / Solaris


Drive: sdc ___________________ _____________________________________________________

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdc1               2,048 1,024,002,047 1,024,000,000   7 HPFS/NTFS
/dev/sdc2       1,024,002,048 1,953,519,615   929,517,568   7 HPFS/NTFS


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/loop0                                              squashfs                                 
/dev/sda1        B4A40E56A40E1C0C                       ntfs       Data2                         
/dev/sda2        7EF017FAF017B6FD                       ntfs       Data3                         
/dev/sda3        54FC1FB7FC1F927A                       ntfs       Data and backup               
/dev/sda: PTTYPE="dos" 
/dev/sdb1        E06ECFB16ECF7EB2                       ntfs       System Reserved               
/dev/sdb2        6422DE0F22DDE5D8                       ntfs                                     
/dev/sdb3        AC3CA4C63CA48CC0                       ntfs       Maverick                      
/dev/sdb4: PTTYPE="dos" 
/dev/sdb5        7698db3f-e402-4d34-895e-e8d9432586aa   ext4                                     
/dev/sdb6        faf08c58-7fa7-4244-8e88-cf3c3bdbc400   swap                                     
/dev/sdb: PTTYPE="dos" 
/dev/sdc1        061441B71441AA8F                       ntfs       Maundler                      
/dev/sdc2        EE585BDF585BA55D                       ntfs       Data                          
/dev/sdc: PTTYPE="dos" 
error: /dev/sdd: No medium found
error: /dev/sde: No medium found
error: /dev/sdf: No medium found
error: /dev/sdg: No medium found

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

aufs             /                        aufs       (rw)
/dev/sr0         /cdrom                   iso9660    (ro,noatime)
/dev/loop0       /rofs                    squashfs   (ro,noatime)
/dev/sda3        /media/Data and backup   fuseblk    (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
/dev/sda2        /media/Data3             fuseblk    (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
/dev/sdc1        /media/Maundler          fuseblk    (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)


=========================== sdb5/boot/grub/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="0"
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 {
  insmod vbe
  insmod vga
}

insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 7698db3f-e402-4d34-895e-e8d9432586aa
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 7698db3f-e402-4d34-895e-e8d9432586aa
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos5)'
    search --no-floppy --fs-uuid --set 7698db3f-e402-4d34-895e-e8d9432586aa
    linux    /boot/vmlinuz-2.6.35-22-generic root=UUID=7698db3f-e402-4d34-895e-e8d9432586aa ro   quiet splash
    initrd    /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos5)'
    search --no-floppy --fs-uuid --set 7698db3f-e402-4d34-895e-e8d9432586aa
    echo    'Loading Linux 2.6.35-22-generic ...'
    linux    /boot/vmlinuz-2.6.35-22-generic root=UUID=7698db3f-e402-4d34-895e-e8d9432586aa ro single 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos5)'
    search --no-floppy --fs-uuid --set 7698db3f-e402-4d34-895e-e8d9432586aa
    linux16    /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos5)'
    search --no-floppy --fs-uuid --set 7698db3f-e402-4d34-895e-e8d9432586aa
    linux16    /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sdb1)" {
    insmod part_msdos
    insmod ntfs
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set e06ecfb16ecf7eb2
    chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### 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  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

=============================== sdb5/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sdb5 during installation
UUID=7698db3f-e402-4d34-895e-e8d9432586aa /               ext4    errors=remount-ro 0       1
# swap was on /dev/sdb6 during installation
UUID=faf08c58-7fa7-4244-8e88-cf3c3bdbc400 none            swap    sw              0       0

=================== sdb5: Location of files loaded by Grub: ===================


 454.9GB: boot/grub/core.img
 497.8GB: boot/grub/grub.cfg
 378.4GB: boot/initrd.img-2.6.35-22-generic
 454.9GB: boot/vmlinuz-2.6.35-22-generic
 378.4GB: initrd.img
 454.9GB: vmlinuz
=======Devices which don't seem to have a corresponding hard drive==============

sdd sde sdf sdg
#706

I am having no luck with this. Can anyone tell me what it is i am typing wrong?

menuentry "mint 10" { set isofile="/distro/m10.iso" loopback loop (hd0,5)/distro/m10.iso linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/distro/m10.iso noprompt noeject initrd (loop)/casper/initrd.lz }

iso file is on my / partition. Thanks in advance guys. :D

#707

Maundler,

Thanks for posting. I placed the RESULTS.txt between "code" tags for formatting purposes. You generate the tags when creating a post by pressing the # icon in the post's menubar. Then you paste between the [noparse] ```


What the results show is that Grub2 was installed, but wrote to the sda MBR. It appears your system boots first to the sdb MBR.

Depending on how it was written, the best solution would be to change the BIOS boot order to boot sda first. Even though it would be a bit strange, it would allow you to have G2 on sda, which would present the boot menu and allow you to boot either Windows or Linux. The advantage would be that the Windows bootloader would still be on sdb and if Grub2 ever broke, you could switch the BIOS back and immediately have Windows again just as you do now.

The other way to get Grub2 working is to boot the LiveCD, mount your Ubuntu partition (sdb5) and install Grub2 to sdb with the following commands:

sudo mount /dev/sdb5 /mnt sudo grub-install --root-directory=/mnt /dev/sdb

Do not include the partition number in the second command.

After rebooting, run "sudo update-grub" if you don't see Windows as a menu option during boot.
#708

DRS.. thanks for the quick response!!! I will try it right now... I mean, it felt "logical" that this would be the answer, although I was unsure how Linux behaved with 2 "bootloaders" and I was unsure whether Windows boot would mess up the Linux one...

Now that it seems to be this way, it works perfect then... I will still have my untouched boot from Windows and the boot from Linux... Anyway, thanks again and I will give it a try and post the results later...

#709

akureikorineko said: I am having no luck with this. Can anyone tell me what it is i am typing wrong?

menuentry "mint 10" { set isofile="/distro/m10.iso" loopback loop (hd0,5)/distro/m10.iso linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/distro/m10.iso noprompt noeject initrd (loop)/casper/initrd.lz }

iso file is on my / partition. Thanks in advance guys. :D

Try this one, with your m10.iso in the sda5 partition. You say the file is on your / partition - I'm assuming it's in the /distro folder.

menuentry "mint 10" { loopback loop (hd0,5)/distro/m10.iso linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/distro/m10.iso noprompt noeject initrd (loop)/casper/initrd.lz }

If you have problems with it, from the Grub menu press "c" to get to the Grub command prompt, then type the following, which should list your m10.iso file. If it doesn't, change the address until you do and then modify your menuentry accordingly.

ls (hd0,5)/distro
#710

Thanks :D that solved it. Now i just have to figure out why it won't actually show a desktop. The startup theme rings, but i get a static screen. (kinda like the old school tv fuzzy channels, but in lines instead of dots)

#711

Hello OP.

I'm on Maverick Meerkat, and have a custom boot menu, with custom background and font colors. It looks neeto like I want it.

My issue is that I like the verbose boot with scrolling text which follows the OS selection from the grub boot menu, but would like to modify the background behind the scrolling text. Is there a way to do such a thing with grub2? Or is it a grub2 related file at all? Thanks for any info and your patience :)

#712

morbs_gt said: Hello OP.

I'm on Maverick Meerkat, and have a custom boot menu, with custom background and font colors. It looks neeto like I want it.

My issue is that I like the verbose boot with scrolling text which follows the OS selection from the grub boot menu, but would like to modify the background behind the scrolling text. Is there a way to do such a thing with grub2? Or is it a grub2 related file at all? Thanks for any info and your patience :)

I know you were referred to this thread but I've already posted in the other one. The short answer is that I don't know what controls things immediately after grub passes control to the kernel. I know that the Grub devs are making improvements to keeping gfxmodes such as resolutions, but I'm not aware of anything on backgrounds or colors.

If you find something, let us know.

#713

Hi drs305,

If you don't want other Operating Systems to be entered in the menu, disable /etc/grub.d/30_osprober

Run this command to stop the script from running: sudo chmod -x /etc/grub.d/30_os-prober DISABLE_30_OS-PROBER='true' in /etc/default/grub This needs to change to (underscore instead of hyphen):

DISABLE_30_OS**_**PROBER='true'

Cheers

#714

masque7 said: Hi drs305,

This needs to change to (underscore instead of hyphen):

DISABLE_30_OS**_**PROBER='true'

Cheers

Fixed. 2 other entries were correct, but I obviously missed this one. Wonder if it's been wrong since I first created the post? ;-)

Thank you *masque7* for catching it and calling it to my attention.

#715

masque7 said: Hi drs305,

This needs to change to (underscore instead of hyphen):

DISABLE_30_OS**_**PROBER='true'

Cheers

Fixed. 2 other entries were correct in later posts, but I obviously missed this one. Wonder if it's been wrong since I first created the post? ;-)

Thank you *masque7* for catching it and calling it to my attention.

#716

Mod, please delete.

#717

Can the grub menu title be changed?

Its the title that's on the top of the grub menu screen.

Currently it says something like GNU GRUB version 1.98+2010084... blah blah blah

Can this be changed to something like GRUB2 MENU? or what ever...

Thanks!

#718

gustavson12 said: Can the grub menu title be changed?

One of the great things of these forums are the unexpected questions that pop up.

The G2 title is not editable by any of the normal configuration scripts found in /etc or /etc/grub.d

I did some exploring the library files and others in /usr/lib/grub and /usr/sbin. While I found editable files which contained plain text which appeared to be linked to the title (/usr/lib/grub/i386-pc/config.h) no changes I attempted to make appeared in the G2 title.

As I have time and the inclination I may pursue this a bit more, but I suspect the title may be coded in areas not accessible in the grub text files. Perhaps someone else will respond.

#719

Hello,

I have problem using GRUB_HIDDEN_TIMEOUT.

I have just Ubuntu 10.10 installed == just one OS. But my experience differs from described:

1. what ever I set or unset to GRUB_HIDDEN_TIMEOUT_QUIET, I newer get countdown on screen.

2. if I interrupt hidden timeout with SHIFT, then rest time to default boot is (GRUB_TIMEOUT - elapsed time ) => not GRUB_TIMEOUT

3. even if GRUB_BACKGROUND set (and working) - by GRUB_HIDDEN_TIMEOUT it is not shown - just blank screen

I thing, that it should work like described by author of thread, but unfortunately it does not

BTW: Can anybody tell me, how to disable border in menu ? It unnecessary covers my nice GRUB_BACKGROUND picture.

--kapetr

#720

kapetr said:

1. what ever I set or unset to GRUB_HIDDEN_TIMEOUT_QUIET, I newer get countdown on screen.

The timeout should be set to false to display the timer as it count's down. I haven't experimented with the timeout feature with a background but will report back. It's possible that as G2 evolves some of the settings have changed.

2. if I interrupt hidden timeout with SHIFT, then rest time to default boot is (GRUB_TIMEOUT - elapsed time ) => not GRUB_TIMEOUT

I'll have to play with this.

3. even if GRUB_BACKGROUND set (and working) - by GRUB_HIDDEN_TIMEOUT it is not shown - just blank screen

Again, I'll check my systems and report back when I have some time.

BTW: Can anybody tell me, how to disable border in menu ? It unnecessary covers my nice GRUB_BACKGROUND picture.

The border is written into the basic Grub 2 code. The developers are aware of the issue but to date I don't believe there is a way to remove the border unless it can be done with themes. There is no simple entry I'm aware of that can be made to the normal G2 scripts.

Grub 2 themes are slowly coming along, and there is now at least a parameter for border colors in progress bars, so it may be possible if you are willing to create a theme and are willing to dig into the manual. Here is the GNU GRUB manual theming link: http://www.gnu.org/software/grub/manual/grub.html#Theme-file-format

You might visit some of the threads regarding BURG, which is much more advanced on the theming side of bootloaders. It would not surprise me if it's developer has a solution.

UPDATE: I am having much the same experience with my tests today with backgrounds and hidden timeouts. I will try some test settings but I don't have a single OS system so I'll have to trick the scripts. If I come up with a solution or script modification for you I will post it.

UPDATE 2 I cannot get the GRUB_HIDDEN_TIMEOUT to count down either. The best I can do is to get a blank screen, which when I press a key, displays the hidden timeout remaining. Pressing another key brings up the menu and timeout.

I don't have a true single OS machine. I recommend filing a bug via "sudo ubuntu-bug grub-pc". It's possible my description no longer applies; there have been a lot of updates to Grub2 since its inception and the "timeout" section has changed/moved. Describe your situation and perhaps Colin Watson or one of the other Ubuntu gurus will respond.

As I currently cannot get the countdown to display even on a blank screen, I've edited these entries in the first post and currently reflect only what is stated in the GNU GRUB (2) manual.

#721

Thank you for yours time and answers. ad 1 - to set "false" I had try - no change. Yours results are the same as by me with "true" 1 OS.

I'm not sure, that my knowledge of problem and English is good enough to make bug report - maybe link to this thread could be enough ?

--kapetr

#722

kapetr said: Thank you for yours time and answers.

ad 1 - to set "false" I had try - no change. Yours results are the same as by me with "true" 1 OS.

I'm not sure, that my knowledge of problem and English is good enough to make bug report - maybe link to this thread could be enough ?

--kapetr

I found a bug report already filed and added my comment about this issue. Mine was just a "me too, it's still happening" comment; it doesn't look like it's being actively worked on. The reason could be that the devs are highly involved on working on Grub 1.99 now. Perhaps it will be looked at in that version.

I'm having problems connecting to Launchpad now to provide the link but I was able to find the bug report a few days ago.

#723

drs305, I'd like to start by thanking you for all the work you've put in here.

I'd appreciate your feedback on a deliciously frustrating problem I've come across. I'll try to be as brief as I can for now:

  • First installation of 10.04 worked *without* any (Grub2) problems.
  • Made a Clonezilla image of the partition.
  • Had an issue with my encrypted home so used a Clonezilla image to reinstate 9.04 to resolve that; had to reinstall Grub to the MBR.
  • Tried multiple times to reinstall 10.04 from both the Clonezilla image and the CD initially used but kept getting same boot problem (blank screen with flashing cursor, "Grub Loading" displayed if shift held).
  • Tried 10.10 installation but same problem.
  • Then embarked on all the various methods suggested for reinstalling Grub2 on this thread and the help.ubuntu.com page.
  • Was able to get a "Grub Rescue" prompt when a reinstall was attempted with [grub-install --root-directory=/mnt /dev/sda].
  • From the rescue prompt, found that manually issuing the commands allowed Ubuntu to boot but only after resetting the prefix: [prefix=(hd0,1)/mnt/boot/grub => prefix=(hd0,1)/boot/grub].
  • Seems (but I could be wrong) that whenever the normal methods of reinstalling Grub2 set the prefix correctly, freeze occurs.
  • Tried SuperGrub2Disk but all of the options cause the same freeze (the CD works fine in another PC).
  • Along the way, did see some error message re: sector(?) 0 of the HDD - wasn't quite sure what to do about this.
  • Finally tried lilo and can boot up fine (currently without UUIDs - had to change in /etc/fstab).
  • What hasn't been attempted yet: (a) Messing around with the MBR; (b) Trying Grub2 without UUIDs.

Apologies for the "brief" description. To summarise my queries:

  • Is it possible that a manual boot can work but an automatic boot cannot (bearing in mind that it did work after the very first installation)?
  • Or should I just give up the ghost and stick to lilo now that I've got a working solution?
#724

myii said:

  • Is it possible that a manual boot can work but an automatic boot cannot (bearing in mind that it did work after the very first installation)?
  • Or should I just give up the ghost and stick to lilo now that I've got a working solution?

I can think of a few reasons why an automatic boot might not work but a manual one could, but it certainly wouldn't be normal.

I'd probably try G2 again since installing lilo isn't very difficult, especially if you already have it working and can make backup copies of it's configuration files.

When it's convenient, I'd recommend purging/reinstalling G2 and then downloading and running the boot info script from the following site if you still have problems. Posting the RESULTS.txt will probably give us a good idea of what is going on. http://bootinfoscript.sourceforge.net

Although it's probably not a UUID issue, you can turn off UUIDs via the /etc/default/grub file settings.

You also mentioned that *set prefix* included "/mnt". That sounds like an incorrect command may have been included when you ran the "grub-install" command. Also, if you have problems with G2 although the "grub-install" command sounds like it reinstalls G2, it doesn't repair every G2 file. If there is a problem with most of the Grub2 files, including missing ones, "grub-install" probably won't fix it. Purging and then reinstalling is often the best course of action when G2 fails for an inexplicable reason.

In any case, I would try installing Grub2. If you already have 'parts' of it on your system, I would purge and reinstall it. From a normally-running Ubuntu boot (non-CD): Make sure the Internet is working, as you will temporarily lose any Grub files until you download grub-pc again.

sudo apt-get purge grub-common
sudo apt-get install grub-pc

You don't need to chroot if you booted normally (even with lilo), but the 'chroot' link in my signature line gives more information about the two commands above if you need it.

#725

Thanks for the prompt reply.

drs305 said: When it's convenient, I'd recommend purging/reinstalling G2 and then downloading and running the boot info script from the following site if you still have problems. Posting the RESULTS.txt will probably give us a good idea of what is going on.

http://bootinfoscript.sourceforge.net

I've already got the script so I'll post the results shortly (after the purge/reinstall).

drs305 said: You also mentioned that *set prefix* included "/mnt". That sounds like an incorrect command may have been included when you ran the "grub-install" command.

I followed the commands as given but I did it from a shell within rescue mode using the alternate installation CD. I'm rather glad it wasn't the correct method since it gave me access to the grub rescue facility!

Just a note but since my last post, I tried to wipe the MBR and reinstall Grub2 but ended up at the same result.

Anyway, I'll try out your suggestions and then post back the results ASAP.

#726

Unfortunately, it didn't work out after the purge and re-installation. This is the output from the script (done before my /mnt "trick" mentioned below):

                Boot Info Script 0.55    dated February 15th, 2010                    

============================= Boot Info Summary: ==============================

 => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
    partition #1 for /boot/grub.

sda1: _________________________________________________________________________

    File system:       ext3
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Ubuntu 10.04 LTS
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda2: _________________________________________________________________________

    File system:       ext3
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files/dirs:   

sda3: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info:  

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 40.0 GB, 40020664320 bytes
16 heads, 63 sectors/track, 77545 cylinders, total 78165360 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sda1    *             63    55,054,754    55,054,692  83 Linux
/dev/sda2          55,054,755    76,019,579    20,964,825  83 Linux
/dev/sda3          76,019,580    78,156,224     2,136,645  82 Linux swap / Solaris


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda1        29dba925-9910-4629-8934-6e9e1085e1e4   ext3                                     
/dev/sda2        67f5d3fa-908e-4ce9-8662-28cfad55f4fa   ext3                                     
/dev/sda3        45fbf60b-02e2-4e08-83ef-54fe451b0477   swap                                     
/dev/sda: PTTYPE="dos" 

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

/dev/sda1        /                        ext3       (rw,errors=remount-ro)
/dev/sda2        /home                    ext3       (rw)


=========================== sda1/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/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
  load_env
fi
set default="0"
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
}
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 29dba925-9910-4629-8934-6e9e1085e1e4
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 29dba925-9910-4629-8934-6e9e1085e1e4
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 29dba925-9910-4629-8934-6e9e1085e1e4
	linux	/boot/vmlinuz-2.6.32-21-generic root=UUID=29dba925-9910-4629-8934-6e9e1085e1e4 ro   quiet splash
	initrd	/boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 29dba925-9910-4629-8934-6e9e1085e1e4
	echo	'Loading Linux 2.6.32-21-generic ...'
	linux	/boot/vmlinuz-2.6.32-21-generic root=UUID=29dba925-9910-4629-8934-6e9e1085e1e4 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod ext2
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 29dba925-9910-4629-8934-6e9e1085e1e4
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod ext2
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set 29dba925-9910-4629-8934-6e9e1085e1e4
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

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

=============================== sda1/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=29dba925-9910-4629-8934-6e9e1085e1e4 /               ext3    errors=remount-ro 0       1
# /home was on /dev/sda2 during installation
UUID=67f5d3fa-908e-4ce9-8662-28cfad55f4fa /home           ext3    defaults        0       2
# swap was on /dev/sda3 during installation
UUID=45fbf60b-02e2-4e08-83ef-54fe451b0477 none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

=================== sda1: Location of files loaded by Grub: ===================


  27.8GB: boot/grub/core.img
  27.8GB: boot/grub/grub.cfg
  27.8GB: boot/initrd.img-2.6.32-21-generic
  27.8GB: boot/vmlinuz-2.6.32-21-generic
  27.8GB: initrd.img
  27.8GB: vmlinuz

Perhaps my /mnt recovery trick should be outlined in case it reveals something:

  • Boot alternate CD in recovery mode.
  • Start script in /dev/sda1 and then run the following commands (the update-grub is probably not needed but I've been doing it regardless):
mount /dev/sda1 /mnt
grub-install --root-directory=/mnt /dev/sda
update-grub
  • Reboot. The [grub rescue] prompt is displayed.
  • Issue the following commands:
set prefix=(hd0,1)/boot/grub
insmod linux
linux /vmlinuz root=/dev/sda1 ro
initrd /initrd.img
boot

  • Voila... Ubuntu 10.04 is served! (with a boot-up time that is *much* faster than lilo* - EDIT: See footnote for disclaimer*).

I hope that can shed some light on my crazy PC. I don't need to input any other commands at the grub rescue prompt... the root variable is already setup fine.

Are there any disadvantages to lilo I should be aware of (other than the boot-up speed* - EDIT: See footnote for disclaimer*)?

[I]Footnote re: Lilo:

  • Initial bootup would take a good 30 seconds more than Grub2.
  • After setting Lilo up with UUIDs, the bootup time was comparable to Grub2.
  • I.e. Lilo isn't slow as I initially made out.[/I]
#727

I cannot see any problems with the contents of RESULTS.txt

If you try a normal boot, I'm assuming you end up at a grub rescue prompt?

Have you tried running the commands you posted without first booting the Alternate CD? What happens?

You should probably also try a normal boot, and at the rescue prompt run "set" and see what parameters it is using if you don't intervene.

Another thing to try would be to eliminate the UUID's. Hold the SHIFT key to display the grub menu. If you can get to it before you see the grub rescue prompt, press 'e' to get into the editing mode. Use the cursor keys and DEL to completely remove the 'search' line, and on the 'linux' line replace "root=UUID=" with "root=/dev/sda1". Then press CTRL-x to see if it boots.

If you are already running Ubuntu after booting with your alternate method, you can edit/etc/default/grub (and open grub.cfg for inspection):

gksu gedit /etc/default/grub /boot/grub/grub.cfg

Remove the # symbol from the start of the following line:

#GRUB_DISABLE_LINUX_UUID=true

Save the file, then run "sudo update-grub. Then inspect grub.cfg, which should be open in another tab of gedit. See if the UUID in the 'linux' line of the first menuentry has been replaced by "sda1". Reboot and see if it boots with sda1 rather than the UUIDs.

#728

drs305 said: If you try a normal boot, I'm assuming you end up at a grub rescue prompt?

No, I get a blank screen with a flashing cursor. If the shift key is held when booting up then I get [Grub loading] - that's all.

drs305 said: Have you tried running the commands you posted without first booting the Alternate CD? What happens?

Every method I've tried has ended up at the same blank screen. I must have stumbled upon the anomaly that caused the prefix variable to be set to [(hd0,1)/mnt/boot/grub], due to using a shell from the rescue mode of the alternate CD.

drs305 said: You should probably also try a normal boot, and at the rescue prompt run "set" and see what parameters it is using if you don't intervene.

I never get a prompt unless I use the method mentioned above. In that case, the only parameters set are:


root=hd0,1
prefix=(hd0,1)/mnt/boot/grub

drs305 said: Another thing to try would be to eliminate the UUID's. Hold the SHIFT key to display the grub menu. If you can get to it before you see the grub rescue prompt, press 'e' to get into the editing mode. Use the cursor keys and DEL to completely remove the 'search' line, and on the 'linux' line replace "root=UUID=" with "root=/dev/sda1". Then press CTRL-x to see if it boots.

To reiterate, I've never been able to get to the grub menu. While trying out some of the manual commands at the grub rescue prompt, I tried to issue the [normal] command after correcting the parameters (hoping to return to the regular grub prompt) but I'd immediately get the same blank screen again.

What irks me about this situation:

  • Grub2 worked perfectly fine the very first time I installed Lucid, so it's just some obscure configuration issue.
  • Grub2 *can* boot up my system but it needs the instructions to be input manually.
  • Lilo boots up the system just fine, with or without the UUIDs being supplied.

Some questions:

  • Why would Grub2 fail at such an early stage of the boot process? Is it searching for something? I've noticed a slight delay on my other machines and some other forum members have mentioned delays lasting for a few minutes... what is Grub2 doing that can take so long before the menu is displayed?
  • I listed the manual commands in my previous post (#4). Is there no way to automate those commands?

I was just about to submit this when I had another thought: is it possible that the partition table in the MBR is somehow causing Grub2 to get stuck? Changes were made to it when I reinstated my cloned partition image. Furthermore, the SuperGrub2Disk encounters problems when trying to analyse my HDD. Is there any way to follow this up?

#729

Try this. Once you have booted into Ubuntu (via lilo or your other method), copy the following at the top of the /boot/grub/grub.cfg file. Place it above the first comment. Save the file, do not update grub (which would erase the change), and reboot.

set prefix=(hd0,1)/boot/grub set root=(hd0,1) insmod part_msdos insmod ext2 insmod linux linux /vmlinuz root=/dev/sda1 ro initrd /initrd.img boot

This will not display a menu, but it should boot the most recent kernel in your Ubuntu installation. It bypasses all UUIDs and the searches for various grub files.

You didn't mention whether you tried removing the UUIDs from G2. This could be done by editing the grub menu during boot (which you couldn't do because you couldn't see it) or by editing the /etc/grub/default file. UUIDs may be the problem.

You can refresh the UUIDs and make sure you are seeing the non-cached UUIDs with the following:

sudo blkid -c /dev/null

I'm still a bit confused about what exactly is happening. From what you mention, it is also possible that Grub2 is booting and leaving you at a flashing cursor because of a video problem. It's possible that either lilo or your improvised commands are booting you into a 'safe graphics' mode. There are no grub failures I know of that leave you at a flashing prompt. There are video problems that will. If it's a video problem you may be albe to fix it, once you have booted, by going to System, Administration, Additional Drivers/Hardware Drivers and trying to install a driver for your video card.

#730

Well done, drs305, with your help I've got to the bottom of this mess. This may end up being a rather long post but there may be some useful feedback here that you, or someone else, may find useful.

Before getting into that, my description of the symptoms has always lacked clarity so I'll try again:

  • After turning on the computer, a blank screen with a flashing cursor - no prompt - would be displayed.
  • The same screen is briefly displayed during a normal boot (on a working computer) just before the grub menu is displayed.
  • In my case, the menu was never displayed, nor any prompt.
  • The only way I ever managed to get a prompt (grub rescue) was by my now-patented "/mnt prefix using alternate CD ©" trick as mentioned in previous posts!

  • From this prompt, I was able to issue a series of commands that allowed the boot to commence.

OK, so starting from the top:

drs305 said:

Try this. Once you have booted into Ubuntu (via lilo or your other method), copy the following at the top of the /boot/grub/grub.cfg file. Place it above the first comment. Save the file, do not update grub (which would erase the change), and reboot.

This really helped. I hadn't considered editing the grub.cfg file (probably due to the big KEEP OUT sign at the top!). What was done:

  • The commands you mentioned allowed the boot to take place - brilliant.
  • Fiddled around with the file until I found out that the problem lines were those that began with:
search --no-floppy --fs-uuid --set [UUID]
  • Commented these out and then rebooted.

  • Grub menu displayed for the first time and normal boot was now possible.

At that stage, I did a bit of googling on this search issue.

The "search" function is plagued by various bugs (see [1], [2]), causing the search to fail.

The page also had instructions on how to make changes to the search in grub.cfg permanent.

  • As mentioned in my previous post, I thought there was some issue with the partition table. Found some murmurings about the same thing on other sites so I decided to give it a try (after backing up my data, of course):
  • The other sites mentioned resizing partitions but I just went straight for destroying them all! I didn't have much to lose (kids' PC) but I'm not recommending this for one's main machine.
  • Reinstalled Ubuntu.

  • Grub menu displayed immediately and booted in without any issues! Just like the very first time I installed Lucid on the machine.

So drs305, there's one for experts. Some ruminations:

  • What exactly is that search command doing that it gets stuck if it doesn't like something in the partition table?
  • Even if I'm wrong and it's got nothing to do with that, why can't the Grub2 crew put some sort of timeout if the search is causing problems? Is it not possible to allow it to fall back to the root envvar value that has already been set in the line preceding it?
  • Why is the search performed twice before the grub menu is displayed?
  • Perhaps a few more echos in the grub.cfg file wouldn't go astray, eh? Then at least I/we would have known where the problem was over three days ago!

  • As mentioned in the quote above (and the links from that page), the search is known to have bugs. This is not the kind of problem you want to be subjecting Linux noobs to, particularly with an LTS release.

I'm not expecting any responses as such but it would be nice to pass on this feedback to the relevant authorities. I'd be happy to if someone could suggest where the best place(s) would be.

Wow, this post has taken me ages. You guys posting on this forum deserve a medal.

#731

myii said: I'm not expecting any responses as such but it would be nice to pass on this feedback to the relevant authorities. I'd be happy to if someone could suggest where the best place(s) would be.

Probably the best way to get your concerns known would be to submit a bug report ("ubuntu-bug grub-pc"). Quite a few of the developers would be subscribed and might see it.

The 'search' problem was somewhat prevalent when G2 first appeared, and we were used to the posts and were able to give solutions. It was at about that time the 'search' problem page was created.

That problem hasn't occurred very often lately and G2 has been modified quite a bit since it's inception. Your problem most likely wasn't caused by Grub2 but something in the UUIDs triggered the failure. When the system boots, G2 can set the root directory via the 'search' line or the 'set root' line, so UUIDs and the search line aren't necessary. We won't ever know, but it could be that on your system it wasn't that the UUID wasn't being found, but that somewhere that UUID was found but pointing to the wrong place - in other words 'search' wasn't failing. Once you start cloning and restoring weird things can happen.

Anyway, I'm glad you were able to figure this out.

Happy Ubuntu-ing !

#732

Darn! It does look like there was something in that partition table causing the problem, but to figure out what, we need a copy of it, which you have destroyed ;(

#733

Thanks for this and all your grub tutorials (from your signature) I found the chainload one useful

Do you have any one on setting up multi-boot systems?

#734

rpm13 said:

Do you have any one on setting up multi-boot systems?

It is pretty well automated in grub2: it just detects the other systems and adds them to the menu.

#735

rpm13 said: Thanks for this and all your grub tutorials (from your signature)

I found the chainload one useful

Do you have any one on setting up multi-boot systems?

psusi said: It is pretty well automated in grub2: it just detects the other systems and adds them to the menu.

If you want a nice background for grub2 as well and a simple dual boot menu that you will never have to mess with, you could check out the tutorial in my signature.

It is listed on page one step 19 in this tutorial.

#736

Thanks! very good article

#737

linuxbasiccommand,

Thanks. I edited your post to remove quoting the entire first post of the thread. Don't know if it was intentional on your part but if anyone needs to refer to it they can click on the _First_ link to the lower right of the last post on this page. ;-)

#738

Psusi and Cavsfan:

The automated multiboot detection works when the two OSes are not 'symmetrical.' A typical example of this would be: I have Meerkat on sda5 and Karmic on sda6. In this case I let Meerkat own grub, mbr etc and detect (and point to) Karmic. In effect Karmic is 'parasitic' ie it is not updated and lets itself get 'managed' by the Meerkat install.

However this gets messy when the multi-OSes are both live and regularly updated, say Meerkat and Debian sid. In this case when one updates 'automatically' it stomps on the other's toes. I asked this on the grub list and got useful answers from Jordan Uggla thread here

Since DRS has written some nice grub tutorials I thought he may want to give configfile and multiboot options more public visibility in place of the older chainload.

[For the record the suxware state of the grub2 docs can be seen if you try to click some of the options at [http://grub.enbug.org/CommandList]](http://grub.enbug.org/CommandList])

#739

drs305 said: One of the great things of these forums are the unexpected questions that pop up.

... I did some exploring the library files and others... no changes I attempted to make appeared in the G2 title.

Did anybody find a way to edit the list of systems boot options? I have updated so may times and grub2 keeps putting the options on the screen, that the second OS option is in out of the screen to choose!

I need/want to remove at least 4 kernel options from the boot list (kernel versions I removed, since I use only the last, after every update).

Thanks and sorry if there is a answer to this somewhere else and I didn't find it.

#740

Gonzalo_VCk,

There are various ways to trim the menu, if that is what you are asking. The easiest way to remove older kernels is via the GUI app "Ubuntu-Tweak". Here is a guide on how to remove kernels, including instructions on Ubuntu Tweak: HOWTO: Remove Older Kernels via GUI

You can also customize things via Grub Customizer. It can hide the older kernels but doesn't phyiscally remove them. The link is in my signature line.

#741

THANKS! It worked perfectly.

PS: the older kernels are removed by apt-get autoremove, that I apply after apt-get upgrade, if I am not mistaken.

#742

Grub(Natty): Is there a way (yet) to make some other than first kernel in the list as a default. I&#8217;m talking about this new Grub version with separation of latest and previous kernels into two pages... When that appeared as a feature, I've made a contraption as a sort of a solution by editing appropriate file (there is a thread somewhere here about that) but... That is not a good solution...

Does Customizer work with NN version of grub? Yet, I do not like to fiddle with such a thing as a Grub through some SW...

#743

Gonzalo_VC said: THANKS! It worked perfectly.

PS: the older kernels are removed by apt-get autoremove, that I apply after apt-get upgrade, if I am not mistaken. I beg to differ. I'm using autoremove every day several times and never (ever) it offered me to remove any of kernels, and believe me, there were lots of them...

#744

As fas as I saw, you can choose which version is to be booted by default: the first or second, or any other. They are listed from newer to older, but it is not mandatory to boot by the first one in the list.

I am running 10.04/Lucid Lynx. Don't know about 11.04 Natty Narwhal.

Good luck.

#745

Gonzalo_VC said: I am running 10.04/Lucid Lynx. Don't know about 11.04 Natty Narwhal.I think it is different...

I wish it was not... Feature that looks like a bug...

#746

zika said: Grub(Natty): Is there a way (yet) to make some other than first kernel in the list as a default. I’m talking about this new Grub version with separation of latest and previous kernels into two pages...

Does Customizer work with NN version of grub? Yet, I do not like to fiddle with such a thing as a Grub through some SW...

I haven't spent a lot of time with Grub 1.99 yet, as Natty won't be 'officially' released until next month and the Grub 2 files may still change further.

If you just want to boot a submenu entry, changing the "DEFAULT=" value in /etc/default/grub still appears to work, even though you may not see the menuentry on the grub screen. You can determine the number to use in the DEFAULT entry with this command, which counts and numbers the menuentries (or just count them manually in /boot/grub/grub.cfg):

grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0
*or more simply:*
grep menuentry /boot/grub/grub.cfg  # Count menuentries starting with 0.

If you want to display all the kernels and eliminate the submenu feature, here is an edit of /etc/grub.d/10_linux that will eliminate the linux kernel submenu. These lines (uncommented) appear at the bottom of the file. *Do not comment the "done" line.*

# if [ "$list" ] && ! $in_submenu; then # echo "submenu \"Previous Linux versions\" {" # in_submenu=: # fi done

#if $in_submenu; then # echo "}" #fi Run "sudo update-grub" after saving the changes.

I can probably come up with a way to display only specific kernels in the main menu, but I haven't done it yet and will probably not do so until Natty is released. At that point, if I come up with a solution, I'll put it in my "Tweaks" thread, linked to in my signature line.

#747

drs305 said: I haven't spent a lot of time with Grub 1.99 yet, as Natty won't be 'officially' released until next month and the Grub 2 files may still change further.

If you just want to boot a submenu entry, changing the "DEFAULT=" value in /etc/default/grub still appears to work, even though you may not see the menuentry on the grub screen. You can determine the number to use in the DEFAULT entry with this command, which counts and numbers the menuentries (or just count them manually in /boot/grub/grub.cfg):

grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0
*or more simply:*
grep menuentry /boot/grub/grub.cfg  # Count menuentries starting with 0.

Run "sudo update-grub" after saving the changes.

I can probably come up with a way to display only specific kernels in the main menu, but I haven't done it yet and will probably not do so until Natty is released. At that point, if I come up with a solution, I'll put it in my "Tweaks" thread, linked to in my signature line.You are writing exactly (as far as I recall) the &#8222;patch&#8220; that I posted as soon as I wrote about this &#8222;problem&#8220;, months ago... At that time changing &#8222;default&#8220; in /etc/default/grub did not work and it did not work numerous times in between, when I tried... It works, at my place, only in conjunction with the patch, until grub gets upgraded... I'm at peace with that but not happy...

UPDATE: @drs305: I am sorry. You are right. Behaivour have changed and, now, changing &#8222;default&#8220; works, even though it is not shown in GRUB menu. Thank You for making me try that again... I, simply, gave up...

#748

zika said: UPDATE: @drs305: Behaivour have changed and, now, changing „default“ works, even though it is not shown in GRUB menu. Thank You for making me try that again... I, simply, gave up...

Glad it's working for you now. As I mentioned, Grub 1.99 is still getting some of the kinks worked out of it. I remember when the "DEFAULT" setting didn't work when the submenu was introduced - in fact I discussed it with the devs at the time. That's probably when you were trying it. Fortunately they have fixed that issue.

#749

drs305 said: Glad it's working for you now. As I mentioned, Grub 1.99 is still getting some of the kinks worked out of it. I remember when the "DEFAULT" setting didn't work when the submenu was introduced - in fact I discussed it with the devs at the time. That's probably when you were trying it. Fortunately they have fixed that issue.

Well, it sort of doesn't... It fooled me that it works for kernels inside that submenu. But it doesn't. If You choose n=2 it invokes the first from the sub-menu. That made me happy too early... If You set n=3 it will go to the 3rd in main menu. So, all but the first in sub-menu are, still, inaccessible... So, nothing, really, changed...:-k

#750

zika said: Well, it sort of doesn't... It fooled me that it works for kernels inside that submenu.

Interesting. If you post RESULTS.txt from the _boot info script_ I can take a look and see if I can find out what's going on.

[COLOR="DarkRed"]Added:[/COLOR] If you haven't run the script don't bother. I spent about 20 minutes testing various submenu options and it appears the feature is still pretty buggy. I didn't have enough time to isolate exactly what is failing but if I figure out a pattern I'll submit a bug report and let you know.

#751

drs305 said: Interesting. If you post RESULTS.txt from the _boot info script_ I can take a look and see if I can find out what's going on.

[COLOR=DarkRed]Added:[/COLOR] If you haven't run the script don't bother. I spent about 20 minutes testing various submenu options and it appears the feature is still pretty buggy. I didn't have enough time to isolate exactly what is failing but if I figure out a pattern I'll submit a bug report and let you know.Yeah, I know. I've run that script several times, for my own sake. Problem is that submenu is made but no infrastructure is provided to call anything from it. Several lines of code would suffice... I've corrected 10_linux, again, and will do that couple of times in future. I hate, only, when I forget it, after grub upgrade, and end up in memorytest or similar, Windows, even worse, in the early morning... But, that is the only time I get back to that partition which keeps old stuff... Memories...

#752

How do you change which OS is automatically loaded in the GRUB menu (I'm on 1.98, Ubuntu 10.04)? I think I saw some instructions in there that looked like they would do what I wanted, but there was no change.

#753

Davidthewin said: How do you change which OS is automatically loaded in the GRUB menu (I'm on 1.98, Ubuntu 10.04)? I think I saw some instructions in there that looked like they would do what I wanted, but there was no change.

Normally you change the "DEFAULT=" number in /etc/default/grub.

Or you can use Grub Customizer.

Did you remember to run "sudo update-grub" after making the change? The actual menu isn't changed until you run the command.

Also, remember that you start counting the menu entries in /boot/grub/grub.cfg (or on the displayed menu) starting with 0, and not 1.

Finally, the numbers aren't working in Grub 1.99, which uses submenues.

If you still are having problems, please run the boot info script and post the contents of RESULTS.txt http://bootinfoscript.sourceforge.net

#754

I've sorted it now thanks.

I have a problem which is possibly related, if you wouldn't mind taking a look at it please:

http://ubuntuforums.org/showthread.php?p=10574250

Thanks very much :)

#755

Many thanks for this, using your instructions I have successfully modified my Grub menu.

#756

Malcolm_85,

You are welcome, and also welcome to the Ubuntu forums. :-)

I wrote this guide when there wasn't much documentation about Grub 2. Since then, things have improved and there are many more resources available.

On of those, if you prefer a GUI app, is Grub Customizer. It can make many of the changes a normal user might want to make to the menu. If you are interested in using it in the future, I wrote a guide about it (don't worry, it is MUCH shorted than this guide). See the "Customizer" link in my signature line.

#757

Why the hell do I get grub "error 15" with this damned grub if I don't put it in a SATA port it likes? Everything is UUID based and it still sucks. Can't find stage 1.5 on the same damned hard drive.

#758

avada said: Why the hell do I get grub "error 15" with this damned grub if I don't put it in a SATA port it likes? Everything is UUID based and it still sucks. Can't find stage 1.5 on the same damned hard drive.

First of all, calm down; you catch more flies with honey than vinegar. Secondly, if you are getting "error 15" and anything about stage 1.5 then you are using grub legacy, not grub2. Since you mention swapping ports, my guess is that you have grub legacy installed on one of your other drives, and when you plug that one into the first sata port, that is the one your bios is trying to boot from. Either tell the bios to boot from the correct drive, or install grub2 on that drive.

#759

psusi said: First of all, calm down; you catch more flies with honey than vinegar. Secondly, if you are getting "error 15" and anything about stage 1.5 then you are using grub legacy, not grub2. Since you mention swapping ports, my guess is that you have grub legacy installed on one of your other drives, and when you plug that one into the first sata port, that is the one your bios is trying to boot from. Either tell the bios to boot from the correct drive, or install grub2 on that drive.

Well, the other hard drives never had os-es on them. Is there a tool to view which have brub installed in the mbr and wipe grub.

Also I forgot, but had another similar problem too, when I didn't get an error, but grub simply didn't load, and booting hung after the usual bios stuff.

#760

avada said: Well, the other hard drives never had os-es on them. Is there a tool to view which have brub installed in the mbr and wipe grub.

Also I forgot, but had another similar problem too, when I didn't get an error, but grub simply didn't load, and booting hung after the usual bios stuff.

See drs305's post #**752** above and at the bottom is a bootinfoscript to run. Post the results here.

#761

Hello,

Thank you for the guide. But I'm having some weird issues with what's being displayed on my grub menu.

Last week I updated to Ubuntu 10.10, but my grub menu remains the same, just like it was before the upgrade. I just today upgrade my generic Linux headers to the latest for 10.10, but still my grub menu remains the same.

It appears that there is a confusion between grub.cfg and menu.lst.

I only have these two linux headers, which I checked from synaptic. 2.6.35.28.50 2.6.35.28.36

When I type uname -r in terminal I get this: 2.6.32-30-generic

I am really confused as to why this is happening. The wrong headers keep showing up.

I have attached the results from Boot Info Script

Cheers, JuliusCes

#762

Hail JuliusCes,

Have you ever been able to boot to Maverick (the 35 kernel)?

I'll give you some things to try. Stop if at any time you are able to boot into .35

  1. When you run update-grub it may be updating menu.lst and not grub 2. Try running this command, which will make sure grub2 is updated and not grub legacy:
sudo grub-mkconfig -o /boot/grub/grub.cfg

On the 'linux' and 'initrd' use the cursor keys try changing 2.6.32-30-generic to 2.6.35-28-generic

  1. At the Grub2 menu, (check the top title to ensure you are looking at Grub 2 1.98 and not Grub Legacy 0.97), press 'e' to edit the menuentry.

After making both changes, press CTRL-x to boot. If it boots, run the following commands:

sudo grub-install /dev/sda
sudo update-grub
  1. Boot into Lucid. Run:
sudo grub-install /dev/sda
sudo update-grub

Reboot and see if the 35 kernel is picked up and select it if it does.

  1. Boot a Maverick LiveCD, chroot into your Ubuntu partition (you can use the instructions in the 'Chroot' link in my signature line) and reinstall "linux-image", "linux-headers-2.6.35-28-generic". Then run the same two commands as #2.
  1. You could try to purge and reinstall grub-common, grub and grub-pc, then reinstall grub-common and grub-pc. This would remove grub and give you a pure Grub2 system. But I suspect the problem isn't with Grub2 but with your installation. It wouldn't be a bad idea to simplify the boot files, but I'm not sure it will fix your current problem. Purging/reinstalling is also covered in the 'chroot' link.
#763

Cavsfan said: See drs305's post #**752** above and at the bottom is a bootinfoscript to run. Post the results here.

Looks like somehow I have an old grub on the other. I'm thinking a botched install attempt.

 => Grub 0.97 is installed in the MBR of /dev/sdc and looks on boot drive #2 
    in partition #2 for /boot/grub/stage2 and /boot/grub/menu.lst.

sdc1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

How do I remove grub from the mbr?

#764

drs305 said: Hail JuliusCes,

Have you ever been able to boot to Maverick (the 35 kernel)?

I'll give you some things to try. Stop if at any time you are able to boot into .35

  1. When you run update-grub it may be updating menu.lst and not grub 2. Try running this command, which will make sure grub2 is updated and not grub legacy:
sudo grub-mkconfig -o /boot/grub/grub.cfg

On the 'linux' and 'initrd' use the cursor keys try changing 2.6.32-30-generic to 2.6.35-28-generic

  1. At the Grub2 menu, (check the top title to ensure you are looking at Grub 2 1.98 and not Grub Legacy 0.97), press 'e' to edit the menuentry.

After making both changes, press CTRL-x to boot. If it boots, run the following commands:

sudo grub-install /dev/sda
sudo update-grub
  1. Boot into Lucid. Run:
sudo grub-install /dev/sda
sudo update-grub

Reboot and see if the 35 kernel is picked up and select it if it does.

  1. Boot a Maverick LiveCD, chroot into your Ubuntu partition (you can use the instructions in the 'Chroot' link in my signature line) and reinstall "linux-image", "linux-headers-2.6.35-28-generic". Then run the same two commands as #2.
  1. You could try to purge and reinstall grub-common, grub and grub-pc, then reinstall grub-common and grub-pc. This would remove grub and give you a pure Grub2 system. But I suspect the problem isn't with Grub2 but with your installation. It wouldn't be a bad idea to simplify the boot files, but I'm not sure it will fix your current problem. Purging/reinstalling is also covered in the 'chroot' link.

DRS thank you for your help. The first step worked like a charm. I was able to boot into the 2.6.35 kernel easily.

Cheers, JuliusCes

#765

avada said:

How do I remove grub from the mbr?

We'd need to see the entire RESULTS.txt to be sure, but if your Windows install is on sda, and your Windows boot partition has the boot flag enabled, and you are still on the LiveCD:

sudo apt-get install lilo
sudo lilo -M /dev/sda mbr

Just run those two commands; don't run any other commands to install lilo. That should restore your Windows bootloader if that is what you are trying to do.

#766

drs305 said: We'd need to see the entire RESULTS.txt to be sure, but if your Windows install is on sda, and your Windows boot partition has the boot flag enabled, and you are still on the LiveCD:

sudo apt-get install lilo
sudo lilo -M /dev/sda mbr

Just run those two commands; don't run any other commands to install lilo. That should restore your Windows bootloader if that is what you are trying to do. Not quite this is a hard drive that never supposed to have grub and is messing with the booting from the other drive. I don't want any bootloader on it.

#767

avada said: Not quite this is a hard drive that never supposed to have grub and is messing with the booting from the other drive. I don't want any bootloader on it.

OK. You can use TestDisk to do this if you want. I'm sure there are easier ways. You would have to enable the Universe repository on the LiveCD, then install "testdisk". Open it with (change sda to the appropriate drive, and confirm it on the first TestDisk screen).

sudo testdisk /dev/sd[COLOR="Red"]a[/COLOR]

Proceed, Continue, Intel (do not leave on "None"), MBR Code: Write TestDisk MBR Code to First Sector. Y, Y (Confirm), OK.

#768

Hi, A Grub (not Grub 2) question. I edited the default setting to a number of the menu which doesn't exist by mistake. I counted the first item as 1 (as in GRub 2.. ) and this seems to have broken Grub, so when I boot up, I get a grub> prompt.

So how do I edit the menu.lst file from within Grub? Or do I need a live cd to do that? I have a CD that will get me into cut-down Linux, but I don't know how to access the menu.lst file from within that.

I did backup my menu.lst file before I did changed it. Any advice, would be very gratefully received. Ciara

#769

Ciara1985 said: Hi,

A Grub (not Grub 2) question. I edited the default setting to a number of the menu which doesn't exist by mistake. I counted the first item as 1 (as in GRub 2.. ) and this seems to have broken Grub, so when I boot up, I get a grub> prompt.

So how do I edit the menu.lst file from within Grub? Or do I need a live cd to do that? I have a CD that will get me into cut-down Linux, but I don't know how to access the menu.lst file from within that.

I did backup my menu.lst file before I did changed it. Any advice, would be very gratefully received. Ciara

From a LiveCD, boot to the Desktop. Mount your Ubuntu partition (I'll use sda5 as an example). Open your menu.lst for editing and reverse whatever you did. Save the file, reboot, and that should fix it.


sudo mount /dev/sd**xy** /mnt # Example: sudo mount /dev/sda5 /mnt
gksu gedit /mnt/boot/grub/menu.lst
#770

Dear DRS305

I have several OS in different partitions. My Ubuntu 9.1 is in sda1. However I can not access it. When I select it on Grub booting I get the message ¨load the kernel first¨.

When I boot with Supergrub, I get the same message.

I tried booting with Rescatux but it can not fix sda1.

I have tried to find out how to load the kernel without success.

Ca you help?

Cheers

#771

delparral said: Dear DRS305

I have several OS in different partitions. My Ubuntu 9.1 is in sda1. However I can not access it. When I select it on Grub booting I get the message ¨load the kernel first¨.

When I boot with Supergrub, I get the same message.

I tried booting with Rescatux but it can not fix sda1.

I have tried to find out how to load the kernel without success.

Ca you help?

Cheers

A way out may be here: https://bbs.archlinux.org/viewtopic.php?id=63411

Different distro, but the principle of checking that the relevant references in the grub.cfg & menu.lst concur might be the same in your case.

Either way, you should go to http://bootinfoscript.sourceforge.net/ and follow the instructions and then post results.txt here to give more information for accurate assistance.

#772

delparral said: Dear DRS305

I have several OS in different partitions. My Ubuntu 9.1 is in sda1. However I can not access it. When I select it on Grub booting I get the message ¨load the kernel first¨.

This message usually means that the prefix (normally "(hdX,Y)/boot/grub" ) isn't set correctly or that the "vmlinuz..." file is missing. We'd be guessing though, so do as *von Stalhein* suggests and run the boot info script. Posting the contents of RESULTS.txt will help us help you.

#773

Hi,

I'm using an application of deployment and management of operating systems and I need to change the order of the default menu entry in one Ubuntu 10.10, but i need to do it outside of the OS to be able to choose the correct OS before boot.

In older versions I only needed to change the parameter in menu.lst but now I can't do a sudo update-grub

How can I change directly /boot/grub/grub.cfg without broking everything?

#774

The same way you edited menu.lst before. Just know that it will be replaced the next time you do run update-grub.

You also can chroot into the system while it is mounted from another system and run update-grub that way:

for f in sys proc dev ; do mount --bind /$f /mnt/$f ; done
chroot /mnt
update-grub
#775

I have found that an application called "Grub Customizer" will work fine for your purpose. Check this web site about it: http://www.webupd8.org/2010/10/grub-customizer-lets-you-reorder-add-or.html

sudo add-apt-repository ppa:danielrichter2007/grub-customizer sudo apt-get update sudo apt-get install grub-customizer

#776

psusi said: The same way you edited menu.lst before. Just know that it will be replaced the next time you do run update-grub.

You also can chroot into the system while it is mounted from another system and run update-grub that way:

for f in sys proc dev ; do mount --bind /$f /mnt/$f ; done
chroot /mnt
update-grub

so if I modify the file grub.cfg every time the computer boots it's not necessary to do the chroot?

#777

I'm not sure exactly what you want to do but there have to be simpler ways of doing what you want rather than editing Grub2 every time you boot.

If you need to make different selections on boot: Do you see the Grub 2 menu during boot? If so, you should be able to choose the selection. If you don't see the menu, perhaps we can permanently make the changes so you do.

If the boot option is always going to be the same: If the version of the OS you want to boot doesn't change (or even if it does), you can create a custom menu and have the first menuentry be the one that always boots by default. You can also disable one or more of the GRUB scripts so that portion of the menu doesn't change (in combination with a custom entry).

If you can be a bit clearer of what exactly you want to do we can probably create a fairly trouble-free solution.

As far as editing the grub files outside the OS: You need to chroot when you are trying to install or update a system. If you only want to manually edit the grub.cfg file, all you have to do is mount the partition and then access the file. Of course, as has been mentioned, any update-grub operation will re-write the file so other steps would be needed to prevent future modifications.

#778

rauletisurv said: so if I modify the file grub.cfg every time the computer boots it's not necessary to do the chroot?

What? If you edit grub.cfg, the changes will be thrown out when you do next run update-grub. You can edit /etc/default/grub and run update-grub using a chroot from a livecd, or you can just edit grub.cfg as a temporary measure to boot the system, then edit /etc/default/grub and run update-grub.

You can also edit the commands for one time use at boot time by pressing e at the grub menu to boot the system this time, and then go edit /etc/default/grub and run update-grub, and then you don't need a livecd at all.

#779

Sorry, I didn't want to explain all the details because is hard and long.

I'm implementing a application of deployment and management of operating systems in my university.

This aplication have a little kernel that boot up before any operating system using PXE.

The HD have 3 operating systems (W7, WXP and Ubuntu10.10) and I have to be able to boot any operating sistems by the aplication. I can't boot the OS directly so I want to boot helped by the ubuntu's grub.

The partitions are mounted in this little kernel and I can change any file of them.

I think edit every time the file it's a good way because every time this aplication will go first and then the students will select what OS they want to use. The partitions will be frozen by deepfreeze so there will be no update-grub, and if there are any the file grub.cfg will by booted anyways.

#780

Hello everyone, a question:

I found out that using the sudo update-grub from the terminal of my first installation helped a lot in having two linux-distros on the same harddisk.

The only thing to mention should be just to not install grub when installing your second linux-distro.

Just install it without putting a bootloader onto the harddisk (important!) and run into your first linux and update grub and the partition with your 2nd distro will be added and should work as desired.

Does someone of you did this also? Did you experience any difficulties with that way?

#781

grubu said: Does someone of you did this also?

Did you experience any difficulties with that way?

That is not bad advice when it is an option.

For a time (and I believe still) in the recent Ubuntu releases the installer did not allow the option of *not* installing the Grub bootloader. It was reported as a bug, as many advanced users recognized the advantages of not installing a second Grub 2.

One workaround was to install it to a flash drive and then just make sure the system boots off the internal hard drive first.

When you do have Grub installed on more than one drive, it can get confusing as to which one is controlling. I help myself by using a different background image for each Grub's boot menu, but you can also determine which one controls since it will place it's OS at the top of the list (if you haven't modified the /etc/grub.d script names).

#782

Yes okay that is a way, hm I have to reinstall it but I think that the option was in there. I will check that.

But if Ubuntu does not have this option it should be one of the last Distros which does not have the ability to choose to not install grub.

So a possibilty could be to first install ubuntu :) and then the others.

Another workaround could be to install the grub4dos if you have a Ntfs or Fat-partition and tell within the menu.lst to boot your first distro's partition from there by adding an entry to your current grub.conf. And when your first installation is succesfully booted, you reinstall that grub to your f.e. sda and update grub. It is just an idea, do you think this could work?

#783

grubu said: Another workaround could be to install the grub4dos if you have a Ntfs or

Fat-partition and tell within the menu.lst to boot your first distro's partition from there by adding an entry to your current grub.conf. And when your first installation is succesfully booted, you reinstall that grub to your f.e. sda and update grub. It is just an idea, do you think this could work?

Yes, it could probably work.

For my own system, I find it easiest for now just to allow the installation to do it's thing, then boot into the OS whose Grub I want to use and run "sudo grub-install /dev/sdX". That then points the sdX MBR (sda, sdb, etc) to the correct partition/Grub 2.

#784

For my own system, I find it easiest for now just to allow the installation to do it's thing, then boot into the OS whose Grub I want to use and run "sudo grub-install /dev/sdX". That then points the sdX MBR (sda, sdb, etc) to the correct partition/Grub 2.

Yeah, great! That's the way to do it.

As we then would have an extended partition with five or more /boot /root & /home partitions won't affect what we want, I would then prefer volume-names in our /etc/fstab's like ubuntu-boot; ubuntu-root; ubuntu-home debian-boot; debian-root; debian-home gentoo-boot; gentoo-root; gentoo-home fedora-boot; fedora-root; fedora-home slitaz-boot; slitaz-root what do you think?

#785

grubu said: Yeah, great! That's the way to do it.

As we then would have an extended partition with five or more /boot /root & /home partitions won't affect what we want, I would then prefer volume-names in our /etc/fstab's like

what do you think?

I use labels for all my fstab entries. The main reason is I am frequently installing/removing OS's for Grub troubleshooting purposes and reformat partitions.

Keeping the same label name for an OS prevents me from having to change the OS's fstab settings (in all the installations) when the partition UUID changes, and allows me to run the "sudo mount -L <label>" wherever the OS happens to reside on that particular day.

#786

Yeah, of cause that was what I wanted to say by 'volume-names' these are just labels as I also think that uuid's will get us confused sometime.

Another question is if it would be possible to tell via the update-grub something like just update grub by rescanning partition (hd0,7) and no other partitions f.e. if you need to update them later?

#787

grubu said: Another question is if it would be possible to tell via the update-grub something like just update grub by rescanning partition (hd0.7) and no other partitions f.e. if you need to update them later?

Being able to specify a partition exclusion is in the works and *may* have already been incorporated in Grub 1.99 - I've seen the patch but don't know if it has been incorporated yet. It isn't in any of the current Ubuntu releases.

In my "Tweaks" thread I have several sections which describe how to hide various partitions. A *much* easier method, at least until it becomes available directly through Grub 2, is via the Grub-Customizer app. Links to both are in my signature line.

Another option if you only want it to scan only the OS's partition (and no others) is to disable os-prober's script:

sudo chmod -x /etc/grub.d/30_os-prober

*or even better* (since it retains the keystatus check), add this to /etc/default/grub:

GRUB_DISABLE_OS_PROBER=true

If you wanted to disable grub from updating itself on any specific installation you can use the "dkpg-divert" command, but this is getting into more advanced territory and users need to weigh (and/or research) the advantages/disadvantages of this method. If doing this, I strongly suggest having a reliable custom grub menu available first.

dpkg-divert --rename --add /usr/sbin/update-grub  # changes name to update-grub.distrib
ln -s /bin/true /usr/sbin/update-grub # runs /bin/true as update-grub so no errors generated
#788

Thank you for this very useful additional information,

I also found something which might help us in some cases.

Herman said:

grub-mkrescue --output=rescue.iso /boot/grub


from here: [URL="http://ubuntuforums.org/showthread.php?t=1470874"]http://ubuntuforums.org/showthread.php?t=1470874
[/URL]
Did you try this out already?
#789

I guess GRUB 2 has a lot of advantages from the "digital" point of view. But there are some days I miss the old one we can edit and arrange more easily...

#790

Yes, we have to learn the exact syntaxes again, but hopefully grub3 will come in the same periode of time. So we can use the new knowledge for many many years :)

Gonzalo_VC, maybe you missed the other thread of drs305 at http://ubuntuforums.org/showthread.php?t=1549847

it is about iso-booting with grub2. Togehter with this thread it inspired me a lot.

I think the Grub 2 Basic thread is a good start for building our minds on grub2 together.

Now to me it seems that the combined know-how just has to be tested on either a real or virtual harddisk.

So I would just say: Let us all don't mind on any question regarding grub2 and bring it to its limits.

At the moment it seems that the only limit is: The number of partitions an extended-partition could take + 3 primary partions. :lolflag:

#791

Hello,

I just wanted to post a small thing which might help you to control the grub2's display a little easier:


sudo apt-get install startupmanager
startupmanager

then try to configure just anything to your needs and reboot to test, for me all workes fine with 1024x768, which is absolutely enough for me. Just for a verify, the 'grub-install -v' gives me a line-output of: grub-install (GNU GRUB 1.98-1ubuntu12) anyway I don't think that it is version-dependend.

#792

grubu said: Hello,

I just wanted to post a small thing which might help you to control the grub2's display a little easier:


sudo apt-get install startupmanager
startupmanager

then try to configure just anything to your needs and reboot to test, for me all workes fine with 1024x768, which is absolutely enough for me. Just for a verify, the 'grub-install -v' gives me a line-output of: grub-install (GNU GRUB 1.98-1ubuntu12) anyway I don't think that it is version-dependend.

Actually, StartUp-Manager is more or less version dependent. It works only partially with Grub 2 versions, and can't handle the Grub 2 submenus introduced with Grub 1.99 (Natty).

SUM was a great tool in its day but it has been surpassed by a GUI app written after the arrival of Grub 2: Grub Customizer: HowTo: Grub Customizer

#793

Oh that is not a good thing so I am a little lucky that it was just tested on the 10.04 LTS. Sorry for the useless information. I will then better refer to the grub-customizer by:

drs305 said:

Add the repository to your system. The following commands will add the repository, import the security key, update the list of available packages and install Grub Customizer.

Applications > Accessories > Terminal

  • Terminal:
  • Open a terminal
  • Install Grub Customizer
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

Thanks.

Em drs305, is there a way to update grub2 to its latest version even from an older ubuntu-version?

#794

grubu said:

Em drs305, is there a way to update grub2 to its latest version even from an older ubuntu-version?

Yes there is. I don't often mention how to do it as I believe if Grub 2 is working it's best to leave it alone. ;-)

But if you really want or need the latest *Ubuntu* version (Grub 1.99RC), I'll provide the general outline of how I do it:

For the normal user, the chances of messing up your system outweigh the advantages IMO.

  • Edit /etc/apt/sources.list by whatever means you wish to use and change the "main" entry to point to "natty" instead of "lucid", "maverick", etc.
  • Save the file and update the package lists.
  • Use "apt-get install -s grub-pc" to update. The "-s" shows what it will do. Once you are satisfied it's going to do what you want, run it again without the "-s". It should only install grub-common, grub-pc and grub-gfxpayload-lists.
  • Once you have run the command, make sure you return the sources.list back to your normal release ("maverick", etc) and update the list.
#795

After getting rid of startupmanager and installing grub-customizer I decided to try to update my grub2 version just as you said, everything happened just as predicted: "sudo apt-get install -s grub-pc" showed:

Suggested packages: multiboot-doc grub-emu xorriso The following NEW packages will be installed: grub-gfxpayload-lists The following packages will be upgraded: grub-common grub-pc 2 upgraded, 1 newly installed, 0 to remove and .... not upgraded. Inst grub-gfxpayload-lists (0.2 Ubuntu:11.04/natty) [] Inst grub-pc [1.98-1ubuntu12] (1.99~rc1-13ubuntu3 Ubuntu:11.04/natty) [] Inst grub-common [1.98-1ubuntu12] (1.99~rc1-13ubuntu3 Ubuntu:11.04/natty) Conf grub-common (1.99~rc1-13ubuntu3 Ubuntu:11.04/natty) Conf grub-pc (1.99~rc1-13ubuntu3 Ubuntu:11.04/natty) Conf grub-gfxpayload-lists (0.2 Ubuntu:11.04/natty)

"sudo apt-get install grub-pc" took me to this question:

Configuration file `/etc/grub.d/00_header' ==> Modified (by you or by a script) since installation. ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : background this process to examine the situation The default action is to keep your current version. *** 00_header (Y/I/N/O/D/Z) [default=N] ?

'I' had been chosen in order to be on a save place and I also reinstalled the maintainer's "/etc/default/grub" and reinstalled grub2 to "sd(x)" to have anything at its basics and then I got a succesful: Setting up grub-pc (1.99~rc1-13ubuntu3) ...

After setting the "/etc/apt/sources.list" back from natty to lucid and doing a reboot the "grub-install -v" is now giving me a: grub-install (GRUB) 1.99~rc1-13ubuntu3

Thanks drs305 it is a pleasure to work with your guidance :P

#796

grubu said: After getting rid of startupmanager and installing grub-customizer I decided to try to update my grub2 version just as you said, everything happened just as predicted: "sudo apt-get install -s grub-pc" showed:

Thanks drs305 it is a pleasure to work with your guidance :P

Glad it worked. Since your normal repositories do not include grub-pc 1.99 you won't get updates to the package. There shouldn't be big changes or major bugs in 1.99. If you ever needed to update the Grub package you would need to once again enable the natty (or later) repository and repeat the process using "apt-get install --reinstall". Just be sure never to run a general upgrade with the 'natty' repository enabled or it could do damage to your earlier release.

#797

Yes there is. I don't often mention how to do it as I believe if Grub 2 is working it's best to leave it alone. ;-)]

I spit beer on the keyboard when I read that :) :D:D

Amen!!!!

#798

drs305 said:

If you ever needed to update the Grub package you would need to once again enable the natty (or later) repository and repeat the process using "apt-get install --reinstall". Just be sure never to run a general upgrade with the 'natty' repository enabled or it could do damage to your earlier release. Yes, thank you that is an important information for any kind of package you might install from a newer build. We should all keep that in mind because sometimes there could be newer working packages which we are able to use then.

As I will stick with the LTS til 2013 I will also try not to forget to set the "sources.list" back. I also have another computer with natty and oneiric in the test, but as this is my first real LTS I want to have a view on that long term thing.

to Grub 2 is working it's best to leave it alone: Hm, I think there is a frighteness that is a little bit to strong. Normally we would install grub2 just to the harddisk we want to use as major-disk, but as it is that easy to do it by a live-cd-boot I will no more be afraid of repairing it, if grub2 might be broken in some way.

Anyway a good solution would be to have at anytime a clean backup of your /boot folder.

Of cause it is not really necessary to play too much with a bootloader, but to me if I haven't tried all that out, I would still not be able to boot an iso with or without persistence which gives me the possibilty to have an working environment at any time it is needed. Another plus is the succesful transfer of an installed system to another place which made me very happy.

#799

Hell drs305,

I have another question, maybe you can help me again with that: In order to get rid of the uuid checking from grub2 and use lable-checking instead I am not sure in which kind I should replace the following line in "/boot/grub/grub.cfg" :


search --no-floppy --fs-uuid --set=root xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

the full "/boot/grub/grub.cfg" menuentry looks like that:


menuentry 'Ubuntu, with Linux 2.6.32-33-generic' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        set gfxpayload=$linux_gfx_mode
        insmod part_msdos
        insmod ext2
        set root='(/dev/sda,msdos6)'
        search --no-floppy --fs-uuid --set=root xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
        linux   /boot/vmlinuz-2.6.32-33-generic root=/dev/sda6 ro splash vga=791 quiet  quiet splash vt.handoff=7
        initrd  /boot/initrd.img-2.6.32-33-generic
}

Thanks for your help.

#800

grubu said: Hell drs305,

I have another question, maybe you can help me again with that: In order to get rid of the uuid checking from grub2 and use lable-checking instead I am not sure in which kind I should replace the following line in "/boot/grub/grub.cfg" ...

I had not experimented with this and it's not well-documented, but I tested it in a VM.

The 'search' line format for a labeled partition appears to be the following. The label for my Ubuntu partition for the tests was *natty* - replace with the correct label for your OS:

search --no-floppy -l *natty* --set=root linux /boot/vmlinuz-2.6.32-33-generic root=LABEL=*natty* ro splash vga=791 quiet quiet splash vt.handoff=7

I would edit the menuentry in the G2 menu to see if the format works for you. Editing the menuentry is non-persistent so if it doesn't work just reboot and try again or boot without making any changes.

If you have a custom Grub 2 entry, the above is the format you need to incorporate the changes into the Grub2 menu.

The question is how to incorporate it into a normal menuentry automatically. You can disable UUIDs in /etc/default/grub but this doesn't remove the UUID from the search line and it changes the 'linux' line to "sdXY".

I'll have to work on this when I have a bit more time - I expect it will involve editing the /etc/grub.d/10_linux file. I'll post back when I find a solution.

#801

It again works like a charm as my root-partition is labeled "ubuntu-root-p6" the menuentry of the "/boot/grub/grub.cfg" is now set to:

menuentry 'Ubuntu-boot-by-label, with Linux 2.6.32-33-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail set gfxpayload=$linux_gfx_mode insmod part_msdos insmod ext2 search --no-floppy -l ubuntu-root-p6 --set=root linux /boot/vmlinuz-2.6.32-33-generic root=LABEL=ubuntu-root-p6 ro splash vga=791 quiet quiet splash vt.handoff=7 initrd /boot/initrd.img-2.6.32-33-generic }

As we spoke earlier the label-thing gives us a lot more control. Thank you very much drs305 for your fast guidance, this seems to be a very good basic, too. :P

drs305 said:

The question is how to incorporate it into a normal menuentry automatically. You can disable UUIDs in /etc/default/grub but this doesn't remove the UUID from the search line and it changes the 'linux' line to "sdXY".

I'll have to work on this when I have a bit more time - I expect it will involve editing the /etc/grub.d/10_linux file. I'll post back when I find a solution.

Yes, that is a thing even though the uuid search could be disabled, hm maybe the the /etc/grub.d/10_linux file is a good way for doing an automatic entry.

Anyway to me the above solution is fully practicable and I am very glad that you could tell me the syntax.

As an "update-grub" will bring us back to the other state we at the moment just have to keep that in mind and bring it manually back then or better: We place it within our /etc/grub.d/40_custom file.

Another interesting thing is that I am also able to boot by label with the new menuentry even if the line in file /etc/default/grub shows "#GRUB_DISABLE_LINUX_UUID="true" so it normally should not be possible or?

#802

Hope I'm not repeating something, that someone else already said, but I thought it would be of value to mention, that if you have Win 7 or XP, on the same PC and it will boot, you could use grud24dos.

Install it on the MS OS and then you will have a "virtual grub", that you can use to boot into any other OS that you lost, and then follow the usual procedures to restore grub from your other OS.

No need to boot from any other media. No need to write to the mbr. No need to burn discs. No need to download isos. Grub will be compatible.

and I'm sure there are a bunch of other good reasons.

#803

dariusdwtt said: Hope I'm not repeating something, that someone else already said, but I thought it would be of value to mention, that if you have Win 7 or XP, on the same PC and it will boot, you could use grud24dos.

Install it on the MS OS and then you will have a "virtual grub", that you can use to boot into any other OS that you lost, and then follow the usual procedures to restore grub from your other OS.

No need to boot from any other media. No need to write to the mbr. No need to burn discs. No need to download isos. Grub will be compatible.

and I'm sure there are a bunch of other good reasons.

Thanks for sharing. Is it really 'gru[COLOR="Red"]d[/COLOR]24dos'? I notice you spelled it the same in another thread. Do you have a link that you've used for this - Windows users would probably like to investigate it.

#804

LOL, soz yes grub.

There's a link in the previous post, and here is a link to the readme.

You'll just need to know which partition your installation is on.

#805

Maybe this question has already been answered, but I can't read through 82 pages of posts to try to find it.

I needed to set the nomodeset parameter for a second Linux on my PC. I prefer grub2 (Arch uses legacy grub), so I control the booting configuration from Ubuntu. If I add the parameter to /etc/default/grub and run update-grub, the only boot command that is affected is the one for Ubuntu.

Therefore, to achieve the needed effect, I had to manually edit /boot/grub/grub.cfg, which is a no-no for grub2. I am uncomfortable with this. Is the main problem that I will have to make this manual change after every time update-grub is run? Is there a better way to do this?

Thanks, Tim

#806

ratcheer said: Maybe this question has already been answered, but I can't read through 82 pages of posts to try to find it.

I needed to set the nomodeset parameter for a second Linux on my PC. I prefer grub2 (Arch uses legacy grub), so I control the booting configuration from Ubuntu. If I add the parameter to /etc/default/grub and run update-grub, the only boot command that is affected is the one for Ubuntu.

Therefore, to achieve the needed effect, I had to manually edit /boot/grub/grub.cfg, which is a no-no for grub2. I am uncomfortable with this. Is the main problem that I will have to make this manual change after every time update-grub is run? Is there a better way to do this?

Thanks, TimIf You have ATI card ``` sudo echo options *radeon modeset*=*0* > /etc/modprobe.d/*radeon*-kms.conf

#807

Thanks, @zika. Can I use that even if I'm using fglrx instead of the rafeon driver?

For some reason, fglrx in Arch requires nomodeset, but in Ubuntu, it does not. Unless Ubuntu is doing something hidden to invoke nomodeset, but it does not show up in grub2.

Tim

#808

ratcheer said: Thanks, @zika. Can I use that even if I'm using fglrx instead of the rafeon driver?

For some reason, fglrx in Arch requires nomodeset, but in Ubuntu, it does not. Unless Ubuntu is doing something hidden to invoke nomodeset, but it does not show up in grub2.

TimI do not think so... I think this is only for OpenSource driver... I'm not sure...

#809

ratcheer said:

I needed to set the nomodeset parameter for a second Linux on my PC. I prefer grub2 (Arch uses legacy grub), so I control the booting configuration from Ubuntu. If I add the parameter to /etc/default/grub and run update-grub, the only boot command that is affected is the one for Ubuntu.

Therefore, to achieve the needed effect, I had to manually edit /boot/grub/grub.cfg, which is a no-no for grub2. I am uncomfortable with this. Is the main problem that I will have to make this manual change after every time update-grub is run? Is there a better way to do this?

I can think of two ways to accomplish this.

The first is to create a custom menuentry for the second OS. You would copy the entire menuentry of the one you want to change into /etc/grub.d/40_custom. Then add the kernel option to the 'linux' line.

To make the entry 'survive' new kernel updates to that Linux OS, if the structure is the same as Ubuntu, you could even change the linux line section "/boot/vmlinuz-2.6..." to "/vmlinuz" and the 'initrd' line from "/boot/initrd.img-2.6...." to "/initrd.img".

The second way would be to modify the 30_os-prober script so that it automatically adds the kernel option to Linux OSs found by the prober script. If you only have one OS found by os-prober, this could be pretty simple. If you have multiple OSs and only need it on one, the change would be a bit more complicated but still achievable. If you want this option I can give you more info.

#810

Thank you, drs305. I am going to closely look at the second method you suggested. Hopefully, I will be able to give it a try.

Tim

PS - I examined the script. Could I just append ' nomodeset' to the line for Linux that says 'linux ${LKERNEL} ${LPARAMS}' ?

#811

ratcheer said: Thank you, drs305. I am going to closely look at the second method you suggested. Hopefully, I will be able to give it a try.

Tim

PS - I examined the script. Could I just append ' nomodeset' to the line for Linux that says 'linux ${LKERNEL} ${LPARAMS}' ?

Hehe. I just opened a reply and it included your addition, which is what I was just about to post.

Yes, it's line 237 in Grub 1.99. It will be attached to every linux entry in the 30_os-prober section.

If you need any other help, just ask.

Added: If you need it only for a specific partition, use a conditional with $LROOT (ex. /dev/sda9 ), for a particular OS, $LABEL (Ubuntu). At least that is what the variables were when I first played with G2.

#812

Excellent. Thanks again!

Tim

PS - It worked, perfectly.

#813

This was a very nice trick. Thank You...

#814

ratcheer said:

PS - I examined the script. Could I just append ' nomodeset' to the line for Linux that says 'linux ${LKERNEL} ${LPARAMS}' ?

Wait. It didn't exactly work perfectly. The result is usable, but a little strange.

Instead of just creating the Arch boot command with nomodeset appended, for some reason it created *two* Arch boot commands, one with nomodeset and the other without it.

I have no idea how this simple change could cause it to make double boot commands for Arch. It seems to me that it should have simply done what it used to do, except when finding Arch, adding nomodeset to the end of its boot command.

Weird.

Tim

#815

ratcheer said: Weird.

I'm back home instead of on the road with limited testing ability. I'll take a look at the script and see if I can find anything.

Off hand, I can think of one possibility. Did you make a backup copy of 30... that might still have the executable bit and is running on 'update-grub'? Any executable script in the grub.d folder is going to be run.

#816

Ah, ok. I did make a backup script. Standard procedure. I had no idea it would be executed after I changed the file name.

Thanks, Tim

#817

Quick question: Is there a way to edit the names of entries that have been successfully listed by Grub2? I only ask because for some reason on my Grub2 (11.10) Kubuntu is listed as Ubuntu, and I'd like to change it to the proper name. Many thanks.

#818

BigSilly said: Quick question: Is there a way to edit the names of entries that have been successfully listed by Grub2? I only ask because for some reason on my Grub2 (11.10) Kubuntu is listed as Ubuntu, and I'd like to change it to the proper name. Many thanks.

There are several ways to do this but by far the most convenient is to use an app called Grub Customizer. It was designed for Grub 2 and can perform a variety of menu tweaks, including renaming entries.

Click the "Customizer" link in my signature line to visit the thread I created about it.

#819

drs305 said: There are several ways to do this but by far the most convenient is to use an app called Grub Customizer. It was designed for Grub 2 and can perform a variety of menu tweaks, including renaming entries.

Click the "Customizer" link in my signature line to visit the thread I created about it.

Excellent! Many thanks. :)

Out of interest, what would be the manual way?

#820

BigSilly said: Excellent! Many thanks. :)

Out of interest, what would be the manual way?

The manual way is in the Tutorial in my signature. It is also mentioned on this thread of drs305's on about page one.

It may look sort of intimidating at first but, it is straight forward.

#821

BigSilly said: Excellent! Many thanks. :)

Out of interest, what would be the manual way?

  1. Manually editing the grub.cfg file, which would not be a good solution as it would get overwritten during updates (yours or system file upgrades).
  1. Manually editing the scripts which generate the final grub menu. These are mostly contained in the /etc/grub.d folder. These edits can be very obscure, and you can see the convoluted way some of these can be made by clicking on the "Tweaks" link in my signature line. I wouldn't recommend these methods - they take a toll on your mind!
  1. Create a custom menu (one is provided in /etc/grub.d/40_custom). This file doesn't change, although there are ways to keep the kernel current. *Cavsfan* came up with a great tutorial on how to use a custom menu while still allowing you to keep the latest kernel in the menu. The link is in his signature.
#822

BigSilly said: Quick question: Is there a way to edit the names of entries that have been successfully listed by Grub2? I only ask because for some reason on my Grub2 (11.10) Kubuntu is listed as Ubuntu, and I'd like to change it to the proper name. Many thanks.

The simplest way to do this is to edit /etc/default/grub and change the GRUB_DISTRIBUTOR line to:

GRUB_DISTRIBUTOR="Kubuntu"

This remains permanent across all calls to update-grub.

The lsb info for all variants of Ubuntu are the same, that's why is shows up as Ubuntu instead of Kubuntu. I covered this in my tutorial. Have a look at my sig.

#823

towheedm said: The simplest way to do this is to edit /etc/default/grub and change the GRUB_DISTRIBUTOR line to:

GRUB_DISTRIBUTOR="Kubuntu"

The lsb info for all variants of Ubuntu are the same, that's why is shows up as Ubuntu instead of Kubuntu. I covered this in my tutorial. Have a look at my sig.

Or GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian This way it is not hard coded.

#824

Cavsfan said: Or GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian

This way it is not hard coded.

Yrs, that's the standard way. But lsb_release -i would return 'Ubuntu' for Ubuntu and all of it's variants.

The original request was to have the menu entries indicate 'Kubuntu' and not 'Ubuntu'. Short of actually modifying the lsb info in Kubuntu, setting:

GRUB_DISTRIBUTOR="Kubuntu"
#825

towheedm said: Yrs, that's the standard way. But lsb_release -i would return 'Ubuntu' for Ubuntu and all of it's variants.

The original request was to have the menu entries indicate 'Kubuntu' and not 'Ubuntu'. Short of actually modifying the lsb info in Kubuntu, setting:

GRUB_DISTRIBUTOR="Kubuntu"

I understand. The tutorial in my sig. will let you put "KuBuNtU", "XYZ" or anything you want to have it display for each menu entry.

#826

Your financial doom and gloom produces additional shocking information daily. This specific full week seemed to be simply no distinct as executives from Common Motors, Honda, as well as Chrysler gotten in Oregon making use of their corporate and business aircraft for you to ask for their own reveal with the $700 billion dollars Troubled Advantage Relief Plan.

Within a shameless exhibit regarding world of one along with entitlement, commanders connected with what exactly once was "best within class" firms begged pertaining to quantities of us dollars because of their tin glasses outstretched while watching YOU Our lawmakers. Prior to Huge 3 ever found its way to Buenos aires, massive acquired already been invested in AIG as well as many of the major financial institutions in the country.

On this economic crisis we are finding one thing we never ever supposed to observe in your day-to-day lives -- broken claims from significant companies in addition to authorities agencies on the scale by no means regarded doable. We've arrived at a place where by actually significant corporations and also significant states such as Florida can't match their own responsibilities using the connect promotes.

For anyone who is a Fl home insurance coverage client, your own most significant tool has become in danger over the financial meltdown -- the Fl home.

Is it possible to brand a holy guarantee compared to 1 your dream house insurance provider makes to you personally any time you will need your money and concurs to help insure your home?

After you buy property owners insurance policies inside Sarasota your insurance firm can be ensuring people rapidly as well as sensible transaction of one's assert. California insurance carriers buy reinsurance to help them create excellent with this offer for your requirements. Reinsurance is actually back up coverage of which insurance carriers purchase to help you safeguard on their own through huge losses earlier mentioned selected levels.

The Fl Storm Problem Account had been formed so that you can support strengthen the California home insurance policy market after Typhoon Tim triggered gigantic amounts in injury to California with 1992. By simply featuring reinsurance on reasonably priced rates, the particular deposit assisted to create homeowners insurance available and also reasonably priced for quite a while.

That each modified following Fl hurricanes connected with 2004 as well as 2005 as soon as Texas property insurance plan grew to be expensive and also nearly impossible to find again.

The actual Fl legislature taken care of immediately your Florida house insurance turmoil simply by voting in 2007 to develop your reinsurance offered because of the Feline Fund by simply $12 million - boosting their entire chance to some complete regarding $28 million. Texas home insurance firms ended up instructed to purchase this added reinsurance from your state also to transfer the financial savings realized on reinsurance in order to homeowners.

As being a Florida property owner, a person did not obtain the rate special discounts that this rules seemed to be likely to produce. A person decided not to find the 24% normal charge cutbacks which were predicted when the legal guidelines handed. And also to make items a whole lot worse, the particular Florida Kitten Finance took on an additional $12 billion throughout chance.

Right now the particular California Problem Account features told all of us how the frozen attachment market segments defintely won't be a sufficient origin to increase the bucks it takes to meet its responsibilities on the insurance companies after a key California hurricane. That lately approximated which it might pay out $13 billion above the following one year : That's $15 billion under the $28 billion dollars it truly is within the hook to repay!

What exactly can all this imply to your account as a Florida household insurance coverage purchaser?

You decided not to have the rate comfort people envisioned plus your state took upon debts who's has no wish associated with paying out.

You are vulnerable if Sarasota encounters a major hurricane over the following season. After the loss of this Sarasota home insurer go over particular ranges, your company may consult your Fl Pet Pay for in order to pay all of them in order to fork out your declare. Since Texas Feline Fund is quick on cash, you might have a protracted postpone throughout taking your maintain paid.

This guarantee to cover your Sarasota household insurance policies declare hasn't been recently far more at risk in comparison with it can be currently.

Currently that you know how the Sarasota Kitty Deposit cannot match the requirements, let's glance at the idea of some sort of Nation's Typhoon Problem Finance of which a number of inside Sarasota happen to be driving within Buenos aires tyres direct for quite some time. This specific Nation's Kitten deposit would likely present yet another stratum connected with damage defense far above this bills on the California Kitty Finance.

The idea is actually that the National Devastation Pay for could be financed in part simply by insurance premiums settled by simply policyholders throughout expresses that are area of the account. Some sort of Countrywide Pet tyres online Finance is a different pay for that could acquire interest and also develop during the decades as soon as at this time there may not be almost any statements.

Fans claim that no taxpayer dollars could be was required to preserve a new Nationwide Kitty Deposit. Historical past conveys to all of us there can be thunder storms thus tyres for sale significant that federal government duty dollars will have to provide to repay key deficits.

And everyone knows of which the federal government can't maintain it's money independent. Simply inquire another person inside Oregon to show you this enormous amounts which might be allowed to be tyres for sale inside the Social Safety measures Believe in Pay for. You won't be revealed almost any funds -- merely a drawer rich in T-Bills and IOU's.

Since the Major Several Automotive manufacturers and also other shameless Bundle 500 businesses have defeated Texas towards the boxing techinque throughout Washington, it is quite impossible tyres cheap that a Country wide Hurricane Problem Fund can go anytime shortly. Perhaps Web design manager Select Obama can shy far from any extra government requirements while he or she people each of the red ink within Washington nowadays. So do not turn to the us government to generate very good on the assure that was meant to shell out your Florida residence insurance state.

Last but not least, Citizens House Insurance Firm features persistently reported that it doesn't always have wherever near the money it to pay out the virtually 50 % any trillion tyres money within hurricane publicity this after having a main Sarasota quake.

A huge storm will mean that Citizens can not fork out possibly the principal bills -- the ones that tyres for sale that need to pay also ahead of cutbacks reach degrees in which Fl Typhoon Accident Pay for reinsurance kicks with. So when any policyholder along with Folks, that you are susceptible to paying out better exclusive assessments tyres direct after a main Sarasota hurricane in comparison with policyholders with private home owners insurance policy -- exclusive fees tacked on to your current yearly insurance coverage invoice.

With this new bold globe where actually health systems can't hold their own promises here are a few actions it is best to carry being a Florida house insurance coverage client today:

Get a California wind assessment done tyres online and also harden your property wherever possible.

Prevent Folks Insurance plan Texas if you can.

Find a house insurer that is sturdy in financial terms and one which includes distribute it is threat over both equally Sarasota and also other states. Less policyholders will mean quicker repayment of one's state.

Document your own insurance policies maintain identical day time because the Texas natural disaster. This may allow it to become much more likely that you're walking paid previous to your current insurance provider seems to be for the Florida Kitty finance regarding compensation.

Lastly. The fact the actual Florida Pet Account can be brief on funds is not shed about Florida home insurance providers. These are being billed regarding reinsurance through an enterprise that's publicly tyres online reported so it can't meet the bills. Meaning insurance agencies are not receiving exactly what many people settled.

You should anticipate California household insurance carriers in order to acquire far more with their reinsurance from the private market place and not on the Condition of Florida just last year. And they will browse complete in which price tag to anyone in the form of increased rates. If they don't get this price raises they require, your current Fl house insurance cover could possibly be baulked.

Since the Sarasota household insurance turmoil persists, it's in no way been additional crucial that you continue to be on top of the particular Texas home insurance policy industry pertaining to non-public insurance policies. You never understand whenever you've got to discover a completely new Florida household insurance company.

#827

Hi, I have very weird issue. I'm trying to install many systems to create a Multi-Booting System for my testing purposes. Lubuntu 11.10 is my main OS and the other systems are other buntus.

After "update-grub" and rebooting, after my PC says "booting from CD" and wait little bit which is the step before GRUB Menu to show up, the screen goes OFF and says "Input Not Supported". It's Acer 17".

I have installed GRUB Customizer and made sure the menu will appear, etc but that did not change anything. Even when I press and hold "Shift", the screen goes OFF with "Input Not Supported" message again. I have also re-installed GRUB to the MBR .. yet, that did not fix anything.

I still can make a selection though. I still can choose an entry so I know GRUB is there and working except it's not visible for some weird reason.

Any idea how to get rid of this issue?

Thanks!

Edit:

#GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT="15"

and

"os-prober"is installed by default.

#828

amjjawad said: Hi, I have very weird issue. I'm trying to install many systems to create a Multi-Booting System for my testing purposes. Lubuntu 11.10 is my main OS and the other systems are other buntus.

After "update-grub" and rebooting, after my PC says "booting from CD" and wait little bit which is the step before GRUB Menu to show up, the screen goes OFF and says "Input Not Supported". It's Acer 17".

I have installed GRUB Customizer and made sure the menu will appear, etc but that did not change anything. Even when I press and hold "Shift", the screen goes OFF with "Input Not Supported" message again. I have also re-installed GRUB to the MBR .. yet, that did not fix anything.

I still can make a selection though. I still can choose an entry so I know GRUB is there and working except it's not visible for some weird reason.

Any idea how to get rid of this issue?

Thanks!

Edit:

#GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT="15"

and

"os-prober"is installed by default.

Have you checked out the tutorial in my signature? It may help. Doesn't matter if you are dual booting windows or other Ubuntu versions.

#829

Cavsfan said: Have you checked out the tutorial in my signature? Your tutorial on Java is missing removal of Java alternative in part callled “Removal“...

#830

amjjawad,

The first thing to check is that the Grub you are updating is the Grub that is controlling your system. Often if multiple systems are installed if things aren't working correctly it's because changes are being made to the Grub that isn't 'in control' of the system.

At boot, check the top item in the Grub menu. Is that the OS/kernel that you normally boot to? If you have multiple installations running the same kernel, you might want to investigate further and press 'e' to edit the default selection and confirm the partition that is booting.

If your normal OS is not currently in control, or to make it the controlling Grub, boot into that OS and run the following, with X being the boot drive (sda, sdb, etc.

sudo grub-install /dev/sdX

If this is not the issue, the next thing I'd try as a temporary troubleshooting action, would be to edit /boot/grub/grub.cfg. This is around line 60 in Grub 1.99

Find the "set timeout=15" and change it to -1. Save the file, do NOT run 'update-grub', and reboot to see if the menu appears. The '-1' value should force Grub to display the menu until you make a selection.

If the menu now appears, we can start troubleshooting why it isn't displaying normally. Posting the contents of the boot info script (available from the Boot Repair app or from _http://bootinfoscript.sourceforge.net_ may help find the problem.

#831

zika said: Your tutorial on Java is missing removal of Java alternative in part callled “Removal“...

Actually that is not a tutorial, just 2 links to websites. I believe the Java alternative is removed when you delete the old java folder.

Then this command [COLOR=#000000][COLOR=#0000FF]sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/64/jre1.6.0_30/bin/java" 1[/COLOR] [/COLOR] replaces it.

Or if you mean the IcedTea browser plug-in, it tells you at the very top to query Ubuntu Software Center for [COLOR=#000000][COLOR=#0000FF]icedtea[/COLOR][/COLOR] and remove it there. I use the right side for 64 bit, so I don't know about the 32 bit version.

But, I was referring to the How to in [COLOR=#000000][COLOR=#0000FF]blue[/COLOR][/COLOR] at the bottom of my signature.

zika, you should comment about the java issue here: [[COLOR=blue]_http://ubuntuforums.org/showthread.php?t=1895858_[/COLOR]]("http://ubuntuforums.org/showthread.php?t=1895858")

#832

drs305 said: amjjawad,

The first thing to check is that the Grub you are updating is the Grub that is controlling your system. Often if multiple systems are installed if things aren't working correctly it's because changes are being made to the Grub that isn't 'in control' of the system.

At boot, check the top item in the Grub menu. Is that the OS/kernel that you normally boot to? If you have multiple installations running the same kernel, you might want to investigate further and press 'e' to edit the default selection and confirm the partition that is booting.

If your normal OS is not currently in control, or to make it the controlling Grub, boot into that OS and run the following, with X being the boot drive (sda, sdb, etc.

sudo grub-install /dev/sdX

Find the "set timeout=15" and change it to -1. Save the file, do NOT run 'update-grub', and reboot to see if the menu appears. The '-1' value should force Grub to display the menu until you make a selection.

If the menu now appears, we can start troubleshooting why it isn't displaying normally. Posting the contents of the boot info script (available from the Boot Repair app or from _http://bootinfoscript.sourceforge.net_ may help find the problem.

Hi,

Lubuntu 11.10 is the main OS which is supposed to control the whole thing. I know that because: 1- It's the first choice on the menu even though I can see the menu but when I press Enter blindly, it boots to Lubuntu 11.10 2- I'm very careful when it comes to Multi-Booting Systems.

I can't see the menu at all even when I press and hold "Shift" key.

I'm using GRUB Customizer by the way and I installed GRUB to the MBR of sda but that did not change anything.

I guess I need to use the other program (forgot the name) to re-install GRUB and if that didn't help then I need to post the output of the booting script.

Thank you :)

#833

amjjawad said: Hi,

Lubuntu 11.10 is the main OS which is supposed to control the whole thing. I know that because: 1- It's the first choice on the menu even though I can see the menu but when I press Enter blindly, it boots to Lubuntu 11.10 2- I'm very careful when it comes to Multi-Booting Systems.

I can't see the menu at all even when I press and hold "Shift" key.

I'm using GRUB Customizer by the way and I installed GRUB to the MBR of sda but that did not change anything.

I guess I need to use the other program (forgot the name) to re-install GRUB and if that didn't help then I need to post the output of the booting script.

Thank you :)

Did you try setting the /boot/grub/grub.cfg timeout to -1 ? That should force Grub to display the menu.

#834

drs305 said: Did you try setting the /boot/grub/grub.cfg timeout to -1 ? That should force Grub to display the menu.

Oh sorry, forgot to mention that. Yes, I've done that but nothing still :(

#835

amjjawad said: Oh sorry, forgot to mention that. Yes, I've done that but nothing still :(

Ok, it's time to see the RESULTS.txt. Setting the timeout to -1 should have displayed the menu. Two reasons that is may not is that it is a different Grub (which you have checked) or that the 'recordfail' section of the Grub menu is not working or not present. Seeing the RESULTS.txt may provide answers.

#836

drs305 said: Ok, it's time to see the RESULTS.txt. Setting the timeout to -1 should have displayed the menu. Two reasons that is may not is that it is a different Grub (which you have checked) or that the 'recordfail' section of the Grub menu is not working or not present. Seeing the RESULTS.txt may provide answers.

Few mins and will post it :) I'm working on two different machines :)

#837

drs305 said: Ok, it's time to see the RESULTS.txt. Setting the timeout to -1 should have displayed the menu. Two reasons that is may not is that it is a different Grub (which you have checked) or that the 'recordfail' section of the Grub menu is not working or not present. Seeing the RESULTS.txt may provide answers.

 Boot Info Script 0.60-git      [2 Jan 2012]


============================= Boot Info Summary: ===============================

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for (,msdos1)/boot/grub on this drive.
 => No boot loader is installed in the MBR of /dev/sdb.

sda1: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 11.10
    Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda2: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sda3: __________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  Unknown
    Boot sector info: 

sda5: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub2 (v1.99)
    Boot sector info:  Grub2 (v1.99) is installed in the boot sector of sda5 
                       and looks at sector 20274616 of the same hard drive 
                       for core.img. core.img is at this location and looks 
                       for (,msdos5)/boot/grub on this drive.
    Operating System:  Ubuntu 11.04
    Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda6: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub2 (v1.99)
    Boot sector info:  Grub2 (v1.99) is installed in the boot sector of sda6 
                       and looks at sector 39520744 of the same hard drive 
                       for core.img. core.img is at this location and looks 
                       for (,msdos6)/boot/grub on this drive.
    Operating System:  Ubuntu 11.10
    Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda7: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub2 (v1.97-1.98)
    Boot sector info:  Grub2 (v1.97-1.98) is installed in the boot sector of 
                       sda7 and looks at sector 47246856 of the same hard 
                       drive for core.img. core.img is at this location and 
                       looks in partition 7 for /boot/grub.
    Operating System:  Ubuntu 10.04.3 LTS
    Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda8: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub2 (v1.99)
    Boot sector info:  Grub2 (v1.99) is installed in the boot sector of sda8 
                       and looks at sector 56542528 of the same hard drive 
                       for core.img. core.img is at this location and looks 
                       for (,msdos8)/boot/grub on this drive.
    Operating System:  Ubuntu 11.10
    Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda9: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub2 (v1.99)
    Boot sector info:  Grub2 (v1.99) is installed in the boot sector of sda9 
                       and looks at sector 68023952 of the same hard drive 
                       for core.img. core.img is at this location and looks 
                       for (,msdos9)/boot/grub on this drive.
    Operating System:  Linux Mint 11 LXDE
    Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda10: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub2 (v1.99)
    Boot sector info:  Grub2 (v1.99) is installed in the boot sector of 
                       sda10 and looks at sector 81435824 of the same hard 
                       drive for core.img. core.img is at this location and 
                       looks for (,msdos10)/boot/grub on this drive.
    Operating System:  Linux Mint 12 Lisa
    Boot files:        /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda11: _________________________________________________________________________

    File system:       ext2
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sda12: _________________________________________________________________________

    File system:       ext2
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sda13: _________________________________________________________________________

    File system:       ext2
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sda14: _________________________________________________________________________

    File system:       ext2
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sda15: _________________________________________________________________________

    File system:       ext2
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sda16: _________________________________________________________________________

    File system:       ext2
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sda4: __________________________________________________________________________

    File system:       ext2
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1    *          2,048    18,876,415    18,874,368  83 Linux
/dev/sda2          18,876,416    19,986,431     1,110,016  82 Linux swap / Solaris
/dev/sda3          19,988,478   145,840,127   125,851,650   5 Extended
/dev/sda5          19,988,480    30,474,239    10,485,760  83 Linux
/dev/sda6          30,476,288    40,962,047    10,485,760  83 Linux
/dev/sda7          40,964,096    51,449,855    10,485,760  83 Linux
/dev/sda8          51,451,904    61,937,663    10,485,760  83 Linux
/dev/sda9          61,939,712    72,425,471    10,485,760  83 Linux
/dev/sda10         72,427,520    82,913,279    10,485,760  83 Linux
/dev/sda11         82,915,328    93,401,087    10,485,760  83 Linux
/dev/sda12         93,403,136   103,888,895    10,485,760  83 Linux
/dev/sda13        103,890,944   114,376,703    10,485,760  83 Linux
/dev/sda14        114,378,752   124,864,511    10,485,760  83 Linux
/dev/sda15        124,866,560   135,352,319    10,485,760  83 Linux
/dev/sda16        135,354,368   145,840,127    10,485,760  83 Linux
/dev/sda4         145,840,128   156,301,311    10,461,184  83 Linux


Drive: sdb _____________________________________________________________________

Disk /dev/sdb: 20.1 GB, 20060135424 bytes
255 heads, 63 sectors/track, 2438 cylinders, total 39179952 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System



"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7   ext4       
/dev/sda10       445b78db-cee9-42b6-bdae-082f7392bb8e   ext4       
/dev/sda11       5b10a3fd-0ce4-4ac7-87d6-fa91191d78e2   ext2       
/dev/sda12       eab8b673-4951-4ed5-8f4d-fed6c38794ee   ext2       
/dev/sda13       7818d5cf-0587-401f-ac32-b2b8b7d95e68   ext2       
/dev/sda14       5143e4ef-3e67-4811-8081-de3a2060d55f   ext2       
/dev/sda15       92dae485-ab5d-42b9-bbd2-19221a9299af   ext2       
/dev/sda16       66c24493-675d-4130-a200-9bfca00c5794   ext2       
/dev/sda2        75b9554b-302e-4d23-93f6-bd80bbd51722   swap       
/dev/sda4        ef0acbb0-80ea-45bc-acbe-64679213056e   ext2       
/dev/sda5        0838b5c2-12fe-47c1-8ba3-397e4b8242da   ext4       
/dev/sda6        260b48a1-7e39-4085-afa1-a9c8b4c96da7   ext4       
/dev/sda7        6c1df292-b0b7-4eed-930d-4ad07bd9a1f5   ext4       
/dev/sda8        a829565c-3153-4124-9493-9410a2c45233   ext4       
/dev/sda9        5c720c72-47c1-4292-8c2e-fc66f4a6a085   ext4       

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sda1        /                        ext4       (rw,errors=remount-ro,commit=0)


=========================== sda1/boot/grub/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="0"
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 {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos1)'
  search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=15
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 3.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	linux	/boot/vmlinuz-3.0.0-12-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro   quiet splash vt.handoff=7
	initrd	/boot/initrd.img-3.0.0-12-generic
}
menuentry 'Ubuntu, with Linux 3.0.0-12-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	echo	'Loading Linux 3.0.0-12-generic ...'
	linux	/boot/vmlinuz-3.0.0-12-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro recovery nomodeset 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.0.0-12-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10) (on /dev/sda10)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos10)'
	search --no-floppy --fs-uuid --set=root 445b78db-cee9-42b6-bdae-082f7392bb8e
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=445b78db-cee9-42b6-bdae-082f7392bb8e ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10) -- recovery mode (on /dev/sda10)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos10)'
	search --no-floppy --fs-uuid --set=root 445b78db-cee9-42b6-bdae-082f7392bb8e
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=445b78db-cee9-42b6-bdae-082f7392bb8e ro recovery nomodeset
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (on /dev/sda5)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos5)'
	search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (recovery mode) (on /dev/sda5)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos5)'
	search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro single
	initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda6)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos6)'
	search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda6)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos6)'
	search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro recovery nomodeset
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 2.6.32-33-generic (on /dev/sda7)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos7)'
	search --no-floppy --fs-uuid --set=root 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5
	linux /boot/vmlinuz-2.6.32-33-generic root=UUID=6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 ro quiet splash
	initrd /boot/initrd.img-2.6.32-33-generic
}
menuentry "Ubuntu, with Linux 2.6.32-33-generic (recovery mode) (on /dev/sda7)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos7)'
	search --no-floppy --fs-uuid --set=root 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5
	linux /boot/vmlinuz-2.6.32-33-generic root=UUID=6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 ro single
	initrd /boot/initrd.img-2.6.32-33-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda8)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos8)'
	search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=a829565c-3153-4124-9493-9410a2c45233 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda8)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos8)'
	search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=a829565c-3153-4124-9493-9410a2c45233 ro recovery nomodeset
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) (on /dev/sda9)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos9)'
	search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=5c720c72-47c1-4292-8c2e-fc66f4a6a085 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) -- recovery mode (on /dev/sda9)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos9)'
	search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=5c720c72-47c1-4292-8c2e-fc66f4a6a085 ro single
	initrd /boot/initrd.img-2.6.38-8-generic
}
### END /etc/grub.d/30_os-prober ###

### 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  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda1/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda2 during installation
UUID=75b9554b-302e-4d23-93f6-bd80bbd51722 none            swap    sw              0       0
--------------------------------------------------------------------------------

=================== sda1: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

   0.571414948 = 0.613552128    boot/grub/core.img                             1
   2.405315399 = 2.582687744    boot/grub/grub.cfg                             2
   1.044910431 = 1.121964032    boot/initrd.img-3.0.0-12-generic               2
   0.692790985 = 0.743878656    boot/vmlinuz-3.0.0-12-generic                  1
   1.044910431 = 1.121964032    initrd.img                                     2
   0.692790985 = 0.743878656    vmlinuz                                        1

=========================== sda5/boot/grub/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="0"
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 {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos5)'
	search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro   quiet splash vt.handoff=7
	initrd	/boot/initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos5)'
	search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	echo	'Loading Linux 2.6.38-8-generic ...'
	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.38-8-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos5)'
	search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos5)'
	search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda1)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos1)'
	search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda1)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos1)'
	search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro recovery nomodeset
	initrd /boot/initrd.img-3.0.0-12-generic
}
### END /etc/grub.d/30_os-prober ###

### 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  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda5/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/sda5       /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda2 during installation
UUID=75b9554b-302e-4d23-93f6-bd80bbd51722 none            swap    sw              0       0
--------------------------------------------------------------------------------

=================== sda5: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

   9.667716980 = 10.380632064   boot/grub/core.img                             1
  12.236568451 = 13.138915328   boot/grub/grub.cfg                             1
  10.710937500 = 11.500781568   boot/initrd.img-2.6.38-8-generic               3
  10.379211426 = 11.144593408   boot/vmlinuz-2.6.38-8-generic                  1
  10.710937500 = 11.500781568   initrd.img                                     3
  10.379211426 = 11.144593408   vmlinuz                                        1

=========================== sda6/boot/grub/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="0"
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 {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos6)'
  search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 3.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos6)'
	search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7
	linux	/boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro   quiet splash vt.handoff=7
	initrd	/boot/initrd.img-3.0.0-12-generic
}
menuentry 'Ubuntu, with Linux 3.0.0-12-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos6)'
	search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7
	echo	'Loading Linux 3.0.0-12-generic ...'
	linux	/boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro recovery nomodeset 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.0.0-12-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos6)'
	search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos6)'
	search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda1)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda1)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro recovery nomodeset
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (on /dev/sda5)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos5)'
	search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (recovery mode) (on /dev/sda5)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos5)'
	search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro single
	initrd /boot/initrd.img-2.6.38-8-generic
}
### END /etc/grub.d/30_os-prober ###

### 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  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda6/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda6 during installation
UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda2 during installation
UUID=75b9554b-302e-4d23-93f6-bd80bbd51722 none            swap    sw              0       0
--------------------------------------------------------------------------------

=================== sda6: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

  18.844985962 = 20.234649600   boot/grub/core.img                             1
  17.500869751 = 18.791415808   boot/grub/grub.cfg                             1
  15.810539246 = 16.976437248   boot/initrd.img-3.0.0-12-generic               2
  15.418891907 = 16.555909120   boot/vmlinuz-3.0.0-12-generic                  1
  15.810539246 = 16.976437248   initrd.img                                     2
  15.418891907 = 16.555909120   vmlinuz                                        1

=========================== sda7/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/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
  load_env
fi
set default="0"
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
}
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-33-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,7)'
	search --no-floppy --fs-uuid --set 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5
	linux	/boot/vmlinuz-2.6.32-33-generic root=UUID=6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 ro   quiet splash
	initrd	/boot/initrd.img-2.6.32-33-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-33-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod ext2
	set root='(hd0,7)'
	search --no-floppy --fs-uuid --set 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5
	echo	'Loading Linux 2.6.32-33-generic ...'
	linux	/boot/vmlinuz-2.6.32-33-generic root=UUID=6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-33-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod ext2
	set root='(hd0,7)'
	search --no-floppy --fs-uuid --set 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod ext2
	set root='(hd0,7)'
	search --no-floppy --fs-uuid --set 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda1)" {
	insmod ext2
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda1)" {
	insmod ext2
	set root='(hd0,1)'
	search --no-floppy --fs-uuid --set ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro recovery nomodeset
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (on /dev/sda5)" {
	insmod ext2
	set root='(hd0,5)'
	search --no-floppy --fs-uuid --set 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (recovery mode) (on /dev/sda5)" {
	insmod ext2
	set root='(hd0,5)'
	search --no-floppy --fs-uuid --set 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro single
	initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda6)" {
	insmod ext2
	set root='(hd0,6)'
	search --no-floppy --fs-uuid --set 260b48a1-7e39-4085-afa1-a9c8b4c96da7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda6)" {
	insmod ext2
	set root='(hd0,6)'
	search --no-floppy --fs-uuid --set 260b48a1-7e39-4085-afa1-a9c8b4c96da7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro recovery nomodeset
	initrd /boot/initrd.img-3.0.0-12-generic
}
### END /etc/grub.d/30_os-prober ###

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

=============================== sda7/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/sda7       /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda2 during installation
UUID=75b9554b-302e-4d23-93f6-bd80bbd51722 none            swap    sw              0       0
--------------------------------------------------------------------------------

=================== sda7: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

  22.529083252 = 24.190418944   boot/grub/core.img                             1
  22.310058594 = 23.955243008   boot/grub/grub.cfg                             1
  22.666877747 = 24.338374656   boot/initrd.img-2.6.32-33-generic              1
  22.649322510 = 24.319524864   boot/vmlinuz-2.6.32-33-generic                 1
  22.666877747 = 24.338374656   initrd.img                                     1
  22.649322510 = 24.319524864   vmlinuz                                        1

=========================== sda8/boot/grub/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="0"
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 {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos8)'
  search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 3.0.0-12-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos8)'
	search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233
	linux	/boot/vmlinuz-3.0.0-12-generic root=UUID=a829565c-3153-4124-9493-9410a2c45233 ro   quiet splash vt.handoff=7
	initrd	/boot/initrd.img-3.0.0-12-generic
}
menuentry 'Ubuntu, with Linux 3.0.0-12-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos8)'
	search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233
	echo	'Loading Linux 3.0.0-12-generic ...'
	linux	/boot/vmlinuz-3.0.0-12-generic root=UUID=a829565c-3153-4124-9493-9410a2c45233 ro recovery nomodeset 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.0.0-12-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos8)'
	search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos8)'
	search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda1)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda1)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro recovery nomodeset
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (on /dev/sda5)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos5)'
	search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (recovery mode) (on /dev/sda5)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos5)'
	search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro single
	initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda6)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos6)'
	search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda6)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos6)'
	search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro recovery nomodeset
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 2.6.32-33-generic (on /dev/sda7)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos7)'
	search --no-floppy --fs-uuid --set=root 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5
	linux /boot/vmlinuz-2.6.32-33-generic root=UUID=6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 ro quiet splash
	initrd /boot/initrd.img-2.6.32-33-generic
}
menuentry "Ubuntu, with Linux 2.6.32-33-generic (recovery mode) (on /dev/sda7)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos7)'
	search --no-floppy --fs-uuid --set=root 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5
	linux /boot/vmlinuz-2.6.32-33-generic root=UUID=6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 ro single
	initrd /boot/initrd.img-2.6.32-33-generic
}
### END /etc/grub.d/30_os-prober ###

### 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  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda8/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda8 during installation
UUID=a829565c-3153-4124-9493-9410a2c45233 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda2 during installation
UUID=75b9554b-302e-4d23-93f6-bd80bbd51722 none            swap    sw              0       0
--------------------------------------------------------------------------------

=================== sda8: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

  26.961605072 = 28.949803008   boot/grub/core.img                             1
  28.975933075 = 31.112671232   boot/grub/grub.cfg                             1
  27.195297241 = 29.200728064   boot/initrd.img-3.0.0-12-generic               1
  25.875110626 = 27.783188480   boot/vmlinuz-3.0.0-12-generic                  1
  27.195297241 = 29.200728064   initrd.img                                     1
  25.875110626 = 27.783188480   vmlinuz                                        1

=========================== sda9/boot/grub/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="0"
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 {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos9)'
search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos9)'
search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos9)'
search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085
insmod png
if background_image /boot/grub/linuxmint.png; then
  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_mint_theme ###
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos9)'
search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085
insmod png
if background_image /boot/grub/linuxmint.png ; then
  set color_normal=white/black
  set color_highlight=white/light-gray
else
  set menu_color_normal=white/black
  set menu_color_highlight=white/light-gray
fi
### END /etc/grub.d/06_mint_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9)' --class linuxmint --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos9)'
	search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085
	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=5c720c72-47c1-4292-8c2e-fc66f4a6a085 ro   quiet splash vt.handoff=7
	initrd	/boot/initrd.img-2.6.38-8-generic
}
menuentry 'Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos9)'
	search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085
	echo	'Loading Linux 2.6.38-8-generic ...'
	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=5c720c72-47c1-4292-8c2e-fc66f4a6a085 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.38-8-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos9)'
	search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos9)'
	search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda1)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos1)'
	search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda1)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos1)'
	search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro recovery nomodeset
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (on /dev/sda5)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos5)'
	search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (recovery mode) (on /dev/sda5)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos5)'
	search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro single
	initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda6)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos6)'
	search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda6)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos6)'
	search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro recovery nomodeset
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 2.6.32-33-generic (on /dev/sda7)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos7)'
	search --no-floppy --fs-uuid --set=root 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5
	linux /boot/vmlinuz-2.6.32-33-generic root=UUID=6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 ro quiet splash
	initrd /boot/initrd.img-2.6.32-33-generic
}
menuentry "Ubuntu, with Linux 2.6.32-33-generic (recovery mode) (on /dev/sda7)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos7)'
	search --no-floppy --fs-uuid --set=root 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5
	linux /boot/vmlinuz-2.6.32-33-generic root=UUID=6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 ro single
	initrd /boot/initrd.img-2.6.32-33-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda8)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos8)'
	search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=a829565c-3153-4124-9493-9410a2c45233 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda8)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(/dev/sda,msdos8)'
	search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=a829565c-3153-4124-9493-9410a2c45233 ro recovery nomodeset
	initrd /boot/initrd.img-3.0.0-12-generic
}
### END /etc/grub.d/30_os-prober ###

### 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  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda9/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
/dev/sda9       /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda2 during installation
UUID=75b9554b-302e-4d23-93f6-bd80bbd51722 none            swap    sw              0       0
--------------------------------------------------------------------------------

=================== sda9: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

  32.436374664 = 34.828292096   boot/grub/core.img                             1
  32.434757233 = 34.826555392   boot/grub/grub.cfg                             1
  30.816406250 = 33.088864256   boot/initrd.img-2.6.38-8-generic               2
  32.428699493 = 34.820050944   boot/vmlinuz-2.6.38-8-generic                  1
  30.816406250 = 33.088864256   initrd.img                                     2
  32.428699493 = 34.820050944   vmlinuz                                        1

========================== sda10/boot/grub/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="0"
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 {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos10)'
search --no-floppy --fs-uuid --set=root 445b78db-cee9-42b6-bdae-082f7392bb8e
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos10)'
  search --no-floppy --fs-uuid --set=root 445b78db-cee9-42b6-bdae-082f7392bb8e
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 0,0,0; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/06_mint_theme ###
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
### END /etc/grub.d/06_mint_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10)' --class linuxmint --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos10)'
	search --no-floppy --fs-uuid --set=root 445b78db-cee9-42b6-bdae-082f7392bb8e
	linux	/boot/vmlinuz-3.0.0-12-generic root=UUID=445b78db-cee9-42b6-bdae-082f7392bb8e ro   quiet splash vt.handoff=7
	initrd	/boot/initrd.img-3.0.0-12-generic
}
menuentry 'Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
	recordfail
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos10)'
	search --no-floppy --fs-uuid --set=root 445b78db-cee9-42b6-bdae-082f7392bb8e
	echo	'Loading Linux 3.0.0-12-generic ...'
	linux	/boot/vmlinuz-3.0.0-12-generic root=UUID=445b78db-cee9-42b6-bdae-082f7392bb8e ro recovery nomodeset 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-3.0.0-12-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos10)'
	search --no-floppy --fs-uuid --set=root 445b78db-cee9-42b6-bdae-082f7392bb8e
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos10)'
	search --no-floppy --fs-uuid --set=root 445b78db-cee9-42b6-bdae-082f7392bb8e
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda1)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda1)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro recovery nomodeset
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (on /dev/sda5)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos5)'
	search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Ubuntu, with Linux 2.6.38-8-generic (recovery mode) (on /dev/sda5)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos5)'
	search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro single
	initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda6)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos6)'
	search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda6)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos6)'
	search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro recovery nomodeset
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 2.6.32-33-generic (on /dev/sda7)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos7)'
	search --no-floppy --fs-uuid --set=root 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5
	linux /boot/vmlinuz-2.6.32-33-generic root=UUID=6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 ro quiet splash
	initrd /boot/initrd.img-2.6.32-33-generic
}
menuentry "Ubuntu, with Linux 2.6.32-33-generic (recovery mode) (on /dev/sda7)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos7)'
	search --no-floppy --fs-uuid --set=root 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5
	linux /boot/vmlinuz-2.6.32-33-generic root=UUID=6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 ro single
	initrd /boot/initrd.img-2.6.32-33-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda8)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos8)'
	search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=a829565c-3153-4124-9493-9410a2c45233 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda8)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos8)'
	search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233
	linux /boot/vmlinuz-3.0.0-12-generic root=UUID=a829565c-3153-4124-9493-9410a2c45233 ro recovery nomodeset
	initrd /boot/initrd.img-3.0.0-12-generic
}
menuentry "Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) (on /dev/sda9)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos9)'
	search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=5c720c72-47c1-4292-8c2e-fc66f4a6a085 ro quiet splash vt.handoff=7
	initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry "Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) -- recovery mode (on /dev/sda9)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos9)'
	search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085
	linux /boot/vmlinuz-2.6.38-8-generic root=UUID=5c720c72-47c1-4292-8c2e-fc66f4a6a085 ro single
	initrd /boot/initrd.img-2.6.38-8-generic
}
### END /etc/grub.d/30_os-prober ###

### 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  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda10/etc/fstab: ===============================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda10 during installation
UUID=445b78db-cee9-42b6-bdae-082f7392bb8e /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda2 during installation
UUID=75b9554b-302e-4d23-93f6-bd80bbd51722 none            swap    sw              0       0
--------------------------------------------------------------------------------

=================== sda10: Location of files loaded by Grub: ===================

           GiB - GB             File                                 Fragment(s)

  38.831653595 = 41.695170560   boot/grub/core.img                             1
  35.620704651 = 38.247440384   boot/grub/grub.cfg                             1
  39.051757812 = 41.931505664   boot/initrd.img-3.0.0-12-generic               2
  35.585369110 = 38.209499136   boot/vmlinuz-3.0.0-12-generic                  2
  39.051757812 = 41.931505664   initrd.img                                     2
  35.585369110 = 38.209499136   vmlinuz                                        2

======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown BootLoader on sda3

00000000  20 b9 33 bc 25 9d 04 0b  82 19 90 28 80 9b 24 09  | .3.%......(..$.|
00000010  f8 41 a9 01 0a 86 0c 93  2a c3 4b b4 2d a2 68 d8  |.A......*.K.-.h.|
00000020  38 b1 49 d1 48 c0 30 c9  41 b9 31 b9 32 bc 34 9c  |8.I.H.0.A.1.2.4.|
00000030  03 0b 81 19 94 8c 01 22  fb 60 c0 49 b0 30 c9 32  |.......".`.I.0.2|
00000040  ca 32 ac 15 ab 04 9a 22  a8 00 0c 05 0c 93 1c 94  |.2....."........|
00000050  1b a3 3c a5 1c b3 7b a1  3b d2 49 a1 08 90 18 a3  |..<...{.;.I.....|
00000060  3b f2 58 b8 32 bd 53 a9  81 1a 84 9b 43 d9 10 18  |;.X.2.S.....C...|
00000070  a1 2a b3 3a 19 e2 48 c9  33 ac 32 bb 07 0d 91 25  |.*.:..H.3.2....%|
00000080  ae 23 8a b3 2d 93 19 a9  43 ad 15 9b 13 bb 62 b9  |.#..-...C.....b.|
00000090  14 8f 85 0b 83 1b a3 3b  d3 5a b0 50 ca 43 ac 14  |.......;.Z.P.C..|
000000a0  8c 84 1b a2 48 b9 58 b0  38 a0 19 81 18 d1 4b 96  |....H.X.8.....K.|
000000b0  0c 03 8c 03 89 a1 38 99  84 1f a4 2a b2 29 b0 53  |......8....*.).S|
000000c0  da 20 08 93 0f 82 28 da  42 a9 02 8b 03 1a c3 2c  |. ....(.B......,|
000000d0  94 99 40 b8 01 0c 05 0a  b1 28 98 15 bf 37 9e 03  |..@......(...7..|
000000e0  0b 83 99 28 a1 18 88 82  a9 7b c3 29 aa 17 9b 94  |...(.....{.)....|
000000f0  2b 85 8d 23 ab 01 02 8f  05 ba 33 9c 84 0a 91 21  |+..#......3....!|
00000100  9c 23 ad 63 c9 30 b8 30  89 a3 8c 11 16 9f 12 09  |.#.c.0.0........|
00000110  09 94 0d 04 aa 11 11 eb  52 ba 33 8e 84 0a 80 00  |........R.3.....|
00000120  98 01 49 f8 40 b9 32 aa  82 0a 42 e8 49 a1 3b c2  |..I.@.2...B.I.;.|
00000130  38 00 f8 48 98 91 30 ac  24 ac 53 ac 7c 07 47 00  |8..H..0.$.S.|.G.|
00000140  e2 38 b8 41 d8 38 c2 3a  b4 3c b2 5a d1 38 c1 28  |.8.A.8.:.<.Z.8.(|
00000150  91 1c 03 0d 93 2b a3 2c  a3 1c 83 9b 16 ac 14 9b  |.....+.,........|
00000160  04 8a 82 8a 32 d9 49 b4  1c 93 18 89 11 ad 54 d8  |....2.I.......T.|
00000170  3a 94 1b 91 18 80 09 84  9f 06 8b 13 ab 02 48 d8  |:.............H.|
00000180  49 b2 1a 31 e8 19 14 c9  1a 34 db 41 ca 42 b8 3a  |I..1.....4.A.B.:|
00000190  84 0c 80 01 18 c9 21 9a  05 1d 94 1d 93 0b 83 18  |......!.........|
000001a0  b8 2a 85 1b 94 8d 23 9a  a1 40 b9 60 d8 31 aa 12  |.*....#..@.`.1..|
000001b0  98 19 21 e9 38 d1 58 c2  0a 82 29 b2 3a b0 00 fe  |..!.8.X...).:...|
000001c0  ff ff 83 fe ff ff 02 00  00 00 00 00 a0 00 00 fe  |................|
000001d0  ff ff 05 fe ff ff 2b 04  a0 00 d7 03 a0 00 00 00  |......+.........|
000001e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200


=============================== StdErr Messages: ===============================

xz: (stdin): Compressed data is corrupt
xz: (stdin): Compressed data is corrupt
xz: (stdin): Compressed data is corrupt
xz: (stdin): Compressed data is corrupt
xz: (stdin): Compressed data is corrupt
xz: (stdin): Compressed data is corrupt

ADDITIONAL INFORMATION :
**************** log of boot-repair 2012-02-05__01h15 ****************
boot-repair version : 3.14-0ppa1~oneiric
boot-sav version : 3.14-0ppa1~oneiric
internet: connected
LIVESESSION is : no (Ubuntu 11.10 , oneiric , Ubuntu , i686  )
BYTES_BEFORE_PART[1] (sda) = 2048 sectors * 512 bytes = 1048576 bytes.

OSPROBER:
/dev/sda1:The OS now in use - Ubuntu 11.10 CurrentSession:linux
/dev/sda10:Linux Mint 12 Lisa (12):LinuxMint:linux
/dev/sda5:Ubuntu 11.04 (11.04):Ubuntu:linux
/dev/sda6:Ubuntu 11.10 (11.10):Ubuntu1:linux
/dev/sda7:Ubuntu 10.04.3 LTS (10.04):Ubuntu2:linux
/dev/sda8:Ubuntu 11.10 (11.10):Ubuntu3:linux
/dev/sda9:Linux Mint 11 LXDE (11):LinuxMint1:linux

BLKID:
/dev/sda1: UUID="ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7" TYPE="ext4"
/dev/sda2: UUID="75b9554b-302e-4d23-93f6-bd80bbd51722" TYPE="swap"
/dev/sda4: UUID="ef0acbb0-80ea-45bc-acbe-64679213056e" TYPE="ext2"
/dev/sda5: UUID="0838b5c2-12fe-47c1-8ba3-397e4b8242da" TYPE="ext4"
/dev/sda6: UUID="260b48a1-7e39-4085-afa1-a9c8b4c96da7" TYPE="ext4"
/dev/sda7: UUID="6c1df292-b0b7-4eed-930d-4ad07bd9a1f5" TYPE="ext4"
/dev/sda8: UUID="a829565c-3153-4124-9493-9410a2c45233" TYPE="ext4"
/dev/sda9: UUID="5c720c72-47c1-4292-8c2e-fc66f4a6a085" TYPE="ext4"
/dev/sda10: UUID="445b78db-cee9-42b6-bdae-082f7392bb8e" TYPE="ext4"
/dev/sda11: UUID="5b10a3fd-0ce4-4ac7-87d6-fa91191d78e2" TYPE="ext2"
/dev/sda12: UUID="eab8b673-4951-4ed5-8f4d-fed6c38794ee" TYPE="ext2"
/dev/sda13: UUID="7818d5cf-0587-401f-ac32-b2b8b7d95e68" TYPE="ext2"
/dev/sda14: UUID="5143e4ef-3e67-4811-8081-de3a2060d55f" TYPE="ext2"
/dev/sda15: UUID="92dae485-ab5d-42b9-bbd2-19221a9299af" TYPE="ext2"
/dev/sda16: UUID="66c24493-675d-4130-a200-9bfca00c5794" TYPE="ext2"

1 disks with OS, 7 OS : 7 Linux, 0 MacOS, 0 Windows, 0 unknown type OS.
Total of 7 OS detected on sda disk.
TABLE_TYPE of sda is MSDos
sda1 : sda, not-sepboot, grub-install, update-grub, apt-get, 32, with boot, , with-os, no-gpt, notEFItable, fstab-without-efi.
sda4 : sda, is-maybe-sepboot, no-grub-install, no-update-grub, no-apt-nor-yum, 32, no boot, /mnt/boot-sav/sda4, no-os, no-gpt, notEFItable, no-fstab.
sda5 : sda, not-sepboot, grub-install, update-grub, apt-get, 32, with boot, /mnt/boot-sav/sda5, with-os, no-gpt, notEFItable, fstab-without-efi.
sda6 : sda, not-sepboot, grub-install, update-grub, apt-get, 32, with boot, /mnt/boot-sav/sda6, with-os, no-gpt, notEFItable, fstab-without-efi.
sda7 : sda, not-sepboot, grub-install, update-grub, apt-get, 32, with boot, /mnt/boot-sav/sda7, with-os, no-gpt, notEFItable, fstab-without-efi.
sda8 : sda, not-sepboot, grub-install, update-grub, apt-get, 32, with boot, /mnt/boot-sav/sda8, with-os, no-gpt, notEFItable, fstab-without-efi.
sda9 : sda, not-sepboot, grub-install, update-grub, apt-get, 32, with boot, /mnt/boot-sav/sda9, with-os, no-gpt, notEFItable, fstab-without-efi.
sda10 : sda, not-sepboot, grub-install, update-grub, apt-get, 32, with boot, /mnt/boot-sav/sda10, with-os, no-gpt, notEFItable, fstab-without-efi.
sda11 : sda, is-maybe-sepboot, no-grub-install, no-update-grub, no-apt-nor-yum, 32, no boot, /mnt/boot-sav/sda11, no-os, no-gpt, notEFItable, no-fstab.
sda12 : sda, is-maybe-sepboot, no-grub-install, no-update-grub, no-apt-nor-yum, 32, no boot, /mnt/boot-sav/sda12, no-os, no-gpt, notEFItable, no-fstab.
sda13 : sda, is-maybe-sepboot, no-grub-install, no-update-grub, no-apt-nor-yum, 32, no boot, /mnt/boot-sav/sda13, no-os, no-gpt, notEFItable, no-fstab.
sda14 : sda, is-maybe-sepboot, no-grub-install, no-update-grub, no-apt-nor-yum, 32, no boot, /mnt/boot-sav/sda14, no-os, no-gpt, notEFItable, no-fstab.
sda15 : sda, is-maybe-sepboot, no-grub-install, no-update-grub, no-apt-nor-yum, 32, no boot, /mnt/boot-sav/sda15, no-os, no-gpt, notEFItable, no-fstab.
sda16 : sda, is-maybe-sepboot, no-grub-install, no-update-grub, no-apt-nor-yum, 32, no boot, /mnt/boot-sav/sda16, no-os, no-gpt, notEFItable, no-fstab.

PARTED:

Model: ATA ST3802110A (scsi)
Disk /dev/sda: 80.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
1      1049kB  9665MB  9664MB  primary   ext4            boot
2      9665MB  10.2GB  568MB   primary   linux-swap(v1)
3      10.2GB  74.7GB  64.4GB  extended
5      10.2GB  15.6GB  5369MB  logical   ext4
6      15.6GB  21.0GB  5369MB  logical   ext4
7      21.0GB  26.3GB  5369MB  logical   ext4
8      26.3GB  31.7GB  5369MB  logical   ext4
9      31.7GB  37.1GB  5369MB  logical   ext4
10      37.1GB  42.5GB  5369MB  logical   ext4
11      42.5GB  47.8GB  5369MB  logical   ext2
12      47.8GB  53.2GB  5369MB  logical   ext2
13      53.2GB  58.6GB  5369MB  logical   ext2
14      58.6GB  63.9GB  5369MB  logical   ext2
15      63.9GB  69.3GB  5369MB  logical   ext2
16      69.3GB  74.7GB  5369MB  logical   ext2
4      74.7GB  80.0GB  5356MB  primary   ext2


Model: ATA SAMSUNG SV0221H (scsi)
Disk /dev/sdb: 20.1GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags


MOUNT:
/dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
gvfs-fuse-daemon on /home/lubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=lubuntu)
/dev/sda4 on /mnt/boot-sav/sda4 type ext2 (rw)
/dev/sda5 on /mnt/boot-sav/sda5 type ext4 (rw)
/dev/sda6 on /mnt/boot-sav/sda6 type ext4 (rw)
/dev/sda7 on /mnt/boot-sav/sda7 type ext4 (rw)
/dev/sda8 on /mnt/boot-sav/sda8 type ext4 (rw)
/dev/sda9 on /mnt/boot-sav/sda9 type ext4 (rw)
/dev/sda10 on /mnt/boot-sav/sda10 type ext4 (rw)
/dev/sda11 on /mnt/boot-sav/sda11 type ext2 (rw)
/dev/sda12 on /mnt/boot-sav/sda12 type ext2 (rw)
/dev/sda13 on /mnt/boot-sav/sda13 type ext2 (rw)
/dev/sda14 on /mnt/boot-sav/sda14 type ext2 (rw)
/dev/sda15 on /mnt/boot-sav/sda15 type ext2 (rw)
/dev/sda16 on /mnt/boot-sav/sda16 type ext2 (rw)


/sys/block/sda:  alignment_offset bdi capability dev device discard_alignment events events_async events_poll_msecs ext_range holders inflight power queue range removable ro sda1 sda10 sda11 sda12 sda13 sda14 sda15 sda16 sda2 sda3 sda4 sda5 sda6 sda7 sda8 sda9 size slaves stat subsystem trace uevent
/sys/block/sdb:  alignment_offset bdi capability dev device discard_alignment events events_async events_poll_msecs ext_range holders inflight power queue range removable ro size slaves stat subsystem trace uevent
/sys/block/sr0:  alignment_offset bdi capability dev device discard_alignment events events_async events_poll_msecs ext_range holders inflight power queue range removable ro size slaves stat subsystem trace uevent
/dev:  autofs block bsg btrfs-control bus cdrom cdrw char console core cpu cpu_dma_latency disk dri dvd ecryptfs fb0 fd full fuse hidraw0 hpet input kmsg log lp0 mapper mcelog mem net network_latency network_throughput null oldmem parport0 port ppp psaux ptmx pts random rfkill rtc rtc0 scd0 sda sda1 sda10 sda11 sda12 sda13 sda14 sda15 sda16 sda2 sda3 sda4 sda5 sda6 sda7 sda8 sda9 sdb sg0 sg1 sg2 shm snapshot snd sr0 stderr stdin stdout uinput urandom usbmon0 usbmon1 usbmon2 usbmon3 vga_arbiter zero
/dev/mapper:  control

DF:

Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda1     ext4    8.9G  1.9G  6.7G  22% /
udev      devtmpfs    225M   12K  225M   1% /dev
tmpfs        tmpfs     93M  796K   92M   1% /run
none         tmpfs    5.0M     0  5.0M   0% /run/lock
none         tmpfs    232M  140K  232M   1% /run/shm
/dev/sda4     ext2    5.0G   10M  4.7G   1% /mnt/boot-sav/sda4
/dev/sda5     ext4    5.0G  1.6G  3.2G  34% /mnt/boot-sav/sda5
/dev/sda6     ext4    5.0G  2.2G  2.5G  47% /mnt/boot-sav/sda6
/dev/sda7     ext4    5.0G  2.2G  2.5G  48% /mnt/boot-sav/sda7
/dev/sda8     ext4    5.0G  2.4G  2.4G  50% /mnt/boot-sav/sda8
/dev/sda9     ext4    5.0G  2.3G  2.5G  49% /mnt/boot-sav/sda9
/dev/sda10    ext4    5.0G  2.1G  2.6G  45% /mnt/boot-sav/sda10
/dev/sda11    ext2    5.0G   10M  4.7G   1% /mnt/boot-sav/sda11
/dev/sda12    ext2    5.0G   10M  4.7G   1% /mnt/boot-sav/sda12
/dev/sda13    ext2    5.0G   10M  4.7G   1% /mnt/boot-sav/sda13
/dev/sda14    ext2    5.0G   10M  4.7G   1% /mnt/boot-sav/sda14
/dev/sda15    ext2    5.0G   10M  4.7G   1% /mnt/boot-sav/sda15
/dev/sda16    ext2    5.0G   10M  4.7G   1% /mnt/boot-sav/sda16

FDISK:

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ac910

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    18876415     9437184   83  Linux
/dev/sda2        18876416    19986431      555008   82  Linux swap / Solaris
/dev/sda3        19988478   145840127    62925825    5  Extended
/dev/sda4       145840128   156301311     5230592   83  Linux
/dev/sda5        19988480    30474239     5242880   83  Linux
/dev/sda6        30476288    40962047     5242880   83  Linux
/dev/sda7        40964096    51449855     5242880   83  Linux
/dev/sda8        51451904    61937663     5242880   83  Linux
/dev/sda9        61939712    72425471     5242880   83  Linux
/dev/sda10       72427520    82913279     5242880   83  Linux
/dev/sda11       82915328    93401087     5242880   83  Linux
/dev/sda12       93403136   103888895     5242880   83  Linux
/dev/sda13      103890944   114376703     5242880   83  Linux
/dev/sda14      114378752   124864511     5242880   83  Linux
/dev/sda15      124866560   135352319     5242880   83  Linux
/dev/sda16      135354368   145840127     5242880   83  Linux

Disk /dev/sdb: 20.1 GB, 20060135424 bytes
255 heads, 63 sectors/track, 2438 cylinders, total 39179952 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c32ee

Device Boot      Start         End      Blocks   Id  System



************************Before mainwindow
FSCK_ACTION no PASTEBIN_ACTION yes
recommendedrepair, reinstall, REINSTALL_POSSIBLE yes PURGE_POSSIBLE yes
UNHIDEBOOT_ACTION yes (10s), noflag (sda1)
PART_TO_REINSTALL_GRUB sda1, PART_TO_REINSTALL_GRUB_PURGE sda1, FORCE_GRUB no (sda) REMOVABLEDISK no
USE_SEPARATEBOOTPART no (sda4) grub2 (sda1)
UNCOMMENT_GFXMODE no ATA  ADD_KERNEL_OPTION no (acpi=off)
MBR_TO_RESTORE sda (mbr) ( )
internet: connected

************************Actions
FSCK_ACTION no PASTEBIN_ACTION yes
bootinfo, nombraction, REINSTALL_POSSIBLE yes PURGE_POSSIBLE yes
UNHIDEBOOT_ACTION no (10s), noflag (sda1)
PART_TO_REINSTALL_GRUB sda1, PART_TO_REINSTALL_GRUB_PURGE sda1, FORCE_GRUB no (sda) REMOVABLEDISK no
USE_SEPARATEBOOTPART no (sda4) grub2 (sda1)
UNCOMMENT_GFXMODE no ATA  ADD_KERNEL_OPTION no (acpi=off)
MBR_TO_RESTORE sda (mbr) (sda 1)
internet: connected
#838

I don't see problems, but we can try a few more things related to the Grub display.

First, I'm assuming you changed the timeout back to 15 after -1 didn't work. If it's video-related, did you have to press ENTER to get it to boot when you had it set to -1? That would indicate that the Grub menu was there waiting for input but that you couldn't see it.

Open /etc/default/grub and change one or both of these settings. You can try one at a time if you want to know which one is definitely needed, or change both just to see if either works. Make the changes so the line(s) look like the ones below:


GRUB_GFXMODE=640x480  # Remove the *#* icon at the start of the line.
GRUB_TERMINAL=console # Remove the *#* icon at the start of the line.
*And if you want to stop the menu until you make a selection:*
GRUB_TIMEOUT=-1 # Change from 15 to -1

Save the file, then run "sudo update-grub" and reboot when you want to see if the changes now allow the menu to be displayed.

#839

drs305 said: I don't see problems, but we can try a few more things related to the Grub display.

I did notice that too but of course you are the expert here :)

First, I'm assuming you changed the timeout back to 15 after -1 didn't work. If it's video-related, did you have to press ENTER to get it to boot when you had it set to -1? That would indicate that the Grub menu was there waiting for input but that you couldn't see it.

Before I change anything, I'd like to confirm one thing here. I did not change the time out yet. It is still "-1". Now, whether it's 15 or -1, in both case, I have to press ENTER to get it to boot.

So Yes, I had to press ENTER.

As I mentioned, it's there but screen goes off with "Input Not Supported" message. That message from the Screen/monitor itself if you know what I mean. It's like the PC is off or not connected.

So, shall I do the changes you suggested?

#840

You are THE MAN, Chief :D

GRUB_GFXMODE=640x480

Did the trick :D I did not have to change both.

Now, may I ask why is that? this is the first time I use Lubuntu as my main OS. With other *buntus, it was working without changing anything. I never had to change that at all. Same PC, nothing changed except the main OS. Weird :)

THANK YOU SO MUCH!

#841

amjjawad said: I did notice that too but of course you are the expert here :)

Before I change anything, I'd like to confirm one thing here. I did not change the time out yet. It is still "-1". Now, whether it's 15 or -1, in both case, I have to press ENTER to get it to boot.

So Yes, I had to press ENTER.

As I mentioned, it's there but screen goes off with "Input Not Supported" message. That message from the Screen/monitor itself if you know what I mean. It's like the PC is off or not connected.

So, shall I do the changes you suggested?

Yes. I am pretty certain it is a video problem and that Grub is not setting the mode correctly. Setting the resolution to the most basic (640x480) and/or using console instead of gfxterm makes the display about as basic as you can get.

Leaving it at "-1" helps when you get distracted during the reboot and forget to watch what happens... ;-)

#842

Hi

Well I have lost almost two days to fix my problem but it has not been possible, maybe it is easy to solve and I am a little bit retarded, I don't know, but the point is that I am losing a lot of time with this, and this forum seems the solution, so let's see if anybody can help, it would be very appreciated.

I want to dual boot w7 and ubuntu 11.10 (first I installed w7 then ubuntu 11.10) but when I start the pc I can't see any screen with options, it starts automatically from ubuntu, I can't see w7.

The partitions have this aspect:

105 mg that w7 installed by default (sda1)

52 gb where I have w7 (sda2)

163 gb nfts partition simply to store info and be able to see it with both operating systems (sda4), i created this partition after installing ubuntu

104 gb ext4 partition (sda3), extended. With ubuntu 11.10, inside this partition I have 31 GB for /home( sda8 ), 8 gb for /tmp (sda7) 61 GB for / (sda6), and 4gb for /swap(sda5).

1.-I don't remember well if the 8gb partition is tmp or data, or something like that, a friend helped me.

2.-If this seems a complete nonsense, yes, it is possible, I am new in linux and still doesn't understand clearly what the hell I am doing.:(

3.- I read the manual but still I don't understand a lot of things.

4.-I tried to put -1 to set timeout and yes, I could see some progress :). Shift, esc or any other button did not make anything until that change, then If I pressed esc I entered in a grub rescue menu or something like that, I tried to use two options, restore grub, and other option to mount partitions but it still starts directly to ubuntu 11.10.

Now I try to restore default settings to "set timeout" but I see two similar lines in the file grub.cfg , line 59 and line 61 , I don't remember wich line had 15 originally so my file now looks like this one:

if [ "${recordfail}" = 1 ]; then set timeout=15 else set timeout=10 fi

¿Is it configured correctly?.

5..-I saw this in a previous post:

" If your normal OS is not currently in control, or to make it the controlling Grub, boot into that OS and run the following, with X being the boot drive (sda, sdb, etc. Code: sudo grub-install /dev/sdX "

I suppose that I should do this but I don't know which letter should I use.

6.- I made the results.txt file, Hope this helps to understand the problem. I have uploaded it as adjoint file, but if you cannot see it, please tell me and I will use another method. I made this file while "set timeout" was -1.

7.- With the discs utility of ubuntu I can see that windows 7 and the 163gb nfts partitions maybe are not mounted because I can choose the mount option wich doesn't happen with the ubuntu partition, ¿Should I mount w7 partition?.

THanks folks.

#843

arnoldpredator,

Welcome to the Ubuntu forums!

I've looked at the RESULTS.txt and can't really see any obvious problems.

You mentioned that you changed the 'timeout' settings in the recordfail section but I don't see this reflected in the grub.cfg file. Did you change it back? For now, the recordfail timeout settings are still set to the default settings.

Remember that if you make any changes to the /etc/default/grub file you must run 'sudo update-grub' for the changes to take affect, and if you make changes directly to /boot/grub/grub.cfg you must NOT run "sudo update-grub" or it will erase those changes.

From what you stated, I think you currently can still boot directly into Ubuntu without a LiveCD, but you don't see any menu.

Normally that means that Grub didn't find Windows, but it is clearly listed in your Grub menu.

The easiest thing to try would be to install and run Boot Repair and see if it finds any errors. It's a very good GUI app written for Grub 2. You can read about how to install and run it from the Boot Repair link in my signature line.

If that doesn't work we can try some manual edits of the grub.cfg file, but try Boot Repair first.

#844

I did not see that you had a "/boot" partition. I believe you need that for the windows boot loader to be a part of GRUB2.

See my file set up. I am using Ubuntu 10.10 instead of 11.10, the only difference that I see.

#845

Hi

First of all thanks for the answers, they are highly appreciated!:D

drs305 said: arnoldpredator,

Welcome to the Ubuntu forums! I've looked at the RESULTS.txt and can't really see any obvious problems. You mentioned that you changed the 'timeout' settings in the recordfail section but I don't see this reflected in the grub.cfg file. Did you change it back? For now, the recordfail timeout settings are still set to the default settings. Remember that if you make any changes to the /etc/default/grub file you must run 'sudo update-grub' for the changes to take affect, and if you make changes directly to /boot/grub/grub.cfg you must NOT run "sudo update-grub" or it will erase those changes. From what you stated, I think you currently can still boot directly into Ubuntu without a LiveCD, but you don't see any menu. Normally that means that Grub didn't find Windows, but it is clearly listed in your Grub menu. The easiest thing to try would be to install and run Boot Repair and see if it finds any errors. It's a very good GUI app written for Grub 2. You can read about how to install and run it from the Boot Repair link in my signature line. If that doesn't work we can try some manual edits of the grub.cfg file, but try Boot Repair first.

-I saw your conversation with amjjaward and tried to modify /boot/grub/grub.cfg with gedit and then simply "save" and NOT running update-grub. THen I made the txt, and then modified another time that file putting 15 in place of -1. I don't know if this was the proper order or if I made a mistake.

-Perhaps I read a tutorial in youtube and maybe I made update-grub, but I don't remeber it very well.

-I installed bootrepair but nothing has changed at the start, it entered directly to ubuntu. I installed it with this commands:

[I]sudo add-apt-repository ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install boot-repair-ubuntu[/I]

I see that it could generate a file very similar to that txt that I made for the forum, ¿Should I upload that file?.

-Ok, I wait for your next answer.

jlh68 said: I did not see that you had a "/boot" partition. I believe you need that for the windows boot loader to be a part of GRUB2.

See my file set up. I am using Ubuntu 10.10 instead of 11.10, the only difference that I see.

I think that I don't have a specific boot partition inside of linux, I don't know if the partition of 100 mg that w7 generates automatically is what you are talking about.

In linux I have /, /home , /tmp, /swap and in windows7 a big partition of 52gb and another partition with only 100 mg as I said.

¿Where should I create that boot partition?. I have space in a 163gb nfts partition there I could made more partitions.

I suppose that the best solution is changing some parameters in a configuration file to avoid making new partitions, but if that solution doesn't work I could try to make new partitions.

I made a capture of the disks utility , perhaps this can help.

Thanks to everybody!!!!!!!!!!!!!!

#846

After you installed Boot Repair did you try running the 'Recommended repair' option?

And yes, since I can't seem to find the problem, please post the link to, or the contents of, the new RESULTS.txt contents.

#847

Hi

Well this is crazy.

I used boot repair with the default options and nothing changed, I created the boot info file to post it here... and then I saw "advanced options" button, and I thaught that perhaps it was a good idea to click on the "repair mbr" option, for it was not marked.

I marked that option, then I run bootrepair... and then I shut down ubuntu.

¡Now it starts only in windows 7! :facepalm:

So I can't upload the boot info file nor can use boot repair, I suppose that now I should use a boot repairing software in windows 7 and try to dual boot both operating systems.

¿Any suggestion?¿What could I do?.

edit:

I burned a cd with boot repair iso file, then I started from cd, used "recomended option" and now It only starts from ubuntu, as before touching the "repair mbr" option.

Now I upload the info file that shows how the system is now, after using the cd. Now it starts directly in ubuntu.

I saw that in the advanced options menu of boot repair there are some interesting options, but I am not sure about what is the best configuration.

In main options:

"place boot flag on..." , I remember that it was sda1 with windows 7 the option that I had

In grub location:

"Os by default " I can't remember what device I had activated

"Place grub in all disks"

¿Can this files solve the problem?¿What configuration is the best?.:confused:

#848

arnoldpredator,

You can probably get Ubuntu back with the LiveCD. Boot the LiveCD, mount your real / and /home partitions, then reinstall Grub so the MBR of the boot drive points to your Ubuntu installation.


sudo mount /dev/sda6 /mnt
sudo mount /dev/sda8 /mnt/home
sudo grub-install --root-directory=/mnt /dev/sda
sudo umount /dev/sda6 /dev/sda8

Don't use the partition number in the [s]final[/s] third command.

Reboot and you should get the Ubuntu/Grub menu. If you don't see Windows in the menu, after booting without the CD run:

sudo update-grub
#849

¿What does this mean?:

"Don't use the partition number in the final command."

----------

In sudo umount /dev/sda6 /dev/sda8

¿Should I not use 6 and 8?

#850

arnoldpredator said: ¿What does this mean?:

"Don't use the partition number in the final command."

----------

In sudo umount /dev/sda6 /dev/sda8

¿Should I not use 6 and 8?

Sorry for the confusion. I added an extra command after I posted. Yes, use sda6 and sda8 in the last command. Just use "sda" in the grub-install command.

#851

drs305 said: arnoldpredator,

You can probably get Ubuntu back with the LiveCD. Boot the LiveCD, mount your real / and /home partitions, then reinstall Grub so the MBR of the boot drive points to your Ubuntu installation.


sudo mount /dev/sda6 /mnt
sudo mount /dev/sda8 /mnt/home
sudo grub-install --root-directory=/mnt /dev/sda
sudo umount /dev/sda6 /dev/sda8

Reboot and you should get the Ubuntu/Grub menu. If you don't see Windows in the menu, after booting without the CD run:

sudo update-grub

I used your first list of commands and the result was a black screen with this words:

error file not found

grub rescue>

It did not start from windows 7 nor ubuntu 11.10.

In the utility disks I see that sda6 ,7 and 8 are already mounted ¿could it be the explanation for the error?.

The other partitions are not mounted since there is an option button wich says "mount".

I used boot repair with two different options:

1.-First in advanced options I used "put flag on sda1", but it only starts in ubuntu.

2.-In Grub location I activated "Force grub into:sda1" (for chainloader), but it starts in ubuntu.

Sorry If this is getting too much time to solve, I appreciate a lot your help.:D

edit:

when the pc starts I see "out of range" in the screen, I don't know if this is important, but I see that I can start from windows 7, and I can start from ubuntu 11.10 but I can't choose what I want at the same time, that is I think the biggest problem.

The set timeout was -1 and nothing happened, then i changed to 15 and the result is the same, I don't know why.

reedit:

Finally it works!!!!!!!!!!!!!!!!111

I think that it has been working properly all the time, but the screen could not show any image, then the solution was simply:

2- Edit /etc/default/grub and uncomment this #GRUB_GFXMODE=640x480 finally it works with this GRUB_GFXMODE=640x480 run: update-grub

--------

drs305 I am ashamed because this now looks very simple, but If you are starting with linux I think that perhaps it is just normal to have this kind of problems.

Thanks for your support!

See you in other threads of this great forum!

#852

arnoldpredator said:

drs305 I am ashamed because this now looks very simple, but If you are starting with linux I think that perhaps it is just normal to have this kind of problems.

Thanks for your support!

See you in other threads of this great forum!

I know the devs work hard to try to get the system to work right from the start so that new users are pleased with Ubuntu. Sometimes it doesn't happen but I'm glad that you now have your system working. :-)

We were all Linux newbies at some point, and many of us (especially me) have learned by trial and error, with help from these forums.

Happy Ubuntu-ing !

#853

I had a ton of grub2 confusion, this morning. Everything is sort of working, now, but I have no idea where I have ended up.

My main installation is Ubuntu 11.10. I was controlling grub2 from it. I have secondary installations of Arch and Ubuntu 12.04. The Arch installation requires some custom configuration settings, which I modified by editing /etc/grub.d/30_os-prober

Everything was working great until a kernel upgrade for Ubuntu 12.04 came this morning. 12.04 ran its own grub2, it didn't detect Arch, and 11.10 would boot, but the filesystems were mounted read-only. So, it wouldn't really run.

I tried several update-grubs and grub-installs from various of my installations, but nothing was getting things right. One of them even picked up on a very old 3.0.0-12 kernel for 11.10. How, I don't know.

So, I finally booted to a LiveCD and did grub-install from there. It did pretty well, and I could boot to a running 11.10 system which was running the correct kernel (I think). Then, from the running 11.10, I ran update-grub. It picked up both Arch and 12.04. However, it did not pick up my custom mods for Arch. And it still looks like it is a 12.04 grub menu, because 12.04 is at the top, 11.10 is on down the list, and Arch is at the bottom. Both Ubuntus boot just fine, but to boot Arch, I now have to type 'e' on its grub menu selection and add my custom parameters, manually, then Ctrx-x to boot.

Whatever is going on? Maybe if I ran grub-install from 11.10 it would fix things back the way they were? But, I've already had so much trouble I don't feel like trying anything else, right now.

Tim

#854

ratcheer,

Update-grub updates the grub menu for the (Ubuntu) OS you are currently booted into but you won't see any change if it isn't the controlling grub.

You had the right idea: Boot into 11.10, then run "sudo grub-install /dev/sda" and your 11.10 should be controlling things again. If the drive isn't the first in the boot order, change 'sda' to the correct designation.

The old kernel in the menu could have come from an os-prober search of your system, but sometimes Grub will also 'harvest' old Grub menus for entries. If the kernel doesn't actually exist, look for and delete any grub.cfg menus you are not actually using (I'd keep the current one for each OS in it's own /boot/grub folder). Run update-grub in each OS to ensure the main menu (within that partition) is up-to-date.

#855

Thanks very much for your reply, @drs305.

So, since my 11.10 was the controlling owner of my prior grub2 configuration, why did the update-grub that was run when 12.04 kernel was upgraded mess up my system?

I wish they would "ask" before doing things like that. Arch did. I was able to instruct the Arch installation to not run grub. That was great.

Thank you, Tim

#856

ratcheer said: Thanks very much for your reply, @drs305.

So, since my 11.10 was the controlling owner of my prior grub2 configuration, why did the update-grub that was run when 12.04 kernel was upgraded mess up my system?

I wish they would "ask" before doing things like that. Arch did. I was able to instruct the Arch installation to not run grub. That was great.

Thank you, Tim

Most times when Grub is going to rewrite the configuration it asks for confirmation, especially in the case when the 'controlling' bootloader changes. This would be when "grub-install" is run or when certain Grub scripts are updated. When a kernel is updated 'update-grub' is run so the menu is updated but a simple kernel update shouldn't trigger 'grub-install'.

Perhaps one of the core Grub files was changed at about the same time as the kernel, or another update on your newer OS triggered the udpate. In any case when control is transferred to another OS I agree that Grub should ask if it's OK to do so. That is the way it's designed, but as you found out sometimes it occurs when the user fails to notice the warning or it gets bypassed for some some reason.

#857

Thank you.

Tim

#858

Since yesterday I'm customizing my GRUB 2 configuration but I'm running in to a few problems now. This is what I want to accomplish:

  1. Change the menu entry sequence in such a way that the Windows loader will always be the first entry. The sequence of the other menu entries does not really mather.
  2. Protect two menu entries with a user+pass (this is not really a problem but I want to realize this as soon as I've solved point 1.
  3. A problem which I'm encountering now is that I've configured to hide the menu, but when I boot the splas image (without menu entries of course) _isn't_ showing until I press a key. I found on the internet another topic with the same problem but I don't fully understand how to realize the mentioned solution.

Splash screen not showing without pressing a key

I'm really desperate for some help, so any answer or link to solutions would be greatly appreciated.

#859

Scripting22 said: Since yesterday I'm customizing my GRUB 2 configuration but I'm running in to a few problems now. This is what I want to accomplish:

The easiest way to do this is with an app called Grub Customizer. It's a great tool that lets you tweak a lot of the Grub settings via a GUI interface. See the "Customizer" link in my signature line.

  1. Change the menu entry sequence in such a way that the Windows loader will always be the first entry. The sequence of the other menu entries does not really mather.

The other option would be to make a custom menu and name it 09_custom, but I'd recommend Grub Customizer.

  1. Protect two menu entries with a user+pass (this is not really a problem but I want to realize this as soon as I've solved point 1.

I wrote a guide on password protection in Grub 2. I don't know if Grub Customizer has a password capability. http://ubuntuforums.org/showthread.php?t=1369019

  1. A problem which I'm encountering now is that I've configured to hide the menu, but when I boot the splas image (without menu entries of course) _isn't_ showing until I press a key. I found on the internet another topic with the same problem but I don't fully understand how to realize the mentioned solution.

Splash screen not showing without pressing a key

I'm really desperate for some help, so any answer or link to solutions would be greatly appreciated.

Grub 2 really isn't set up to normally run this way since the purpose of the Grub screen is to select an OS to boot. The way Grub thinks, if you aren't going to make a selection there is no need to see the menu (and background).

Setting up Grub so you can see a grub splash image is going to slow your boot, since nothing is going to start until you make a selection. If your desire is to show a blank screen on boot unti a selection is made, it can be accomplished but would take a bit of work.

My main difference with the suggestion in the link you provided would be to use a menuentry with an empty title (i.e. " " ). The menuentry would still exist, but would be invisible.

With the introduction of the submenu option in newer Grub 2 versions, I think rather than using a second grub.cfg file a submenu might be easier to manage. I'd have to experiment a bit to see how it would work. I'll put it in the "if I have some extra time I'll play with it" category.

I realize I haven't answered your third question very well, but it will have to do for the moment.

#860

Thnx! Your reply is really helpfull. I've changed the sequence of the menu entries with the Grub customizer app.

Your guide on password protection seems not to difficult so I will save that for the last.

The third answer however is (like you mentioned) for me a bit difficult to understand. First thing I don't understand is, how can there be two grub.cfg files? Which one will be (first) used at boot, or wil the both be used after each other?

Second thing I like to ask is, where would I put the empty menu entry and what would be the effect of it? Or do you mean that this empty menu entry should be added to the second grub.cfg file?

When I was searching on the internet yesterday for a solution I also found that the use of sub menus could be of some help. But I think that this is much more difficult to configure. Therefore I think I go for the moment for a second grub.cfg with a empty entry.

Could you please explain a little bit more about how to create a second grub.cfg and add a empty entry to it?

#861

Scripting22 said:

The third answer however is (like you mentioned) for me a bit difficult to understand. First thing I don't understand is, how can there be two grub.cfg files? Which one will be (first) used at boot, or wil the both be used after each other?

I knew the answer was insufficient but I hadn't tried what I was about to propose.

To answer your question, your first grub configuration file (grub.cfg) would merely point to a second one. Grub can use any valid .cfg file, so the main menu (grub.cfg) could point to another menu. When that menuentry is selected, the new .cfg menu is displayed. That is what the quoted menuentry from the other link does.

Another way to display a second menu is via the 'submenu', which is contained within the original menu but hidden from view (except for the submenu title). This concept was introduced to limit the number of kernel versions are displayed on the main menu.

The second set of menuentries would merely be hidden in a submenu of the grub.cfg file.

I've now tested an idea and it works.

First, change the default timeout to -1. This will force you to make a selection before the system boots. You can do this in Grub Customizer.

Next, open /boot/grub/grub.cfg for editing. In the 10_linux section, find the following line (if you have it):

submenu "Previous Linux versions" {

Move it to the line immediately before the first *menuentry* in the 10_linux section. It should now look something like this:

submenu "Previous Linux versions" { menuentry 'Ubuntu, with Linux 3.0.0-17-generic' --class ubuntu --class gnu-linux --class gnu --class os { Next, change the "Previous Linux versions" title to look like this:

submenu " " {

Save the file and do NOT update grub.

If you only had one Linux OS, with MEMTEST disabled, and no Windows entries, what you should see when you boot is a screen with just the background image. If you press ENTER, your full menu will appear.

See if this is the effect you are looking for. This method is not foolproof without some more tweaking since an update of grub will remove this edit, but it's a start.

#862

Okay, so far I did exactly what you said but when I rebooted my laptop I ended up in de GRUB commandline instead of the menu.

Maybe this is caused by the fact that I've made alterations to the sequence of menu entries. Maybe this has caused to change the run the scripts in a different order?

I solved the problem by using the solution mentioned in my first post. Unfortunately the solution by using a submenu doesn't create the desired effect.

Now I will password protect the different menu entries in the second grub.cfg so I will furthermore protect my Linux distributions. :)

#863

Scripting22 said: Okay, so far I did exactly what you said but when I rebooted my laptop I ended up in de GRUB commandline instead of the menu.

Maybe this is caused by the fact that I've made alterations to the sequence of menu entries. Maybe this has caused to change the run the scripts in a different order?

I solved the problem by using the solution mentioned in my first post. Unfortunately the solution by using a submenu doesn't create the desired effect.

Now I will password protect the different menu entries in the second grub.cfg so I will furthermore protect my Linux distributions. :)

Glad you were able to restore your system.

If you still aren't happy with your result and want me to experiement with the submenu for your machine - attach a copy of your grub.cfg file I will check it to see what happened, or at least provide a working solution.

#864

drs305 said: Glad you were able to restore your system.

If you still aren't happy with your result and want me to experiement with the submenu for your machine - attach a copy of your grub.cfg file I will check it to see what happened, or at least provide a working solution.

Thxn for offering me to look at another solution with the submenu but I think first I want to give another alternative a try. After yesterday I came to the conclusion that if I want to solve this permanent and in a good fashion I will have to add my changes to the scripts in /etc/grub.d/ so if any updates will be installed (of images or grub), my changes will resist.

The first part of my plan is to edit the command "update-grub" which is a synoniem of "grub-mkconfig -o /boot/grub/grub.cfg" to "grub-mkconfig -o /boot/grub/othergrub.cfg". The normal grub.cfg will then remain always the same and any changes due to manual or automatic updates will be written to othergrub.cfg. The problem right now is I can't find the command "update-grub". Could you help me with this?

The second part is to include some rules or script in /etc/grub.d so at any time there will only be displayed three menu entries namely "Windows 7", "Kubuntu" and "Backtrack" in the right order. How to do this I'm not quite sure, but I think I will figure it out in time.

An important reason for using script instead of manual alterations to othergrub.cfg is that menu entries are also password protected through the use of scripts. This reason and the fact that my configuration will be gone the first time update-grub is run has convinced me to use only the scripts.

Maybe the two different grub configuration files could be decreased to one by the use of a submenu, but on this moment I'm not able to envision how this would work. If you can explain me how it would work, and it saves boot time then I would surely give it a try.

I also would like to start with a clean configuration of grub. Before I started, I didn't backup the orginal files and by the use of grub-customizer I can't find back al changes in de scripts. Do you know how I could accomplish this?

So far I would really like to thank you for all the effort!

Edit: I found the update-grub script in /usr/lib/grub-legacy, and looked at it. But I don't have any clue where is determined that the output is written to grub.cfg.

#865

Scripting22 said: Thxn for offering me to look at another solution with the submenu but I think first I want to give another alternative a try. After yesterday I came to the conclusion that if I want to solve this permanent and in a good fashion I will have to add my changes to the scripts in /etc/grub.d/ so if any updates will be installed (of images or grub), my changes will resist.

The first part of my plan is to edit the command "update-grub" which is a synoniem of "grub-mkconfig -o /boot/grub/grub.cfg" to "grub-mkconfig -o /boot/grub/othergrub.cfg". The normal grub.cfg will then remain always the same and any changes due to manual or automatic updates will be written to othergrub.cfg. The problem right now is I can't find the command "update-grub". Could you help me with this?

The second part is to include some rules or script in /etc/grub.d so at any time there will only be displayed three menu entries namely "Windows 7", "Kubuntu" and "Backtrack" in the right order. How to do this I'm not quite sure, but I think I will figure it out in time.

An important reason for using script instead of manual alterations to othergrub.cfg is that menu entries are also password protected through the use of scripts. This reason and the fact that my configuration will be gone the first time update-grub is run has convinced me to use only the scripts.

Maybe the two different grub configuration files could be decreased to one by the use of a submenu, but on this moment I'm not able to envision how this would work. If you can explain me how it would work, and it saves boot time then I would surely give it a try.

I also would like to start with a clean configuration of grub. Before I started, I didn't backup the orginal files and by the use of grub-customizer I can't find back al changes in de scripts. Do you know how I could accomplish this?

So far I would really like to thank you for all the effort!

  1. The update-grub command is located in /usr/sbin/update-grub. You can find the location of a command by running "which <command>". Example: which update-grub

I don't know if this is what you had in mind, but you can reconfigure a command to run what you want it to run using 'dpkg-divert'. Without going into great detail, you could either set 'update-grub' not to run or have it run another command when called by a system update.

sudo dpkg-divert --rename --add /usr/sbin/update-grub  # changes name to update-grub.distrib
sudo ln -s /bin/true /usr/sbin/update-grub # runs /bin/true as update-grub so no errors generated

The above more or less 'disables' update-grub, but you could also point it to another command.

http://ubuntuforums.org/showthread.php?t=1287602 Caution: It's pretty geeky and should be avoided if possible. ;-)

  1. When Grub 2 first came out there was almost no documentation and few known tweaks. Before G2 apps were developed, I wrote a guide on how to tweak the Grub menu (hide partitions, rename things, etc). There are now much easier ways to do most of these things, but the guide remains and may provide you some insight on how to do what you want if the existing apps don't work.
  1. I don't think anything you do is going to decrease boot times, since you are going to have to invoke a delay if you really want to display the grub menu rather than have it boot...

I'll try explaining the submenu concept again. If the entire 10_linux section is embedded within a submenu, all you would see would be the submenu title and you would have to click on the submenu title to 'expose' its contents (i.e. your real menu). To make the submenu title invisible, you would make it's title a single or multiple spaces with nothing else. Thus it would technically be displayed but you wouldn't see anything because the title is blank.

You would either set the timeout to -1 to force the user to make a selection, or you could set the default to use an entry in the submenu. The format for setting a default entry in a submenu is docemented in the guide I wrote about it: Grub 1.99 Submenus

  1. You could use the title tweaks thread to figure out how to insert the correct structure whenever update-grub is executed. An easier way would be to create a custom menu with everything you want and then disable 10,20,30 scripts in /etc/grub.d by removing the executable bit from those files.

With just your 40_custom file, the grub.cfg file would consist of all the administrative stuff needed by grub, and only your custom menus. You can design the custom menu so it always boots the current kernel and doesn't need updating after a kernel update.

  1. The easiest way I've found to return grub to the defaults is to purge and reinstall it. It takes only a minute - just make sure you have a reliable Internet connection before starting:
sudo apt-get purge grub-common # Removes grub-pc, grub-common, and one or more supporting Grub 2 packages.
sudo apt-get install grub-pc # Reinstalls all the required packages.

When reinstalling, use the spacebar to select the *drive* (not the partition) and the TAB key to navigate to/from the OK selection.

It might be good to make copies of your existing /etc/default/grub file and /etc/grub.d and /boot/grub folders in case you want to refer to them later.

#866

drs305, would my tutorial be suited to what Scripting22 is trying to do? Not trying to hog the spotlight, just asking.

#867

Cavsfan said: drs305, would my tutorial be suited to what Scripting22 is trying to do? Not trying to hog the spotlight, just asking.

The more the merrier! I was going to point him to your excellent guide if he decided to go the 'custom' route.

@ *Scripting22*

Here's the link: How to: Create a Customized GRUB2 Screen that is Maintenance Free.

#868

drs305 said: The more the merrier! I was going to point him to your excellent guide if he decided to go the 'custom' route.

@ *Scripting22*

Here's the link: How to: Create a Customized GRUB2 Screen that is Maintenance Free.

@drs305: Okay thanks for your extensive answer. I will give the options listed this evening and tomorrow a try. It could take a while untill I get back to this.

@Cavsfan: tutorial/guide is bookmarked. Thanks for input.

#869

Scripting22 said: @drs305: Okay thanks for your extensive answer. I will give the options listed this evening and tomorrow a try. It could take a while untill I get back to this.

@Cavsfan: tutorial/guide is bookmarked. Thanks for input.

Glad I could help. It's pretty extensive but, straight forward. There are many examples of what your screen will look like. My current screen is toward the end of the thread. Thanks drs305.

#870

drs305 said: The more the merrier! I was going to point him to your excellent guide if he decided to go the 'custom' route.

@ *Scripting22*

Here's the link: How to: Create a Customized GRUB2 Screen that is Maintenance Free.

Allright, the last few days I've been working hard to get GRUB working like I wanted to. First of all I created a custom file with my own menu entries, so after this step I had only the menu entries I wanted, in the right order with the right names.

After this I tried to exclude the first grub.cfg file (which only redirects), by introducing a submenu. The submenu was fairly hidden, but the background image didn't pop up like I wanted to. I did remember you said GRUB isn't designed to work that way. I accepted that, and reintroduced the first grub.cfg file which points to the "othergrub.cfg" file.

After altering the script of "update-grub" to write output directly to /boot/grub/othergrub.cfg everything was in place and working the way I want it.

The last part existed of protecting two of the three menu entries and here came the trouble. First I created a encrypted password and second I added two lines in the 00_header file the same as mentioned in the guide of you. But when I ran the update-grub command I get back:

Generating grub.cfg ...
/etc/grub.d/00_header: 21: password_pbkdf2: not found
#871

Scripting22 said:

The last part existed of protecting two of the three menu entries and here came the trouble. First I created a encrypted password and second I added two lines in the 00_header file the same as mentioned in the guide of you. But when I ran the update-grub command I get back:

Generating grub.cfg ...
/etc/grub.d/00_header: 21: password_pbkdf2: not found

I'm currently on a business trip and don't have access to my testing machine. You might take at look at the 'source' documentation to see if there is anything there: http://www.gnu.org/software/grub/manual/html_node/Security.html

You might check to make sure you have the password modules in /boot/grub (I have password.mod, password_pbkdf2.mod and and pbkdf2.mod). The error message you quote seems a bit odd. It sounds like there is a reference in 00_header regarding the module. From memory, other than setting the username and password in 00_header I don't recall any mention of the actual modules. You use the command *grub-mkpasswd-pbkdf2* to create the password but then only the password code goes into the grub files in the format described in the first post of the password guide.

When I used encrypted passwords one thing I had to ensure was that when copying/pasting was that there were no spaces/line breaks. Since the encrypted password was very long it always spanned several lines in my terminal.

#872

Checked for the modules but they were there, so that couldn't be the problem. After this I tried a few things with the lines which adds users and (encrypted) passwords. Surprisingly it made a difference when I added the lines to 00_header _with_ the lines:

cat << EOF
set superusers="monkey"
password_pbkdf2 monkey grub.pbkdf2.sha512.10000.XXXXXXXXXXXXXXXXX
EOF

Instead of:


set superusers="monkey"
password_pbkdf2 monkey grub.pbkdf2.sha512.10000.XXXXXXXXXXXXXXXXX

In the guide however it's said that when a custom (not-standard) script is used these lines (cat << EOF, EOF) should not be added because these scritps are added automaticly to grub.cfg (in my case othergrub.cfg).

Anyway, problem is solved and everything is working. Special thanks to drs305 for all the help he gave to archieve this.

#873

Scripting22 said: Surprisingly it made a difference when I added the lines to 00_header _with_ the lines: ...

In the guide however it's said that when a custom (not-standard) script is used these lines (cat << EOF, EOF) should not be added because these scritps are added automaticly to grub.cfg (in my case othergrub.cfg).

Glad you now have what you want woking. I think the determination on "CAT" usage rests on which file(s) you are working with. In a custom script non-commented lines are copied in their entirety. The 00_header file is not completely copied, so if you add any extra lines you need to specify them for export.

Happy Ubuntu-ing !

#874

Just did the update from 10.10 to 11.04 on my desktop.

Win7 was the default OS. When I rebooted after the install, 11.04 was the default. I changed that back to Win7 with Start-Up Manager.

Rebooted. 11.04 was still the default. Why is it ignoring the default? Thanks for any advice.

grub-install (GRUB) 1.99~rc1-13ubuntu3



### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="8"
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 {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos3)'
search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos3)'
search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
set locale_dir=($root)/boot/grub/locale
set lang=en_CA
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=20
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-14-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    linux    /boot/vmlinuz-2.6.38-14-generic root=UUID=c7de2b12-ec17-40a9-982f-e2a34cfb7d9e ro  splash vga=769  quiet splash vt.handoff=7
    initrd    /boot/initrd.img-2.6.38-14-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-14-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    echo    'Loading Linux 2.6.38-14-generic ...'
    linux    /boot/vmlinuz-2.6.38-14-generic root=UUID=c7de2b12-ec17-40a9-982f-e2a34cfb7d9e ro single  splash vga=769
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-2.6.38-14-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 2.6.35-32-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    linux    /boot/vmlinuz-2.6.35-32-generic root=UUID=c7de2b12-ec17-40a9-982f-e2a34cfb7d9e ro  splash vga=769  quiet splash vt.handoff=7
    initrd    /boot/initrd.img-2.6.35-32-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-32-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    echo    'Loading Linux 2.6.35-32-generic ...'
    linux    /boot/vmlinuz-2.6.35-32-generic root=UUID=c7de2b12-ec17-40a9-982f-e2a34cfb7d9e ro single  splash vga=769
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-2.6.35-32-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-30-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    linux    /boot/vmlinuz-2.6.35-30-generic root=UUID=c7de2b12-ec17-40a9-982f-e2a34cfb7d9e ro  splash vga=769  quiet splash vt.handoff=7
    initrd    /boot/initrd.img-2.6.35-30-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-30-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    echo    'Loading Linux 2.6.35-30-generic ...'
    linux    /boot/vmlinuz-2.6.35-30-generic root=UUID=c7de2b12-ec17-40a9-982f-e2a34cfb7d9e ro single  splash vga=769
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-2.6.35-30-generic
}
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    linux16    /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    linux16    /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sdb1)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(/dev/sdb,msdos1)'
    search --no-floppy --fs-uuid --set=root 88F22069F2205E26
    chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### 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  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
#875

dheianevans said: Just did the update from 10.10 to 11.04 on my desktop.

Win7 was the default OS. When I rebooted after the install, 11.04 was the default. I changed that back to Win7 with Start-Up Manager.

Rebooted. 11.04 was still the default. Why is it ignoring the default? Thanks for any advice.

The default is set to 8. I believe it should be (EDIT) [s]6[/s] 5, but my counting may be off. If Grub can't boot the desired menuentry number it will attempt to boot one of the main selections, which is why it is probably booting your Ubuntu OS.

A more reliable way to set the default is to use the actual menuentry title rather than a number. In this case, you most likely want in /etc/default/grub:

GRUB_DEFAULT="Windows 7 (loader) (on /dev/sdb1)" Don't forget to run "sudo update-grub" after saving the change.

Note: I added "Code" tags to your post. You add them when creating a post by pressing the # icon in the post's menu and then pasting the content between the tags.

#876

dheianevans said: Just did the update from 10.10 to 11.04 on my desktop.

Win7 was the default OS. When I rebooted after the install, 11.04 was the default. I changed that back to Win7 with Start-Up Manager.

Rebooted. 11.04 was still the default. Why is it ignoring the default? Thanks for any advice.

grub-install (GRUB) 1.99~rc1-13ubuntu3

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="8"
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 {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos3)'
search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos3)'
search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
set locale_dir=($root)/boot/grub/locale
set lang=en_CA
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=20
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-14-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    linux    /boot/vmlinuz-2.6.38-14-generic root=UUID=c7de2b12-ec17-40a9-982f-e2a34cfb7d9e ro  splash vga=769  quiet splash vt.handoff=7
    initrd    /boot/initrd.img-2.6.38-14-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-14-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    echo    'Loading Linux 2.6.38-14-generic ...'
    linux    /boot/vmlinuz-2.6.38-14-generic root=UUID=c7de2b12-ec17-40a9-982f-e2a34cfb7d9e ro single  splash vga=769
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-2.6.38-14-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 2.6.35-32-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    linux    /boot/vmlinuz-2.6.35-32-generic root=UUID=c7de2b12-ec17-40a9-982f-e2a34cfb7d9e ro  splash vga=769  quiet splash vt.handoff=7
    initrd    /boot/initrd.img-2.6.35-32-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-32-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    echo    'Loading Linux 2.6.35-32-generic ...'
    linux    /boot/vmlinuz-2.6.35-32-generic root=UUID=c7de2b12-ec17-40a9-982f-e2a34cfb7d9e ro single  splash vga=769
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-2.6.35-32-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-30-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    linux    /boot/vmlinuz-2.6.35-30-generic root=UUID=c7de2b12-ec17-40a9-982f-e2a34cfb7d9e ro  splash vga=769  quiet splash vt.handoff=7
    initrd    /boot/initrd.img-2.6.35-30-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-30-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    set gfxpayload=$linux_gfx_mode
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    echo    'Loading Linux 2.6.35-30-generic ...'
    linux    /boot/vmlinuz-2.6.35-30-generic root=UUID=c7de2b12-ec17-40a9-982f-e2a34cfb7d9e ro single  splash vga=769
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-2.6.35-30-generic
}
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    linux16    /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos3)'
    search --no-floppy --fs-uuid --set=root c7de2b12-ec17-40a9-982f-e2a34cfb7d9e
    linux16    /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sdb1)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(/dev/sdb,msdos1)'
    search --no-floppy --fs-uuid --set=root 88F22069F2205E26
    chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### 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  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

EDIT: drs305, I counted 9 menuentry lines, so 8 would appear to be correct.

One suggestion would be to use the HOWTO in my signature. It customizes the background screen and you never have to mess with changing the default line number of the OS you want as default.

I just have 3 entries on my Grub2 screen: Lucid Lynx, Lucid Lynx Recovery and Windows 7. There are several examples at the bottom of the 1st page. My current and latest is posted [[COLOR=blue]_on post 105 of the HOWTO._[/COLOR]]("http://ubuntuforums.org/showpost.php?p=11594281&postcount=105") You can have different color fonts too.

#877

Cavsfan said: EDIT: drs305, I counted 9 menuentry lines, so 8 would appear to be correct.

One suggestion would be to use the HOWTO in my signature. It customizes the background screen and you never have to mess with changing the default line number of the OS you want as default.

I just have 3 entries on my Grub2 screen: Lucid Lynx, Lucid Lynx Recovery and Windows 7. There are several examples at the bottom of the 1st page. My current and latest is posted [[COLOR=blue]_on post 105 of the HOWTO._[/COLOR]]("http://ubuntuforums.org/showpost.php?p=11594281&postcount=105") You can have different color fonts too.

Actually, I think we are both incorrect. My guess is now 5, since I forget to start at 0. The confusion is due to the submenu feature. Only the entries on the *main* page count if you are going to use a single number. So what is displayed on the main menu currently is:

0 Ubuntu, with Linux 2.6.38-14-generic

1 Ubuntu, with Linux 2.6.38-14-generic (recovery mode) 2 Previous Linux versions 3 Memory test (memtest86+) 4 Memory test (memtest86+, serial console 115200) 5 Windows 7 (loader) (on /dev/sdb1)

For more on submenus, see this guide I wrote: http://ubuntuforums.org/showthread.php?p=10720316

#878

You know way more than I do about Grub2. I thought you might be out of town or something, so I thought I would mention my tutorial as I too did not like having to edit the default line every time a kernel got added.

#879

Cavsfan said: You know way more than I do about Grub2. I thought you might be out of town or something, so I thought I would mention

my tutorial as I too did not like having to edit the default line every time a kernel got added.

I'll be gone for two weeks starting tomorrow, so hopefully *dheianevans* will resolve this before then. Of course, there are plenty of others, such as you, who can help as well.

#880

Hi guys...I'll try changing the default line as you suggested and get back to you.

UPDATE: it worked. Thanks

#881

dheianevans said: Hi guys...I'll try changing the default line as you suggested and get back to you.

UPDATE: it worked. Thanks

Glad to hear you got it fixed! :)

#882

I have ubuntu,lubuntu,and mint on 6 20 gig particians and have room for more butI've had problems with grub recognizining all the diferent activ partitions of which at this time 3 are actual partician and the others are part of the extended partician

#883

The question is not specific to Lubuntu. Moved to Grub 2.

#884

pdlethbridge said: I have ubuntu,lubuntu,and mint on 6 20 gig particians and have room for more butI've had problems with grub recognizining all the diferent activ partitions of which at this time 3 are actual partician and the others are part of the extended partician

I am pretty sure you could put all of those in the custom file /etc/grub.d/40_custom as mentioned in step 3 of the tutorial in my signature. Then you would want to save that file as /etc/grub.d/06_custom and make it executable. The 1st 2 steps pertain to making a custom background, but if you are not interested in that you could start at step 3. Also, on the last page are some replies from drs305 on how to add other OSs to grub2. Just make sure you enter sudo update-grub when you make any changes.

#885

Hi drs305,

I have a multi-booting system (11 systems) on one 80GB IDE HDD on P4 with 512MB RAM. Everything was fine until I upgraded my main system which is Lubuntu 11.10 to Lubuntu 12.04 and that was my first time ever to upgrade, I always do fresh new installation but I wanted to see what kind of mess the upgrade can make and I think I knew the answer.

Now, GRUB is acting up and I have 3 times the number of entries. I tried to use Boot Repair tool to re-install GRUB but that did not fix anything.

http://paste.ubuntu.com/965058/

I have no idea how to clean that mess. I need one entry for each system along with the recovery of that system ... just like any normal GRUB menu not like the mess I have right now.

I use that PC for testing and I always use GRUB Customizer to rename the entries after each installation. I'm not sure why the upgrade did this?

Thanks in advance :)

#886

Hi amjjawad,

I thought grub2 was using the two level menu, but my system also presented my with all my systems. But the first thing I do is turn off os-prober and add my own 40_custom.

Since I want to directly boot the newest kernel in every install I use the partition boot for all Ubuntu (Debian?) installs as they have the link to the newest in /.

Cavsfan's link is good as I also learned from Ranch Hand on using the partition boot method. I usually throw in a few ISO boots (from drs305's instructions) and other things.

#887

oldfred said: Hi amjjawad,

I thought grub2 was using the two level menu, but my system also presented my with all my systems. But the first thing I do is turn off os-prober and add my own 40_custom.

Since I want to directly boot the newest kernel in every install I use the partition boot for all Ubuntu (Debian?) installs as they have the link to the newest in /.

Cavsfan's link is good as I also learned from Ranch Hand on using the partition boot method. I usually throw in a few ISO boots (from drs305's instructions) and other things.

Hello my friend oldfred :) long time no see!

I tried to purge GRUB and re-install it but I got the same issue, triple or double entries and I have no idea how to clean that up. Editing GRUB2 is a bit hard to me as I didn't dive deep into that yet. I'm good in fixing simple stuff but editing GRUB in such cases is new to me. I will try to look into that link and try to find a way but ... let's see :)

P.S. To explain it better: For example, I have say "Lubuntu 12.04 - 3.2.0-24-generic on sda12" repeated two or three times. It should be only one entry for the same Kernel.

#888

Are you sure it is repeated and not different kernels? You can houseclean old kernels in each install to reduce entries.

But if repeated, it may be a script issue in os-prober of some sort? We have seen where a user created multiple copies of some scripts.

Several ways to houseclean older kernels. I like to keep two as a minimum. Check current kernel: lsb_release -a Go to Synaptic Package Manager and search for linux-image. More info in post #8 http://ubuntuforums.org/showthread.php?t=1283521 HOWTO: Grub Customizer http://ubuntuforums.org/showthread.php?t=1664134 HOWTO: Remove Older Kernels via GUI (or CLI) http://ubuntuforums.org/showthread.php?t=1587462 http://www.liberiangeek.net/2010/07/remove-kernel-ubuntu-10-04-lucid-lynx-grub/

If you want to try 40_custom you can add just one of your other Ubuntu entires with this. pick the partition number and edit partition number and label. I think cavsfan link has more detail.

gksudo gedit /etc/grub.d/40_custom Then do: sudo update-grub

I first saw this from Ranch hand Note that this does not define the kernel. It defines the partition. It boots the newest bootable kernel that it finds at that partition. example based on sda13 change all 13's to your partition number.

menuentry "Ubuntu on sda13" { set root=(hd0,13) linux /vmlinuz root=/dev/sda13 ro quiet splash initrd /initrd.img }

If that boots your install in any of your partitions, then we can add all your other installs, and turn off os-prober. Then you only have one entry per install.

#889

Thanks oldfred for filling for drs305! I think he said he would be back Monday.

amjjawad, the How to in my signature seems intimidating at first but, the more you look at it the simpler it gets. When ranch hand first told me about how to do this, I was very intimidated myself too. It took me a while to actually do the steps. I thought since no one else had written a howto about it, with ranch hand's permission I created the tutorial. It is pretty straight forward and with patience anyone can do it.

If you just do steps 1 through 5. You will have the custom entries on top and all of what you now have will be below that. Just make sure you edit /etc/grub.d/40_custom put your custom entries in it and then save it as /etc/grub.d/06_custom. This is what causes it to display at the very top.

When you get more comfortable with what you have, you can do step 6. Then you will only have the custom entries that you want displayed.

Keep in mind that Grub2 considers the last installed kernel to be the default one and not the highest numbered kernel, which is what one would think.

#890

have a SSD with win7 and a Seagate 1tb drive that I just put 12.04 on.

when I boot it comes up with a " windows loading files" banner at the bottom ( much like when you first do a windows installation ) and then it boots straight to 12.04

lets change that ( have 2 computers side by side ) ...just installed updates and when rebooted it came up with a failed win7 message...do i want to fix error or continue booting.... I selected contine booting and straight to Ubuntu 12.04

help...GRUB doesnt show

edit" most probabley doesnt belong here as its just gone past a GRUB issue.... when I boot it gives me the option to Repair windows but nothing happens and if I select the other then it into 12.04.

#891

losbey said: have a SSD with win7 and a Seagate 1tb drive that I just put 12.04 on.

when I boot it comes up with a " windows loading files" banner at the bottom ( much like when you first do a windows installation ) and then it boots straight to 12.04

lets change that ( have 2 computers side by side ) ...just installed updates and when rebooted it came up with a failed win7 message...do i want to fix error or continue booting.... I selected contine booting and straight to Ubuntu 12.04

help...GRUB doesnt show

edit" most probabley doesnt belong here as its just gone past a GRUB issue.... when I boot it gives me the option to Repair windows but nothing happens and if I select the other then it into 12.04.

Try this: enter this gksu gedit /etc/default/grub in a terminal. Set GRUB_TIMEOUT=60 or 10 or whatever you want in seconds. If you want the grub to display until you press a key enter GRUB_TIMEOUT=-1. Be sure to enter sudo update-grub when finished or else the changes will be lost.

#892

@losbey

Download and run Boot-Repair. Run the Boot info report and post the link, so we can see your entire configuration. If adventurous you can run the boot repairs before we review it and it should not create any larger issues, but I would prefer to review first.

Boot Repair: https://help.ubuntu.com/community/Boot-Repair You can repair many boot issues with this or Create BootInfo report & post the link to a run of boot info script so we can see your exact configuration.

#893

oldfred said: Are you sure it is repeated and not different kernels?

A side of there are old Kernels,the menu is duplicated:

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-24-generic
Found initrd image: /boot/initrd.img-3.2.0-24-generic
Found linux image: /boot/vmlinuz-3.0.0-17-generic
Found initrd image: /boot/initrd.img-3.0.0-17-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Linux Mint 12 Lisa (12) on /dev/sda10
Found Ubuntu 11.10 (11.10) on /dev/sda11
Found Ubuntu 12.04 LTS (12.04) on /dev/sda12
Found Ubuntu precise (development branch) (12.04) on /dev/sda13
Found Ubuntu 11.10 (11.10) on /dev/sda16
Found Ubuntu 11.04 (11.04) on /dev/sda5
Found Ubuntu 11.10 (11.10) on /dev/sda6
Found Ubuntu 10.04.3 LTS (10.04) on /dev/sda7
Found Ubuntu 11.10 (11.10) on /dev/sda8
Found Linux Mint 11 LXDE (11) on /dev/sda9
Found Linux Mint 12 Lisa (12) on /dev/sda10
Found Ubuntu 11.10 (11.10) on /dev/sda11
Found Ubuntu 12.04 LTS (12.04) on /dev/sda12
Found Ubuntu precise (development branch) (12.04) on /dev/sda13
Found Ubuntu 11.10 (11.10) on /dev/sda16
Found Ubuntu 11.04 (11.04) on /dev/sda5
Found Ubuntu 11.10 (11.10) on /dev/sda6
Found Ubuntu 10.04.3 LTS (10.04) on /dev/sda7
Found Ubuntu 11.10 (11.10) on /dev/sda8
Found Linux Mint 11 LXDE (11) on /dev/sda9
done

You can houseclean old kernels in each install to reduce entries.

Yes my good friend, I'm aware of this but the duplication (I don't know what happened - I'm interested to find out), IMHO, must be fixed first or I could be wrong about this.

But if repeated, it may be a script issue in os-prober of some sort? We have seen where a user created multiple copies of some scripts.

I never ever use any script :D Everything was fine "before" the upgrade from Lubuntu 11.10 to Lubuntu 12.04 and I'm not exactly blaming the upgrade itself, but ... could be something happened to the GRUB Customizer? because I used to "Hide" the older Kernel using GRUB Customizer so that explains why the old Kernels are showing up again. However, that doesn't explain, IMHO, the duplication.

I like to keep two as a minimum.

Same here :)

If you want to try 40_custom you can add just one of your other Ubuntu entires with this. pick the partition number and edit partition number and label. I think cavsfan link has more detail.

gksudo gedit /etc/grub.d/40_custom Then do: sudo update-grub

I first saw this from Ranch hand Note that this does not define the kernel. It defines the partition. It boots the newest bootable kernel that it finds at that partition. example based on sda13 change all 13's to your partition number.

menuentry "Ubuntu on sda13" { set root=(hd0,13) linux /vmlinuz root=/dev/sda13 ro quiet splash initrd /initrd.img }

If that boots your install in any of your partitions, then we can add all your other installs, and turn off os-prober. Then you only have one entry per install.

Before I try that, does GRUB Customizer offer such feature or process? for me, I have two test machines with Multi-Booting Systems (not less than 6 systems minimum) and GRUB Customizer is a great tool to save time. I'd love to improve my skills with editing GRUB,etc but I don't have much time these days :)

Thanks a lot, oldfred for your help ... I'd like to find out what is going on with the duplication :)

P.S. @Cavsfan I may try that but first, I need to know the answer for my Qs above :) Thanks a lot :)

#894

amjjawad, what does this produce entered in terminal: ``` grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0


And this: **sudo grub-mkconfig**
#895

amjjawad,

The multip le entries may be coming from Grub2 'mining' information from other Grub menus. In other words, when Grub updates, it searches all the other partitions for bootable kernels and from Grub-readable menus.

It will look for grub.cfg and menu.lst files and can extract entries from those.

When I was troubleshooting this type of problem, I first looked at grub.cfg to see if all the duplicates were located in the 30_os-prober section. If so, I then looked at those partitions (based on the entry) to see what kind of old (or current) menus might be found by grub.

As a test, I would rename an entry in those menus and then run update-grub to see if the new name appeared in grub.cfg. For instance, I'd rename an entry "Ubuntu..." to "UUbuntu".

And don't forget if you use variations of Ubuntu (Mint, etc) the kernel title may be the same as that of your Ubuntu OS. I am not sure what the current policy is, but a while ago most of the variations still showed up as "Ubuntu, ..." even if it was really a Kubuntu installation, etc. Don't use those distros so I don't know if that is still the case.

#896

Cavsfan said: amjjawad, what does this produce entered in terminal: ```

grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0

0 Ubuntu, with Linux 3.2.0-24-generic 1 Ubuntu, with Linux 3.2.0-24-generic (recovery mode) 2 Ubuntu, with Linux 3.0.0-17-generic 3 Ubuntu, with Linux 3.0.0-17-generic (recovery mode) 4 Memory test (memtest86+) 5 Memory test (memtest86+, serial console 115200) 6 Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10) (on /dev/sda10) 7 Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10) -- recovery mode (on /dev/sda10) 8 Ubuntu 11.10 (11.10) (on /dev/sda11) 9 Ubuntu 11.10 (11.10) (on /dev/sda11) 10 Ubuntu 11.10 (11.10) (on /dev/sda11) 11 Ubuntu 11.10 (11.10) (on /dev/sda11) 12 Ubuntu 11.10 (11.10) (on /dev/sda11) 13 Ubuntu, with Linux 3.2.0-24-generic (on /dev/sda12) 14 Ubuntu, with Linux 3.2.0-24-generic (recovery mode) (on /dev/sda12) 15 Ubuntu, with Linux 3.2.0-21-generic (on /dev/sda12) 16 Ubuntu, with Linux 3.2.0-21-generic (recovery mode) (on /dev/sda12) 17 Ubuntu, with Linux 3.2.0-20-generic (on /dev/sda12) 18 Ubuntu, with Linux 3.2.0-20-generic (recovery mode) (on /dev/sda12) 19 Ubuntu, with Linux 3.2.0-14-generic-pae (on /dev/sda13) 20 Ubuntu, with Linux 3.2.0-14-generic-pae (recovery mode) (on /dev/sda13) 21 Ubuntu, with Linux 3.0.0-17-generic (on /dev/sda16) 22 Ubuntu, with Linux 3.0.0-17-generic (recovery mode) (on /dev/sda16) 23 Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda16) 24 Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda16) 25 Ubuntu, with Linux 2.6.38-8-generic (on /dev/sda5) 26 Ubuntu, with Linux 2.6.38-8-generic (recovery mode) (on /dev/sda5) 27 Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda6) 28 Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda6) 29 Ubuntu, with Linux 2.6.32-33-generic (on /dev/sda7) 30 Ubuntu, with Linux 2.6.32-33-generic (recovery mode) (on /dev/sda7) 31 Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda8) 32 Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda8) 33 Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) (on /dev/sda9) 34 Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) -- recovery mode (on /dev/sda9) 35 Ubuntu 11.10 (11.10) (on /dev/sda11) 36 Ubuntu 11.10 (11.10) (on /dev/sda11) 37 Ubuntu 11.10 (11.10) (on /dev/sda11) 38 Ubuntu 11.10 (11.10) (on /dev/sda11) 39 Ubuntu 11.10 (11.10) (on /dev/sda11) 40 Ubuntu 11.10 (11.10) (on /dev/sda11) 41 Ubuntu 11.10 (11.10) (on /dev/sda11) 42 Ubuntu 11.10 (11.10) (on /dev/sda11) 43 Ubuntu 11.10 (11.10) (on /dev/sda11) 44 Lubuntu 11.04, with Linux 2.6.38-8-generic (on /dev/sda5) 45 Lubuntu 11.04, with Linux 2.6.38-8-generic (recovery mode) (on /dev/sda5) 46 Xubuntu 11.10, with Linux 3.0.0-12-generic (on /dev/sda6) 47 Xubuntu 11.10, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda6) 48 Ubuntu 10.04, with Linux 2.6.32-33-generic (on /dev/sda7) 49 Ubuntu 10.04, with Linux 2.6.32-33-generic (recovery mode) (on /dev/sda7) 50 Ubuntu 11.10, with Linux 3.0.0-12-generic (on /dev/sda8) 51 Ubuntu 11.10, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda8) 52 Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) (on /dev/sda9) 53 Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) -- recovery mode (on /dev/sda9) 54 Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10) (on /dev/sda10) 55 Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10) -- recovery mode (on /dev/sda10) 56 Lubuntu 12.04, with Linux 3.2.0-24-generic (on /dev/sda12) 57 Lubuntu 12.04, with Linux 3.2.0-24-generic (recovery mode) (on /dev/sda12) 58 Ubuntu 12.04, with Linux 3.2.0-14-generic-pae (on /dev/sda13) 59 Ubuntu 12.04, with Linux 3.2.0-14-generic-pae (recovery mode) (on /dev/sda13) 60 Lubuntu 11.10 64bit, with Linux 3.0.0-17-generic (on /dev/sda16) 61 Lubuntu 11.10 64bit, with Linux 3.0.0-17-generic (recovery mode) (on /dev/sda16)


> And this: **sudo grub-mkconfig**


Are you sure you want to have a look at this? O_o

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="0" 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 { insmod vbe insmod vga insmod video_bochs insmod video_cirrus }

insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=800x600x16 load_video insmod gfxterm insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 set locale_dir=($root)/boot/grub/locale set lang=en_US insmod gettext fi terminal_output gfxterm if [ "${recordfail}" = 1 ]; then set timeout=-1 else set timeout=10 fi

END /etc/grub.d/00_header ###

BEGIN /etc/grub.d/05_debian_theme ###

set menu_color_normal=white/black set menu_color_highlight=black/light-gray

END /etc/grub.d/05_debian_theme ###

BEGIN /etc/grub.d/10_linux_proxy ###

Found linux image: /boot/vmlinuz-3.2.0-24-generic Found initrd image: /boot/initrd.img-3.2.0-24-generic Found linux image: /boot/vmlinuz-3.0.0-17-generic Found initrd image: /boot/initrd.img-3.0.0-17-generic menuentry "Ubuntu, with Linux 3.2.0-24-generic" --class ubuntu --class gnu-linux --class gnu --class os { recordfail set gfxpayload=$linux_gfx_mode insmod gzio insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 linux /boot/vmlinuz-3.2.0-24-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro quiet splash vt.handoff=7 initrd /boot/initrd.img-3.2.0-24-generic } menuentry "Ubuntu, with Linux 3.2.0-24-generic (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod gzio insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 echo 'Loading Linux 3.2.0-24-generic ...' linux /boot/vmlinuz-3.2.0-24-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro recovery nomodeset echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-3.2.0-24-generic } menuentry "Ubuntu, with Linux 3.0.0-17-generic" --class ubuntu --class gnu-linux --class gnu --class os { recordfail set gfxpayload=$linux_gfx_mode insmod gzio insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 linux /boot/vmlinuz-3.0.0-17-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro quiet splash vt.handoff=7 initrd /boot/initrd.img-3.0.0-17-generic } menuentry "Ubuntu, with Linux 3.0.0-17-generic (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod gzio insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 echo 'Loading Linux 3.0.0-17-generic ...' linux /boot/vmlinuz-3.0.0-17-generic root=UUID=ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 ro recovery nomodeset echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-3.0.0-17-generic } if [ ${recordfail} != 1 ]; then if [ -e ${prefix}/gfxblacklist.txt ]; then if hwmatch ${prefix}/gfxblacklist.txt 3; then if [ ${match} = 0 ]; then set linux_gfx_mode=keep else set linux_gfx_mode=text fi else set linux_gfx_mode=text fi else set linux_gfx_mode=keep fi else set linux_gfx_mode=text fi export linux_gfx_mode if [ "$linux_gfx_mode" != "text" ]; then load_video; fi

END /etc/grub.d/10_linux_proxy ###

BEGIN /etc/grub.d/20_linux_xen ###

END /etc/grub.d/20_linux_xen ###

BEGIN /etc/grub.d/20_memtest86+ ###

Found memtest86+ image: /boot/memtest86+.bin menuentry "Memory test (memtest86+)" { insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 linux16 /boot/memtest86+.bin } menuentry "Memory test (memtest86+, serial console 115200)" { insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set=root ae0e04b8-d7cd-4dd8-bd64-cc903be3c3f7 linux16 /boot/memtest86+.bin console=ttyS0,115200n8 }

END /etc/grub.d/20_memtest86+ ###

BEGIN /etc/grub.d/30_os-prober ###

Found Linux Mint 12 Lisa (12) on /dev/sda10 menuentry "Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10) (on /dev/sda10)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos10)' search --no-floppy --fs-uuid --set=root 445b78db-cee9-42b6-bdae-082f7392bb8e linux /boot/vmlinuz-3.0.0-12-generic root=UUID=445b78db-cee9-42b6-bdae-082f7392bb8e ro quiet splash vt.handoff=7 initrd /boot/initrd.img-3.0.0-12-generic } menuentry "Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10) -- recovery mode (on /dev/sda10)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos10)' search --no-floppy --fs-uuid --set=root 445b78db-cee9-42b6-bdae-082f7392bb8e linux /boot/vmlinuz-3.0.0-12-generic root=UUID=445b78db-cee9-42b6-bdae-082f7392bb8e ro recovery nomodeset initrd /boot/initrd.img-3.0.0-12-generic } Found Ubuntu 11.10 (11.10) on /dev/sda11 menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos11)' search --no-floppy --fs-uuid --set=root 2e60cde8-6769-4a01-ad7a-f6de859b2a2d linux /vmlinuz root=/dev/sda11 initrd /initrd.img } menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos11)' search --no-floppy --fs-uuid --set=root 2e60cde8-6769-4a01-ad7a-f6de859b2a2d linux /vmlinuz root=/dev/sda11 initrd /initrd.img } menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos11)' search --no-floppy --fs-uuid --set=root 2e60cde8-6769-4a01-ad7a-f6de859b2a2d linux /boot/vmlinuz-3.0.0-17-generic root=/dev/sda11 initrd /boot/initrd.img-3.0.0-17-generic } menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos11)' search --no-floppy --fs-uuid --set=root 2e60cde8-6769-4a01-ad7a-f6de859b2a2d linux /vmlinuz root=/dev/sda11 initrd /initrd.img } menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos11)' search --no-floppy --fs-uuid --set=root 2e60cde8-6769-4a01-ad7a-f6de859b2a2d linux /vmlinuz root=/dev/sda11 initrd /initrd.img } Found Ubuntu 12.04 LTS (12.04) on /dev/sda12 menuentry "Ubuntu, with Linux 3.2.0-24-generic (on /dev/sda12)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos12)' search --no-floppy --fs-uuid --set=root 73b3fc49-77bc-4229-a158-14b4d1812733 linux /boot/vmlinuz-3.2.0-24-generic root=UUID=73b3fc49-77bc-4229-a158-14b4d1812733 ro quiet splash $vt_handoff initrd /boot/initrd.img-3.2.0-24-generic } menuentry "Ubuntu, with Linux 3.2.0-24-generic (recovery mode) (on /dev/sda12)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos12)' search --no-floppy --fs-uuid --set=root 73b3fc49-77bc-4229-a158-14b4d1812733 linux /boot/vmlinuz-3.2.0-24-generic root=UUID=73b3fc49-77bc-4229-a158-14b4d1812733 ro recovery nomodeset initrd /boot/initrd.img-3.2.0-24-generic } menuentry "Ubuntu, with Linux 3.2.0-21-generic (on /dev/sda12)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos12)' search --no-floppy --fs-uuid --set=root 73b3fc49-77bc-4229-a158-14b4d1812733 linux /boot/vmlinuz-3.2.0-21-generic root=UUID=73b3fc49-77bc-4229-a158-14b4d1812733 ro quiet splash $vt_handoff initrd /boot/initrd.img-3.2.0-21-generic } menuentry "Ubuntu, with Linux 3.2.0-21-generic (recovery mode) (on /dev/sda12)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos12)' search --no-floppy --fs-uuid --set=root 73b3fc49-77bc-4229-a158-14b4d1812733 linux /boot/vmlinuz-3.2.0-21-generic root=UUID=73b3fc49-77bc-4229-a158-14b4d1812733 ro recovery nomodeset initrd /boot/initrd.img-3.2.0-21-generic } menuentry "Ubuntu, with Linux 3.2.0-20-generic (on /dev/sda12)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos12)' search --no-floppy --fs-uuid --set=root 73b3fc49-77bc-4229-a158-14b4d1812733 linux /boot/vmlinuz-3.2.0-20-generic root=UUID=73b3fc49-77bc-4229-a158-14b4d1812733 ro quiet splash $vt_handoff initrd /boot/initrd.img-3.2.0-20-generic } menuentry "Ubuntu, with Linux 3.2.0-20-generic (recovery mode) (on /dev/sda12)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos12)' search --no-floppy --fs-uuid --set=root 73b3fc49-77bc-4229-a158-14b4d1812733 linux /boot/vmlinuz-3.2.0-20-generic root=UUID=73b3fc49-77bc-4229-a158-14b4d1812733 ro recovery nomodeset initrd /boot/initrd.img-3.2.0-20-generic } Found Ubuntu precise (development branch) (12.04) on /dev/sda13 menuentry "Ubuntu, with Linux 3.2.0-14-generic-pae (on /dev/sda13)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos13)' search --no-floppy --fs-uuid --set=root 46bbff7b-efdf-433a-a73c-c201796d2962 linux /boot/vmlinuz-3.2.0-14-generic-pae root=UUID=46bbff7b-efdf-433a-a73c-c201796d2962 ro quiet splash vt.handoff=7 initrd /boot/initrd.img-3.2.0-14-generic-pae } menuentry "Ubuntu, with Linux 3.2.0-14-generic-pae (recovery mode) (on /dev/sda13)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos13)' search --no-floppy --fs-uuid --set=root 46bbff7b-efdf-433a-a73c-c201796d2962 linux /boot/vmlinuz-3.2.0-14-generic-pae root=UUID=46bbff7b-efdf-433a-a73c-c201796d2962 ro recovery nomodeset initrd /boot/initrd.img-3.2.0-14-generic-pae } Found Ubuntu 11.10 (11.10) on /dev/sda16 menuentry "Ubuntu, with Linux 3.0.0-17-generic (on /dev/sda16)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos16)' search --no-floppy --fs-uuid --set=root f51328dd-02a5-4473-843f-6563fd37fe38 linux /boot/vmlinuz-3.0.0-17-generic root=UUID=f51328dd-02a5-4473-843f-6563fd37fe38 ro quiet splash vt.handoff=7 initrd /boot/initrd.img-3.0.0-17-generic } menuentry "Ubuntu, with Linux 3.0.0-17-generic (recovery mode) (on /dev/sda16)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos16)' search --no-floppy --fs-uuid --set=root f51328dd-02a5-4473-843f-6563fd37fe38 linux /boot/vmlinuz-3.0.0-17-generic root=UUID=f51328dd-02a5-4473-843f-6563fd37fe38 ro recovery nomodeset initrd /boot/initrd.img-3.0.0-17-generic } menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda16)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos16)' search --no-floppy --fs-uuid --set=root f51328dd-02a5-4473-843f-6563fd37fe38 linux /boot/vmlinuz-3.0.0-12-generic root=UUID=f51328dd-02a5-4473-843f-6563fd37fe38 ro quiet splash vt.handoff=7 initrd /boot/initrd.img-3.0.0-12-generic } menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda16)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos16)' search --no-floppy --fs-uuid --set=root f51328dd-02a5-4473-843f-6563fd37fe38 linux /boot/vmlinuz-3.0.0-12-generic root=UUID=f51328dd-02a5-4473-843f-6563fd37fe38 ro recovery nomodeset initrd /boot/initrd.img-3.0.0-12-generic } Found Ubuntu 11.04 (11.04) on /dev/sda5 menuentry "Ubuntu, with Linux 2.6.38-8-generic (on /dev/sda5)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos5)' search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro quiet splash vt.handoff=7 initrd /boot/initrd.img-2.6.38-8-generic } menuentry "Ubuntu, with Linux 2.6.38-8-generic (recovery mode) (on /dev/sda5)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos5)' search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro single initrd /boot/initrd.img-2.6.38-8-generic } Found Ubuntu 11.10 (11.10) on /dev/sda6 menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda6)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos6)' search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7 linux /boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro quiet splash vt.handoff=7 initrd /boot/initrd.img-3.0.0-12-generic } menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda6)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos6)' search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7 linux /boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro recovery nomodeset initrd /boot/initrd.img-3.0.0-12-generic } Found Ubuntu 10.04.3 LTS (10.04) on /dev/sda7 menuentry "Ubuntu, with Linux 2.6.32-33-generic (on /dev/sda7)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos7)' search --no-floppy --fs-uuid --set=root 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 linux /boot/vmlinuz-2.6.32-33-generic root=UUID=6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 ro quiet splash initrd /boot/initrd.img-2.6.32-33-generic } menuentry "Ubuntu, with Linux 2.6.32-33-generic (recovery mode) (on /dev/sda7)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos7)' search --no-floppy --fs-uuid --set=root 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 linux /boot/vmlinuz-2.6.32-33-generic root=UUID=6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 ro single initrd /boot/initrd.img-2.6.32-33-generic } Found Ubuntu 11.10 (11.10) on /dev/sda8 menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda8)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos8)' search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233 linux /boot/vmlinuz-3.0.0-12-generic root=UUID=a829565c-3153-4124-9493-9410a2c45233 ro quiet splash vt.handoff=7 initrd /boot/initrd.img-3.0.0-12-generic } menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda8)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos8)' search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233 linux /boot/vmlinuz-3.0.0-12-generic root=UUID=a829565c-3153-4124-9493-9410a2c45233 ro recovery nomodeset initrd /boot/initrd.img-3.0.0-12-generic } Found Linux Mint 11 LXDE (11) on /dev/sda9 menuentry "Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) (on /dev/sda9)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos9)' search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085 linux /boot/vmlinuz-2.6.38-8-generic root=UUID=5c720c72-47c1-4292-8c2e-fc66f4a6a085 ro quiet splash vt.handoff=7 initrd /boot/initrd.img-2.6.38-8-generic } menuentry "Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) -- recovery mode (on /dev/sda9)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos9)' search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085 linux /boot/vmlinuz-2.6.38-8-generic root=UUID=5c720c72-47c1-4292-8c2e-fc66f4a6a085 ro single initrd /boot/initrd.img-2.6.38-8-generic }

END /etc/grub.d/30_os-prober ###

BEGIN /etc/grub.d/30_os-prober_proxy ###

Found Linux Mint 12 Lisa (12) on /dev/sda10 Found Ubuntu 11.10 (11.10) on /dev/sda11 Found Ubuntu 12.04 LTS (12.04) on /dev/sda12 Found Ubuntu precise (development branch) (12.04) on /dev/sda13 Found Ubuntu 11.10 (11.10) on /dev/sda16 Found Ubuntu 11.04 (11.04) on /dev/sda5 Found Ubuntu 11.10 (11.10) on /dev/sda6 Found Ubuntu 10.04.3 LTS (10.04) on /dev/sda7 Found Ubuntu 11.10 (11.10) on /dev/sda8 Found Linux Mint 11 LXDE (11) on /dev/sda9 menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos11)' search --no-floppy --fs-uuid --set=root 2e60cde8-6769-4a01-ad7a-f6de859b2a2d linux /vmlinuz root=/dev/sda11 initrd /initrd.img } menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos11)' search --no-floppy --fs-uuid --set=root 2e60cde8-6769-4a01-ad7a-f6de859b2a2d linux /vmlinuz root=/dev/sda11 initrd /initrd.img } menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos11)' search --no-floppy --fs-uuid --set=root 2e60cde8-6769-4a01-ad7a-f6de859b2a2d linux /vmlinuz root=/dev/sda11 initrd /initrd.img } menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos11)' search --no-floppy --fs-uuid --set=root 2e60cde8-6769-4a01-ad7a-f6de859b2a2d linux /vmlinuz root=/dev/sda11 initrd /initrd.img } menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos11)' search --no-floppy --fs-uuid --set=root 2e60cde8-6769-4a01-ad7a-f6de859b2a2d linux /vmlinuz root=/dev/sda11 initrd /initrd.img } menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos11)' search --no-floppy --fs-uuid --set=root 2e60cde8-6769-4a01-ad7a-f6de859b2a2d linux /vmlinuz root=/dev/sda11 initrd /initrd.img } menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos11)' search --no-floppy --fs-uuid --set=root 2e60cde8-6769-4a01-ad7a-f6de859b2a2d linux /vmlinuz root=/dev/sda11 initrd /initrd.img } menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos11)' search --no-floppy --fs-uuid --set=root 2e60cde8-6769-4a01-ad7a-f6de859b2a2d linux /vmlinuz root=/dev/sda11 initrd /initrd.img } menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos11)' search --no-floppy --fs-uuid --set=root 2e60cde8-6769-4a01-ad7a-f6de859b2a2d linux /vmlinuz root=/dev/sda11 initrd /initrd.img } menuentry "Lubuntu 11.04, with Linux 2.6.38-8-generic (on /dev/sda5)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos5)' search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro quiet splash vt.handoff=7 initrd /boot/initrd.img-2.6.38-8-generic } menuentry "Lubuntu 11.04, with Linux 2.6.38-8-generic (recovery mode) (on /dev/sda5)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos5)' search --no-floppy --fs-uuid --set=root 0838b5c2-12fe-47c1-8ba3-397e4b8242da linux /boot/vmlinuz-2.6.38-8-generic root=UUID=0838b5c2-12fe-47c1-8ba3-397e4b8242da ro single initrd /boot/initrd.img-2.6.38-8-generic } menuentry "Xubuntu 11.10, with Linux 3.0.0-12-generic (on /dev/sda6)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos6)' search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7 linux /boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro quiet splash vt.handoff=7 initrd /boot/initrd.img-3.0.0-12-generic } menuentry "Xubuntu 11.10, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda6)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos6)' search --no-floppy --fs-uuid --set=root 260b48a1-7e39-4085-afa1-a9c8b4c96da7 linux /boot/vmlinuz-3.0.0-12-generic root=UUID=260b48a1-7e39-4085-afa1-a9c8b4c96da7 ro recovery nomodeset initrd /boot/initrd.img-3.0.0-12-generic } menuentry "Ubuntu 10.04, with Linux 2.6.32-33-generic (on /dev/sda7)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos7)' search --no-floppy --fs-uuid --set=root 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 linux /boot/vmlinuz-2.6.32-33-generic root=UUID=6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 ro quiet splash initrd /boot/initrd.img-2.6.32-33-generic } menuentry "Ubuntu 10.04, with Linux 2.6.32-33-generic (recovery mode) (on /dev/sda7)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos7)' search --no-floppy --fs-uuid --set=root 6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 linux /boot/vmlinuz-2.6.32-33-generic root=UUID=6c1df292-b0b7-4eed-930d-4ad07bd9a1f5 ro single initrd /boot/initrd.img-2.6.32-33-generic } menuentry "Ubuntu 11.10, with Linux 3.0.0-12-generic (on /dev/sda8)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos8)' search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233 linux /boot/vmlinuz-3.0.0-12-generic root=UUID=a829565c-3153-4124-9493-9410a2c45233 ro quiet splash vt.handoff=7 initrd /boot/initrd.img-3.0.0-12-generic } menuentry "Ubuntu 11.10, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda8)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos8)' search --no-floppy --fs-uuid --set=root a829565c-3153-4124-9493-9410a2c45233 linux /boot/vmlinuz-3.0.0-12-generic root=UUID=a829565c-3153-4124-9493-9410a2c45233 ro recovery nomodeset initrd /boot/initrd.img-3.0.0-12-generic } menuentry "Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) (on /dev/sda9)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos9)' search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085 linux /boot/vmlinuz-2.6.38-8-generic root=UUID=5c720c72-47c1-4292-8c2e-fc66f4a6a085 ro quiet splash vt.handoff=7 initrd /boot/initrd.img-2.6.38-8-generic } menuentry "Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) -- recovery mode (on /dev/sda9)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos9)' search --no-floppy --fs-uuid --set=root 5c720c72-47c1-4292-8c2e-fc66f4a6a085 linux /boot/vmlinuz-2.6.38-8-generic root=UUID=5c720c72-47c1-4292-8c2e-fc66f4a6a085 ro single initrd /boot/initrd.img-2.6.38-8-generic } menuentry "Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10) (on /dev/sda10)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos10)' search --no-floppy --fs-uuid --set=root 445b78db-cee9-42b6-bdae-082f7392bb8e linux /boot/vmlinuz-3.0.0-12-generic root=UUID=445b78db-cee9-42b6-bdae-082f7392bb8e ro quiet splash vt.handoff=7 initrd /boot/initrd.img-3.0.0-12-generic } menuentry "Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10) -- recovery mode (on /dev/sda10)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos10)' search --no-floppy --fs-uuid --set=root 445b78db-cee9-42b6-bdae-082f7392bb8e linux /boot/vmlinuz-3.0.0-12-generic root=UUID=445b78db-cee9-42b6-bdae-082f7392bb8e ro recovery nomodeset initrd /boot/initrd.img-3.0.0-12-generic } menuentry "Lubuntu 12.04, with Linux 3.2.0-24-generic (on /dev/sda12)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos12)' search --no-floppy --fs-uuid --set=root 73b3fc49-77bc-4229-a158-14b4d1812733 linux /boot/vmlinuz-3.2.0-24-generic root=UUID=73b3fc49-77bc-4229-a158-14b4d1812733 ro quiet splash $vt_handoff initrd /boot/initrd.img-3.2.0-24-generic } menuentry "Lubuntu 12.04, with Linux 3.2.0-24-generic (recovery mode) (on /dev/sda12)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos12)' search --no-floppy --fs-uuid --set=root 73b3fc49-77bc-4229-a158-14b4d1812733 linux /boot/vmlinuz-3.2.0-24-generic root=UUID=73b3fc49-77bc-4229-a158-14b4d1812733 ro recovery nomodeset initrd /boot/initrd.img-3.2.0-24-generic } menuentry "Ubuntu 12.04, with Linux 3.2.0-14-generic-pae (on /dev/sda13)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos13)' search --no-floppy --fs-uuid --set=root 46bbff7b-efdf-433a-a73c-c201796d2962 linux /boot/vmlinuz-3.2.0-14-generic-pae root=UUID=46bbff7b-efdf-433a-a73c-c201796d2962 ro quiet splash vt.handoff=7 initrd /boot/initrd.img-3.2.0-14-generic-pae } menuentry "Ubuntu 12.04, with Linux 3.2.0-14-generic-pae (recovery mode) (on /dev/sda13)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos13)' search --no-floppy --fs-uuid --set=root 46bbff7b-efdf-433a-a73c-c201796d2962 linux /boot/vmlinuz-3.2.0-14-generic-pae root=UUID=46bbff7b-efdf-433a-a73c-c201796d2962 ro recovery nomodeset initrd /boot/initrd.img-3.2.0-14-generic-pae } menuentry "Lubuntu 11.10 64bit, with Linux 3.0.0-17-generic (on /dev/sda16)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos16)' search --no-floppy --fs-uuid --set=root f51328dd-02a5-4473-843f-6563fd37fe38 linux /boot/vmlinuz-3.0.0-17-generic root=UUID=f51328dd-02a5-4473-843f-6563fd37fe38 ro quiet splash vt.handoff=7 initrd /boot/initrd.img-3.0.0-17-generic } menuentry "Lubuntu 11.10 64bit, with Linux 3.0.0-17-generic (recovery mode) (on /dev/sda16)" --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos16)' search --no-floppy --fs-uuid --set=root f51328dd-02a5-4473-843f-6563fd37fe38 linux /boot/vmlinuz-3.0.0-17-generic root=UUID=f51328dd-02a5-4473-843f-6563fd37fe38 ro recovery nomodeset initrd /boot/initrd.img-3.0.0-17-generic }

END /etc/grub.d/30_os-prober_proxy ###

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 $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi

END /etc/grub.d/41_custom ###

done


By the way, the execution of this commend: ```
sudo grub-mkconfig

I don't know, perhaps because I have tons of installed systems? or it's a problem somewhere else? even updating GRUB takes SO long on this machine.

Yes, the HDD is IDE but, as far as I can tell, it never was that slow before. My guess it's because of the systems I have installed. Slow when it comes to the execution of commands like

sudo update-grub
#897

drs305 said: And don't forget if you use variations of Ubuntu (Mint, etc) the kernel title may be the same as that of your Ubuntu OS. I am not sure what the current policy is, but a while ago most of the variations still showed up as "Ubuntu, ..." even if it was really a Kubuntu installation, etc. Don't use those distros so I don't know if that is still the case.

Yes my friend drs305, it is still the case until now. As long as the system (distro) shares the same core as Ubuntu, it will shows as "Ubuntu" not as "Lubuntu" or "Xubuntu" unless you rename it and I always do that after I'm done with installation and I use GRUB Customizer for that to make my life easier.

This might not be the same case but I think it's for the same reason (all Ubuntu variants share the same core), there is this bug: https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/990091

and my comment here already states that: https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/990091/comments/2

I have posted the output of the commends on my previous post. This might enlighten us to find out what is wrong?

#898

Thankfully the Grub specialist drs305 is back! Hopefully he will be able to use that output to help fix your problem. Man, that is a lot of operating systems! You definitely could benefit from my How To when ever you get the duplicates out of the mix. Here is my output of

grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0
cavsfan@cavsfan-desktop:~$ grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0
     0	Ubuntu Lucid Lynx
     1	Ubuntu Lucid Lynx (Recovery Mode)
     2	Windows 7

I have 3 entries and that's it!

#899

I hope this helps. I figure this out: I counted 60 menu entries!


4  menuentries in 10_linux_proxy
2  menuentries in 20_memtest86+
27 menuentries in 30_os-prober
27 menuentries in 30_os-prober_proxy

sudo chmod -x /etc/grub.d/30_os-prober

But, we better wait on drs305's insight first and see what he thinks. I noticed you don't have a 10_linux file but, have a 10_linux_proxy, 30_os-prober and 30_os-prober_proxy files.

#900

Cavsfan said: Thankfully the Grub specialist drs305 is back! Hopefully he will be able to use that output to help fix your problem.

That is why I posted here :P However, I'm sure you and oldfred are doing a great job too. I know oldfred for 2 years now or maybe more but I don't think we have met :) glad to know another user who is obsessed about GRUB like us :D

Man, that is a lot of operating systems! You definitely could benefit from my How To when ever you get the duplicates out of the mix.

Here is my output of

grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0
cavsfan@cavsfan-desktop:~$ grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0
     0	Ubuntu Lucid Lynx
     1	Ubuntu Lucid Lynx (Recovery Mode)
     2	Windows 7

I have 3 entries and that's it!

I'm a HOWTO writer as well, tester, a member of Lubuntu Team, etc so I need such setup :) Yeah, I know this is TOO much ;)

Cavsfan said: I hope this helps. I figure this out: I counted 60 menu entries!


4  menuentries in 10_linux_proxy
2  menuentries in 20_memtest86+
27 menuentries in 30_os-prober
27 menuentries in 30_os-prober_proxy

sudo chmod -x /etc/grub.d/30_os-prober

But, we better wait on drs305's insight first and see what he thinks. I noticed you don't have a 10_linux file but, have a 10_linux_proxy, 30_os-prober and 30_os-prober_proxy files.

Ok, let's wait and see :)

Thank you so much!

#901

I'm still working on it. I see several duplicates but, not sure what to do. I'll work on it a bit more and see if I can help.

You are very welcome! This is challenging and I like a challenge. Not sure If I am up to it but I know drs305 is. I am hoping I can save him some time and provide some worth while info on your system.

Actually I got most of my info from ranch hand about writing the How To. I know drs305 as he has helped me many times and I have tried to help out when I notice he may be out of town. That is if it is something small that I can understand. I have seen oldfred on here a lot helping with grub and I know he knows a lot about dual booting Ubuntu and windows too. This is a very good forum! :)

#902

It would definitely not be right to do this sudo chmod -x /etc/grub.d/30_os-prober. It looks like several things are duplicated between 10_linux_proxy, 30_os-prober and 30_os-prober_proxy. But, since you cannot edit them I don't know what to do. The following lines are all of the menuentry lines from your grub-mkconfig output. This is from the 4 files that have menuentry in them and the blank line denotes end of file. Hopefully drs305 can make sense of this data and get to the bottom of this. And hopefully all of this is useful to drs305. I am at the end of my ability to help further but, I tried. :)


menuentry "Ubuntu, with Linux 3.2.0-24-generic" --class ubuntu --class gnu-linux --class gnu --class os
menuentry "Ubuntu, with Linux 3.2.0-24-generic (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os
menuentry "Ubuntu, with Linux 3.0.0-17-generic" --class ubuntu --class gnu-linux --class gnu --class os
menuentry "Ubuntu, with Linux 3.0.0-17-generic (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os

menuentry "Memory test (memtest86+)
menuentry "Memory test (memtest86+, serial console 115200)

menuentry "Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10) (on /dev/sda10)" --class gnu-linux --class gnu --class os
menuentry "Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10) -- recovery mode (on /dev/sda10)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu, with Linux 3.2.0-24-generic (on /dev/sda12)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu, with Linux 3.2.0-24-generic (recovery mode) (on /dev/sda12)
menuentry "Ubuntu, with Linux 3.2.0-21-generic (on /dev/sda12)
menuentry "Ubuntu, with Linux 3.2.0-21-generic (recovery mode) (on /dev/sda12)
menuentry "Ubuntu, with Linux 3.2.0-20-generic (on /dev/sda12)
menuentry "Ubuntu, with Linux 3.2.0-20-generic (recovery mode) (on /dev/sda12)
menuentry "Ubuntu, with Linux 3.2.0-14-generic-pae (on /dev/sda13)
menuentry "Ubuntu, with Linux 3.2.0-14-generic-pae (recovery mode) (on /dev/sda13)
menuentry "Ubuntu, with Linux 3.0.0-17-generic (on /dev/sda16)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu, with Linux 3.0.0-17-generic (recovery mode) (on /dev/sda16)
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda16)
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda16)
menuentry "Ubuntu, with Linux 2.6.38-8-generic (on /dev/sda5)
menuentry "Ubuntu, with Linux 2.6.38-8-generic (recovery mode) (on /dev/sda5)
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda6)
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda6)
menuentry "Ubuntu, with Linux 2.6.32-33-generic (on /dev/sda7)
menuentry "Ubuntu, with Linux 2.6.32-33-generic (recovery mode) (on /dev/sda7)
menuentry "Ubuntu, with Linux 3.0.0-12-generic (on /dev/sda8)
menuentry "Ubuntu, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda8)
menuentry "Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) (on /dev/sda9)
menuentry "Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) -- recovery mode (on /dev/sda9)

menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 11.10 (11.10) (on /dev/sda11)" --class gnu-linux --class gnu --class os
menuentry "Lubuntu 11.04, with Linux 2.6.38-8-generic (on /dev/sda5)" --class gnu-linux --class gnu --class os
menuentry "Lubuntu 11.04, with Linux 2.6.38-8-generic (recovery mode) (on /dev/sda5)
menuentry "Xubuntu 11.10, with Linux 3.0.0-12-generic (on /dev/sda6)" --class gnu-linux --class gnu --class os
menuentry "Xubuntu 11.10, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda6)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 10.04, with Linux 2.6.32-33-generic (on /dev/sda7)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 10.04, with Linux 2.6.32-33-generic (recovery mode) (on /dev/sda7)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 11.10, with Linux 3.0.0-12-generic (on /dev/sda8)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 11.10, with Linux 3.0.0-12-generic (recovery mode) (on /dev/sda8)" --class gnu-linux --class gnu --class os
menuentry "Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) (on /dev/sda9)" --class gnu-linux --class gnu --class os
menuentry "Linux Mint 11 LXDE, 2.6.38-8-generic (/dev/sda9) -- recovery mode (on /dev/sda9)" --class gnu-linux --class gnu --class os
menuentry "Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10) (on /dev/sda10)" --class gnu-linux --class gnu --class os
menuentry "Linux Mint 12 32-bit, 3.0.0-12-generic (/dev/sda10) -- recovery mode (on /dev/sda10)" --class gnu-linux --class gnu --class os
menuentry "Lubuntu 12.04, with Linux 3.2.0-24-generic (on /dev/sda12)" --class gnu-linux --class gnu --class os
menuentry "Lubuntu 12.04, with Linux 3.2.0-24-generic (recovery mode) (on /dev/sda12)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 12.04, with Linux 3.2.0-14-generic-pae (on /dev/sda13)" --class gnu-linux --class gnu --class os
menuentry "Ubuntu 12.04, with Linux 3.2.0-14-generic-pae (recovery mode) (on /dev/sda13)" --class gnu-linux --class gnu --class os
menuentry "Lubuntu 11.10 64bit, with Linux 3.0.0-17-generic (on /dev/sda16)" --class gnu-linux --class gnu --class os
menuentry "Lubuntu 11.10 64bit, with Linux 3.0.0-17-generic (recovery mode) (on /dev/sda16)" --class gnu-linux --class gnu --class os
#903

I've just returned from 2+ weeks of vacation, without any electronics. I'm still trying to catch up.

I'd agree with Cavsfan's approach and try to simplify things. You can do this in several ways. Since the update time is pretty long, I'd most likely create a custom menu as suggested by Cavsfan and then turn off 30_os-prober.

To just reduce the kernels you currently have:

In general, you don't need more than 2 kernels in any release, and with your experience, you could remove the older one after a week or so once you know the current kernel works. You can add a kernel back via chroot if necessary and if a release does break, it's not like you are going to be without an OS! ;-)

Before you leave any OS run it's "update-grub" so it's grub.cfg file is updated (and hopefully reduced).

At the top of your list, your current OS has both 3.2 and 3.0 kernels. I doubt you need either of the 3.0 ones in that release any longer.

You can also disable the recovery mode on all your releases. To get into the recovery mode from any Grub menu, press E, remove "quiet splash" and whatever follows and replace it with "single" on the 'linux' line. Then F10 or CTRL-X to boot into the recovery mode.

For the following: I haven't thought it through completely, but I think it's from your sda11 installation that you are getting all the 11,10 entries. If you aren't successful I'll come back and more thoroughly inspect your output when I have a bit more time.

Within grub.cfg it is picking up:

Found Linux Mint 12 Lisa (12) on /dev/sda10 Found Ubuntu 11.10 (11.10) on /dev/sda11 Found Ubuntu 12.04 LTS (12.04) on /dev/sda12 Found Ubuntu precise (development branch) (12.04) on /dev/sda13 Found Ubuntu 11.10 (11.10) on /dev/sda16 Found Ubuntu 11.04 (11.04) on /dev/sda5 Found Ubuntu 11.10 (11.10) on /dev/sda6 Found Ubuntu 10.04.3 LTS (10.04) on /dev/sda7 Found Ubuntu 11.10 (11.10) on /dev/sda8 Found Linux Mint 11 LXDE (11) on /dev/sda9 These are all erroneous entries - probably text being imported. It could come from a bad custom menu that contains that text. Look in your sda11 installation and see if you can find them and remove them. As a quick/dirty fix, open the sda11 grub.cfg file. If these entries are within, manually remove all those entries and don't run sda11's update-grub until you find the culprit.

#904

Cavsfan said: I'm still working on it. I see several duplicates but, not sure what to do. I'll work on it a bit more and see if I can help.

This is very nice of you and I appreciate that you do :)

You are very welcome! This is challenging and I like a challenge. Not sure If I am up to it but I know drs305 is.

I am hoping I can save him some time and provide some worth while info on your system. We have something in common, two actually, that what I expected from the first time you replied my post and I was right about it :D I too love GRUB Problems and I too love challenges :D However, I can't beat drs305 and oldfred yet :D

Everything counts. Enough you are trying to help IMHO :)

Actually I got most of my info from ranch hand about writing the How To. I know drs305 as he has helped me many times and I have tried to help

out when I notice he may be out of town. That is if it is something small that I can understand. I have seen oldfred on here a lot helping with grub and I know he knows a lot about dual booting Ubuntu and windows too. This is a very good forum! :)

Me, drs305, oldfred and YesWeCan, once we had a very very complicated case and we all were working on it. That thread was a battle. I know all those guys, they are the best, no question about it.

Indeed, this is the best forum and that is exactly why I'm still here despite some negative stuff :) I just love it.

I have learned almost everything about Linux from here.

Oh yes, yet another something in common between me and you ;)

Time to log off now!

#905

Not sure I can add a whole lot, but where is the proxy versions coming from? I do not have those in my scripts, so are they copies for some reason?

Also many of the 11.10 entries are just the type Cavsfan & I use as the Ranch Hand partition boot stanza, not a typical os-prober boot stanza that finds the specific kernel. It is almost like 11.10 has some manual entries and the proxy version is copying the entire grub.cfg from 11.10?

I also have a lot of entries, so one of the first things I do with a new version is turn off os-prober, copy in my 40_custom and maybe edit it to pick up my last install (& maybe delete showing one old one) as I just keep adding / partitions. My 40_custom is just the partition boot stanzas and it now even it getting too large.

#906

Ranch hand told me to edit 40_custom but, then save it as 06_custom. That way 40_custom is preserved and the custom entries will always be the first thing displayed even if or when you have the other grub files still executable.

That's my 2 cents! :)

#907

Very helpful info, thank you for posting. :)

#908

I think I can tell what was going on but not sure if I will explain that correctly. Before Upgrading Lubuntu 11.10 32bit to 12.04, everything was OK. After each installation to any OS, I run GRUB Customizer (of course after updating GRUB) and rename the entry for the new OS. As you know, sometimes, the upgrade from release to a newer release will affect some applications. I have checked the repositories and GRUB Customizer PPA was disabled.

1- Why there was many entries for Ubuntu 11.10? that is a mini Ubuntu installation that had some errors and connection loss and after I was done from that installation, updating GRUB created many entries even before the upgrade.

I have formatted sda11 - I don't need that right now. I may re-install ubuntu mini later if I need to do some tests, etc.


Ubuntu 11.10 (11.10) (on /dev/sda11)
Ubuntu 11.10 (11.10) (on /dev/sda11)
Ubuntu 11.10 (11.10) (on /dev/sda11)
Ubuntu 11.10 (11.10) (on /dev/sda11)
Ubuntu 11.10 (11.10) (on /dev/sda11)

2- Why there was a duplicate? Looks like after the upgrade (and it seems I chose the wrong option during the upgrade when it asked me about GRUB), updating grub created another entries for each installation + the old entries which I have renamed myself using GRUB Customizer was there too.

I have noticed when it says:

Ubuntu, with Linux 3.0.0-17-generic (on /dev/sda16)
Lubuntu 11.10 64bit, with Linux 3.0.0-17-generic (on /dev/sda16)

And same goes to the other entries for the other systems. Still can't tell what 'exactly' happened but at least it's a bit clear now.

Now, everything is back to normal without any duplication after I installed Lubuntu 12.04 64bit on /dev/sda15 and I chose to install GRUB to the MBR so now, the OS on sda1 is no longer my main OS.

3- The problem I had before which we discussed here:

http://ubuntuforums.org/showthread.php?t=1195275&page=84

is back again but [B]I followed the same step and fixed it.

[/B]Thank you all for your time :)

#909

Good article. Anyways some of the problems with GRUB unable to load up properly the Linux are caused of ACPI being enabled. Its generally a good idea to disable ACPI in kernel boot time from GRUB on servers. Check this for more info - http://www.pc-freak.net/blog/disable-acpi-productive-linux-servers-decrease-kernel-panics-increase-cpu-fan-lifespan/

Best

#910

hipodilski,

Welcome to the Ubuntu forums.

Thanks for the link. I don't run servers so I can't attest to the claim, but G2 does make it pretty easy to add kernel options. Even more so for testing, since you can press 'e' and edit the menuentry to try it on a one-time basis to see if it helps (or hurts).

#911

Drs305, I just wanted to ask you a question. I freed up a 60GB chunk of my HD awhile back. I noticed that Linux Mint 13 was released today so I downloaded the ISO.

You know what my setup is, Ubuntu 10.04 and Windows 7. If I install Mint into that 60GB, is there anything I should know before hand?

I've never tri-booted before and just thought I better ask you. I would think one thing is to make /etc/grub.d/10_linux and /etc/grub.d/30_os-prober both executable before hand.

Currently I have just 3 lines:

cavsfan@cavsfan-desktop:~$ grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0
     0    Ubuntu Lucid Lynx
     1    Ubuntu Lucid Lynx (Recovery Mode)
     2    Windows 7
cavsfan@cavsfan-desktop:~$

Thanks :)

Also, could I do this with a USB drive? I have a 64GB drive and my PC is bootable via usb.

#912

Cavsfan said: You know what my setup is, Ubuntu 10.04 and Windows 7. If I install Mint into that 60GB, is there anything I should know before hand?

I'm sure you are familiar with the perils of installing Ubuntu, but I still recommend using the manual partitioning scheme to make sure your other OS's don't get overwritten. ;-)

But as far as Grub goes, the only main issue is which Grub controls your boot. If you accept the default installation settings, your new mint will control the boot until you change it back. That's easy - just boot to your original OS and run "sudo grub-install /dev/sdX".

I assume you will stick to your maintenance-free grub menu, so if you enable 10_* and 30_* and run it once you can copy the Mint data it finds to your custom menu and disable them again.

And if you left the Mint grub menu as is, you would certainly know if and when it took over. (I have different backgrounds to easily tell the difference, but my menus are almost identical on all the OSs.) You could even go to the extreme of disabling Mint's grub commands or not installing it at all, but I probably wouldn't go that far.

I've never had a problem with installing to a USB drive for testing, and if you keep the OS booting from a main drive you won't notice much difference.

Hope you enjoy the experience.

#913

Thanks! I am just hoping I can get back to Ubuntu and windows. I'll give it a try.

Thanks and I'll post back the results. :)

#914

Well, it went really well. I was able to install it and it also asks where to put the grub, which was nice. It defaulted to my 1TB USB drive, so it's a good thing I noticed that and fixed it. I could see the Mint and recovery were the 1st two options and then my custom 3 entries. Followed by 10_linux and 30_os-prober.

The only bad thing that happened is that it would not accept my user or password. I am not sure which. So, I may have to re-install but, at least I know how to do it. Thanks for the help. ------------------------------------------------------------------------------------------------ I see what I did now. I misspelled my username. It's a good thing I have access to the mint home directory to see that. Guess I'll see if I can fix that or else I'll have to re-install but, at least it is pretty fast. Thanks again!

#915

drs305 said: I'm sure you are familiar with the perils of installing Ubuntu, but I still recommend using the manual partitioning scheme to make sure your other OS's don't get overwritten. ;-)

But as far as Grub goes, the only main issue is which Grub controls your boot. If you accept the default installation settings, your new mint will control the boot until you change it back. That's easy - just boot to your original OS and run "sudo grub-install /dev/sdX".

I assume you will stick to your maintenance-free grub menu, so if you enable 10_* and 30_* and run it once you can copy the Mint data it finds to your custom menu and disable them again.

And if you left the Mint grub menu as is, you would certainly know if and when it took over. (I have different backgrounds to easily tell the difference, but my menus are almost identical on all the OSs.) You could even go to the extreme of disabling Mint's grub commands or not installing it at all, but I probably wouldn't go that far.

I've never had a problem with installing to a USB drive for testing, and if you keep the OS booting from a main drive you won't notice much difference.

Hope you enjoy the experience.

I installed Mate which is supposed to be based on gnome 2. I'm not sure I like it. I'll have to play around with it more.

The grub is not the one I have edited, although it must contain some of 06_custom as the 3 entries are there except that they say "sda1" etc beside each, which is not what I have.

So, do I just enter sudo grub-install /dev/sda to put it back?

#916

Cavsfan said:

So, do I just enter sudo grub-install /dev/sda to put it back?

Yes, but only from the OS you want to control things. That will point the MBR instructions to look for the Grub folder on your currently-running OS.

#917

drs305 said: Yes, but only from the OS you want to control things. That will point the MBR instructions to look for the Grub folder on your currently-running OS.

Thanks for the quick reply! That would be Ubuntu 10.04 I would have to think right? That cannot be accomplished in windows 7, which my wife primarily uses.

#918

You are good! :D

It looks like it worked.

cavsfan@cavsfan-desktop:~$ sudo grub-install /dev/sda
[sudo] password for cavsfan:
Installation finished. No error reported.
cavsfan@cavsfan-desktop:~$ 

Can't drag and drop things into the dock. It's like starting over from scratch.

Here is what I have now (thanks to you):```

0 Ubuntu Lucid Lynx 1 Ubuntu Lucid Lynx (Recovery Mode) 2 Windows 7 3 Ubuntu, with Linux 2.6.32-41-generic 4 Ubuntu, with Linux 2.6.32-41-generic (recovery mode) 5 Ubuntu, with Linux 2.6.32-40-generic 6 Ubuntu, with Linux 2.6.32-40-generic (recovery mode) 7 Windows 7 (loader) (on /dev/sda1) 8 Linux Mint 13 MATE 64-bit, 3.2.0-24-generic (/dev/sda5) (on /dev/sda7) 9 Linux Mint 13 MATE 64-bit, 3.2.0-24-generic (/dev/sda5) -- recovery mode (on /dev/sda7) 10 Linux Mint 13 MATE 64-bit, 3.2.0-23-generic (/dev/sda5) (on /dev/sda7) 11 Linux Mint 13 MATE 64-bit, 3.2.0-23-generic (/dev/sda5) -- recovery mode (on /dev/sda7)

I think I like Ubuntu better.
#919

One question: would you know how I could change this

menuentry "Linux Mint 13 MATE 64-bit, 3.2.0-24-generic (/dev/sda5) (on /dev/sda7)" {
    insmod ext2
    set root='(hd0,5)'
    search --no-floppy --fs-uuid --set 283ef203-29c7-437f-9992-8ff6dad9f7e1
    linux /vmlinuz-3.2.0-24-generic root=UUID=f2943974-0a9f-47ec-b5d4-7389c9be2ac0 ro quiet splash $vt_handoff
    initrd /initrd.img-3.2.0-24-generic
}
menuentry "Linux Mint 13 MATE 64-bit" {
        set root=(hd0,7)
        linux /vmlinuz root=/dev/sda7 ro quiet splash
        initrd /initrd.img
}

Although I set sda4 to /boot, sda5 to swap, sda6 to / and sda7 to /home this is what sudo blkid yields:

cavsfan@cavsfan-desktop:~$ sudo blkid
/dev/sda1: UUID="1CFC7A8DFC7A60C6" TYPE="ntfs" 
/dev/sda2: UUID="deb59f40-8300-4f51-95b2-ab5492a4f2c6" TYPE="swap" 
/dev/sda5: UUID="283ef203-29c7-437f-9992-8ff6dad9f7e1" TYPE="ext4" 
/dev/sda7: UUID="f2943974-0a9f-47ec-b5d4-7389c9be2ac0" TYPE="ext4" 
/dev/sda8: UUID="38870dc0-cd26-47a4-84b1-22c8467fa753" TYPE="ext4" 
/dev/sda3: UUID="a162dc8a-e4df-4b79-b4c3-524761ff7ae1" TYPE="ext4" 
/dev/sdb1: LABEL="Fantom" UUID="78B8D1A1B8D15DE6" TYPE="ntfs"
#920

Cavsfan said: One question: would you know how I could change this

menuentry "Linux Mint 13 MATE 64-bit, 3.2.0-24-generic (/dev/sda5) (on /dev/sda7)" {
    insmod ext2
    set root='(hd0,5)'
    search --no-floppy --fs-uuid --set 283ef203-29c7-437f-9992-8ff6dad9f7e1
    linux /vmlinuz-3.2.0-24-generic root=UUID=f2943974-0a9f-47ec-b5d4-7389c9be2ac0 ro quiet splash $vt_handoff
    initrd /initrd.img-3.2.0-24-generic
}
menuentry "Linux Mint 13 MATE 64-bit" {
        set root=(hd0,7)
        linux /vmlinuz root=/dev/sda7 ro quiet splash
        initrd /initrd.img
}

Although I set sda4 to /boot, sda5 to swap, sda6 to / and sda7 to /home this is what sudo blkid yields:

cavsfan@cavsfan-desktop:~$ sudo blkid
/dev/sda1: UUID="1CFC7A8DFC7A60C6" TYPE="ntfs" 
/dev/sda2: UUID="deb59f40-8300-4f51-95b2-ab5492a4f2c6" TYPE="swap" 
/dev/sda5: UUID="283ef203-29c7-437f-9992-8ff6dad9f7e1" TYPE="ext4" 
/dev/sda7: UUID="f2943974-0a9f-47ec-b5d4-7389c9be2ac0" TYPE="ext4" 
/dev/sda8: UUID="38870dc0-cd26-47a4-84b1-22c8467fa753" TYPE="ext4" 
/dev/sda3: UUID="a162dc8a-e4df-4b79-b4c3-524761ff7ae1" TYPE="ext4" 
/dev/sdb1: LABEL="Fantom" UUID="78B8D1A1B8D15DE6" TYPE="ntfs"

Lots of ?s...

  1. The original menuentry says both sda5 and sda7 in the title. When Grub automatically builds the menuentry, it doesn't (normally) make mistakes so I'm guessing it was on sda5. Did you make a manual entry and then make the title ... (on sda7). Maybe a separate boot partition does things like that to a menuentry, but I've limited experience experimenting with a separate /boot and not noticed it.

Note the "set root" line and root in the search line (if present) refer to the /boot partition. The "root" reference in the linux line refers to the main files of the OS.

In your proposal, if you are using a separate boot, the "set" line and the "linux" line should refer to different partitions. I'd give you the specifics but don't know which is which (see 2).

Note: Also, if using a custom menuentry, Grub 1.99 now uses "--set=root=28..." rather than "--set 28..." so if you are using a custom menuentry in the latest Ubuntu manually change the search line accordingly (if you include the search line).

First, I'd verify the contents of the various partitions to confirm the appropriate files are in each device as specified by the blkid results. Once you know the correct /boot and / partitions, you can build your menuentry (see 1.).

  1. Your blkid doesn't match what you tried to do. Don't bet against the blkid results - something must have gone wrong with your plan.
  1. If you continue to have problems, you can experiment in the grub terminal. Press c to get to the terminal, then try loading the kernel with the full command to see if you have the correct partition:

linux (hd0,X)/vmlinuz-3.2.0-24-generic root=/dev/sdaX ro

Notice there is no "boot" in the address since you have a separate boot partition. And again, the root and (hd0,X) values will be different. hd0,X will be your boot partition, root= will be your OS files.

This post may be a bit confusing, but it would be clearer if I knew which partitions were which regarding your main OS's /boot, /, /swap.

#921

In Mint here is what blkid says:

/dev/sda1: UUID="1CFC7A8DFC7A60C6" TYPE="ntfs" 
/dev/sda2: UUID="deb59f40-8300-4f51-95b2-ab5492a4f2c6" TYPE="swap" 
/dev/sda3: UUID="a162dc8a-e4df-4b79-b4c3-524761ff7ae1" TYPE="ext4" 
/dev/sda5: UUID="283ef203-29c7-437f-9992-8ff6dad9f7e1" TYPE="ext4" 
/dev/sda6: UUID="4a88d030-5de4-4c4d-b5f3-9fb376f8df17" TYPE="swap" 
/dev/sda7: UUID="f2943974-0a9f-47ec-b5d4-7389c9be2ac0" TYPE="ext4" 
/dev/sda8: UUID="38870dc0-cd26-47a4-84b1-22c8467fa753" TYPE="ext4" 
/dev/sdb1: LABEL="Fantom" UUID="78B8D1A1B8D15DE6" TYPE="ntfs" 

I ended up installing it 3 times and wrote them down.

But, my main OS (Ubuntu) sees the other one.

It doesn't see the windows7 partition and sdb1 is my 1TB USB drive.

Are you saying that this might work: (in red)

menuentry "Linux Mint 13 MATE 64-bit" {
        set root=(hd0,[COLOR=Red]5[/COLOR])
        linux /vmlinuz root=/dev/sda[COLOR=Red]7[/COLOR] ro quiet splash
        initrd /initrd.img
}
#922

Cavsfan said: In Mint here is what blkid says:

/dev/sda1: UUID="1CFC7A8DFC7A60C6" TYPE="ntfs" 
/dev/sda2: UUID="deb59f40-8300-4f51-95b2-ab5492a4f2c6" TYPE="swap" 
/dev/sda3: UUID="a162dc8a-e4df-4b79-b4c3-524761ff7ae1" TYPE="ext4" 
/dev/sda5: UUID="283ef203-29c7-437f-9992-8ff6dad9f7e1" TYPE="ext4" 
/dev/sda6: UUID="4a88d030-5de4-4c4d-b5f3-9fb376f8df17" TYPE="swap" 
/dev/sda7: UUID="f2943974-0a9f-47ec-b5d4-7389c9be2ac0" TYPE="ext4" 
/dev/sda8: UUID="38870dc0-cd26-47a4-84b1-22c8467fa753" TYPE="ext4" 
/dev/sdb1: LABEL="Fantom" UUID="78B8D1A1B8D15DE6" TYPE="ntfs" 

I ended up installing it 3 times and wrote them down.

But, my main OS (Ubuntu) sees the other one.

It doesn't see the windows7 partition and sdb1 is my 1TB USB drive.

Are you saying that this might work: (in red)

menuentry "Linux Mint 13 MATE 64-bit" {
        set root=(hd0,[COLOR=Red]5[/COLOR])
        linux /vmlinuz root=/dev/sda[COLOR=Red]7[/COLOR] ro quiet splash
        initrd /initrd.img
}

Those are the correct addresses for what you describe so I would expect that menuentry to work.

On thing I've found helpful is to label everything, such as "Mintboot", "Precise", "Mint", etc. It helps, especially with the blkid output, which includes labels.

sudo tune2fs -L "Mintboot" /dev/sda5

I didn't really understand this part:

But, my main OS (Ubuntu) sees the other one.

It doesn't see the windows7 partition and sdb1 is my 1TB USB drive.

#923

Cavsfan said: In Mint here is what blkid says:

/dev/sda1: UUID="1CFC7A8DFC7A60C6" TYPE="ntfs" 
/dev/sda2: UUID="deb59f40-8300-4f51-95b2-ab5492a4f2c6" TYPE="swap" 
/dev/sda3: UUID="a162dc8a-e4df-4b79-b4c3-524761ff7ae1" TYPE="ext4" 
/dev/sda5: UUID="283ef203-29c7-437f-9992-8ff6dad9f7e1" TYPE="ext4" 
/dev/sda6: UUID="4a88d030-5de4-4c4d-b5f3-9fb376f8df17" TYPE="swap" 
/dev/sda7: UUID="f2943974-0a9f-47ec-b5d4-7389c9be2ac0" TYPE="ext4" 
/dev/sda8: UUID="38870dc0-cd26-47a4-84b1-22c8467fa753" TYPE="ext4" 
/dev/sdb1: LABEL="Fantom" UUID="78B8D1A1B8D15DE6" TYPE="ntfs" 

I ended up installing it 3 times and wrote them down.

But, my main OS (Ubuntu) sees the other one.

It doesn't see the windows7 partition and sdb1 is my 1TB USB drive.

Are you saying that this might work: (in red)

menuentry "Linux Mint 13 MATE 64-bit" {
        set root=(hd0,[COLOR=Red]5[/COLOR])
        linux /vmlinuz root=/dev/sda[COLOR=Red]7[/COLOR] ro quiet splash
        initrd /initrd.img
}

drs305 said: Those are the correct addresses for what you describe so I would expect that menuentry to work.

I tried changing them to the above 5 and 7 in red and it still said you must load kernel first, press any key.

On thing I've found helpful is to label everything, such as "Mintboot", "Precise", "Mint", etc. It helps, especially with the blkid output, which includes labels.

sudo tune2fs -L "Mintboot" /dev/sda5

Thanks I did that and saved it.

I didn't really understand this part:> But, my main OS (Ubuntu) sees the other one.

It doesn't see the windows7 partition and sdb1 is my 1TB USB drive.What I meant was I don't think either grub sees the same stuff. The one on Ubuntu sees it one way and the one on Mint sees it another. The sda3 and sda8 are switched around. I don't know if that matters or not. I was wrong by saying it doesn't see windows that is sda1.

I am on (GNU GRUB 1.98-1ubuntu13) here on Ubuntu. I check which version it is on Mint.

#924

Mint says

grub-install -v
unshare failed: Operation not permitted
grub-install.real (GRUB) 1.99-21ubuntu3
#925

I think what is happening regarding sda3 and sda8 is that each is the 'home' folder for its own installation. If that is the case, what you are seeing is normal.

If you are running the OS that uses sda3 as /home, it would see sda8 as just another Linux partition and sda3 as its home folder.

If you are running the other OS, with sda8 as /home, vice versa.

It doesn't really matter to Grub, which doesn't consider /home in the boot process. It cares about root /, and /boot (or where the boot & grub files are). Other than that, it lets the system figure out where things are. That is one of the reasons some boots fail if the fstab is incorrect - Grub passes control to the kernel but then the system can't figure things out because one of the critical folders is incorrectly listed (or not) in fstab.

#926

drs305 said: I think what is happening regarding sda3 and sda8 is that each is the 'home' folder for its own installation. If that is the case, what you are seeing is normal.

If you are running the OS that uses sda3 as /home, it would see sda8 as just another Linux partition and sda3 as its home folder.

If you are running the other OS, with sda8 as /home, vice versa.

It doesn't really matter to Grub, which doesn't consider /home in the boot process. It cares about root /, and /boot (or where the boot & grub files are). Other than that, it lets the system figure out where things are. That is one of the reasons some boots fail if the fstab is incorrect - Grub passes control to the kernel but then the system can't figure things out because one of the critical folders is incorrectly listed (or not) in fstab.

I guess the only thing I know to do is hard code the last mint kernel and recovery in my 06_custom file. It won't be perfectly maintenance free but, pretty close. Just a minor change if a kernel comes down the pipe. I am not sure how long I will deal with LMDE 13 Mate anyway. If you come up with anything else let me know. Thanks for your time! :)

#927

i make a rescue grub usb this way . sudo grub-mkrescue --output=rescue.iso sudo dd if=~/rescue.iso of=/dev/sdb

my grub.cfg is:

menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686' --class debian --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(/dev/sda,msdos5)' search --no-floppy --fs-uuid --set 069ca903-d3d9-43ef-8e1e-02a27109fce3 echo 'Loading Linux 2.6.32-5-686 ...' linux /vmlinuz-2.6.32-5-686 root=UUID=a28fd0a3-5391-4ac5-8206-3c97e53dc605 ro quiet echo 'Loading initial ramdisk ...' initrd /initrd.img-2.6.32-5-686 }

menuentry "Microsoft Windows XP Professional" { set root=(hd0,msdos1) search --no-floppy --fs-uuid --set f888-ccdb drivemap -s (hd0) $root chainloader +1 }

now , i reinstall my xp,then i can't use my debian . i reboot with my usb,when i get grub> 1.boot xp input ls ,the hd0 turn into hd1,my usb is hd0, so i input grub>set root=(hd0,msdos1) grub>search --no-floppy --fs-uuid --set f888-ccdb grub>drivemap -s (hd0) $root grub>chainloader +1 grub>boot

it's ok! i can boot xp.

2.boot debian i input: grub>insmod part_msdos grub>insmod ext2 grub>set root='(hd1,msdos5)' grub>linux /vmlinuz-2.6.32-5-686 root=UUID=a28fd0a3-5391-4ac5-8206-3c97e53dc605 ro quiet grub>initrd /initrd.img-2.6.32-5-686 grub>boot

i can't boot debian,what's wrong in my grub command?

#928

luofeiyu said:

2.boot debian i input: grub>insmod part_msdos grub>insmod ext2 grub>set root='(hd1,msdos5)' grub>linux /vmlinuz-2.6.32-5-686 root=UUID=a28fd0a3-5391-4ac5-8206-3c97e53dc605 ro quiet grub>initrd /initrd.img-2.6.32-5-686 grub>boot

i can't boot debian,what's wrong in my grub command?

I can only compare your menuentry with what we normally see. In Ubuntu the normal setup, unless you have a separate 'boot' partition, has a symlink (/vmlinuz) in / and the actual kernel in /boot (/boot/vmlinuz-3-0.....).

In your example, you are specifying the actual kernel and initrd image as residing in / rather than /boot. So in the above example it would normally be: grub>linux /vmlinuz ... or grub>linux /boot/vmlinuz-2.6...

If this isn't the problem I'd recommend installing and running the Boot Repair app from a LiveCD.

#929

i have separate '/boot' partition and '/' partition.

it's so strange for my system ,i can boot it with my rescue cd,but i can't boot it with my rescue usb,the same grub command grub>insmod part_msdos grub>insmod ext2 grub>set root='(hd1,msdos5)' grub>linux /vmlinuz-2.6.32-5-686 \root=UUID=a28fd0a3-5391-4ac5-8206-3c97e53dc605 ro quiet grub>initrd /initrd.img-2.6.32-5-686 grub>boot

to boot in from my rescue usb ,what i get is : /bin/sh :can't access tty ;job control turned off

#930

grub>insmod part_msdos grub>insmod ext2 grub>set root='(hd1,msdos5)' grub>linux /vmlinuz-2.6.32-5-686 \root=UUID=a28fd0a3-5391-4ac5-8206-3c97e53dc605 rootdelay=60 ro quiet grub>initrd /initrd.img-2.6.32-5-686 grub>boot

when i add rootdelay=60,it works fine.

#931

i still have a problem ,if i want to install ppp-udeb ,how to write my command? linux /vmlinuz-2.6.32-5-686 append install modules=ppp.udeb ??

#932

luofeiyu said: i still have a problem ,if i want to install ppp-udeb ,how to write my command?

linux /vmlinuz-2.6.32-5-686 append install modules=ppp.udeb ??

I'm not familiar enough with this to advise you. I recommend you start a thread of your own and you will probably get a quicker answer than having your question 'buried' in this thread.

#933

This thread is closed.

The information is now held on the community wiki at https://help.ubuntu.com/community/Grub2

On that page are links to a variety of other Grub 2 pages which cover installation, troubleshooting, ISO booting, Grub menu displays, and more. The majority of those pages were migrated from threads started on the Ubuntu Forums.

Thank you to all the users who posted in these threads and expanded our knowledge of Grub 2 since it's introduction.

A thread for discussion of the wiki can be found at http://ubuntuforums.org/showthread.php?p=12073029

Support threads regarding the wiki and it's content should be created in a suitable forum.