PDA

View Full Version : [ubuntu] error: no such partition



pkristoff
January 28th, 2011, 04:35 AM
I recently had a dual boot system setup with a 64-bit & 32-bit versions of ubuntu on my machine. i booted up under a liveCD version of the 32-bit version went to Gpart and removed the 32-bit partition. now when i boot the computer i get

error: no such partition
grub rescue>

i have run the boot script the results are below. Any help would be much appreciated:


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)
/dev/sda5 /mnt/temp ext4 (rw)
/dev /mnt/temp/dev none (rw,bind)
/dev/pts /mnt/temp/dev/pts none (rw,bind)


=========================== 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 [ -s $prefix/grubenv ]; then
set have_grubenv=true
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
}

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 [ "${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.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 [ -f $prefix/custom.cfg ]; 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

Quackers
January 28th, 2011, 06:18 AM
Grub is looking for its boot files in sda7, which no longer exists.
You should re-install grub by booting from the Ubuntu live cd/usb and selecting "try ubuntu". Then, when the desktop loads copy/paste the following commands into the terminal, one line at a time and pressing enter after each line.

sudo mount /dev/sda5 /mnt
sudo grub-install --root-directory=/mnt /dev/sda
If this reports no errors, reboot and you should be good.

pkristoff
January 28th, 2011, 12:50 PM
It worked but when did

sudo mount /dev/sda5 /mnt
i got:
mount: can't find /dev/sda5 in /etc/fstab or /etc/mtab

so i did:
sudo mkdir /mnt/temp
sudo mount /dev/sda5 /mnt/temp
sudo grub-install --root-directory=/mnt/temp /dev/sda

INstallation finished. No error reported.



Thanks

Quackers
January 28th, 2011, 04:11 PM
Excellent :-) Well done!
You're welcome :-)