LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-15-2010, 04:34 PM   #1
deliz
LQ Newbie
 
Registered: Feb 2010
Posts: 5

Rep: Reputation: 0
Partition "erased" ?


Okay Guys, today when I enter Ubuntu as usual, i get on the screen to log on then i insert my login data, and the pc froze up. I try again and nothing. Came to mind that would be HDD bad-blocks, which have a long and boring history with them.

Okay, I log on Windows, I do some stuff, then I go back to ubuntu, and same thing. I've tried running fsck in the shell (recovery option on grub) , but has not had any results. The fsck just tried, but it get some error or something.

After fsck I restart, the screen show ERROR 17 in Grub, had given it before, I thought it was nothing, just reinstall grub. Ok

So i put the ubuntu liveCD to try to recover Grub, and the Grub was like impossible to recover or install. Nice to mention that i was checking the HDD to see if everything was straight, and only came to the Windows partition, ubuntu partition did not appear. I had noticed that was strange, but ok.

After a while i managed to recover the Windows MBR, then I want to use explore2fs to save some files from ubuntu and then format the entire hard drive, but nothing, had no unit available to chose there, all in white, no options, no hda or sda.

I lost everything? It is not possible, I have too many things there, they can not be thrown away

Some guys told me that my partition got lost into HDD.
Here some things that i try already -

Quote:
ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa820a820

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 1658 13209600 6 FAT16
Partition 2 does not end on cylinder boundary.
/dev/sda3 1658 5099 27643904 7 HPFS/NTFS
Partition 3 does not end on cylinder boundary.
/dev/sda4 5100 9733 37222605 5 Extended
/dev/sda5 5100 9546 35720496 83 Linux
/dev/sda6 9547 9733 1502046 82 Linux swap / Solaris
Quote:
ubuntu@ubuntu:~$ sudo mount /dev/sda4
mount: can't find /dev/sda4 in /etc/fstab or /etc/mtab
Quote:
ubuntu@ubuntu:~$ sudo mount /dev/sda4 /media/disk
mount: you must specify the filesystem type
Quote:
ubuntu@ubuntu:~$ sudo mount -t ext2 /dev/sda4 /media/disk
mount: wrong fs type, bad option, bad superblock on /dev/sda4,
missing codepage or helper program, or other error
(aren't you trying to mount an extended partition,
instead of some logical partition inside?)
In some cases useful info is found in syslog - try
dmesg | tail or so

ps: sorry for the bad english
ps2? sorry if i post it at the wrong board
 
Old 02-15-2010, 04:56 PM   #2
mpier
Member
 
Registered: Jan 2008
Location: Poland
Distribution: Slackware, Arch
Posts: 38

Rep: Reputation: 17
Hi,
my english isn't so good, but i sought to use it. Reading is quite useful ability and not so hard, than you should try it. fdisk -l! What is sda4? See?

Last edited by mpier; 02-15-2010 at 04:57 PM.
 
Old 02-15-2010, 05:09 PM   #3
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 78
I believe that ubuntu uses the default in grub.conf:

Code:
title Ubuntu, kernel 2.6.20-15-generic
root (hd0,3)
kernel /boot/vmlinuz-2.6.20-15-generic  root=UUID=65619789-a4bf-4d31-9957-6b3d4cdb5c6f ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
this suggests that your linux partition is in sda4. your partition table shows sda4 as being the beginning of the extended partition and sda5 being your actual linux partition. grub.conf should be changed to

Code:
title Ubuntu, kernel 2.6.20-15-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.20-15-generic  root=UUID=65619789-a4bf-4d31-9957-6b3d4cdb5c6f ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic

The error 17 is telling you that grub cannot find the root partition
 
Old 02-15-2010, 08:41 PM   #4
deliz
LQ Newbie
 
Registered: Feb 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bret381 View Post
I believe that ubuntu uses the default in grub.conf:

Code:
title Ubuntu, kernel 2.6.20-15-generic
root (hd0,3)
kernel /boot/vmlinuz-2.6.20-15-generic  root=UUID=65619789-a4bf-4d31-9957-6b3d4cdb5c6f ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
this suggests that your linux partition is in sda4. your partition table shows sda4 as being the beginning of the extended partition and sda5 being your actual linux partition. grub.conf should be changed to

Code:
title Ubuntu, kernel 2.6.20-15-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.20-15-generic  root=UUID=65619789-a4bf-4d31-9957-6b3d4cdb5c6f ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic

The error 17 is telling you that grub cannot find the root partition
sure, but how can i change the grub.conf if i can`t mount the partitions?
i try to fix grub using this method:

Quote:
sudo grub
find /boot/grub/stage1
root (hd0,?)
setup (hd0)
quit
but when i ask him to find the stage1, i got -

Quote:
find /boot/grub/stage1

Error 15: File not found
I already had recovered the grub by this way like a million times, and now i just cant :/
 
Old 02-15-2010, 09:53 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,838

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
You can't mount an extended partition - try your mount comannd as /dev/sda5.
 
Old 02-15-2010, 10:26 PM   #6
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 78
sudo mount -t ext3 (or whatever file system type your using) /dev/sda5 /mount_point
 
Old 02-16-2010, 08:50 AM   #7
deliz
LQ Newbie
 
Registered: Feb 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bret381 View Post
sudo mount -t ext3 (or whatever file system type your using) /dev/sda5 /mount_point
Quote:
ubuntu@ubuntu:~$ sudo mount /dev/sda5 /mnt/tmp
mount: you must specify the filesystem type
Quote:
ubuntu@ubuntu:~$ sudo mount -t ext2 /dev/sda5 /mnt/tmp
mount: wrong fs type, bad option, bad superblock on /dev/sda5,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
i tried mounting as ext2 and ext3, same error

ps: maybe useful
Quote:
ubuntu@ubuntu:~$ sudo file -s /dev/sda5
/dev/sda5: ACB archive data

Last edited by deliz; 02-16-2010 at 08:53 AM.
 
Old 02-16-2010, 09:16 AM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
The default filesystem for Ubuntu 9.10 is ext4 according to the Ubuntu site (half way down this page):

http://www.ubuntu.com/getubuntu/rele...es/910overview
 
Old 02-16-2010, 09:35 AM   #9
deliz
LQ Newbie
 
Registered: Feb 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
The default filesystem for Ubuntu 9.10 is ext4 according to the Ubuntu site (half way down this page):

http://www.ubuntu.com/getubuntu/rele...es/910overview
My version is 8.04
 
Old 02-16-2010, 04:33 PM   #10
deliz
LQ Newbie
 
Registered: Feb 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Hey guys

i do some stuff

Quote:
ubuntu@ubuntu:~$ sudo e2fsck -p /dev/sda5
e2fsck: Bad magic number in super-block while trying to open /dev/sda5
/dev/sda5:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
So i shutdown for like 5 hours, and try just

Quote:
sudo e2fsck /dev/sda5
and it worked! it is fixed now

ty guys
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
my "yum" got erased seeker48 Linux - Newbie 16 03-18-2009 02:22 PM
hard drives come up "no partition table" and "in use by another program" marti972 Linux - Newbie 3 03-17-2009 12:44 AM
Unable to reinstall Windows after "erased" and encrypted Fedora 9 installation famdabur General 3 01-27-2009 08:13 AM
fdisk reports odd "Start "and "End" sectors on single partition eponymous Linux - Software 3 10-01-2007 04:41 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 09:31 AM


All times are GMT -5. The time now is 06:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration