1 2 Previous Next 19 Replies Latest reply: Mar 28, 2012 7:04 PM by 772452 RSS

    How to repair GRUB

    772452
      Both Solaris 11 and Windows, installed on the same hdd, x86_64.

      Subsequent to the moving/resizing of the Windows Partition, by GParted, GRUB no longer appears at bootup; only Windows boots -- as though Solaris and GRUB don't even exist.

      At first, Windows refused to boot also, but the Windows Install/Repair disk, coupled with "last known good configuration," dissolved that problem.

      The Solaris Partition has not been disturbed afaik.

      Can i save my Solaris 11 installation?

      Edited by: Neal Weissman on Feb 10, 2012 3:51 PM

      Edited by: Neal Weissman on Feb 10, 2012 3:57 PM

      Edited by: Neal Weissman on Feb 12, 2012 12:00 AM
        • 1. Re: How to repair GRUB
          bobthesungeek76036
          I would think you could re-install GRUB by booting your system off of the Solaris 11 Live DVD.

          http://www.linuxquestions.org/questions/showthread.php?p=1967148#post1967148
          • 2. Re: How to repair GRUB
            772452
            can you flesh out this answer: the solaris11 live dvd has no obvious option to repair GRUB -- all i see is the option to install Solaris, which will accomplish what i do not want, viz., overwriting my current Sol11 Install.

            and the GParted "Help" is worthless -- its on-point instruction -- repairing GRUB after a partition movement or resize -- is flat-out wrong! to its credit, though, it does instruct you consult GRUB's documentation! ... GParted: be assured that i will be extricating you from my solaris install asap!

            Edited by: Neal Weissman on Feb 11, 2012 1:47 AM

            Edited by: Neal Weissman on Feb 11, 2012 1:57 AM
            • 3. Re: How to repair GRUB
              alan.pae
              Neal Weissman wrote:
              can you flesh out this answer: the solaris11 live dvd has no obvious option to repair GRUB -- all i see is the option to install Solaris, which will accomplish what i do not want, viz., overwriting my current Sol11 Install.
              Boot from the Live DVD. Let the GUI come all the way up.

              Once your booted up into the GUI open a Terminal Window.

              su -

              to switch to root and then:

              installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/dsk/whatever_device

              alan
              • 4. Re: How to repair GRUB
                772452
                believe it or not, i tried that -- but the terminal steadfastly refused to allow me to become superuser: it will not accept any password that i thought of, not even "enter (no password)"

                and btw, it turns out that this is a known bug in GParted: [http://gparted-forum.surf4.info/viewtopic.php?id=13777] http://gparted-forum.surf4.info/viewtopic.php?id=13777. The problem seems to be that the Sol11 11/11 live dvd contains an antiquated version of GParted -- 0.4.5 -- whereas GParted says "*** We recommend GParted Live 0.6.2-2 or higher for all partition editing operations. ***"

                btw, i am "nweissma," post #46 at http://gparted-forum.surf4.info/viewtopic.php?pid=28972#p28972


                Solaris11 has quite a few bugs: i just had a freeze requiring a hard shutdown.

                but Thanks for Your Answer.

                Edited by: Neal Weissman on Feb 11, 2012 6:22 PM
                • 5. Re: How to repair GRUB
                  alan.pae
                  Sorry I've done this to many times.

                  The default su password is

                  solaris
                  • 6. Re: How to repair GRUB
                    alan.pae
                    also forgot, it's

                    installgrub -fm ...
                    • 7. Re: How to repair GRUB
                      772452
                      i can't follow your unstruction installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/dsk/whateverdevice_ -- it seems to make no accommodation for the live dvd source of GRUB.

                      besides, GParted's report states the partitions themselves are "unmounted," and i see no way to mount them, so reinstalling GRUB may not solve this problem.

                      one more thing that seems to be problematical: GRUB appears to be for Linux, and i believe that i (a noob) descried differences between the GRUB used by Solaris and the GRUB described at sourceforge.

                      Edited by: Neal Weissman on Feb 11, 2012 10:29 PM

                      Edited by: Neal Weissman on Feb 11, 2012 10:31 PM

                      Edited by: Neal Weissman on Feb 11, 2012 10:37 PM

                      Edited by: Neal Weissman on Feb 11, 2012 10:40 PM
                      • 8. Re: How to repair GRUB
                        alan.pae
                        Neal Weissman wrote:
                        i can't follow your unstruction installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/dsk/whateverdevice_ -- it seems to make no accommodation for the live dvd source of GRUB.

                        besides, GParted's report states the partitions themselves are "unmounted," and i see no way to mount them, so reinstalling GRUB may not solve this problem.
                        Should be unmounted unless Solaris is running and has mounted the partitions. Re-installing GRUB and then booting some other OS will not resolve this.
                        one more thing that seems to be problematical: GRUB appears to be for Linux, and i believe that i (a noob) descried differences between the GRUB used by Solaris and the GRUB described at sourceforge.
                        Grub will boot whatever it can. Solaris GRUB can boot ext2fs file systems but Linux GRUB has no knowledge of either UFS or ZFS. Both of those are used to boot Solaris. UFS for older Solaris and ZFS for newer Solaris.

                        And now back to your problem.

                        It seems that you used GParted to repartition the disk for whatever reason.

                        Following that you used the Windows repair facilities to get Windows to boot again. This usually means that Windows overwrites the MBR with it's own boot loader and removes GRUB as the active boot loader. And since Solaris uses GRUB to boot replacing the GRUB boot loader with Windows boot loader makes it impossible to boot Solaris.

                        GRUB for either Linux or Solaris can boot Windows so re-installing GRUB allows you to boot either Windows or Solaris.

                        So the unknown variable is the /dev/device/whatever_device since whatever_device depends on Solaris and may or may not be different for different machines.

                        So one my machine to figure out what whatever_device should be I use the format command.

                        so su -

                        from a terminal window and check the output

                        0. c5d0 <Hitachi- MPCDN7Y4HGYRJ-0001 cyl 4958 alt 2 hd 255 sec 63>
                        /pci@0,0/pci-ide@1f,2/ide@0/cmdk@0,0

                        Just hit Control-C here to bail.

                        So now from that same terminal window under Live DVD run

                        installgrub -fm /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c5d0s0

                        Just append an s0 to the end of the entry on line 0. Hopefully you only have one device listed.

                        And that should replace the Windows boot loader with Grub and unless something else has changed you should at least see the GRUB menu and at best Solaris will still boot.

                        installgrub -fm /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c5d0s0
                        stage2 written to partition 1, 282 sectors starting at 50 (abs 49158950)
                        stage1 written to partition 1 sector 0 (abs 49158900)
                        stage1 written to master boot sector

                        alan
                        • 9. Re: How to repair GRUB
                          rukbat
                          This happened to have been cross-posted to:
                          http://www.linuxquestions.org/questions/solaris-opensolaris-20/how-to-repair-grub-928760/

                          You should have mentioned that so that response efforts don't get duplicated.
                          • 10. Re: How to repair GRUB
                            772452
                            this is not deceitful, as you are suggesting: the first answers in otn forum were not dispositive, so i thought to ask in linuxquestions.org because GParted was originally written for linux, and the GParted 0.4.5 found in Solaris11's live dvd caused the decimation of GRUB, which is the problem that seeds this instant otn thread.

                            Edited by: Neal Weissman on Feb 14, 2012 9:40 PM
                            • 11. Re: How to repair GRUB
                              772452
                              Alan: none of what you say is being realized!


                              as you can see from http://i244.photobucket.com/albums/gg20/nweissma/terminal_1.png

                              entering su-root produces nothing even resembling "0. c5d0 <Hitachi- MPCDN7Y4HGYRJ-0001 cyl 4958 alt 2 hd 255 sec 63>"

                              so that's a dead end.

                              the next three .png's are from GParted's Report -- can you extract dispositive meaning from them?


                              http://i244.photobucket.com/albums/gg20/nweissma/GParted_1.png

                              http://i244.photobucket.com/albums/gg20/nweissma/GParted_2.png

                              http://i244.photobucket.com/albums/gg20/nweissma/GParted_3.png


                              do you now have enough information to construct the correct 'installgrub' command?*

                              i am lacking the basic concepts ........

                              Edited by: Neal Weissman on Feb 16, 2012 9:37 PM
                              • 12. Re: How to repair GRUB
                                alan.pae
                                So what happens if you run format from a terminal windows as root?

                                alan
                                • 13. Re: How to repair GRUB
                                  772452
                                  ???? .. where did this come from? run "format" why ? and for that matter, how ?

                                  Edited by: Neal Weissman on Feb 16, 2012 10:50 PM

                                  Edited by: Neal Weissman on Feb 16, 2012 10:50 PM
                                  • 14. Re: How to repair GRUB
                                    alan.pae
                                    It was stated earlier also.

                                    just boot the live dvd, open a terminal window:

                                    su -

                                    format

                                    and then copy and paste it to an email to yourself and post the output here.

                                    alan
                                    1 2 Previous Next