Announcement

Collapse
No announcement yet.

MBR and SGD boot problems

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

    MBR and SGD boot problems

    I was forced to reinstall Windows XP and now the GRUB MBR is gone.

    Here's my setup:

    3 GB WinXP SP3
    1 GB swap
    5 GB Kubuntu 9.04
    28 GB /home

    That would put Kubuntu at (hd0,2). SGD got it right. However, it freezes at:

    Filesystem type is ext2fs, partition type 0x83
    setup (hd0)
    Checking if "/boot/grub/stage1" exists... yes
    Checking if "/boot/grub/stage2" exists... yes
    Checking if "/boot/grub/e2fs_stage1_5" exists... yes
    Running "embed /boot/grub/e2fs_stage1_5 (hd)"... _ <------ and it stays like that forever
    PS: I ran "auto_super_grub_disk_1.9_alternate.exe" from Windows. Auto, Manual, nothing works...

    (hd0,2) is ext4 and it sees it as "ext2fs". Could that be it ?

    #2
    Re: MBR and SGD boot problems

    "(hd0,2) is ext4 and it sees it as "ext2fs". Could that be it ?"
    Maybe.

    Looks like you are using the old (and good ) GRUB legacy 0.97 (i.e., not GRUB 2).
    So Section 3 of this will show you how to reinstall GRUB to the MBR of that drive (you will do this work from a Live CD). It's the part about root-setup-quit that you want. Should be no problems:
    How To GRUB Methods - Toolkit
    http://kubuntuforums.net/forums/inde...opic=3081671.0
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Re: MBR and SGD boot problems

      Yes, I checked that out before posting. Especially SECTION 6, "Re-installed XP and now can't boot Kubuntu". The thing is, the only available medium I have is a USB stick with GRUB, the WinXP install files and Parted Magic on it.

      Can I use Parted Magic to restore the MBR ?

      sudo grub
      find /boot/grub/stage1
      root (hd0,2)
      setup (hd0)
      quit

      Edit:

      grub> find /boot/grub/stage1

      Error 15: File not found
      I think I need to chroot or something... How do I do that ?

      This should probably be in the Newbie section, right ? Please help.

      Comment


        #4
        Re: MBR and SGD boot problems

        You don't have the Kubuntu live CD?
        Or a GParted Live CD? (or any Linux Live CD?)

        You can use SGD live CD:
        when you get to a menu, hit the "c" key to get "your own" GRUB prompt, grub>, then proceed with root--setup--quit.
        (The error 15 is confusing, though! Re-installing Windows would NOT destroy stage1).
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          Re: MBR and SGD boot problems

          File not found perhaps because I tried it from Parted Magic (v4.8 ) instead of the Kubuntu Live CD.

          Is the find command supposed to search all partitions ? Maybe I haven't specified for it to look in hd0,2 ? Like set a root or rootnoverify or something like that...



          PS: I'm writing this from Parted Magic right now. So basically I have everything I need, except for the proper commands to input. Woe-is-me...

          Comment


            #6
            Re: MBR and SGD boot problems

            No experience with Parted Magic, sorry.
            (Just checked: Parted Magic DOES contain GParted, so you should be OK with that.)

            The GRUB find command will search all partitions for the file you specify:
            grub>find /boot/grub/stage1

            You do have the SGD CD, right?
            And you are sure you are not using GRUB 2.
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              Re: MBR and SGD boot problems

              No, definitely not GRUB 2.

              From inside Parted Magic 4.8:

              [img width=400 height=266]http://f.imagehost.org/0260/Screenshot_8.png[/img]


              Edit: I still think it's because GRUB sees the partition as "ext2fs" instead of ext4. I may need to reinstall Kubuntu... Damn...

              Comment


                #8
                Re: MBR and SGD boot problems

                pmagic works very well. I use it all the time.
                Can you please output the following so we don't have to guess

                from pmagic you don't need sudo:

                Code:
                fdisk -l
                blkid
                and from kbuntu:
                Code:
                cat /boot/menu.lst
                Boot Info Script

                Comment


                  #9
                  Re: MBR and SGD boot problems

                  Code:
                  Welcome - Parted Magic (Linux 2.6.32.2-pmagic)
                  Most of the filesystem tools and partition programs featured by Parted Magic
                  include man pages. To read a manual page, simply type man and
                  the name of the tool. (Examples: 'man ntfsprogs' or 'man fdisk')
                  
                  root@PartedMagic:~# fdisk -l
                  
                  Disk /dev/hda: 40.0 GB, 40027029504 bytes
                  255 heads, 63 sectors/track, 4866 cylinders
                  Units = cylinders of 16065 * 512 = 8225280 bytes
                  Disk identifier: 0x0003dab7
                  
                    Device Boot   Start     End   Blocks  Id System
                  /dev/hda1  *      1     392   3148708+  7 HPFS/NTFS
                  /dev/hda2       393     523   1052257+ 82 Linux swap / Solaris
                  /dev/hda3       524    1176   5245222+ 83 Linux
                  /dev/hda4      1177    4866  29639925  83 Linux
                  
                  Disk /dev/sda: 500.1 GB, 500107862016 bytes
                  255 heads, 63 sectors/track, 60801 cylinders
                  Units = cylinders of 16065 * 512 = 8225280 bytes
                  Disk identifier: 0x95508af3
                  
                    Device Boot   Start     End   Blocks  Id System
                  /dev/sda1        1    60801  488384001  7 HPFS/NTFS
                  
                  Disk /dev/sdb: 500.1 GB, 500107862016 bytes
                  255 heads, 63 sectors/track, 60801 cylinders
                  Units = cylinders of 16065 * 512 = 8225280 bytes
                  Disk identifier: 0xdfa5dfa5
                  
                    Device Boot   Start     End   Blocks  Id System
                  /dev/sdb1        1    60801  488384001  7 HPFS/NTFS
                  
                  Disk /dev/sdc: 4009 MB, 4009754624 bytes
                  124 heads, 62 sectors/track, 1018 cylinders
                  Units = cylinders of 7688 * 512 = 3936256 bytes
                  Disk identifier: 0x25ea8b53
                  
                    Device Boot   Start     End   Blocks  Id System
                  /dev/sdc1  *      1     258   987966  c W95 FAT32 (LBA)
                  Partition 1 has different physical/logical beginnings (non-Linux?):
                     phys=(0, 1, 1) logical=(0, 1, 2)
                  Partition 1 has different physical/logical endings:
                     phys=(122, 254, 63) logical=(257, 2, 55)
                  Partition 1 does not end on cylinder boundary.
                  /dev/sdc2       258     258     31+ 21 Unknown
                  Partition 2 has different physical/logical beginnings (non-Linux?):
                     phys=(123, 0, 1) logical=(257, 2, 56)
                  Partition 2 has different physical/logical endings:
                     phys=(123, 0, 63) logical=(257, 3, 56)
                  Partition 2 does not end on cylinder boundary.
                  root@PartedMagic:~# 
                  root@PartedMagic:~# 
                  root@PartedMagic:~# blkid
                  /dev/loop0: TYPE="squashfs" 
                  /dev/loop1: TYPE="squashfs" 
                  /dev/loop2: TYPE="squashfs" 
                  /dev/hda1: UUID="522C3BBE2C3B9BC3" TYPE="ntfs" 
                  /dev/hda2: UUID="58cac7ba-59cd-4377-9577-28c8a397172b" TYPE="swap" 
                  /dev/hda3: UUID="6afd2824-4267-4381-b5cb-02871c2b4fa8" TYPE="ext4" 
                  /dev/hda4: UUID="80678507-7891-45c4-8f21-dd0495ed4fa9" TYPE="ext4" 
                  /dev/sda1: UUID="F468D8CB68D88E2C" TYPE="ntfs" 
                  /dev/sdb1: UUID="BEA87153A8710B63" TYPE="ntfs" 
                  /dev/sdc1: LABEL="WinXP SP3" UUID="B5C2-2F11" TYPE="vfat" 
                  root@PartedMagic:~# 
                  root@PartedMagic:~# 
                  root@PartedMagic:~# cat /boot/menu.lst
                  cat: can't open '/boot/menu.lst': No such file or directory
                  root@PartedMagic:~#
                  sdc1 is the USB stick with WinXP setup files and Parted Magic.
                  No such file or directory... Shouldn't I have changed dir there ? Like "cd /dev/hda3" or something ?

                  Edit: I think "cat /boot/grub/menu.lst" would've probably worked. Anyway, here's menu.lst:

                  ## ## End Default Options ##

                  title Ubuntu 9.04, kernel 2.6.28-11-generic
                  uuid 6afd2824-4267-4381-b5cb-02871c2b4fa8
                  kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=6afd2824-4267-4381-b5cb-02871c2b4fa8 ro quiet splash
                  initrd /boot/initrd.img-2.6.28-11-generic
                  quiet

                  title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
                  uuid 6afd2824-4267-4381-b5cb-02871c2b4fa8
                  kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=6afd2824-4267-4381-b5cb-02871c2b4fa8 ro single
                  initrd /boot/initrd.img-2.6.28-11-generic

                  title Ubuntu 9.04, memtest86+
                  uuid 6afd2824-4267-4381-b5cb-02871c2b4fa8
                  kernel /boot/memtest86+.bin
                  quiet

                  ### END DEBIAN AUTOMAGIC KERNELS LIST

                  # This is a divider, added to separate the menu items below from the Debian
                  # ones.
                  title Other operating systems:
                  root


                  # This entry automatically added by the Debian installer for a non-linux OS
                  # on /dev/sda1
                  title Microsoft Windows XP Professional
                  rootnoverify (hd0,0)
                  savedefault
                  chainloader +1

                  Comment


                    #10
                    Re: MBR and SGD boot problems

                    Not sure where we're at here. You found the menu.lst, so that's a good thing. Now just gotta do the root-setup-quit thing to re-install GRUB. See the how-to for using the geometry command to determine exactly how BIOS and GRUB are seeing your drives:
                    grub>geometry (hd,press the TAB key now>
                    and
                    grub>geometry (hd1)
                    grub>geometry (hd2)
                    etc.

                    Find out exactly where Kubuntu is: (hdx,y).
                    Then
                    grub>root (hdx,y)
                    grub>setup (hdz)
                    grub>quit

                    where hdz = the MBR of the first BIOS boot drive.
                    That should do it.
                    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                    Comment


                      #11
                      Re: MBR and SGD boot problems

                      It appears that your booting 9.04 off of this partition:
                      Code:
                      /dev/hda3: UUID="6afd2824-4267-4381-b5cb-02871c2b4fa8" TYPE="ext4"
                      Is this partition "/home" perhaps- fstab would confirm:
                      Code:
                      /dev/hda4: UUID="80678507-7891-45c4-8f21-dd0495ed4fa9" TYPE="ext4"
                      Boot Info Script

                      Comment

                      Working...
                      X