Hi all.
This is my first post in the forum. Since English is not my mother language, if I did not describe something clearly just let me know and I will try my best again. Much thanks.
I am trying to rescue a portable hard drive but right now I cannot figure out what happened to it. Previously I know this disk has some connection problems but it was not so serious, and I can still mount the disk after serveral times pluging. and unpluging.
But right now it seems it is totally down. When connected via USB port it sounds like it only spins less than 1 sec. Then I heard a snap and it stops. This repeats 3 times then it is totally silent. I guess it may be caused by not sufficient power so I’ve tried another port and it behaves like spin, snap, spin, snap without an end.
When tried with lsblk, it shows a raw disk without partitions. I dissected the wrapper and saw the hard drive is marked 500GB, but it is recognized as 2TB in lsblk. I cannot remember how large it should be when it still worked sorry.
What I have tested so far are:
hdparm:
delta67@Pollux ~ sudo hdparm -I /dev/sdb
/dev/sdb:
ATA device, with non-removable media
Standards:
Likely used: 5
Configuration:
Logical max current
cylinders 0 0
heads 0 0
sectors/track 0 0
--
Logical/Physical Sector size: 512 bytes
device size with M = 1024*1024: 0 MBytes
device size with M = 1000*1000: 0 MBytes
cache/buffer size = unknown
Capabilities:
IORDY(may be)(cannot be disabled)
Standby timer values: spec'd by Vendor
R/W multiple sector transfer: Max = 0 Current = ?
DMA: not supported
PIO: pio0
Logical Unit WWN Device Identifier: 50014ee6abe7ac97
NAA : 5
IEEE OUI : 0014ee
Unique ID : 6abe7ac97
Checksum: correct
parted:
(parted) mkpart primary btrfs 0 10
Error: /dev/sdb: unrecognised disk label
(parted) mklabel gpt
Error: Input/output error during read on /dev/sdb
Retry/Ignore/Cancel? ^C
Error: Input/output error during write on /dev/sdb
Retry/Ignore/Cancel? ^C
PS: when I chose cancel or ignore, parted did not respond any more.
fdisk:
delta67@Pollux ~ sudo fdisk -l /dev/sdc
fdisk: cannot open /dev/sdc: Input/output error
dmesg:
[189049.345604] sd 20:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[189049.345608] sd 20:0:0:0: [sdb] tag#0 Sense Key : 0x5 [current]
[189049.345610] sd 20:0:0:0: [sdb] tag#0 ASC=0x20 ASCQ=0x0
[189049.345613] sd 20:0:0:0: [sdb] tag#0 CDB: opcode=0x88 88 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00
[189049.345615] blk_update_request: critical target error, dev sdb, sector 0
[189049.345617] Buffer I/O error on dev sdb, logical block 0, async page read
I’ve also tried testdisk and did a quick search but had no luck. The deep search gives IO error for every bit it reads.
I am not so sure if it is still the connection problem. And if the disk is partly broken, is there any way that I may rescue at least some of the data inside?
Thanks again for everyone.
Last edited by delta67 (2016-04-14 10:17:18)
- Forum
- The Ubuntu Forum Community
- Ubuntu Official Flavours Support
- Installation & Upgrades
- [ubuntu] Input/output error reading sda during installation
-
Input/output error reading sda during installation
Hello everyone,
Please, I need help with this issue. I think I checked all posts about similar problems and I still couldn�t solve it.
Background:
I rescued an unused old CPU tower from 2007 with a core 2 quad, 4 gb ddr2 ram and a more modern (around 2011) discrete graphic card. I recently cancelled the TV subscription and want to use this PC as media center connected to the TV + network storage.
The CPU was still working with dual boot Windows 7 64bit/Ubuntu 11 installed in a noisy and slowly 320gb hdd.Problem:
To make the PC a bit faster and smoother I bought a SSD drive (Kingston SSDnowv300 120gb) to use as boot device for Ubuntu. However, I am unable to install Ubuntu on it. The Ubuntu 14.04.1 desktop 64bit DVD boots and loads the installer (very slowly, I have to say) but when the real installation starts, it gives me the error: input/output error reading dev/sda. If a press ignore several times I get also fsync error on sda and return me to the the window where you choose where to install Ubuntu.Things I tried:
- Erase disk and install option on Ubuntu installer gives the error.
- If I choose manual partition it shows me the drive but without any partition table. I create a partition table from that window and manually create the partitions, but when it starts the installation I get the same error.
- Windows Diskpart clean and convert to MBR also do not work. I assume this old motherboard has no EFI support. In fact the Ubuntu DVD boots in BIOS mode (No EFI screen asking what to do ). Anyway, I also tried covert to GPT and got the same result.
- Gparted, Disks and other many disk utilities using the live CD session also gives the same error and/or similar ones.
- Burn another DVD at low speed also didn�t help. MD5sum was verified for the iso. Linux Mint 17 DVD also gives the same error.
- Windows 7 64 can be installed smoothly and works very nice (so the drive and the SATA cable seem OK)
- Connect the SSD to my laptop and install Ubuntu worked perfectly (drive is OK and can run linux) (in this case it was installed in EFI mode with GPT partition tables because it is a modern laptop)
- In one post I saw that changing the SSD to AHCI mode in the BIOS solved a similar issue. But I don�t have that option in the BIOS, so I guess is in IDE mode. Also I don�t see many options to play around in the BIOS.
- I ordered a new SATA cable just to discard that maybe it produces an error only in linux installation. I don�t have any hope, but I will try as soon as it arrives.
Request:
What else can I try? Right now I don�t know what else to do. There must be a way to install Ubuntu in this CPU if Windows can make it.I hope I am not forgetting any important detail. Thanks for your time and sorry for the long post.
Last edited by jander2; January 10th, 2015 at 08:02 PM.
Reason: Solved
-
Re: Input/output error reading sda during installation
jander2; Hi ! Welcome to the forum .
I will start this ball rolling, We will all want to know that the SSD is seen by the operating system.
Boot up the liveDVD in «try ubuntu» mode to a terminal:
post back the outputs of terminal commands:Code:
sudo fdisk -lu sudo parted -l
code tag tutorial:
http://ubuntuforums.org/showthread.p…8#post12776168Which will show what you are working with and give us an indication of where to go from there to get ya to a point of installing ubuntu.
Is it your goal to install ubuntu alone on that SSD drive — or dual boot on that drive with Windows 7 ?
Will Windows continue to be a factor, such that we arrange the system to dual boot ?
-
Re: Input/output error reading sda during installation
Thanks for replying Bashing-om,
This is what I got:
Code:
ubuntu@ubuntu:~$ sudo fdisk -lu ubuntu@ubuntu:~$ sudo parted -l Error: /dev/sda: unrecognised disk label Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only. Error: Can't have a partition outside the disk!
Hope it is useful
-
Re: Input/output error reading sda during installation
jander2; Nope;
Not too helpful … humm …
Is there but the single SSD drive connected at this time ?
Is that last the complete output of the commands ?Presently all we have is an idication that the partition table is messed up ..
Error: Can’t have a partition outside the disk!
Confirm please that you are booting a DVD and not from a USB drive in this live-environment . Yes, I do see » Unable to open /dev/sr0 » which certainly indicates the liveDVD .
Let’s get some additional confirmation of what is. What return is there from terminal command:
Then perhaps we can ‘sic’ fdisk on the SSD , IF you want to partition in legacy mode
OR
‘sic’ gdisk on it IF you want to partition in GPT .get that SSD recognized and identified .. then we can do something
-
Re: Input/output error reading sda during installation
Yes, it was the whole output from those commands.
Connected to the motherboard are only: SSD, cdrom, the PCI discrete graphics card and a multi-card reader .
I don’t have any usb drive plugged in, so it can only boot from the cdrom. By the way, I tried to boot from a usb drive and never made it work after trying three different programs to make bootable USB drives (also tried several different pendrives). But the usb is detected when the PC boot and listed after pressing F8.
Didn’t know this command. Very useful. Output bellow:
Code:
ubuntu@ubuntu:~$ sudo lshw -C disk *-cdrom description: DVD-RAM writer product: DVD-RAM GSA-H55N vendor: HL-DT-ST physical id: 0.0.0 bus info: scsi@4:0.0.0 logical name: /dev/cdrom logical name: /dev/sr0 logical name: /cdrom version: 1.02 serial: [ capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram configuration: ansiversion=5 mount.fstype=iso9660 mount.options=ro,noatime state=mounted status=ready *-medium physical id: 0 logical name: /dev/cdrom logical name: /cdrom capabilities: partitioned partitioned:dos configuration: mount.fstype=iso9660 mount.options=ro,noatime signature=1b45097d state=mounted *-disk description: SCSI Disk physical id: 0.0.0 bus info: scsi@5:0.0.0 logical name: /dev/sda size: 111GiB (120GB) configuration: sectorsize=512 *-disk:0 description: SCSI Disk product: Flash HS-CF vendor: Generic physical id: 0.0.0 bus info: scsi@6:0.0.0 logical name: /dev/sdb version: 5.14 capabilities: removable configuration: sectorsize=512 *-medium physical id: 0 logical name: /dev/sdb *-disk:1 description: SCSI Disk product: Flash HS-MS/SD vendor: Generic physical id: 0.0.1 bus info: scsi@6:0.0.1 logical name: /dev/sdc version: 5.14 capabilities: removable configuration: sectorsize=512 *-medium physical id: 0 logical name: /dev/sdc *-disk:2 description: SCSI Disk product: Flash HS-SM vendor: Generic physical id: 0.0.2 bus info: scsi@6:0.0.2 logical name: /dev/sdd version: 5.14 capabilities: removable configuration: sectorsize=512 *-medium physical id: 0 logical name: /dev/sdd
Indeed the SSD is listed there.
Thanks
-
Re: Input/output error reading sda during installation
jander2; Well …
The SSD is recognized, and is identified — for now — as ‘sda’.
In GParted — from the liveDVD .. make sure that there are no key icons in the display pane (swap may be in use, -> swap off ).
What results if you (RE-)format the SSD -> file system type ext4 ?
As it is in my mind a possibility that AHCI may be required for bios to properly recognize the Solid State Device , We can just poke at it and see what results we can obtain.
-
Re: Input/output error reading sda during installation
I don’t see any key icons or swap option. Where should I see them? In the gparted window?
When I launch gparted it already gives me error «Libparted bug found: Input/output error during read on /dev/sda».
I press ignore and it shows me just 111GiB of unallocated space with a warning. Double click in the warning gives:Code:
/dev/sda: unrecognised disk label Input/output error during read on /dev/sda Input/output error during read on /dev/sda Input/output error during write on /dev/sda Error fsyncing/closing /dev/sda: Input/output error Input/output error during read on /dev/sda Input/output error during read on /dev/sda /dev/sda: unrecognised disk label
I cannot create partitions or format becuase it says that there is no partition table.
So I go device/create partition table, choose msdos, and get same error again (gpt table either)Bed time in Europe. Let’s see tomorrow
Many thanks
-
Re: Input/output error reading sda during installation
jander2; OK,
We continue tomorrow.
Maybe with both GPT and MBR tables in place it is confusing the issue ..
Maybe, we should just zero out that SSD with ‘dd’ and see then if it will take a new partitioning ?What say others ?
Last edited by Bashing-om; January 10th, 2015 at 12:38 AM.
Reason: typo
-
Re: Input/output error reading sda during installation
I tried dd to erase MBR and partition table, but if fails:
Code:
ubuntu@ubuntu:~$ sudo dd if=/dev/zero of=/dev/sda bs=512 count=1 dd: error writing ‘/dev/sda’: Input/output error 1+0 records in 0+0 records out 0 bytes (0 B) copied, 0.000602042 s, 0.0 kB/s
Any suggestions?
-
Re: Input/output error reading sda during installation
Great news! It is working now!!!
It turns out that the motherboard has 3 sata ports, one supported by Marvell 88SE6111 and two supported by ICH9R/ICH9DO/ICH9DH.
I was using the Marvel one, so I decided to check one of the other kind. This time gparted recognized the Windows 7 existing partitions and the installer allowed me to erase and install ubuntu.
First attempt didn’t boot, but I had the old HDD connected during the installation and maybe the boot was created there. So I repeated the installation, this time with Linux Mint, and it boots and work nicely and fast.So I will tag this as solved and update the keywords with more relevant ones.
Thanks for you help, Bashing-om
Tags for this Thread
Bookmarks
Bookmarks

Posting Permissions
For the past 3 days (after an update) my Debian Jessie refuses to mount NTFS disks. I reinstalled libfuse2 and ntfs-3g, yet I get the same Input/output error
I tried the same disks under Windows 7 and OSX Mavericks (using ntfs-3g) and they work fine. I purged ntfs-3g and reinstalled, and still the same problem.
The disks will sometimes mount and sometimes won’t mount. If they do mount, I am sometimes able to go into the mount directory, whereas some other times, I get a bash error Input/output error for the mount directory. The times I am able to go into the mount directory, when I try an ls -l, I see tons of question marks, instead of file/dir attributes.
I have tried ntfsfix and chkdisk under windows, and they both reported no problems, it is only under this Jessie install that all of a sudden I can’t mount them properly.
dmesg has no usefull info other than the external disk being attached:
[12816.210969] scsi 20:0:0:0: Direct-Access Seagate External SG16 PQ: 0 ANSI: 4
[12816.211825] sd 20:0:0:0: Attached scsi generic sg7 type 0
[12816.212542] sd 20:0:0:0: [sdg] 732566642 4096-byte logical blocks: (3.00 TB/2.72 TiB)
[12816.213591] sd 20:0:0:0: [sdg] Write Protect is off
[12816.213595] sd 20:0:0:0: [sdg] Mode Sense: bf 00 00 00
[12816.214782] sd 20:0:0:0: [sdg] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[12816.215561] sd 20:0:0:0: [sdg] 732566642 4096-byte logical blocks: (3.00 TB/2.72 TiB)
[12816.242055] sdg: sdg1 sdg2
[12816.243244] sd 20:0:0:0: [sdg] 732566642 4096-byte logical blocks: (3.00 TB/2.72 TiB)
[12816.246031] sd 20:0:0:0: [sdg] Attached SCSI disk
parted /dev/sdg 'print'
Model: Seagate External (scsi)
Disk /dev/sdg: 3001GB
Sector size (logical/physical): 4096B/4096B
Partition Table: msdos
Number Start End Size Type File system Flags
1 258kB 1038GB 1038GB primary
2 1038GB 3001GB 1962GB primary
fdisk -l /dev/sdg
Note: sector size is 4096 (not 512)
Disk /dev/sdg: 3000.6 GB, 3000592965632 bytes
255 heads, 63 sectors/track, 45600 cylinders, total 732566642 sectors
Units = sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00090a06
Device Boot Start End Blocks Id System
/dev/sdg1 63 253473569 1013894028 7 HPFS/NTFS/exFAT
/dev/sdg2 253473792 732566527 1916370944 83 Linux
mount -t ntfs-3g /dev/sdg1 /media/Downloads
ntfs-3g-mount: failed to access mountpoint /media/Downloads: Input/output error
If I manage to mount it via
mount -t ntfs-3g /dev/sdg1 /media/Downloads
Once I cd into it:
cd media/Downloads
root@athena:/media/Downloads# ls -l
ls: reading directory .: Input/output error
total 0
root@athena:/media/Downloads#
mount however, says:
/dev/sdf1 on /media/Downloads type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
What did I brake?
EDIT
ntfsinfo -m /dev/sdg1
Volume is scheduled for check.
Please boot into Windows TWICE, or use the 'force' option.
NOTE: If you had not scheduled check and last time accessed this volume
using ntfsmount and shutdown system properly, then init scripts in your
distribution are broken. Please report to your distribution developers
(NOT to us!) that init scripts kill ntfsmount or mount.ntfs-fuse during
shutdown instead of proper umount.
Failed to open '/dev/sdg1'.
EDIT#2
ntfsinfo -fm /dev/sdg1
WARNING: Dirty volume mount was forced by the 'force' mount option.
Volume Information
Name of device: /dev/sdg1
Device state: 11
Volume Name:
Volume State: 91
Volume Flags: 0x0001 DIRTY
Volume Version: 3.1
Sector Size: 4096
Cluster Size: 4096
Index Block Size: 4096
Volume Size in Clusters: 253473506
MFT Information
MFT Record Size: 4096
MFT Zone Multiplier: 0
MFT Data Position: 24
MFT Zone Start: 0
MFT Zone End: 31684192
MFT Zone Position: 4
Current Position in First Data Zone: 31684192
Current Position in Second Data Zone: 0
Allocated clusters 145403 (0.1%)
LCN of Data Attribute for FILE_MFT: 4
FILE_MFTMirr Size: 4
LCN of Data Attribute for File_MFTMirr: 126736753
Size of Attribute Definition Table: 2560
Number of Attached Extent Inodes: 0
FILE_Bitmap Information
FILE_Bitmap MFT Record Number: 6
State of FILE_Bitmap Inode: 80
Length of Attribute List: 0
Number of Attached Extent Inodes: 0
FILE_Bitmap Data Attribute Information
Decompressed Runlist: not done yet
Base Inode: 6
Attribute Types: not done yet
Attribute Name Length: 0
Attribute State: 3
Attribute Allocated Size: 31686656
Attribute Data Size: 31684192
Attribute Initialized Size: 31684192
Attribute Compressed Size: 0
Compression Block Size: 0
Compression Block Size Bits: 0
Compression Block Clusters: 0
Free Clusters: 199331046 (78.6%)
I will try mounting it under windows in a few hours (I’m running a check on another disk I don’t want to interrupt).
EDIT#3
I went back into windows, and scanned the disks. Windows indeed found problems with one of them, but both were fixed, mountable and browsable.
Yet, under Debian, I still cannot do anything.
I opened Gparted, and interestingly enough, it complains:
Unable to read the contents of this file system!
Because of this some operations may be unavailable.
The cause might be a missing software package.
The following list of software packages is required for ntfs file system support: ntfsprogs / ntfs-3g.
However,
apt-cache policy ntfs-3g
ntfs-3g:
Installed: 1:2014.2.15AR.2-1
Candidate: 1:2014.2.15AR.2-1
Version table:
*** 1:2014.2.15AR.2-1 0
!!! So, have I run into some kind of ntfs-3g bug, or is my system now broken???
fdisk
works on disks, not partitions. On Linux, a disk is referred to as e.g. /dev/sdb
, whereas the partitions on it are referred to as /dev/sdb1
, /dev/sdb2
etc. Note that old-style (/dev/[hs]d?, /dev/[hs]d??) partition specifiers always end with a digit, whereas disk specifiers always end with a letter.
If you just format the disk (no bad blocks checking etc.), then a format time of a few seconds is not entirely unreasonable. All you did was write the initial file system metadata structures to disk, and while I don’t have any exact numbers to cite, those are fairly small, and USB is pretty fast for writing such relatively small amounts of data. If you didn’t get any errors, the format process probably did its thing.
The first thing you should do is run fdisk on the proper device. In your case, it sounds like that will be sudo fdisk /dev/sdb
, but note that in some cases the device name can change with time. I recommend using one of the entries in /dev/disk/by-id instead, as those will not change. You can see what the disk shows up with there by running, immediately before you connect the disk:
diff <(ls /dev/disk/by-id) <(sleep 15; ls /dev/disk/by-id)
This will show the differences in directory content between the two executions of ls
, which will be spaced 15 seconds apart thanks to the sleep
invocation in the second input pipe. 15 seconds should give the kernel enough time to identify the disk and let udev create the appropriate device nodes. If it doesn’t show any differences (empty output), unplug the disk and try it again increasing the delay. You will see both partition devices (ending with -part
followed by a number and possibly @
) and disk devices (without the -part
part). If the file names do end with @
, disregard that character; it’s a ls
output artefact.
Once you have partition(s) properly in place, you can make a file system on it/them. For example, sudo mkfs.ext4 -v /dev/disk/by-id/xxxxx-Passport-XXXXXXX-part1
. The -v
turns on extra output («v» for verbose) which will give you an idea of whether the file system is created successfully.
After that, the disk should be perfectly usable.