HD partitions visible only when plugged into motherboard and not when plugged as USB device ???


PowerGod

Forum Addict!
Joined
Jun 20, 2011
Messages
4,417
My main HD broke down... it is the one with the OS, and the restore partition... that doesn t work too..

If I start the PC with a Linux live distro, I can see the content of the HD, all the partitions are there and I can read the files (at least the ones that doesn t give reading errors),
but I don t have space inside the PC for another HD, so I need to substitute it to install the OS on the new one, and then read the old things I need from this one plugged as USB device...

The thing is... when I plug it as USB, it is recognized as UNPARTITIONED !! While if I plug it again to the motherboard the partitions are all still there !!

What is this magic ?

The OS is Windows 8.1, and it was preinstalled with the PC... can I do something to make it readable outside the PC ?
I don t know what to search on the internet, I only find general tips to restore files... nothing about this thing...
 
Do you have a second computer ?
If yes just do a samba/CIFS share from Linux.
 
Hardware based encryption maybe? Is that a thing noadays?

Anyway, you said it broke down, yet you can read it? That alone is weird.
Before playing around anymore copy the data! If the HD is faulty it will only get worse and worse, so stop thinking and start the copy process.
"dd" or better "ddrescue" should be the way to go. Or if you know exactly what you need do it by hand.
Just put the the replacement HD in the usb case for now. Use a seperate partition so you can still install to it while having all the data on it.

Read the smart data with "gsmarctcontrol" to see how badly broken the HD is, smart is the statistics and health memory of a drive, note that some features of a harddrive only work on SATA and not on USB. Smart is one of them.
 
I have only this PC, and the OS doesn t start anymore with the disk, I tested it with a BIOS utility, an it say it is faulty...
With Linux I started copying files on some other external HDs I have, but I don t have so much space to put all the things I need from it... that s why I wanted to first install an OS on the new disk and then grab the files from it... but if I can t use it external I can t do this...

I could try the route of partitioning the new one as USB, in the hope that Windows installer will maintain them while installing the OS...
 
Writing more data to a drive that had some corrupted one way or the other before might not be the greatest idea to be honest.
 
I don t want to write data in the faulty one, I just want to copy from it, but it s difficult if I can t take it out from the PC
 
@PowerGod, I once had a disk that did not have partitions, so it was not sda1/hda1 that could be mounted, but directly sda/hda (saved a few bytes in partitions, which I could use as, well, storage). The "magic" could be in the bootsector of your drive, that when connected as an USB device, is ignored.
So the only way is to mount it was manually, with all parameters (knowing what fs type it was). Because that automount/fuse did not recognize it; it might be your case too.
I must say that "gparted-pkexec" could see it (that the disks had a partition). If you don't have "gparted", "cfdisk" might do the trick (but be careful to not write, just look and exit with "Quit"; it has a menu).
 
I used gparted to have a look at it when I wasn t able to mount as USB device, and it was telling full size unpartitioned... but instead, while plugged to motherboard, is seen always by gparted with 4 partitions, 2 for restore or windows things, one with EFI, and one NTFS with the OS...
 
I've copied data in the past from hard discs propped on top of my pc case connected to the computer via a molex->SATA power cable and a SATA data connector connected to a spare port. I was reliable enough for me to copy some few hundred gigs of data off of it. You can do a similar trick with PATA/IDE drives although you're more likely to not have the right cable, or both ports on your existing cable are used, although with most vintage machines of that ilk, you could disconnect the IDE CD ROM and use that port.
 
I don t have another sata cable... one day i ll find out if there are still stores around my parts that sells computer parts... in the last years they become selling complete products and nothing else... and I m too much in a hurry to buy something online
 
In the UK at least, Currys/PC World carries them albeit for significantly more than I get them online, but if in a hurry that's where I'd try, at least if I didn't have a local PC repair shop to try first.
 
Indeed, you should backup first.

What does
Bash:
cat /proc/mounts
say about your when the disk shows the partitions ?
Maybe also check dmesg.

That could help:
 
The partition is shown mounted like this
Code:
/dev/sda4 /media/sda4 fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0

while dmesg is full of error messages for that drive
Code:
.
.
.
[25404.214599] ata1.00: status: { DRDY ERR }
[25404.214601] ata1.00: error: { UNC }
[25405.926561] ata1.00: configured for UDMA/100
[25405.926575] sd 0:0:0:0: [sda] tag#16 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[25405.926577] sd 0:0:0:0: [sda] tag#16 Sense Key : Medium Error [current] [descriptor] 
[25405.926579] sd 0:0:0:0: [sda] tag#16 Add. Sense: Unrecovered read error - auto reallocate failed
[25405.926581] sd 0:0:0:0: [sda] tag#16 CDB: Read(10) 28 00 00 8f 74 a8 00 00 08 00
[25405.926583] blk_update_request: I/O error, dev sda, sector 9401512
[25405.926585] Buffer I/O error on dev sda4, logical block 788117, async page read
[25405.926600] ata1: EH complete
[25411.639800] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[25411.639803] ata1.00: irq_stat 0x40000001
[25411.639806] ata1.00: failed command: READ DMA
[25411.639808] ata1.00: cmd c8/00:08:a8:74:8f/00:00:00:00:00/e0 tag 24 dma 4096 in
                        res 51/40:00:a8:74:8f/00:00:00:00:00/00 Emask 0x9 (media error)
[25411.639810] ata1.00: status: { DRDY ERR }
[25411.639811] ata1.00: error: { UNC }
[25411.725827] ata1.00: configured for UDMA/100
[25411.725841] sd 0:0:0:0: [sda] tag#24 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[25411.725843] sd 0:0:0:0: [sda] tag#24 Sense Key : Medium Error [current] [descriptor] 
[25411.725846] sd 0:0:0:0: [sda] tag#24 Add. Sense: Unrecovered read error - auto reallocate failed
[25411.725849] sd 0:0:0:0: [sda] tag#24 CDB: Read(10) 28 00 00 8f 74 a8 00 00 08 00
[25411.725851] blk_update_request: I/O error, dev sda, sector 9401512
[25411.725854] Buffer I/O error on dev sda4, logical block 788117, async page read
[25411.725867] ata1: EH complete
[25451.145902] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[25451.145905] ata1.00: irq_stat 0x40000001
[25451.145908] ata1.00: failed command: READ DMA
[25451.145911] ata1.00: cmd c8/00:08:e8:6a:8f/00:00:00:00:00/e0 tag 18 dma 4096 in
                        res 51/40:00:e8:6a:8f/00:00:00:00:00/00 Emask 0x9 (media error)
[25451.145912] ata1.00: status: { DRDY ERR }
[25451.145913] ata1.00: error: { UNC }
[25451.237121] ata1.00: configured for UDMA/100
[25451.237135] sd 0:0:0:0: [sda] tag#18 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[25451.237137] sd 0:0:0:0: [sda] tag#18 Sense Key : Medium Error [current] [descriptor] 
[25451.237140] sd 0:0:0:0: [sda] tag#18 Add. Sense: Unrecovered read error - auto reallocate failed
[25451.237142] sd 0:0:0:0: [sda] tag#18 CDB: Read(10) 28 00 00 8f 6a e8 00 00 08 00
[25451.237144] blk_update_request: I/O error, dev sda, sector 9399016
[25451.237147] Buffer I/O error on dev sda4, logical block 787805, async page read
[25451.237161] ata1: EH complete
.
.
.

That GPT discussion is really interesting, it could really explain my situation.

I ll try the GPT moving trick after I finished to backup the most important files... the disk seems really in a bad shape.
 
If it is the USB connection messing up the sector size, then plugging it in via SATA cables with the side of the computer off should bypass that problem.

That said, I've never caught my USB-connected HDD caddy doing anything like that. A hard disc that originated inside a portable HDD might be formatted all kind of strange ways, but given this drive originated from the computer's SATA connector it doesn't apply to this.
 
I m reading it via SATA already, it is the only way to see the partitions...

The HD was preinstalled with windows OEM and some HP tools to update firmwares and drivers... and a lot of other things that I removed immediately...

I was lucky anyway... a Windows installation never worked for so many years without issues... and actually it s the disk that failed here...
 
Maybe the Pandora now will help in the transition... I was able to ssh to it, to copy the Win 8.1 ISO that I just donwloaded (luckily I made a copy of the activation code previously, even if could be not necessary because OEM code should be already in the hardware)... at least I can try if ISO Optical Drive works in this case...

Else I ll have to find out a Windows PC to use their official USB creator...

P.S.: watching a TV serie on the Pandora while receiving the files... I m so proud of this old device :)
I didn t use it to backup the files of the faulty HD just because no USB3... and I had to move TBs of things...
 
Last edited:
How about: put the new drive in the computer, install the new OS, put the old drive back in the computer and the new drive into the USB thing, then copy the files over using the Linux live distro.
 
First of all, I still don t have an installation support with Windows, I need to create a DVD or an USB key, and for the first, I remember that not all burning softwares were putting in it the right flag to make it autobooting, instead for the USB key, I have to try some linux usb creators but in the past I had no luck, and the only program that created a working USB was the official Microsoft creator kit (that maybe I could try with wine).

Second, if the GPT partition is the thing that gives issues with the USB box, I could have the same problem even with the new HD, because I still don t know how much partitioning customization I can do with the ISO that I got from Microsoft... I have the feeling that if the image finds the OEM code in my PC it will do everything automatic on the disk... but I hope to be able to choose...

EDIT:
The Microsoft Media creation kit doesn t work with WINE, it require at least Win 7... one down.

EDIT:
All the linux programs I tried to make an USB installer from the ISO failed... all the files where there, but the BIOS wasn't able to read the efi boot...

Mounting the ISO on the Pandora with "ISO Optical Drive" gave some interesting results: when in "BOOT" mode, the BIOS was just ignoring the device, but while in "Optical drive" mode the device was present in the "UEFI boot devices" list... but anyway it had the same issue of the previous USB installations, the BIOS wasn't finding the efi boot file... even if it was there...
(In the next days I suppose I will be switching the old and the new HD a lot in the PC, so maybe I can finally do some experimentations with "ISO Optical Drive")

So, I tried with a DVD this time, and while burning the image with "Brasero" still made a not working boot device, burning with K3b (with everything on AUTO) DID THE TRICK !!!

The DVD started the Windows installation !!

As I had predicted, I had not so many install options... it asked what to do with the new empty HD, and I just told "make a new partition"... so it responded with an "Ok, then I'll create 4 of them !!"
I had absolutely no choices about the kind of partition system at all, so it is still GPT.
 
Last edited:
Second, if the GPT partition is the thing that gives issues with the USB box, I could have the same problem even with the new HD
It could, and that would be annoying, but the issues with the old drive might just be because it's not working properly.
 
Back
Top