Results 1 to 6 of 6

Thread: (10.04) I screwed up my grub

  1. #1
    Join Date
    Jun 2010
    Location
    The great state of Texas
    Beans
    73
    Distro
    Ubuntu 10.04 Lucid Lynx

    (10.04) I screwed up my grub

    I had a tri-boot setup with a small partition on my netbook, along with ubuntu netbook remix 10.10, and windows 7. I did not like 10.10, so I installed 10.04, and deleted the 10.10 partition. Now when I boot up I get the grub rescue thing. How can I restore the grub from a live cd?

  2. #2
    Join Date
    Mar 2010
    Location
    /home
    Beans
    9,397
    Distro
    Xubuntu

    Re: (10.04) I screwed up my grub

    Hi,
    use the LiveCD and post the results of the boot info script linked at the bottom of my post.

    It will tell us what is where and make offering solutions easier.

    Thanks.

  3. #3
    Join Date
    Jun 2010
    Location
    The great state of Texas
    Beans
    73
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: (10.04) I screwed up my grub

    here are the results
    Code:
                    Boot Info Script 0.55    dated February 15th, 2010                    
    
    ============================= Boot Info Summary: ==============================
    
     => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
        partition #7 for /boot/grub.
    
    sda1: _________________________________________________________________________
    
        File system:       ntfs
        Boot sector type:  Windows Vista/7
        Boot sector info:  No errors found in the Boot Parameter Block.
        Operating System:  Windows 7
        Boot files/dirs:   /bootmgr /Boot/BCD /Windows/System32/winload.exe
    
    sda2: _________________________________________________________________________
    
        File system:       
        Boot sector type:  Unknown
        Boot sector info:  
        Mounting failed:
    mount: unknown filesystem type ''
    
    sda3: _________________________________________________________________________
    
        File system:       Extended Partition
        Boot sector type:  -
        Boot sector info:  
    
    sda5: _________________________________________________________________________
    
        File system:       swap
        Boot sector type:  -
        Boot sector info:  
    
    sda6: _________________________________________________________________________
    
        File system:       ext4
        Boot sector type:  -
        Boot sector info:  
        Operating System:  Ubuntu 10.04 LTS
        Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
    
    =========================== Drive/Partition Info: =============================
    
    Drive: sda ___________________ _____________________________________________________
    
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    
    Partition  Boot         Start           End          Size  Id System
    
    /dev/sda1    *             63    77,915,249    77,915,187   7 HPFS/NTFS
    /dev/sda2         312,545,280   312,578,047        32,768  ef EFI (FAT-12/16/32)
    /dev/sda3          77,915,250   312,545,279   234,630,030   5 Extended
    /dev/sda5         306,405,376   312,545,279     6,139,904  82 Linux swap / Solaris
    /dev/sda6          77,915,376   306,391,679   228,476,304  83 Linux
    
    
    blkid -c /dev/null: ____________________________________________________________
    
    Device           UUID                                   TYPE       LABEL                         
    
    /dev/loop0                                              squashfs                                 
    /dev/sda1        BAEE4AE5EE4A9991                       ntfs       Win7                          
    /dev/sda3: PTTYPE="dos" 
    /dev/sda5        03dad46f-604c-425a-bda3-e5afacf15c53   swap                                     
    /dev/sda6        e62b7c93-defd-4e8b-a92f-b364de28f160   ext4                                     
    /dev/sda: PTTYPE="dos" 
    
    ============================ "mount | grep ^/dev  output: ===========================
    
    Device           Mount_Point              Type       Options
    
    aufs             /                        aufs       (rw)
    /dev/sr0         /cdrom                   iso9660    (ro,noatime)
    /dev/loop0       /rofs                    squashfs   (ro,noatime)
    /dev/sda6        /media/e62b7c93-defd-4e8b-a92f-b364de28f160 ext4       (rw,nosuid,nodev,uhelper=udisks)
    /dev/sda1        /media/Win7              fuseblk    (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
    
    
    =========================== sda6/boot/grub/grub.cfg: ===========================
    
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by /usr/sbin/grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
      load_env
    fi
    set default="0"
    if [ ${prev_saved_entry} ]; then
      set saved_entry=${prev_saved_entry}
      save_env saved_entry
      set prev_saved_entry=
      save_env prev_saved_entry
      set boot_once=true
    fi
    
    function savedefault {
      if [ -z ${boot_once} ]; then
        saved_entry=${chosen}
        save_env saved_entry
      fi
    }
    
    function recordfail {
      set recordfail=1
      if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
    }
    insmod ext2
    set root='(hd0,7)'
    search --no-floppy --fs-uuid --set e62b7c93-defd-4e8b-a92f-b364de28f160
    if loadfont /usr/share/grub/unicode.pf2 ; then
      set gfxmode=640x480
      insmod gfxterm
      insmod vbe
      if terminal_output gfxterm ; then true ; else
        # For backward compatibility with versions of terminal.mod that don't
        # understand terminal_output
        terminal gfxterm
      fi
    fi
    insmod ext2
    set root='(hd0,7)'
    search --no-floppy --fs-uuid --set e62b7c93-defd-4e8b-a92f-b364de28f160
    set locale_dir=($root)/boot/grub/locale
    set lang=en
    insmod gettext
    if [ ${recordfail} = 1 ]; then
      set timeout=-1
    else
      set timeout=10
    fi
    ### END /etc/grub.d/00_header ###
    
    ### BEGIN /etc/grub.d/05_debian_theme ###
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
    ### END /etc/grub.d/05_debian_theme ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Ubuntu, with Linux 2.6.32-26-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod ext2
    	set root='(hd0,7)'
    	search --no-floppy --fs-uuid --set e62b7c93-defd-4e8b-a92f-b364de28f160
    	linux	/boot/vmlinuz-2.6.32-26-generic root=UUID=e62b7c93-defd-4e8b-a92f-b364de28f160 ro   quiet splash
    	initrd	/boot/initrd.img-2.6.32-26-generic
    }
    menuentry 'Ubuntu, with Linux 2.6.32-26-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod ext2
    	set root='(hd0,7)'
    	search --no-floppy --fs-uuid --set e62b7c93-defd-4e8b-a92f-b364de28f160
    	echo	'Loading Linux 2.6.32-26-generic ...'
    	linux	/boot/vmlinuz-2.6.32-26-generic root=UUID=e62b7c93-defd-4e8b-a92f-b364de28f160 ro single 
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-2.6.32-26-generic
    }
    menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod ext2
    	set root='(hd0,7)'
    	search --no-floppy --fs-uuid --set e62b7c93-defd-4e8b-a92f-b364de28f160
    	linux	/boot/vmlinuz-2.6.32-21-generic root=UUID=e62b7c93-defd-4e8b-a92f-b364de28f160 ro   quiet splash
    	initrd	/boot/initrd.img-2.6.32-21-generic
    }
    menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod ext2
    	set root='(hd0,7)'
    	search --no-floppy --fs-uuid --set e62b7c93-defd-4e8b-a92f-b364de28f160
    	echo	'Loading Linux 2.6.32-21-generic ...'
    	linux	/boot/vmlinuz-2.6.32-21-generic root=UUID=e62b7c93-defd-4e8b-a92f-b364de28f160 ro single 
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-2.6.32-21-generic
    }
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
    	insmod ext2
    	set root='(hd0,7)'
    	search --no-floppy --fs-uuid --set e62b7c93-defd-4e8b-a92f-b364de28f160
    	linux16	/boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
    	insmod ext2
    	set root='(hd0,7)'
    	search --no-floppy --fs-uuid --set e62b7c93-defd-4e8b-a92f-b364de28f160
    	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Windows 7 (loader) (on /dev/sda1)" {
    	insmod ntfs
    	set root='(hd0,1)'
    	search --no-floppy --fs-uuid --set baee4ae5ee4a9991
    	chainloader +1
    }
    menuentry "Ubuntu, with Linux 2.6.35-22-generic (on /dev/sda5)" {
    	insmod ext2
    	set root='(hd0,5)'
    	search --no-floppy --fs-uuid --set cb55e579-7a98-4368-92c4-3d4ed6042ce3
    	linux /boot/vmlinuz-2.6.35-22-generic root=UUID=cb55e579-7a98-4368-92c4-3d4ed6042ce3 ro quiet splash acpi_osi=Linux acpi_baclight=vendor
    	initrd /boot/initrd.img-2.6.35-22-generic
    }
    menuentry "Ubuntu, with Linux 2.6.35-22-generic (recovery mode) (on /dev/sda5)" {
    	insmod ext2
    	set root='(hd0,5)'
    	search --no-floppy --fs-uuid --set cb55e579-7a98-4368-92c4-3d4ed6042ce3
    	linux /boot/vmlinuz-2.6.35-22-generic root=UUID=cb55e579-7a98-4368-92c4-3d4ed6042ce3 ro single
    	initrd /boot/initrd.img-2.6.35-22-generic
    }
    ### END /etc/grub.d/30_os-prober ###
    
    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    ### END /etc/grub.d/40_custom ###
    
    =============================== sda6/etc/fstab: ===============================
    
    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' to print the universally unique identifier
    # for a device; this may be used with UUID= as a more robust way to name
    # devices that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    # / was on /dev/sda7 during installation
    UUID=e62b7c93-defd-4e8b-a92f-b364de28f160 /               ext4    errors=remount-ro 0       1
    # swap was on /dev/sda8 during installation
    UUID=07f2e693-9a98-410e-bf3d-e122063a0f49 none            swap    sw              0       0
    
    =================== sda6: Location of files loaded by Grub: ===================
    
    
      95.8GB: boot/grub/core.img
      57.2GB: boot/grub/grub.cfg
      40.0GB: boot/initrd.img-2.6.32-21-generic
      96.0GB: boot/initrd.img-2.6.32-26-generic
      95.8GB: boot/vmlinuz-2.6.32-21-generic
      95.8GB: boot/vmlinuz-2.6.32-26-generic
      96.0GB: initrd.img
      40.0GB: initrd.img.old
      95.8GB: vmlinuz
      95.8GB: vmlinuz.old
    =========================== Unknown MBRs/Boot Sectors/etc =======================
    
    Unknown BootLoader  on sda2
    
    00000000  55 aa 03 e9 7a 00 93 00  00 00 00 00 00 00 00 00  |U...z...........|
    00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    00000020  00 00 00 00 00 00 00 00  ff ff 00 00 00 9b cf 00  |................|
    00000030  ff ff 00 00 00 93 cf 00  ff ff 00 00 00 9a 0f 00  |................|
    00000040  ff ff 00 00 00 92 0f 00  27 00 20 00 00 00 00 00  |........'. .....|
    00000050  ff ff 00 00 00 00 00 00  10 00 44 65 76 69 63 65  |..........Device|
    00000060  56 4d 20 52 6f 6d 20 4c  6f 61 64 65 72 00 00 00  |VM Rom Loader...|
    00000070  01 31 31 2f 32 32 2f 32  30 30 37 00 00 00 00 00  |.11/22/2007.....|
    00000080  0e 58 2e a3 42 02 68 00  00 1f 68 00 00 07 57 2e  |.X..B.h...h...W.|
    00000090  8d 3e 00 06 2e 80 7d 20  03 75 17 9c 60 b8 03 00  |.>....} .u..`...|
    000000a0  cd 10 61 9d 2e 8d 3e 8c  03 e8 fd 02 b4 00 50 cd  |..a...>.......P.|
    000000b0  16 58 5f b8 03 00 c1 e0  09 89 c3 0e 07 26 66 8b  |.X_..........&f.|
    000000c0  47 0c 66 85 c0 74 05 2e  66 a3 56 00 fa 66 31 c0  |G.f..t..f.V..f1.|
    000000d0  8c c8 66 c1 e0 04 2e 66  01 06 4a 00 fb 2e 66 a3  |..f....f..J...f.|
    000000e0  3a 00 b0 9a 2e a2 3d 00  66 50 e8 25 03 66 58 66  |:.....=.fP.%.fXf|
    000000f0  50 66 51 1e c8 0c 00 00  0e 1f 66 31 c0 3e a1 06  |PfQ.......f1.>..|
    00000100  00 66 c1 e0 09 66 2d 03  00 00 00 66 50 2e 66 a1  |.f...f-....fP.f.|
    00000110  56 00 66 50 66 31 c0 66  31 c9 b9 00 06 8c c8 66  |V.fPf1.f1......f|
    00000120  c1 e0 04 66 01 c8 66 50  e8 cb 01 c9 1f 66 59 66  |...f..fP.....fYf|
    00000130  58 fa 2e 0f 01 16 48 00  0f 20 c0 0c 01 0f 22 c0  |X.....H.. ....".|
    00000140  2e 66 8b 36 56 00 66 67  66 67 8b 06 66 3d eb 3e  |.f.6V.fgfg..f=.>|
    00000150  45 54 74 14 0f 20 c0 24  fe 0f 22 c0 57 2e 8d 3e  |ETt.. .$..".W..>|
    00000160  5a 03 e8 44 02 5f cd 18  0f 20 c0 24 fe 0f 22 c0  |Z..D._... .$..".|
    00000170  06 53 8c cb 8e c3 bb 00  06 e8 e0 00 5b 07 c8 0c  |.S..........[...|
    00000180  00 00 66 b8 00 02 00 00  66 50 2e 66 a1 56 00 66  |..f.....fP.f.V.f|
    00000190  50 66 31 c0 66 31 c9 b9  00 06 8c c8 66 c1 e0 04  |Pf1.f1......f...|
    000001a0  66 01 c8 66 50 e8 4e 01  c9 2e 66 8b 36 56 00 66  |f..fP.N...f.6V.f|
    000001b0  89 e0 66 50 16 66 29 db  bb 48 00 66 29 c9 8c c9  |..fP.f)..H.f)...|
    000001c0  66 c1 e1 04 66 01 d9 66  51 66 29 c0 66 29 c9 b8  |f...f..fQf).f)..|
    000001d0  08 00 66 50 b8 14 02 8c  c9 66 c1 e1 04 66 01 c1  |..fP.....f...f..|
    000001e0  66 51 66 29 c0 89 e0 66  29 c9 8c d1 66 c1 e1 04  |fQf)...f)...f...|
    000001f0  66 01 c1 fa 2e 0f 01 16  48 00 0f 20 c0 0c 01 0f  |f.......H.. ....|
    00000200

  4. #4
    Join Date
    Mar 2010
    Location
    /home
    Beans
    9,397
    Distro
    Xubuntu

    Re: (10.04) I screwed up my grub

    Thanks for the results.

    Let's try the simplest method first and see if it gets things up and running.

    From the LiveCD:

    Code:
    sudo mount /dev/sda6 /mnt
    Code:
    sudo grub-install --root-directory=/mnt/ /dev/sda
    Don't forget to run

    Code:
    sudo update-grub
    after rebooting (and hopefully getting back into Ubuntu).

  5. #5
    Join Date
    Jun 2010
    Location
    The great state of Texas
    Beans
    73
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: (10.04) I screwed up my grub

    IT WORKS! thanks a lot! I'll remember next time to properly uninstall ubuntu (I just really didn't like the new unity, and the old interface with 10.10 was extremely buggy, so I just had to go for 10.04. It is much better)

  6. #6
    Join Date
    Mar 2010
    Location
    /home
    Beans
    9,397
    Distro
    Xubuntu

    Re: (10.04) I screwed up my grub

    You are more than welcome

    Enjoy!

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
  •