Page 12 of 94 FirstFirst ... 210111213142262 ... LastLast
Results 111 to 120 of 931

Thread: Grub 2 Basics

  1. #111
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by sejsen View Post
    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.
    Code:
    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:
    Code:
    sudo grub-install /dev/sda
    sudo update-grub
    Back to Xorg...

    Retired.

  2. #112
    Join Date
    Nov 2009
    Beans
    4

    Re: Grub 2 Basics

    @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
    Last edited by sejsen; November 19th, 2009 at 03:44 PM.

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

    Re: Grub 2 Basics

    Quote Originally Posted by sejsen View Post
    + 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.
    Back to Xorg...

    Retired.

  4. #114
    Join Date
    Nov 2009
    Beans
    4

    Re: Grub 2 Basics

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

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

    Re: Grub 2 Basics

    Quote Originally Posted by sejsen View Post
    >>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:
    #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.
    Last edited by drs305; November 19th, 2009 at 04:58 PM.
    Back to Xorg...

    Retired.

  6. #116
    Join Date
    Nov 2009
    Beans
    4

    Re: Grub 2 Basics

    Finally OK.

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

    Thanks a lot for your patient help.

  7. #117
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: Grub 2 Basics

    Many thanks drs305, this post really helped me out
    No longer participating......

  8. #118
    Join Date
    Jul 2009
    Location
    Kolkata, India
    Beans
    189
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Grub 2 Basics

    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 -i
    Mounted my root partition:
    mount /dev/sda9 /mnt
    Mounted my home partition:
    mount /dev/sda10 /mnt
    Reinstalled 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-res...g-windows.html.
    Thank you.
    Last edited by Tapas Bose, India; November 21st, 2009 at 08:05 PM. Reason: For giving some extra information
    Avoid the Gates of Hell. Use Ubuntu.


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

    Re: Grub 2 Basics

    @ 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.
    Back to Xorg...

    Retired.

  10. #120
    Join Date
    Apr 2008
    Beans
    11,707

    Re: Grub 2 Basics

    @drs305,

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

    Code:
    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/+s...b2/+bug/485457

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

Page 12 of 94 FirstFirst ... 210111213142262 ... 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
  •