LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-20-2008, 10:17 AM   #1
athreyavc
Member
 
Registered: May 2004
Location: bangalore
Distribution: Cent OS, Ubuntu
Posts: 116

Rep: Reputation: 15
Unable to seek on /dev/sda


Hi All,

I have triple boot on my desktop. Ubuntu 7.10 , Win XP and FC8. I have 2 80GB Hdds. Ubuntu and WinXP are on the first hdd(hda).

While editing some partitions on the WinXP , I accidently deleted a Ubuntu linux partition. Grub is still active and I can see all the OSs. But ubuntu is not booting. Then I tried to install ubuntu again

But I am not seeing any partitions on the hda. It should have shown NTFS and ext3 partitions on the hda. I saw this error

[root@localhost /]# fdisk -l

Unable to seek on /dev/sda



I can not parttion the hda either now as i have some important data on Win Partiton.

Can the partition table recovered on the hda ? If yes how? Kindly help me on this
 
Old 01-20-2008, 10:22 AM   #2
serafean
Member
 
Registered: Mar 2006
Location: Czech Republic
Distribution: Gentoo, Chakra
Posts: 997
Blog Entries: 15

Rep: Reputation: 136Reputation: 136
Hi, to recover a partition table, I know nothing better than testdisk; but before using it, BACKUP your data!!

Serafean
 
Old 01-20-2008, 11:01 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I infer that you did fdisk while running on hdb with Fedora.

First, don't do anything that could cause a write to hda. Anything that is recoverable could be overwritten by writing new data. If the data is really valuable, you might want to first clone the drive and/or get it to a recovery service.

There might be some clues in looking at the raw data in the partition table....like so:
Quote:
dd if=/dev/sda bs=1 skip=446 count=64|hexdump -C
I used sda since that was what was in the output of fdisk. (I think the latest kernels think only in sdx.) If sda doesn't work, then try hda.
Post the results here.
 
Old 01-20-2008, 12:04 PM   #4
athreyavc
Member
 
Registered: May 2004
Location: bangalore
Distribution: Cent OS, Ubuntu
Posts: 116

Original Poster
Rep: Reputation: 15
Hi All,

Thanks a lot for the quick reply.

I ran gpart on the System and surprisingly the Ubuntu is back. But WinXP is gone. I see a partition but I can not mount it it gives the error as "NTFS signature missing".

here is the fdisk output

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

Device Boot Start End Blocks Id System
/dev/sda1 1 73 586340 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 74 1410 10739388 83 Linux
/dev/sda3 * 1411 1568 1269100 82 Linux swap / Solaris
/dev/sda4 1569 2905 10739452+ f W95 Ext'd (LBA)
/dev/sda5 1569 2419 6835626 83 Linux

I am sure I have 2 NTFS partitions

Did I loose the data here ?

Please help me out

Best Regards,
 
Old 01-20-2008, 01:25 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
What is "gpart". Your post implied that it somehow fixed something so that you could see partitions on sda.

Can you confirm that the partitions you list are consistent with the Ubuntu installation? For example, it looks like you have a 500+ MB partition (used for /boot?) 10+ GB primary (maybe used for /), and a 10+ GB logical (maybe used for /home?)

What do think the partition setup should have been?---e.g. had you expected to see 1 or more primary partitions of type 7 (NTFS)?

One thing that is strange is that the swap partition is marked as active.

Can you boot into Ubuntu?

Quote:
I see a partition but I can not mount it it gives the error as "NTFS signature missing".
I see FOUR partitions (not counting the extended)--which one are you referring to?
 
Old 01-20-2008, 09:59 PM   #6
athreyavc
Member
 
Registered: May 2004
Location: bangalore
Distribution: Cent OS, Ubuntu
Posts: 116

Original Poster
Rep: Reputation: 15
Hi,

gpart is a program is found on the net to rescan the partitions on the disk and create partition table.

Yes I can boot UBUNTU.

I have two NTFS partitions setup on the disk. I can not see them . As you identified , I am surprised to see the swap partition showing active.

I remember exactly that /dev/sda3 was NTFS partiton before. While using the "Disk Management" I accidently deleted a linux partition.

Anyways , I have backed up the data previously to trying anything. So,no issues in that end. But rather than installing everything again, I want to repair it, if possible.

Thanks a lot for your quick reply

Best regards
 
Old 01-21-2008, 11:38 AM   #7
athreyavc
Member
 
Registered: May 2004
Location: bangalore
Distribution: Cent OS, Ubuntu
Posts: 116

Original Poster
Rep: Reputation: 15
Hi All,

I am able to recover everything without a hitch. The amazing utility that did the trick is "testdisk".

I ran it from the hdb i.e. from the fedora. Now all the operating systems are up and running and the DATA is intact

Thanks for all your inputs

Best Regards,

Athreya VC

This issue for me is now "SOLVED"
 
Old 01-21-2008, 12:16 PM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Thank you for reporting back. It is amazing how many people never follow-up---regardless of whether their issue was solved.
 
  


Reply



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
unable to seek on /dev/hda santhosh23 Linux - Hardware 1 01-11-2007 09:32 PM
Fdisk Error: "Unable to seek on /dev/hdb vidguy Linux - General 4 02-17-2006 10:36 PM
fdisk unable to read /dev/sda frankie_DJ Slackware 1 09-08-2005 08:44 PM
unable to find /dev/sda mcd Linux - Hardware 2 10-15-2004 01:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 02:59 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
Open Source Consulting | Domain Registration