LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 06-17-2005, 03:20 PM   #1
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Rep: Reputation: 45
Lost NTFS partition?


Everything (well almost evrything) was working seemingly. Then when I next rebooted I noticed that I couldn't access one of my partitions on my 80GB hard drive. The following (part) output is from: # fdisk -l

Code:
Disk /dev/hda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1912    15358108+   7  HPFS/NTFS
/dev/hda2            1913        9963    64669657+   f  W95 Ext'd (LBA)
/dev/hda3            3188        9963    54428188+   7  HPFS/NTFS
/dev/hda5            1913        3187    10241374+   c  W95 FAT32 (LBA)
It can see hda5. But it doesn't want to mount hda3. The /etc/fstab file is as follows:

Code:
/dev/hdc2            /                    ext3       acl,user_xattr        1 1
/dev/hdd1            /mnt/media_store     ntfs       user,umask=0          0 0
/dev/hdc1            swap                 swap       pri=42                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
proc                 /proc                proc       defaults              0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
sysfs                /sys                 sysfs      noauto                0 0
/dev/dvdrecorder     /media/dvdrecorder   subfs      fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd0             /media/floppy        subfs      fs=floppyfss,procuid,nodev,nosuid,sync 0 0
/dev/hda3	     /mnt/windows	  ntfs	     user,umask=0	   0 0
/dev/hda5            /mnt/shared          vfat       user,umask=0          0 0
The strange thing is that although hda1 and hda3 are NTFS partitions, the following is what LVM shows. They are definitely not Linux native partitions.
 
Old 06-17-2005, 05:02 PM   #2
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: Ubuntu
Posts: 3,517

Rep: Reputation: 58
Did you try manual mounting with 'mount /dev/hda3'? Maybe you need to set the option 'auto' for automated mounting of that partition.
 
Old 06-18-2005, 10:32 AM   #3
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
Looks like the problem could be a disk one. Running testdisk to check things out
 
Old 06-18-2005, 03:18 PM   #4
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
Looks like I did something to screw up the NTFS partition royally. This is what gpart returns

Code:
Begin scan...
Possible partition(Windows NT/W2K FS), size(14998mb), offset(0mb)
Possible partition(DOS FAT), size(10001mb), offset(14998mb)
Possible partition(Windows NT/W2K FS), size(0mb), offset(70046mb)
End scan.

Checking partitions...
Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): primary 
Partition(DOS or Windows 95 with 32 bit FAT): primary 
Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): primary 
Ok.

Guessed primary partition table:
Primary partition(1)
   type: 007(0x07)(OS/2 HPFS, NTFS, QNX or Advanced UNIX)
   size: 14998mb #s(30716217) s(63-30716279)
   chs:  (0/1/1)-(1023/15/63)d (0/1/1)-(30472/7/63)r

Primary partition(2)
   type: 011(0x0B)(DOS or Windows 95 with 32 bit FAT)
   size: 10001mb #s(20482748) s(30716406-51199153)
   chs:  (1023/15/63)-(1023/15/63)d (30472/10/1)-(50792/12/62)r

Primary partition(3)
   type: 007(0x07)(OS/2 HPFS, NTFS, QNX or Advanced UNIX)
   size: 0mb #s(1) s(143456166-143456166)
   chs:  (1023/15/63)-(1023/15/63)d (142317/10/1)-(142317/10/1)r

Primary partition(4)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
Partition 3 is not meant to be 0MB and I suspect there isn't supposed to be a Partition 4.

Anyone know how to recover an NTFS partition just using Linux (SuSE in this case?)
 
Old 06-18-2005, 03:28 PM   #5
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
** Error: invalid extended ptbl found at sector (30716280)

** Warning: short read near sector (160086339), 64512 bytes instead of 66048. Skipping...
End Scan.

The first one is before Begin scan... and the second one before Checking partitions...
 
Old 06-23-2005, 03:13 AM   #6
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
Ok so now I have reformatted the drive and reinstalled XP on that drive (still NTFS). Except now the mbr has been re-written and LILO no longer comes up. Problem is that I do not have my SuSE DVD with me at present (and possibly not for a while as well). So is there a boot image that I can download and be able to boot say a floppy and repair the mbr from within Linux?
 
Old 06-23-2005, 04:00 AM   #7
equinox
Member
 
Registered: Dec 2003
Location: Johannesburg, South Africa
Posts: 846

Rep: Reputation: 30
Have u got no other Linux cds? Using chroot should do the trick!
 
Old 06-23-2005, 05:27 AM   #8
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
I have a Mandrake 10.1 CD. Can I use that?
 
Old 06-23-2005, 05:50 AM   #9
equinox
Member
 
Registered: Dec 2003
Location: Johannesburg, South Africa
Posts: 846

Rep: Reputation: 30
Yup you can! Just make some mountpoints and mount your filesystems and chroot !
 
Old 06-24-2005, 03:05 AM   #10
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
equinox: to you that seems easy. can i assume you mean:

1. Boot up from the Mandrake CD
2. ?
3. ?
4. Login (presumably as root) into Mandrake?
5. # chroot
 
Old 07-03-2005, 01:24 PM   #11
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
So I have installed Mandriva Linux 2005 Limited Edition. Lilo is loaded as well.

I type chroot and nothing gives me confidence that the SuSE install is fixed
 
Old 07-03-2005, 01:40 PM   #12
equinox
Member
 
Registered: Dec 2003
Location: Johannesburg, South Africa
Posts: 846

Rep: Reputation: 30
Dude, typing chroot doesnt magically fix things ok... It's alot complicated. My advice was to boot with the MDK cds and switch to a console and mount your partitions...

i.e:

If SuSE was installed as follows:

/dev/hda1 = / (reiserfs)
/dev/hda2 = swap (swap)

You would do this:

mkdir /mnt/suse
mount -t reiserfs /dev/hda1 /mnt/suse

Then:

chroot /mnt/suse /bin/bash
OR
chroot /mnt/suse -s /bin/bash

Now after doing that, you're now in your SuSE environment. And to fix your MBR or boot problems, just run:

/sbin/lilo

Then to exit all this do:

exit
cd /
umount /mnt/suse
reboot

Am I making sense?

Last edited by equinox; 07-03-2005 at 01:44 PM.
 
Old 07-04-2005, 09:21 AM   #13
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
That should do the trick. Thanks.
 
  


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
HELP PLEASE!!! Lost NTFS Partition frijj2k Linux - General 9 05-27-2005 10:44 AM
FC2 with XP - Lost my NTFS partition amrgo Linux - General 6 08-08-2004 08:49 AM
I lost my NTFS partition by mistake using GRUB yoonsangkyun Linux - Newbie 6 06-03-2004 07:53 PM
I lost my NTFS partition by reinstalling GRUB yoonsangkyun Linux - General 4 01-22-2004 02:25 PM
Lost XP HPFS/NTFS partition ajkhan Linux - General 3 09-19-2003 07:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 11:53 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