Announcement

Collapse
No announcement yet.

[SOLVED] Grub 2: Bad advice = Vista Messed

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

    [SOLVED] Grub 2: Bad advice = Vista Messed

    Hi,
    I am a Kubuntu user for a long time, and recently upgrade to 10.04. I have a HP tx1320us notebook and used to have a dual boot with old grub and Kubuntu 9.10/Windows Vista. After making the migration, I had the bad idea of upgrading grub too, in order to use the graphical splash of grub 2. That was a bad idea. The migration went well ... first it chainloaded old grub to new grub 2 and asked us to first test before a final migration. I tested, but did that only for Kubuntu (not Vista). Finally, as apparently everything was working, I decided to finish the migration, running a script that would make the final grub 2 installation. This is where all my problems started. The script asked me where did I wanted grub 2 installed. It offered me to install it on MBR and on each partition. It said, though, that it was not advisable to install it on MBR, and in the case of doubt, to install it in ALL partitions. It is what I did. Every partition ! Also, the Vista partition ... yes ... I know ... very stupid decision. The fact is ... grub 2 messed Vista bootloader and possibly vista bootmanager (I don't know how it works). The fact is ... Vista do not boot anymore. I tried a Vista recover CD, and the recover CD was not able to detect any problem in the Vista installation. I tried the manual tweaks ... with "bootrec.exe /fixmbr" + "bootrec.exe /fixboot" + "bootsect /ns60 ALL" and all the variations. I tried to alter the bcd with bcdedit, following a recipe I found in a forum and many things more ... but Vista does not boot anymore. All I have is a text black screen with the | character blinking in the upper left corner, or, in some of my trials, a successive sequence of reboots. I am becoming without alternatives. I cannot simply reinstall Vista, because my Vista CDs are HP cd's, which will install the original HP configuration back in the computer, and destroy my Linux and all my stuff in the Vista partition (by the way, Vista partition is ok, and viewable from Linux). What I am looking for is a kind of software that could restore the Vista bootloader and bootmanager, without having to install everything. Could any of you passed through a situation like that and succeed ? I am desperately in need of a light.

    #2
    Re: Grub 2: Bad advice = Vista Messed

    Just a guess, but perhaps your VISTA partition lost its boot flag.
    Boot a LiveCD and run GParted. Check the boot flag partition on your VISTA partition and enable it if it isn't enabled, the click the apply icon.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Re: Grub 2: Bad advice = Vista Messed

      Hi, GreyGeek ... thanks for the tip ... but I have already did that ... the active partition flag is still there. I guess that maybe the problem is related to the Vista Bootloader + Bootmanager, which are two different mechanisms which I still don't know exactly how they work ... there should be a way of reinstalling them ... I hope ....

      Comment


        #4
        Re: Grub 2: Bad advice = Vista Messed

        I am no expert but what does:
        Code:
        sudo update-grub
        give?

        Does it see your vista install?
        can you post the output?

        Also google is your friend:
        http://neosmart.net/wiki/display/EBC...r+from+the+DVD

        Note: you may have to reinstall grub after using the above link.

        To do this have a look here:
        http://kubuntuforums.net/forums/inde...opic=3106368.0

        especially:
        Re-installing GRUB 2 using Live CD:
        from section 3
        HP Pavilion dv6 core i7 (Main)
        4 GB Ram
        Kubuntu 18.10

        Comment


          #5
          Re: Grub 2: Bad advice = Vista Messed

          Hi Fintan, thanks for your reply.
          Grub is able to find the Vista partition and creates an entry for it. But if we try to boot in such partition, the same thing as in a clean MBR (without grub, after a bootrec.exe /fixmbr) happens ... it stops in a black screen and never go out of it - I have to hard reboot to go out.
          Regarding the neosmart.net page, this was one of my first trials (the black magic recipe using bcdedit I alluded in my first post - nuclear holocaust, which unfortunately didn't worked for me). I'm now wondering if is there any tweak made by HP in my original Vista installation, such that the repaired bootsector given by "bootrec.exe /fixboot" is not considering. In other words, it may be the case that my original bootsector was not the same as the one given by the "bootrec.exe /fixboot", and this is why it is not working. Or (it is also a hypothesis), I might have installed some unknown kind of bootsector virus, which changed the address to another place, and now when the virus was erased by grub, the system is not able to boot. I'm trying to think about all the possibilities, because I don't see a reason for the system not to boot after a fixmbr and a fixboot. These should have restored the original MBR and bootsector. Unless there is some other magic in the Vista boot procedure which I am not aware of. As far as I know, from the MBR the boot procedure should go to the first sector of my partition, where it should find the bootsector, which should find the Vista boot program and start it up.

          Comment


            #6
            Re: Grub 2: Bad advice = Vista Messed

            Originally posted by gudwin
            ...
            I might have installed some unknown kind of bootsector virus, which changed the address to another place, and now when the virus was erased by grub, the system is not able to boot.
            ...
            About a year and a half ago a friend told me of his WinXP woes, again. Like before, I checked out his computer. This time he had, IIRC, 53 viruses and 2 Trojans. Each was so busy doing its zombie work that little CPU time was left over for what he wanted to do. "Slow as molasses", he said.

            One of the Trojans was a keyboard logger. It installed itself in the MBR and in the hidden "recovery" partition. It made booting difficult and error prone. I found that if I replaced the MBR and the hidden copy reinfected the MBR. Delete the hidden copy of the Trojan and the MBR copy replaced it. Delete them both and the system wouldn't boot on its own. The most logical solution was to do a low level format of the HD using dd (data destroyer), which wiped out everything, including the MBR and the hidden recovery partition, and install Linux. I phoned up and told him about the keyboard logger and advised that he drive to the bank and change his account passwords, and contact his credit card companies and change their account info as well. Dittos for Internet stores he shopped with. He was lucky. No unauthorized transactions occurred before he got his info changed.

            He has been running the same version of Linux, PCLinuxOS, since then, with the usual updates, and has reported zero infections and zero crashes, and no loss of speed.
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              Re: Grub 2: Bad advice = Vista Messed

              Hi GreyGeek,
              This is my standard option too ... I use only Linux for all my banking transactions (and most of my daily work). But I still need Vista, because some applications I use (e.g. Quartus simulator) only run in Windows environment - they do not work in Wine. Unfortunately, they are too heavy to be run in vmware. Otherwise I will be using only Linux.

              Comment


                #8
                Re: Grub 2: Bad advice = Vista Messed

                Originally posted by gudwin
                ...
                I still need Vista, because some applications I use (e.g. Quartus simulator) only run in Windows environment - they do not work in Wine. Unfortunately, they are too heavy to be run in vmware. Otherwise I will be using only Linux.
                I was in the same pickle for several years because I needed a dev tool which was only available for Windows. But, that project is history and so is Windows.!

                EDIT: I looked up Quartus (and Altera) and noticed that Altera inlcuded PLD capabilities. My need for Windows was because Linux did not have any programs which allowed writing applications for PLD & PLC devices. I used IQAN, from Parker.com to write control software for their Plc devices, which my friend used to control his new kind of ag tractor.
                "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                – John F. Kennedy, February 26, 1962.

                Comment


                  #9
                  Re: Grub 2: Bad advice = Vista Messed

                  Are you needing :
                  https://www.altera.com/support/softw...uartus_sub.jsp

                  there is a linux version as well

                  I do not know this software but I am pretty sure it is not as hungry as adobe flash, DW and PS running at the same time.

                  That is what I use my XP guest in a vmware player environment for.

                  If you cannot get your vista back and need help setting a vmware guest (not vista!) up shout
                  HP Pavilion dv6 core i7 (Main)
                  4 GB Ram
                  Kubuntu 18.10

                  Comment


                    #10
                    Re: Grub 2: Bad advice = Vista Messed

                    Hi,
                    Thanks for your suggestions ... it is good to know that they finally released the Quartus for Linux ... last year, when I installed it, it was available only for the paid license. Now, I could see they released also the free license for Linux. One less application to demand windows (but unfortunately there are others ... I still can't work in collaboration with some colleagues which use MSOffice, due to equations ... OpenOffice always mess my equations when we exchange papers we are writing in collaboration). At home I have a better computer, and I use VMWare with a virtual XP for my windows dependencies. But in the notebook (an AMD Turion X2), it becomes too slow.
                    I will keep playing a little with bcdedit, to see if I can manage a configuration that works. I will also try to find some livecd with better recovering tools. I tried super grub disk, which was fine for restoring grub after the "bootrec /fixmbr" ... it is really a tool that everybody should have for emergencies ... but it was not able to help me yet. I tried also testdisk (from Linux), but it didn't worked also.
                    I am puzzled, because I am suspecting that the boot process is never reaching the Vista boot manager. I would like to create some multi-boot configuration, just to force the Vista boot manager to show me the menu, maybe including some memory test as an option for boot. I would like to know WHERE the process is breaking down, if in MBR, in bootsector or in boot manager. Let's try a little bit more.

                    Comment


                      #11
                      Re: Grub 2: Bad advice = Vista Messed

                      mmm... installed Grub everywhere, eh?

                      I had a situation where Grub installed on my Linux partition, even though XP was the boot partition.

                      I removed it from the Linux partition and forced it to the XP (primary partition), and removed the boot flag from the Linux partition and restored it on the primary partition (hence my first suggestion), which restored a normal Grub boot allowing access to both partitions.

                      Perhaps if you removed all the Grubs but that one in the primary, made sure your Linux partition is NOT flagged as boot, and your XP partition is.
                      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                      – John F. Kennedy, February 26, 1962.

                      Comment


                        #12
                        Re: Grub 2: Bad advice = Vista Messed

                        I DID IT ! I SOLVED THIS ##$%#$% PROBLEM !
                        And found a bug in bootrec.exe !!!!
                        The facts ... after making a deep study of the Vista bootsector from http://thestarman.pcministry.com/asm/mbr/VistaVBR.htm I realized what was the problem. I noticed that the bootsector in the given page started with EB 52 ... and my bootsector was starting with EB 63 ... and this is the trick ! EB 63 is the beginning of the GRUB bootsector, which I accidentally wrote over the Vista bootsector. The problem: bootrec.exe did not repaired the first three bytes of the partition (they should be constant: EB 52 is a jump to the real code, which for all Windows should start in address 54). So, the problem was that the jump was being done to the earlier start of the grub code, instead of the vista code. The solution: I used hexedit from Linux to edit the bootsector and changed 63 to 52. After that, it was just a matter of rebooting and Vista appeared again ! VICTORY !
                        I don't know why bootrec didn't repaired the whole bootsector, but just the standard code part of it. Maybe Microsoft engineers thought it was not necessary. But it is certainly a bug in bootrec.
                        Thanks for all of you which tried to help me ! And I hope this message becomes a spark of light for someone else who listen to the bad advice in upgrade-from-grub-legacy and spoil their Vista partition.

                        Comment


                          #13
                          Re: [SOLVED] Grub 2: Bad advice = Vista Messed

                          Way cool. Good job. I'll assume that you did the 'Happy Dance' when you got it fixed.
                          Windows no longer obstructs my view.
                          Using Kubuntu Linux since March 23, 2007.
                          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                          Comment


                            #14
                            Re: [SOLVED] Grub 2: Bad advice = Vista Messed

                            VERY GOOD sleuthing, and excellent use of the hex disk editor. 8)
                            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                            – John F. Kennedy, February 26, 1962.

                            Comment

                            Working...
                            X