Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

[SOLVED] Acessing external hard drive

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
nerd811
n00b
n00b
Posts: 36
Joined: Thu Jul 21, 2016 5:09 pm

[SOLVED] Acessing external hard drive

  • Quote

Post by nerd811 » Sat Oct 14, 2017 7:26 pm

Hi I have a usb hard drive that I want to access, but for some reason I can only access it trough Windows.And no the problem is apparently not related to my kernel because either whenever using genkernel or trying to access it trough my debian machine the partitions show up wrongly, that is on windows it says it's only a fat32 partition but on linux it shows the following:

Code: Select all

Disk /dev/sdb: 931.5 GiB, 1000204885504 bytes, 1953525167 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0x73696d20

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sdb1       1919230059 6204919772 4285689714     2T  a OS/2 Boot Manager
/dev/sdb2        544829025 1089655755  544826731 259.8G 65 Novell Netware 386
/dev/sdb3        168653938  168653938          0     0B 65 Novell Netware 386
/dev/sdb4       2885681152 2885734080      52929  25.9M  0 Empty

Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.
Partition 3 does not start on physical sector boundary.
Partition table entries are not in disk order.
Also this hard drive was partitioned on a xbox 360 since it has both my personal files and the games for the console.
Last edited by nerd811 on Sat Oct 14, 2017 9:23 pm, edited 1 time in total.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56071
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Oct 14, 2017 7:34 pm

nerd811,

Windows only sees the first partition on an external hard drive.
That will be /dev/sdb1.

However, that partition table is corrupt. partition 4 is inside partition 1, which is a very bad thing, if its real.

I suspect that the real partition table is GPT.
What does

Code: Select all

fdisk -t gpt /dev/sdb
show?
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
nerd811
n00b
n00b
Posts: 36
Joined: Thu Jul 21, 2016 5:09 pm

  • Quote

Post by nerd811 » Sat Oct 14, 2017 7:35 pm

NeddySeagoon wrote:nerd811,

Windows only sees the first partition on an external hard drive.
That will be /dev/sdb1.

However, that partition table is corrupt. partition 4 is inside partition 1, which is a very bad thing, if its real.

I suspect that the real partition table is GPT.
What does

Code: Select all

fdisk -t gpt /dev/sdb
show?
It shows the following:

Code: Select all

Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device /dev/sdb already contains a vfat signature.
The signature will be removed by a write command.

Device does not contain a recognized partition table.

Command (m for help):

Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56071
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Oct 14, 2017 9:07 pm

nerd811,

I left out an option, sorry about that

Code: Select all

fdisk -t gpt -l /dev/sdb
However, it looks like the drive is not partitioned. That would account for the odd looking partition table.
Can you mount /dev/sdb (No partition number)

Floppies are not partitioned some USB sticks are used like big floppies. *NIX does not insist that you partition a HDD either. Its unusual not to but it still works.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
nerd811
n00b
n00b
Posts: 36
Joined: Thu Jul 21, 2016 5:09 pm

  • Quote

Post by nerd811 » Sat Oct 14, 2017 9:13 pm

NeddySeagoon wrote:nerd811,

I left out an option, sorry about that

Code: Select all

fdisk -t gpt -l /dev/sdb
However, it looks like the drive is not partitioned. That would account for the odd looking partition table.
Can you mount /dev/sdb (No partition number)

Floppies are not partitioned some USB sticks are used like big floppies. *NIX does not insist that you partition a HDD either. Its unusual not to but it still works.
It shows this:

Code: Select all

Disk /dev/sdb: 931.5 GiB, 1000204885504 bytes, 1953525167 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
And if I try mounting without partition number:

Code: Select all

mount: /dev/sdb: more filesystems detected. This should not happen,
       use -t <type> to explicitly specify the filesystem type or
       use wipefs(8) to clean up the device.
EDIT: OMG thanks Neddy, I just had to type

Code: Select all

 mount -t vfat /dev/sdb /mountpoint/ 
and now it works! HOOORAYYY! But apparently normal users can't mess around with the files so I'd be thankful if you could help me with that as well.
EDIT2:forget about it already found out how the permissions work! if anyone ends up needing this in the future I used this https://www.daniweb.com/hardware-and-so ... e-in-linux I used DMR's answer.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56071
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Oct 14, 2017 9:55 pm

nerd811,

There is neither a MSDOS partition table in LBA 0, nor a GPT table starting at LBA 1, which are the normal locations for these data structures.
Nor is the drive used unpartitioned.

That hints that a non standard partition table, or table location is in a not standard location

Its possible to mount a partition without knowing the partition table if you know where the partition starts.
Run testdisk on the drive. It will attempt to detect filesystem boundaries - beware false pasitives - and offer to rewrite the partition table.
On no account allow that.

When you know potential filesystem starts, test them with,

Code: Select all

mount -o ro,offset=<bytes> /dev/sdb /some/moutpoint
You will need to convert testdisk output to bytes.
The ro option is there because you are asking the kernel to guess the filesystem type. If the kernel guess is not correct, you don't want to damage the filesystem.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Post Reply

6 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy