LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-09-2016, 02:10 PM   #1
mikeb1986
LQ Newbie
 
Registered: Mar 2011
Posts: 26

Rep: Reputation: 0
HDD parition corrupted?


Turned my PC on this morning and got

error: no such device ...
grub rescue>

I have booted into my other HDD, hoping to recover a few files from my usual HDD and go for a fresh install, but it doesnt appear on file explorer. The other parition on the drive does, but not the boot partition. Disk utility sees it as
Partition 1 629Gb Unknown (should be Ext4)

The other (working) partition appears as
Filesystem Partition 3 1.4Tb Ext4

I have run testdisk on the drive and a search of the disk shows the 2 partitions, the swap and the extended, when I try to explore files on the suspect partition it says "No file found, filesystem may be damaged". the partition I use for storage shows up the files there OK

I am unsure where to go next, I'm not bothered about the OS on there, I would just like to recover a handful of files that I know are only on that drive and I will go for a re-install, but if I could get it back to how it was that would be even better. Any help much appreciated.

For the record I am running on Linux Mint 17.1 on the second HDD, that is what should be on the broken partition too if it helps. thanks
 
Old 02-09-2016, 02:16 PM   #2
MrTux
Member
 
Registered: Dec 2015
Posts: 131

Rep: Reputation: Disabled
For it to appear you need to mount it manually.
 
Old 02-09-2016, 02:39 PM   #3
mikeb1986
LQ Newbie
 
Registered: Mar 2011
Posts: 26

Original Poster
Rep: Reputation: 0
I dont know how to do that as a command. But in Disk utitlity its not there as an option. A lot of the options are greyed out and theres no filesystem listed for it. Where the other say Ext4 or Swap for example, this says unknown
 
Old 02-09-2016, 03:03 PM   #4
MrTux
Member
 
Registered: Dec 2015
Posts: 131

Rep: Reputation: Disabled
have you tried doing blkid and find if your "corrupted" hard drive shows up?


if so try mounting it.

mount /dev/sdX /mnt

not sure if ubuntu has a /mnt if not make it

mkdir /mnt


NOTE: I assume you are using root.

IF it happens to show up, I would backup all important data right away!!!!!!
 
Old 02-09-2016, 03:12 PM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,124

Rep: Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346
If testdisk can't find any evidence of an ext4 filesystem, that's pretty bad. It suggests that not only is the primary super block destroyed but the backup super blocks as well. Another possibility is that the partition table entry for that partition has been damaged. What is the output from "fdisk -lu /dev/sda" (substituting the correct device if it is not "sda")? What happens if you try to run "fsck.ext4 -n /dev/sda1"? (Again, substitute the correct device, and do not leave out the "-n". At this point you do not want fsck to try to "fix" anything. That could be disasterous.)

When you post output, please include the actual command you ran, and wrap it all in [CODE] ... [/CODE] tags to preserve formatting.
 
Old 02-09-2016, 10:32 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,677

Rep: Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260
Might be worth it to make a dd or partimage or gparted partition image of it before you play with it too much.


I've seen deals like this where you might try to manually edit partition information.
 
Old 02-10-2016, 01:52 AM   #7
mikeb1986
LQ Newbie
 
Registered: Mar 2011
Posts: 26

Original Poster
Rep: Reputation: 0
Thank you everyone for replies.
I don't know what I did if anything, other than scanning it with test disk, but this morning I have a different error on startup.

On another note I can now mount the disk when I startup on another HDD and it is showing as Ext4, and have backed up what I need, so far it all seems to be uncorrupt.

While I would like to know what happened, I think I'm just going to go for a format and reinstall on the drive and see if anything unusual happens. The only bit I'm not sure about in the commands suggested is the "partition 2 does not start on a physical sector boundary" or is this normal? sdb1 is the partition that wasn't working, sdb3 is the "storage" partition with no OS

Code:
mike-study mike # fdisk -lu /dev/sdb

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000238e5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  1227923455   613960704   83  Linux
/dev/sdb2      3890325502  3907028991     8351745    5  Extended
Partition 2 does not start on physical sector boundary.
/dev/sdb3      1227923456  3890323455  1331200000   83  Linux
/dev/sdb5      3890325504  3907028991     8351744   82  Linux swap / Solaris

Partition table entries are not in disk order

mike-study mike # fsck.ext4 -n /dev/sdb1
e2fsck 1.42.9 (4-Feb-2014)
/dev/sdb1: clean, 297309/38379520 files, 29420213/153490176 blocks
Thanks again for replies
 
Old 02-10-2016, 10:04 AM   #8
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,124

Rep: Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346
Quote:
Originally Posted by mikeb1986 View Post
The only bit I'm not sure about in the commands suggested is the "partition 2 does not start on a physical sector boundary" or is this normal? sdb1 is the partition that wasn't working, sdb3 is the "storage" partition with no OS

Code:
mike-study mike # fdisk -lu /dev/sdb

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000238e5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  1227923455   613960704   83  Linux
/dev/sdb2      3890325502  3907028991     8351745    5  Extended
Partition 2 does not start on physical sector boundary.
/dev/sdb3      1227923456  3890323455  1331200000   83  Linux
/dev/sdb5      3890325504  3907028991     8351744   82  Linux swap / Solaris

Partition table entries are not in disk order
For the extended partition that physical sector alignment does not matter. What matters is that all of your other partitions are properly aligned. Misalignment severely affects write performance in drives with physical sectors larger than the logical sector size, but the only thing misaligned here is the header on that extended partition. The only time that header is written is when you are repartitioning the disk. (For that matter, the only time it is read is during booting or when you run commands like fdisk that read partition information from the disk.)
 
Old 02-10-2016, 09:08 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,677

Rep: Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260Reputation: 2260
Controller on drive?
 
Old 02-10-2016, 09:18 PM   #10
BW-userx
Senior Member
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Void Linux / Slackware 14.2
Posts: 3,096

Rep: Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531Reputation: 531
Quote:
Originally Posted by mikeb1986 View Post
Turned my PC on this morning and got

error: no such device ...
grub rescue>

I have booted into my other HDD, hoping to recover a few files from my usual HDD and go for a fresh install, but it doesnt appear on file explorer. The other parition on the drive does, but not the boot partition. Disk utility sees it as
Partition 1 629Gb Unknown (should be Ext4)

The other (working) partition appears as
Filesystem Partition 3 1.4Tb Ext4

I have run testdisk on the drive and a search of the disk shows the 2 partitions, the swap and the extended, when I try to explore files on the suspect partition it says "No file found, filesystem may be damaged". the partition I use for storage shows up the files there OK

I am unsure where to go next, I'm not bothered about the OS on there, I would just like to recover a handful of files that I know are only on that drive and I will go for a re-install, but if I could get it back to how it was that would be even better. Any help much appreciated.

For the record I am running on Linux Mint 17.1 on the second HDD, that is what should be on the broken partition too if it helps. thanks
\
soory wrong post LoL removed what I had and put in right post ...

Last edited by BW-userx; 02-10-2016 at 09:20 PM.
 
  


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
[SOLVED] Booting LFS on separate USB HDD + separate /boot parition nivwusquorum Linux From Scratch 33 12-14-2011 07:38 AM
corrupted HDD: need to place backup onto different HDD Cyberman Linux - Desktop 6 09-26-2009 11:51 PM
Duplicating a corrupted HDD carlos_vcan Linux - Newbie 6 05-23-2008 03:58 PM
power failure corrupted parition nifflerX Linux - General 6 10-21-2004 12:08 PM
corrupted bz2's .... hdd problem? SiQDiZ Slackware 7 06-04-2003 02:47 AM


All times are GMT -5. The time now is 01:15 AM.

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