LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 11-13-2008, 12:22 PM   #31
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88

Can you get a friend to mount it and unmount it safely inside a windows environment?
 
Old 11-13-2008, 01:22 PM   #32
bergzan
LQ Newbie
 
Registered: Aug 2008
Location: Ljubljana
Posts: 19

Original Poster
Rep: Reputation: 0
sadly but i can't
thats why im asking if there is any other way (cos if there is not i will need to install vista and than ubuntu again
 
Old 11-13-2008, 04:56 PM   #33
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Quote:
Originally Posted by bergzan View Post
ok 350GB external disk is now readable (gues i need to format the comp and get vista on and than ubuntu again)
Well, you would have guessed wrong.

Quote:
This doesn't look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/sdb1 ? 410 119791 958924038+ 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sdb2 ? 121585 234786 909287957+ 43 Unknown
Partition 2 does not end on cylinder boundary.
/dev/sdb3 ? 14052 14052 5 72 Unknown
Partition 3 does not end on cylinder boundary.
/dev/sdb4 164483 164486 25945 0 Empty
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order
Haha - as far as I'm aware only winduhs could screw up a partition table like this - it even manages to confuse itself. I don't understand why fdisk is complaining about the cylinder boundary though.

You can try to mount that partition:
sudo mount -t ntfs-3g /dev/sdb1 /mnt -o rw,force,uid=(your non-root user's UID)

Your non-root user should then be able to browse (and write) the contents in /mnt. If that works, you can create an fstab entry to allow normal users to mount sdb1.
 
Old 11-14-2008, 05:17 AM   #34
bergzan
LQ Newbie
 
Registered: Aug 2008
Location: Ljubljana
Posts: 19

Original Poster
Rep: Reputation: 0
i tiped
sudo mount -t ntfs-3g /dev/sdb1 /mnt -o rw,force,uid= in terminal

and all it did was that i couldnt even see the 500GB anymore and i need to restart computer so can see it again
 
Old 11-14-2008, 04:31 PM   #35
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Well, there's something seriously wrong (which fdisk may be hinting at about partition boundaries). You may have to install Visduh after all and recover your files. It's really hard to figure these things out remotely; it's always better to sit in front of the computer.
 
Old 11-15-2008, 02:25 AM   #36
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Are you certain that you entered "sudo /sbin/fdisk -l /dev/sdb". Your posted results look like you entered "sudo /sbin/fdisk -l /dev/sdb1" instead.

If "sudo /sbin/fdisk -l /dev/sdb" works, also look at "sudo /sbin/fdisk -lu /dev/sdb" as well. Guessing correctly where a partition starts, it is possible to use losetup to create a loop device, which is attached to /dev/sdb at the correct offset. Then if the filesystem is OK, you can still mount the first partition, even though the partition table is trashed.
You can almost bet the farm that the first partition starts on block 63. So, it the partition table is trashed but the first partition is OK, you can do this to mount it:
Code:
# Attach loop device to /dev/sdb.  Will return which loop device was used.  This example assumes /dev/loop0.
sudo /sbin/losetup -fs /dev/sdb -o $((63*512))
#create a directory for the mount point (or use an existing one)
sudo mkdir /mnt/rescu
# mount the filesystem on /dev/loop0
sudo mount -t ntfs-3g /dev/loop0 /mnt/rescu
You can also use this method to mount a partition found on an image file.

Once mounted, backup the files you want to save. After that, use fdisk to recreate the correct partition table. Use the "-u" option with fdisk so that you don't get rounding down errors. This can cause problems on the first partition or for partitions that aren't on cylinder boundaries.

Last edited by jschiwal; 11-15-2008 at 02:33 AM.
 
  


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



LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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