Announcement

Collapse
No announcement yet.

lost grub after using an external HD

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    lost grub after using an external HD

    Dear all,

    I have a dual boot machine with Windows 7 and Kubuntu 9.10. Every time that I stick my external 320GB hard drive under Windows I lose GRUB after rebooting. I also have a 8GB flash drive and I don't have such a problem. After rebooting I have this message:

    GRUB loading.
    the symbol '_d' not found
    Aborted. Press any key to exit.

    After pressing any key, this new message appears:

    NVIDIA Boot Agent 253.0543
    Copyright (C) 2001-2008 NVIDIA Corporation
    Copyright (C) 1997-2008 Intel Corporation
    Client MAC ADDR: 00 23 B5 26 46 13 GUID: 44454C4C-3900-1044-8038-C2C04F4C4C31
    DHCP ........

    After few minutes the DHCP line disappears and the new info in the screen is:

    PXE-E53: No boot filename received
    PXE-M0F: Exiting NVIDIA Boot agent
    Operating system not found.


    And this is it. To solve the problem I need to used the Live CD to boot and reinstall GRUB.
    This is really annoying!!! I can not just don't use external disk. Does anyone knows what is going on here? I'd appreciate any help on this.
    Thanks









    #2
    Re: lost grub after using an external HD

    Just a first guess since we don't have much to go on -

    Check your bios and verify your boot device order. Sounds to me like your computer is putting the removable HD ahead of your fixed disks.

    In any case - you shouldn't have to reinstall grub unless you've done something to remove it.

    You're NOT using hardware RAID are you

    Please Read Me

    Comment


      #3
      Re: lost grub after using an external HD

      Hi,

      Thanks for your replay. The boot sequence is:
      Hard drive
      USB Storage
      CD/DVD/CD-RW Drive
      Removable Devices
      Network

      But the removable HD was not connected anymore when I rebooted my notebook.

      Concerning reinstall grub this is the way I found to get everything working again. If there is another way to restore my system, please let me know. I'd appreciate any extra information.

      Again, what I do is: boot my notebook with windows, plug in my external HD, see what is inside it, safely remove it and then reboot my notebook. Everything is screwed up again.

      About the hardware RAID, I guess not. It's a Dell Studio XPS 13 machine.

      Comment


        #4
        Re: lost grub after using an external HD

        Sounds like its altering your MBR somehow. Either that or grub config file.

        If you download boot_info_script(see my link below), and run it when your system works.

        Then run it again after using the usb drive and you figure out exactly what went wrong.

        On the second go around you would need to boot up using a LiveCD and run boot_info script from there. The output file is RESULTS.txt. Compare the two.
        Boot Info Script

        Comment


          #5
          Re: lost grub after using an external HD

          Hi,

          I ran your script when everything works fine. The output file is attached (RESULTS_ok.tex).
          Since I only have problems using the drive under Windows, I couldn't check what happens after it.
          Under Kubuntu I have no problem at all using the same drive. Running the script before and after using it (after it is removed) the outputs are the same.
          Next step was stick it again under Windows and try to boot. I couldn't. Same error as always. After using a LiveCD I ran boot_info script and I got the new output file (RESULTS_bad.txt).
          Comparing the two files with the following command: diff RESULTS_ok.txt RESULTS_bad.txt
          I got the following output:

          74a75
          > /dev/loop0 squashfs
          85c86,88
          < /dev/sda5 / ext4 (rw,errors=remount-ro)
          ---
          > aufs / aufs (rw)
          > /dev/sr0 /cdrom iso9660 (rw)
          > /dev/loop0 /rofs squashfs (rw)

          Honestly, I don't know how to interpret it. Does it help??
          Attached Files

          Comment


            #6
            Re: lost grub after using an external HD

            Both the "good" and the "bad" look identical:
            Code:
            Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
              partition #5 for /boot/grub.
            and P5 looks ok:
            sda5: __________________________________________________ _______________________

            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
            Instead of re-booting have you tried power off and unplug usb drive and then power on?

            Ok, I see the problem with your RESULTS file. You didn't have the usb drive plugged in. We need that.
            Boot Info Script

            Comment


              #7
              Re: lost grub after using an external HD

              Hi,

              Sorry about that. The RESULTS file with the usb drive plugged in (RESULTS_withHD.txt) is attached.
              Can you get some info from this file?
              Attached Files

              Comment


                #8
                Re: lost grub after using an external HD

                Ok, I see now that the external USB is a Windows bootable OS. that may be the issue. Just a quick glance, everything looks normal except sdb has a Windows boot mbr.

                Now let me get this straight. If you boot the usb windows drive, then reboot, grub is messed up, correct?

                If so ,have you tried booting the usb drive and then shutdown the computer and unplug the usb drive. Is grub still messed up?

                If it is, I need to see the new RESULTS file. To do that ,boot with a Livecd and leave the usb unplugged and run boot_info-script. then we will know what got stepped on.
                Boot Info Script

                Comment


                  #9
                  Re: lost grub after using an external HD

                  Hello,

                  I think I've solved the problem. Following you suggestion I've tried booting the usb drive and then shutdown the computer and unplug the usb drive. The grub was messed up again. Using the Live CD I booted the notebook and, with the usb drive plugged in I reinstalled the grub. Then rebooted the machine (with the usb plugged in) and everything was working fine. Than rebooted several times with kubuntu and Windows (without removing the drive) and I had no problem. Since I've never had problems mounting and unmounting the drive in linux, the problem should be related to how the drive was being removed in Windows. Doing a little research I found out that in Windows 7 this issue is dealt in a different way. The default is "Optimize for quick removal" option. If this option is checked it doesn't matter if you use the Safely Remove Hardware icon, it will not work properly. Probably it will work in a single boot machine. After I "unchecked" this option, I was able to remove the drive without become corrupted.

                  I'm sorry bothering you guys with this "not kubuntu" issue, but maybe this can help someone in the future.

                  Thank you very much for your help.

                  Comment


                    #10
                    Re: lost grub after using an external HD

                    Thanks for the update. Don't be sorry. Its just another Windows gotcha thing. I was wondering what Windows was on the USB drive. Microsoft doesn't consider any other OS buts its own.

                    They apparently moved from Windows is my idea..to ..Your computer is our idea! Nothing should be on you computer but MS products.
                    Boot Info Script

                    Comment

                    Working...
                    X