Results 1 to 6 of 6

Thread: GRUB reconfigure - boot to wrong partition

  1. #1
    Join Date
    Mar 2005
    Beans
    184
    Distro
    Ubuntu 8.10 Intrepid Ibex

    [fixed] GRUB reconfigure - boot to wrong partition

    I've used my laptop extensively for testing other distro's, so I have a number of partitions on them. Lately I've been settling on Intrepid, but the grub menu was still on one of the other partitions (the last installed distro).

    So I thought I would fix that (every kernel upgrade didn't show up in the menu, I had to manually edit menu.lst on the other partition) and edited grub to point to my current partition (hda5) like so:
    $ grub
    grub> root (hd0,4)
    grub> setup (hd0)
    grub> quit

    But after a reboot the computer boots up using the kernel from hda5, but fails to start X and drops me in the homedirectory of hda11 (the location of the last distro I installed)! Did I forget something (like update the initramfs or something)? How did this happen, and more importantly, how do I fix it?
    Last edited by DFreeze; March 9th, 2009 at 08:58 AM. Reason: fixed
    pain fuels passion
    I'm so passionate it hurts

  2. #2
    Join Date
    Mar 2009
    Beans
    37

    Re: GRUB reconfigure - boot to wrong partition

    I don't know if your error is the same as mine but...
    Whenever I startup my laptop now without my external HD plugged in it just says "Error Loading Grub 21" or something and stops and I have to power down the laptop plugin the ex hdd then I can goto windows vista through there.

    Any thoughts?
    Learning Ubuntu and C at the moment, so be patient with me

  3. #3
    Join Date
    Jan 2009
    Location
    Guildford, Surrey, UK
    Beans
    76
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: GRUB reconfigure - boot to wrong partition

    Did you remember to adjust the boot order of the hard drives so that the one you installed grub to came first?

    If you didn't you will be loading the old one which might have caused your problems...

  4. #4
    Join Date
    Mar 2005
    Beans
    184
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: GRUB reconfigure - boot to wrong partition

    Yeah, a quick Google on 'grub error 21' suggests that grub can't find the harddisk it is looking for. Probably the menu.lst is installed on the external drive. From the menu, grub can be told to load the OS installed on your first harddrive.

    So it looks like a 'long way round', but it is expected behaviour.

    The thing stunning me is that grub boots the kernel (including usplash and the whole shebang) from the right partition, but fails to load X and puts me in the homedirectory of a _different_ partition. I guess I should have told some other part of te bootprocess that I switched grub to another partition, but I don't know which part... Anyone?
    pain fuels passion
    I'm so passionate it hurts

  5. #5
    Join Date
    Mar 2009
    Beans
    37

    Re: GRUB reconfigure - boot to wrong partition

    So, do I have to reinstall ubuntu? And when I do in the boot order list have my laptop HD first and then the external HD second?

    And if I have to reinstall ubuntu do I have to do anything? or just reorder the boot sequence and then reinstall it?

    Or is there something I have to do in Windows also before doing so
    Last edited by Somiac; March 4th, 2009 at 07:37 PM.
    Learning Ubuntu and C at the moment, so be patient with me

  6. #6
    Join Date
    Mar 2005
    Beans
    184
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: GRUB reconfigure - boot to wrong partition

    Hey Somiac, I don't know exactly how to do this, but maybe these links will help you along. I will try to update my initramfs this evening following this guide, to see if that will fix my issue. I will update here.

    ::UPDATE::

    So I found the fix. It was simpler than I thought: the root=... part in GRUB was pointing to the wrong disk (DUH). These huge UUID numbers made it not so obvious to see (/dev/hdaX would be easily spotted to be right or wrong), but this took me a while to figure out. Checking the original grub menu.lst gave it away.

    In any case, the computer boots normally again.
    Last edited by DFreeze; March 9th, 2009 at 08:57 AM. Reason: fixed
    pain fuels passion
    I'm so passionate it hurts

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
  •