Page 13 of 94 FirstFirst ... 311121314152363 ... LastLast
Results 121 to 130 of 931

Thread: Grub 2 Basics

  1. #121
    Join Date
    Jul 2009
    Location
    Kolkata, India
    Beans
    187
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Grub 2 Basics

    @ drs305.
    Thank you.
    Avoid the Gates of Hell. Use Ubuntu.


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

    Re: Grub 2 Basics

    Quote Originally Posted by kansasnoob View Post
    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.

    Update: Note and attribution added to Section 2D of Grub 2 Title Tweaks
    Last edited by drs305; November 22nd, 2009 at 08:18 PM.
    GRUB2

    Retired.

  3. #123
    Join Date
    Dec 2006
    Location
    Mumbai, India
    Beans
    625
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Grub 2 Basics

    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.



    Attached Images Attached Images
    Ignorance is the parent of fear . . . MobyDick

  4. #124
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    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:
    Code:
    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:
    Code:
    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
    GRUB2

    Retired.

  5. #125
    Join Date
    May 2008
    Beans
    16

    Re: Grub 2 Basics

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

    Code:
    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.

  6. #126
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by benpaka View Post
    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 ???

    Code:
    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
    GRUB2

    Retired.

  7. #127
    Join Date
    Dec 2006
    Location
    Mumbai, India
    Beans
    625
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Grub 2 Basics

    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.
    Attached Images Attached Images
    Ignorance is the parent of fear . . . MobyDick

  8. #128
    Join Date
    Jan 2008
    Beans
    5

    Re: Grub 2 Basics

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

  9. #129
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by mahiyar View Post
    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 highlighted entry. The section should be start around line 120.
    Code:
    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`"


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

    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.
    Code:
    cat /boot/grub/grub.cfg | less
    Press "q" when you are done inspecting the file.
    GRUB2

    Retired.

  10. #130
    Join Date
    Dec 2006
    Location
    Mumbai, India
    Beans
    625
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Grub 2 Basics

    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.
    Attached Images Attached Images
    Ignorance is the parent of fear . . . MobyDick

Page 13 of 94 FirstFirst ... 311121314152363 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •