error: no such partition

Help
2011-01-28
2012-08-23
  • Paul Kristoff

    Paul Kristoff - 2011-01-28

    i had 2 ubuntos running on my machine a 64bit and 32bit. i removed the 32 bit
    partition and got the following:

    error: no such partition

    grub rescue >

    i ran the script it is pasted below:

    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 (,msdos7)/boot/grub.

    sda2:


    File system: Extended Partition

    Boot sector type: Unknown

    Boot sector info:

    sda5:


    File system: ext4

    Boot sector type: -

    Boot sector info:

    Operating System: Ubuntu 10.10

    Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

    sda6:


    File system: swap

    Boot sector type: -

    Boot sector info:

    =========================== 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/sda2 * 4,094 312,580,095 312,576,002 5 Extended

    /dev/sda5 4,096 310,243,327 310,239,232 83 Linux

    /dev/sda6 310,245,376 312,580,095 2,334,720 82 Linux swap / Solaris

    blkid -c /dev/null:


    Device UUID TYPE LABEL

    /dev/loop0 squashfs

    /dev/sda2: PTTYPE="dos"

    /dev/sda5 6a7b3210-b11d-4647-95e5-61f0e3908955 ext4

    /dev/sda6 7f5f2868-2730-4a03-85eb-a98e8a690292 swap

    /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)

    =========================== sda5/boot/grub/grub.cfg:

    DO NOT EDIT THIS FILE

    It is automatically generated by grub-mkconfig using templates

    from /etc/grub.d and settings from /etc/default/grub

    BEGIN /etc/grub.d/00_header

    if ; then

    set have_grubenv=true

    load_env

    fi

    set default="0"

    if ; 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 ; then

    saved_entry="${chosen}"

    save_env saved_entry

    fi

    }

    function recordfail {

    set recordfail=1

    if ; then if ; then save_env recordfail; fi; fi

    }

    function load_video {

    insmod vbe

    insmod vga

    }

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos5)'

    search --no-floppy --fs-uuid --set 6a7b3210-b11d-4647-95e5-61f0e3908955

    if loadfont /usr/share/grub/unicode.pf2 ; then

    set gfxmode=640x480

    load_video

    insmod gfxterm

    fi

    terminal_output gfxterm

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos5)'

    search --no-floppy --fs-uuid --set 6a7b3210-b11d-4647-95e5-61f0e3908955

    set locale_dir=($root)/boot/grub/locale

    set lang=en

    insmod gettext

    if ; 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.35-24-generic' --class ubuntu --class gnu-
    linux --class gnu --class os {

    recordfail

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos5)'

    search --no-floppy --fs-uuid --set 6a7b3210-b11d-4647-95e5-61f0e3908955

    linux /boot/vmlinuz-2.6.35-24-generic
    root=UUID=6a7b3210-b11d-4647-95e5-61f0e3908955 ro quiet splash

    initrd /boot/initrd.img-2.6.35-24-generic

    }

    menuentry 'Ubuntu, with Linux 2.6.35-24-generic (recovery mode)' --class
    ubuntu --class gnu-linux --class gnu --class os {

    recordfail

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos5)'

    search --no-floppy --fs-uuid --set 6a7b3210-b11d-4647-95e5-61f0e3908955

    echo 'Loading Linux 2.6.35-24-generic ...'

    linux /boot/vmlinuz-2.6.35-24-generic
    root=UUID=6a7b3210-b11d-4647-95e5-61f0e3908955 ro single

    echo 'Loading initial ramdisk ...'

    initrd /boot/initrd.img-2.6.35-24-generic

    }

    menuentry 'Ubuntu, with Linux 2.6.35-23-generic' --class ubuntu --class gnu-
    linux --class gnu --class os {

    recordfail

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos5)'

    search --no-floppy --fs-uuid --set 6a7b3210-b11d-4647-95e5-61f0e3908955

    linux /boot/vmlinuz-2.6.35-23-generic
    root=UUID=6a7b3210-b11d-4647-95e5-61f0e3908955 ro quiet splash

    initrd /boot/initrd.img-2.6.35-23-generic

    }

    menuentry 'Ubuntu, with Linux 2.6.35-23-generic (recovery mode)' --class
    ubuntu --class gnu-linux --class gnu --class os {

    recordfail

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos5)'

    search --no-floppy --fs-uuid --set 6a7b3210-b11d-4647-95e5-61f0e3908955

    echo 'Loading Linux 2.6.35-23-generic ...'

    linux /boot/vmlinuz-2.6.35-23-generic
    root=UUID=6a7b3210-b11d-4647-95e5-61f0e3908955 ro single

    echo 'Loading initial ramdisk ...'

    initrd /boot/initrd.img-2.6.35-23-generic

    }

    menuentry 'Ubuntu, with Linux 2.6.32-26-generic' --class ubuntu --class gnu-
    linux --class gnu --class os {

    recordfail

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos5)'

    search --no-floppy --fs-uuid --set 6a7b3210-b11d-4647-95e5-61f0e3908955

    linux /boot/vmlinuz-2.6.32-26-generic
    root=UUID=6a7b3210-b11d-4647-95e5-61f0e3908955 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 part_msdos

    insmod ext2

    set root='(hd0,msdos5)'

    search --no-floppy --fs-uuid --set 6a7b3210-b11d-4647-95e5-61f0e3908955

    echo 'Loading Linux 2.6.32-26-generic ...'

    linux /boot/vmlinuz-2.6.32-26-generic
    root=UUID=6a7b3210-b11d-4647-95e5-61f0e3908955 ro single

    echo 'Loading initial ramdisk ...'

    initrd /boot/initrd.img-2.6.32-26-generic

    }

    END /etc/grub.d/10_linux

    BEGIN /etc/grub.d/20_linux_xen

    END /etc/grub.d/20_linux_xen

    BEGIN /etc/grub.d/20_memtest86+

    menuentry "Memory test (memtest86+)" {

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos5)'

    search --no-floppy --fs-uuid --set 6a7b3210-b11d-4647-95e5-61f0e3908955

    linux16 /boot/memtest86+.bin

    }

    menuentry "Memory test (memtest86+, serial console 115200)" {

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos5)'

    search --no-floppy --fs-uuid --set 6a7b3210-b11d-4647-95e5-61f0e3908955

    linux16 /boot/memtest86+.bin console=ttyS0,115200n8

    }

    END /etc/grub.d/20_memtest86+

    BEGIN /etc/grub.d/30_os-prober

    menuentry "Ubuntu, with Linux 2.6.35-24-generic (on /dev/sda7)" {

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos7)'

    search --no-floppy --fs-uuid --set f66c3701-3b3a-4377-95c9-e3c071b9c5d5

    linux /boot/vmlinuz-2.6.35-24-generic
    root=UUID=f66c3701-3b3a-4377-95c9-e3c071b9c5d5 ro quiet splash

    initrd /boot/initrd.img-2.6.35-24-generic

    }

    menuentry "Ubuntu, with Linux 2.6.35-24-generic (recovery mode) (on
    /dev/sda7)" {

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos7)'

    search --no-floppy --fs-uuid --set f66c3701-3b3a-4377-95c9-e3c071b9c5d5

    linux /boot/vmlinuz-2.6.35-24-generic
    root=UUID=f66c3701-3b3a-4377-95c9-e3c071b9c5d5 ro single

    initrd /boot/initrd.img-2.6.35-24-generic

    }

    menuentry "Ubuntu, with Linux 2.6.35-22-generic (on /dev/sda7)" {

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos7)'

    search --no-floppy --fs-uuid --set f66c3701-3b3a-4377-95c9-e3c071b9c5d5

    linux /boot/vmlinuz-2.6.35-22-generic
    root=UUID=f66c3701-3b3a-4377-95c9-e3c071b9c5d5 ro quiet splash

    initrd /boot/initrd.img-2.6.35-22-generic

    }

    menuentry "Ubuntu, with Linux 2.6.35-22-generic (recovery mode) (on
    /dev/sda7)" {

    insmod part_msdos

    insmod ext2

    set root='(hd0,msdos7)'

    search --no-floppy --fs-uuid --set f66c3701-3b3a-4377-95c9-e3c071b9c5d5

    linux /boot/vmlinuz-2.6.35-22-generic
    root=UUID=f66c3701-3b3a-4377-95c9-e3c071b9c5d5 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

    BEGIN /etc/grub.d/41_custom

    if ; then

    source $prefix/custom.cfg;

    fi

    END /etc/grub.d/41_custom

    =============================== sda5/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/sda5 during installation

    UUID=6a7b3210-b11d-4647-95e5-61f0e3908955 / ext4 errors=remount-ro 0 1

    swap was on /dev/sda6 during installation

    UUID=7f5f2868-2730-4a03-85eb-a98e8a690292 none swap sw 0 0

    =================== sda5: Location of files loaded by Grub:

    15.6GB: boot/grub/core.img

    23.3GB: boot/grub/grub.cfg

    24.9GB: boot/initrd.img-2.6.32-26-generic

    32.3GB: boot/initrd.img-2.6.35-23-generic

    122.9GB: boot/initrd.img-2.6.35-24-generic

    16.2GB: boot/vmlinuz-2.6.32-26-generic

    16.1GB: boot/vmlinuz-2.6.35-23-generic

    33.3GB: boot/vmlinuz-2.6.35-24-generic

    122.9GB: initrd.img

    32.3GB: initrd.img.old

    33.3GB: vmlinuz

    16.1GB: vmlinuz.old

    =========================== Unknown MBRs/Boot Sectors/etc

    Unknown BootLoader on sda2

    00000000 10 83 41 34 01 c2 04 00 56 8b 74 24 08 8b 0e 85 |..A4....V.t$....|

    00000010 c9 74 0c 8b 01 6a 01 ff 10 c7 06 00 00 00 00 5e |.t...j.........^|

    00000020 c2 04 00 cc cc cc cc cc cc cc cc cc cc cc cc cc |................|

    00000030 8b 41 40 85 c0 74 0e 8b 54 24 04 3b 51 44 73 05 |.A@..t..T$.;QDs.|

    00000040 8b 14 90 eb 02 33 d2 32 c0 85 d2 74 11 8b 4c 24 |.....3.2...t..L$|

    00000050 08 b8 01 00 00 00 d3 e0 85 42 1c 0f 95 c0 c2 08 |.........B......|

    00000060 00 cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc |................|

    00000070 53 56 8b 71 38 8d 59 2c 3b f3 57 8b b9 a8 00 00 |SV.q8.Y,;.W.....|

    00000080 00 c7 41 0c 00 00 00 00 74 30 55 eb 03 8d 49 00 |..A.....t0U...I.|

    00000090 8b 46 08 85 c0 8b 57 08 74 15 8d 9b 00 00 00 00 |.F....W.t.......|

    000000a0 0f b6 6c 02 ff 01 69 0c 83 e8 01 85 c0 75 f1 8b |..l...i......u..|

    000000b0 76 0c 3b f3 8b 7f 0c 75 d7 5d 5f 5e 5b c3 cc cc |v.;....u.]_^[...|

    000000c0 53 55 56 8b 74 24 10 8b 46 08 39 41 08 57 74 03 |SUV.t$..F.9A.Wt.|

    000000d0 89 41 08 8d 46 24 8d 79 24 33 db 3b f8 74 3c 8b |.A..F$.y$3.;.t<.|

    000000e0 68 14 8d 50 08 3b ea 74 32 8b 51 38 8b 5a 10 89 |h..P.;.t2.Q8.Z..|

    000000f0 6b 0c 8b 6a 10 8b 58 14 89 6b 10 8b 58 18 89 53 |k..j..X..k..X..S|

    00000100 0c 8b 58 18 89 5a 10 8b 50 1c 01 57 1c 8d 50 08 |..X..Z..P..W..P.|

    00000110 33 db 89 58 1c 89 50 14 89 50 18 8d 46 5c 8d 79 |3..X..P..P..F.y|

    00000120 5c 3b f8 74 3c 8b 68 14 8d 50 08 3b ea 74 32 8b |\;.t<.h..P.;.t2.|

    00000130 51 70 8b 5a 10 89 6b 0c 8b 6a 10 8b 58 14 89 6b |Qp.Z..k..j..X..k|

    00000140 10 8b 58 18 89 53 0c 8b 58 18 89 5a 10 8b 50 1c |..X..S..X..Z..P.|

    00000150 01 57 1c 8d 50 08 33 db 89 58 1c 89 50 14 89 50 |.W..P.3..X..P..P|

    00000160 18 8d 86 94 00 00 00 8d b9 94 00 00 00 3b f8 74 |.............;.t|

    00000170 3f 8b 68 14 8d 50 08 3b ea 74 35 8b 91 a8 00 00 |?.h..P.;.t5.....|

    00000180 00 8b 5a 10 89 6b 0c 8b 6a 10 8b 58 14 89 6b 10 |..Z..k..j..X..k.|

    00000190 8b 58 18 89 53 0c 8b 58 18 89 5a 10 8b 50 1c 01 |.X..S..X..Z..P..|

    000001a0 57 1c 8d 50 08 33 db 89 58 1c 89 50 14 89 50 18 |W..P.3..X..P..P.|

    000001b0 8d 86 cc 00 00 00 8d b9 cc 00 00 00 3b f8 00 41 |............;..A|

    000001c0 02 00 83 fe ff ff 02 00 00 00 00 e0 7d 12 00 fe |............}...|

    000001d0 ff ff 05 fe ff ff 02 e0 7d 12 00 a8 23 00 00 00 |........}...#...|

    000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

    000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|

    00000200

     
  • Gert Hulselmans

    Gert Hulselmans - 2011-01-31

    grub rescue> set prefix=(hd0,5)/boot/grub

    grub rescue> insmod (hdX,Y)/boot/grub/configfile.mod
    
    set root=(hd0,5)
    configfile /boot/grub/grub.cfg
    boot
    

    Then you should be able to select a menu item in grub2.

    Fix grub2:

    grub-install /dev/sda --no-floppy
    

    Based on info found at: https://wiki.archlinux.org/index.php/GRUB2#Using_the_
    rescue_console

     

Log in to post a comment.