PDA

View Full Version : [ubuntu] Corrupted Partition after upgrade



kidwai
April 30th, 2011, 12:16 PM
I upgraded to 11.04 , that broke my GRUB . I tried everything to resolve it , i used the chroot method and everything . It didnt work , so I installed another 11.04 using livecd on a 10gb partition I had .

Now, ive got a working 11.04 BUT i cant access my orginal 220 GB partition ( which i had originally upgraded, but it went bonkers ) . Gparted shows its format as "unknown" and flags as "boot"

What can I do to recover my partition ? Its got really important info and its got a paper \i was hoping to submit (i know i should have backed up , but an upgrade never went wrong for me before.. :( )

thanks in advance
Kidwai

kidwai
May 1st, 2011, 05:17 PM
bump;

anyone please ??

Rubi1200
May 1st, 2011, 05:24 PM
Hi,

please do the following so we can see what is where on the system:

Boot the Ubuntu Live CD/USB. Choose the option "Try Ubuntu without any changes." Once the desktop loads come back here and do the following:

1. Download the boot info script. There is a link in my signature.
2. Once downloaded, move the boot info script to the desktop.
3. Open a terminal and run the command


sudo bash ~/Desktop/boot_info_script*.sh

This will create a RESULTS.txt file on the desktop. Paste the entire contents of that file back here in a new post. Once pasted highlight all text and click the # sign on the toolbar to place code tags around the text.

kidwai
May 1st, 2011, 07:24 PM
Thanks for the response. I wanted to ask you if running a LiveCD is necessary because I have 11.04 running perfectly in one partition of the hard disk.

Does it make any difference? Or should I just do as instructed by you?

Rubi1200
May 1st, 2011, 07:28 PM
Yes, it is okay to do it from the working install. Just follow the instructions from the download script part onwards.

kidwai
May 2nd, 2011, 06:05 AM
I hope this is useful in solving the problem . its sda1 that i REALLY want to recover (its a 220gb partition)


Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks for b2d.

sda1: __________________________________________________ _______________________

File system:
Boot sector type: Unknown
Boot sector info:
Mounting failed:
mount: unknown filesystem type ''

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 11.04
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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 * 2,048 469,968,895 469,966,848 83 Linux
/dev/sda2 469,970,942 488,396,799 18,425,858 5 Extended
/dev/sda5 469,970,944 488,396,799 18,425,856 83 Linux


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda2: PTTYPE="dos"
/dev/sda5 fba5388b-1e00-4be8-9991-3959c26d85ec ext4
/dev/sda: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

/dev/sda5 / ext4 (rw,errors=remount-ro,commit=600)


=========================== 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 video_bochs
insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root fba5388b-1e00-4be8-9991-3959c26d85ec
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root fba5388b-1e00-4be8-9991-3959c26d85ec
set locale_dir=($root)/boot/grub/locale
set lang=en_IN
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
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root fba5388b-1e00-4be8-9991-3959c26d85ec
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=fba5388b-1e00-4be8-9991-3959c26d85ec ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root fba5388b-1e00-4be8-9991-3959c26d85ec
echo 'Loading Linux 2.6.38-8-generic ...'
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=fba5388b-1e00-4be8-9991-3959c26d85ec ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-8-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='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root fba5388b-1e00-4be8-9991-3959c26d85ec
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos5)'
search --no-floppy --fs-uuid --set=root fba5388b-1e00-4be8-9991-3959c26d85ec
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### 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: ===============================

proc /proc proc nodev,noexec,nosuid 0 0
UUID=fba5388b-1e00-4be8-9991-3959c26d85ec / ext4 errors=remount-ro 0 1
/dev/sdb /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

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


240.7GB: boot/grub/core.img
240.7GB: boot/grub/grub.cfg
241.8GB: boot/initrd.img-2.6.38-8-generic
241.2GB: boot/vmlinuz-2.6.38-8-generic
241.8GB: initrd.img
241.2GB: vmlinuz
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader on sda1

00000000 fc 33 c0 8e d8 8e c0 be 00 7c bf 00 06 b9 00 01 |.3.......|......|
00000010 f3 a5 ea 2e 06 00 00 47 41 47 3a 20 90 00 10 00 |.......GAG: ....|
00000020 01 00 00 7c 00 00 00 00 00 00 00 00 00 00 bf 17 |...|............|
00000030 06 b4 0e bb 07 00 8a 05 3c 90 74 07 57 cd 10 5f |........<.t.W.._|
00000040 47 eb ee bf 1d 06 80 3d 00 75 5f b4 02 cd 16 a9 |G......=.u_.....|
00000050 0f 00 74 56 33 c0 8e d8 8e c0 be be 7d b9 04 00 |..tV3.......}...|
00000060 80 3c 80 74 0a 83 c6 10 e2 f6 b0 32 e9 bb 00 b2 |.<.t.......2....|
00000070 80 b4 41 bb aa 55 cd 13 72 5b 81 fb 55 aa 75 55 |..A..U..r[..U.uU|
00000080 bf 26 06 8b 4c 08 89 0d 8b 4c 0a 89 4d 02 b4 42 |.&..L....L..M..B|
00000090 be 1e 06 bb 03 00 50 56 53 b2 80 cd 13 73 30 5b |......PVS....s0[|
000000a0 5e 58 4b 75 f1 b0 31 e9 80 00 bb 7f 01 b8 00 10 |^XKu..1.........|
000000b0 8e d8 8e c0 b9 03 00 51 ba 80 00 b9 02 00 b4 02 |.......Q........|
000000c0 b0 3d 90 cd 13 73 46 59 e2 ed b0 31 eb 5c 90 5b |.=...sFY...1.\.[|
000000d0 5e 58 eb 27 90 b2 80 8a 74 01 8b 4c 02 bb 03 00 |^X.'....t..L....|
000000e0 53 51 52 bb 00 7c b8 01 02 cd 13 73 0b 5a 59 5b |SQR..|.....s.ZY[|
000000f0 4b 75 ed b0 31 eb 33 90 5a 59 5b 81 3e fe 7d 55 |Ku..1.3.ZY[.>.}U|
00000100 aa 74 05 b0 34 eb 23 90 ea 00 7c 00 00 b8 00 10 |.t..4.#...|.....|
00000110 8e c0 26 81 3e fc 02 47 41 75 0d 26 83 3e fe 02 |..&.>..GAu.&.>..|
00000120 47 75 05 ea 00 03 00 10 b0 33 bb 07 00 b4 0e cd |Gu.......3......|
00000130 10 eb fe 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000200

Unknown BootLoader on sda2

00000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
000001b0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 fe |................|
000001c0 ff ff 83 fe ff ff 02 00 00 00 00 28 19 01 00 00 |...........(....|
000001d0 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

Rubi1200
May 2nd, 2011, 07:48 AM
Sorry for asking this again, but what did you have on sda1 previously?

There seems to be damage to whatever was there:

mount: unknown filesystem type ''If you don't have any data on it, the easiest thing to do might be to simply use GParted from the LiveCD to delete and then reformat the partition.

If you want to try and fix this, then from the LiveCD do this:


sudo e2fsck -f -y -v /dev/sda1

Let the command complete and then reboot taking out the CD. Hopefully, you will be back in Ubuntu.

If not, run the boot script again and/or sudo update-grub in the working install because it probably controls booting now.


If you need to recover something, then try Testdisk from the LiveCD.

But, whatever you do, ask first if something is unclear or if you want another opinion.

kidwai
May 2nd, 2011, 08:18 AM
My 10.10 was on sda1 , i upgraded it to 11.04 but the update went haywrie, I could access it through livecd but now i cant mount it through livecd or my current install :(

I could format it, but i have some important stuff there so i'd much rather be able to recover it .

how do I run Testdisk ? is this an application in livecd or I can download it from software centre ?

btw , what is sda2 , extended logical partition ? Its 10gb and it doesnt seem to be doing anything... ?

wilee-nilee
May 2nd, 2011, 08:26 AM
My 10.10 was on sda1 , i upgraded it to 11.04 but the update went haywrie, I could access it through livecd but now i cant mount it through livecd or my current install :(

I could format it, but i have some important stuff there so i'd much rather be able to recover it .

how do I run Testdisk ? is this an application in livecd or I can download it from software centre ?

btw , what is sda2 , extended logical partition ? Its 10gb and it doesnt seem to be doing anything... ?

sda2 is the extended partition, if you open gparted you will see the second Natty is inside.

Notice the numbers here.

/dev/sda2 469,970,942 488,396,799 18,425,858 5 Extended
/dev/sda5 469,970,944 488,396,799 18,425,856 83 Linux

Rubi1200
May 2nd, 2011, 08:42 AM
I recommend trying to run the fsck first before using Testdisk.

fabricator4
May 2nd, 2011, 09:03 AM
how do I run Testdisk ? is this an application in livecd or I can download it from software centre ?

You can download it through software center, then it's run from command line. As Rubi1200 said though, try running e2fsck first and see how that works out for you, it might be able to put the ext2 type information back there (maybe...)



btw , what is sda2 , extended logical partition ? Its 10gb and it doesnt seem to be doing anything... ?

Subsequent partitions need somewhere to be, they can't be on their own. (Not quite true, but I won't go into the complexity of primary partitions and boot flags here.) The Natty installer knew that, so it made the extended partition (sda2) first, then put the new partition partition into it.

BTW, how did you happen to have a spare 10GB partition to install Natty onto? Was that your swap partition previously? It seems a little large for that. Just hoping you didn't resize the broken partition to make room for it. That would be baaaaaad. 8-[

Chris.

kidwai
May 2nd, 2011, 06:54 PM
Hi,

the e2fsck worked !!!! THANK YOU !! it gave this message . is it of any importance ? I can access the files without a problem tho



/dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****

261984 inodes used (1.78%)
406 non-contiguous files (0.2%)
507 non-contiguous directories (0.2%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 223570/159
3898705 blocks used (6.64%)
0 bad blocks
1 large file

181181 regular files
32055 directories
59 character device files
26 block device files
0 fifos
425 links
48642 symbolic links (38148 fast symbolic links)
12 sockets
--------
262400 files

kidwai
May 2nd, 2011, 06:57 PM
You can download it through software center, then it's run from command line. As Rubi1200 said though, try running e2fsck first and see how that works out for you, it might be able to put the ext2 type information back there (maybe...)



Subsequent partitions need somewhere to be, they can't be on their own. (Not quite true, but I won't go into the complexity of primary partitions and boot flags here.) The Natty installer knew that, so it made the extended partition (sda2) first, then put the new partition partition into it.

BTW, how did you happen to have a spare 10GB partition to install Natty onto? Was that your swap partition previously? It seems a little large for that. Just hoping you didn't resize the broken partition to make room for it. That would be baaaaaad. 8-[

Chris.

Thank you for the info. yes it was swap , and it was excessive , so i formatted it :D

the extended partition sda2 was there before the natty installation, i.e in 10.10 . what does this partition do tho ? Ive got two other laptops with ubuntu and none of them have this . so , is it wasting 10gb unnecessarily on this laptop ??

Rubi1200
May 2nd, 2011, 07:29 PM
Hi,

the e2fsck worked !!!! THANK YOU !! it gave this message . is it of any importance ? I can access the files without a problem tho



/dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****

261984 inodes used (1.78%)
406 non-contiguous files (0.2%)
507 non-contiguous directories (0.2%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 223570/159
3898705 blocks used (6.64%)
0 bad blocks
1 large file

181181 regular files
32055 directories
59 character device files
26 block device files
0 fifos
425 links
48642 symbolic links (38148 fast symbolic links)
12 sockets
--------
262400 files
Excellent news that you are back up and running :-)

The message is just information about the file-system characteristics and looks fairly normal to me, so don't worry.