Results 1 to 10 of 13
Hi all.
Running Ubuntu 12.04 on USB
# dd if=/dev/zero of=/dev/sda
Code:
dd: writing to `/dev/sda': Input/output error
281+0 records in
280+0 records out
143360 bytes (143 kB) copied, 77.3732 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-25-2012 #1Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,712
dd blank HD fail
Hi all.
Running Ubuntu 12.04 on USB
# dd if=/dev/zero of=/dev/sda# dd if=/dev/zero of=/dev/sda bs=512Code:dd: writing to `/dev/sda': Input/output error 281+0 records in 280+0 records out 143360 bytes (143 kB) copied, 77.3732 s, 1.9 kB/s
Is the HD corrupted? Please helpCode:dd: writing `/dev/sda': Input/output error 281+0 records in 280+0 records out 143360 bytes (143 kB) copied, 26.7369 s, 5.4 kB/s 281+0 records in 280+0 records out 143360 bytes (143 kB) copied, 26.737 s, 5.4 kB/s
TIA
B.R.
satimis
- 12-26-2012 #2
Can you run following commands and post its output there?
Code:blkid
And also run with straceCode:file /dev/sda
Code:strace -e trace=all dd if=/dev/zero of=/dev/sda
First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org
- 12-26-2012 #3Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,712
Hi,
Before reading your posting I succeeded installing Ubuntu 12.04 on the HD. But I couldn't boot it.
On reboot, it dropped to;
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built=in shell (sah)
Enter 'help' for a list of built-in commands
(initramfs)
Reboot and started Recovery Mode;
..........
sd 1:0:0:0 [sda] Add. Sense: Unrecovered read error - auto real locate failed
sd 1:0:0:0 [sde] CDN: Read(10) :28 00 00 00 01 18 00 00 08 00
end_request: I/O error, dev sda, sector 285
Buffer I/O error on devcice sda, logical block 35
ata2: EH complete
(hanging here)
It is very strange. Now I even can't boot Live Ubuntu 12.04 USB. It just hangs on Ubuntu screen. But I can boot Live Fedora17 USB
# blkidCode:/dev/sdb: LABEL="Fedora-17-x86_64-Live-Desktop.is" TYPE="iso9660" /dev/loop0: TYPE="squashfs" /dev/loop1: TYPE="DM_snapshot_cow" /dev/loop2: TYPE="squashfs" /dev/loop3: LABEL="_Fedora-17-x86_6" UUID="b39d6418-8f98-4350-a48a-e70b0dd203f9" TYPE="ext4" /dev/sda1: UUID="7b9a9488-886e-46ad-a92e-18ea6b99d404" TYPE="ext4" /dev/sda5: UUID="b7790b9b-fca7-4ef7-a0c0-e538d8391ff9" TYPE="swap" /dev/mapper/live-rw: LABEL="_Fedora-17-x86_6" UUID="b39d6418-8f98-4350-a48a-e70b0dd203f9" TYPE="ext4" /dev/mapper/live-osimg-min: LABEL="_Fedora-17-x86_6" UUID="b39d6418-8f98-4350-a48a-e70b0dd203f9" TYPE="ext4"
# file /dev/sda
/dev/sda: block special
# strace -e trace=all dd if=/dev/zero of=/dev/sdaI'm prepared running gparted to partition the HD to check.Code:..... ..... 512) = 512 read(0, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512 write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512 read(0, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512 write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = -1 EIO (Input/output error) open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=2512, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7effd5651000 read(3, "# Locale name alias data base.\n#"..., 4096) = 2512 read(3, "", 4096) = 0 close(3) = 0 munmap(0x7effd5651000, 4096) = 0 open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) write(2, "dd: ", 4dd: ) = 4 write(2, "writing to `/dev/sda'", 21writing to `/dev/sda') = 21 open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) write(2, ": Input/output error", 20: Input/output error) = 20 write(2, "\n", 1 ) = 1 close(0) = 0 close(1) = 0 write(2, "281+0 records in\n280+0 records o"..., 35281+0 records in 280+0 records out ) = 35 write(2, "143360 bytes (143 kB) copied", 28143360 bytes (143 kB) copied) = 28 write(2, ", 23.5022 s, 6.1 kB/s\n", 22, 23.5022 s, 6.1 kB/s ) = 22 close(2) = 0 exit_group(1) = ? +++ exited with 1 +++
B.R.
satimis
- 12-26-2012 #4
As you booted using Live Fedora-17 cd - Can you try and run fsck on /dev/sda1 ? so that any bad blocks will detected and added to bad block list. I assume sda1 is your Ubuntu partition
First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org
- 12-26-2012 #5Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,712
Just ran gparted
Started gparted
Warning
=======
The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
New Partition #1 fat32 149,05GiB ).00B (used) 149.05GiB(Unused)
Libparted Bug Found!
Error informing the kernel about modifications to partition /dev/sda1 -- Device or resource busy. This means Linux won't know about any changes you made to /dev/sda1 until you reboot -- so you shouldn't mount it or use it in any way before rebooting.
libparted : 3.0
======================
The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
Partition(s) 5 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.
The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
Error informing the kernel about modifications to partition /dev/sda1 -- Device or resource busy. This means Linux won't know about any changes you made to /dev/sda1 until you reboot -- so you shouldn't mount it or use it in any way before rebooting.
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
gpartedbin: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
gpartedbin: xcb_io.c:178: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
/usr/sbin/gparted: line 99: 1840 Aborted (core dumped) $BASE_CMD
FAILED
I'll come back after testing your advice. Thanks
- 12-26-2012 #6Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,712
# fdisk -l
Code:Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000712fc Device Boot Start End Blocks Id System /dev/sda1 104448 312580095 156237824 83 Linux WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted. Disk /dev/sdb: 4111 MB, 4111466496 bytes 127 heads, 62 sectors/track, 1019 cylinders, total 8030208 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x1d459011 Device Boot Start End Blocks Id System Disk /dev/mapper/live-rw: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/mapper/live-osimg-min: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
# fsck /dev/sda1Code:fsck from util-linux 2.21.1 e2fsck 1.42 (29-Nov-2011) fsck.ext2: No such file or directory while trying to open /dev/sda1 Possibly non-existent device?
Edit
====
# fsck /dev/sdaCode:fsck from util-linux 2.21.1 e2fsck 1.42 (29-Nov-2011) fsck.ext2: Device or resource busy while trying to open /dev/sda Filesystem mounted or opened exclusively by another program?
- 12-26-2012 #7
That's really strange error message from fsck!
Can you run file -s /dev/sda1 ? For example, I got below output as expected on ext4
If your output(file -s /dev/sda1) doesn't show ext4 ,are you okay to reformat the disk with ext4?[root@qabot laks]# blkid
/dev/sda1: LABEL="SYSTEM_DRV" UUID="9ED0A3A5D0A3825F" TYPE="ntfs"
/dev/sda2: LABEL="Windows7_OS" UUID="BAB4A70AB4A6C869" TYPE="ntfs"
/dev/sda3: LABEL="Lenovo_Recovery" UUID="72D0A117D0A0E319" TYPE="ntfs"
/dev/sda5: UUID="ebb7320c-3f06-4fda-9e49-946bb54dce9a" TYPE="ext4"
/dev/sda6: LABEL="_Fedora-17-x86_6" UUID="919c8bfa-d5ef-4378-a2ef-eab90959f6c5" TYPE="ext4"
/dev/sda7: UUID="0d4f6f9e-ca87-4d74-b2a6-39a4ef32f32a" TYPE="ext4"
[root@qabot laks]# file -s /dev/sda5
/dev/sda5: Linux rev 1.0 ext4 filesystem data, UUID=ebb7320c-3f06-4fda-9e49-946bb54dce9a (needs journal recovery) (extents) (huge files)
Code:mkfs.ext4 /dev/sda1
First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org
- 12-26-2012 #8Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,712
# mkfs.ext4 /dev/sda1
# file -s /dev/sdaCode:mke2fs 1.42 (29-Nov-2011) Could not stat /dev/sda1 --- No such file or directory
Code:/dev/sda: x86 boot sector; partition 1: ID=0x83, starthead 127, startsector 104448, 312475648 sectors, code offset 0xb8
# mkfs.ext4 /dev/sda1Code:mke2fs 1.42 (29-Nov-2011) Could not stat /dev/sda1 --- No such file or directory
# mkfs.ext4 /dev/sdaIt is quite strange. I'm neither running any program on /dev/sda nor doing any work on itCode:mke2fs 1.42 (29-Nov-2011) /dev/sda is entire device, not just one partition! Proceed anyway? (y,n) y /dev/sda is apparently in use by the system; will not make a filesystem here!
- 12-26-2012 #9
Can you shutdown and restart the system ? seems like /dev/sda1 is not completely written into MBR records or something ? I'm not sure
Then login to live-cd and try "blkid" to ensure that /dev/sda1 is there and then run fsck.ext4 on it ? Btw,is that external hard-disk or built-in disk?
First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org
- 12-26-2012 #10Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,712
# fdisk -l
Code:Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000712fc Device Boot Start End Blocks Id System /dev/sda1 104448 312580095 156237824 83 Linux WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted. Disk /dev/sdb: 4111 MB, 4111466496 bytes 127 heads, 62 sectors/track, 1019 cylinders, total 8030208 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x1d459011 Device Boot Start End Blocks Id System Disk /dev/mapper/live-rw: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/mapper/live-osimg-min: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
$ blkid# file /dev/sda1Code:/dev/sdb: LABEL="Fedora-17-x86_64-Live-Desktop.is" TYPE="iso9660" /dev/loop0: TYPE="squashfs" /dev/loop1: TYPE="DM_snapshot_cow" /dev/loop2: TYPE="squashfs" /dev/loop3: LABEL="_Fedora-17-x86_6" UUID="b39d6418-8f98-4350-a48a-e70b0dd203f9" TYPE="ext4" /dev/mapper/live-rw: LABEL="_Fedora-17-x86_6" UUID="b39d6418-8f98-4350-a48a-e70b0dd203f9" TYPE="ext4" /dev/mapper/live-osimg-min: LABEL="_Fedora-17-x86_6" UUID="b39d6418-8f98-4350-a48a-e70b0dd203f9" TYPE="ext4"
/dev/sda1: block special
# file /dev/sda
/dev/sda: block special
# strace -e trace=all dd if=/dev/zero of=/dev/sdaCode:..... open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) write(2, ": Input/output error", 20: Input/output error) = 20 write(2, "\n", 1 ) = 1 close(0) = 0 close(1) = 0 write(2, "281+0 records in\n280+0 records o"..., 35281+0 records in 280+0 records out ) = 35 write(2, "143360 bytes (143 kB) copied", 28143360 bytes (143 kB) copied) = 28 write(2, ", 22.4508 s, 6.4 kB/s\n", 22, 22.4508 s, 6.4 kB/s ) = 22 close(2) = 0 exit_group(1) = ? +++ exited with 1 +++
# fsck /dev/sda1# mkfs.ext4 /dev/sda1Code:fsck from util-linux 2.21.1 e2fsck 1.42 (29-Nov-2011) fsck.ext2: Superblock invalid, trying backup blocks... fsck.ext2: Bad magic number in super-block while trying to open /dev/sda1 The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device>Code:mke2fs 1.42 (29-Nov-2011) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 9764864 inodes, 39059456 blocks 1952972 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=4294967296 1192 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done
# blkidNow /dev/sda1 is thereCode:/dev/sdb: LABEL="Fedora-17-x86_64-Live-Desktop.is" TYPE="iso9660" /dev/loop0: TYPE="squashfs" /dev/loop1: TYPE="DM_snapshot_cow" /dev/loop2: TYPE="squashfs" /dev/loop3: LABEL="_Fedora-17-x86_6" UUID="b39d6418-8f98-4350-a48a-e70b0dd203f9" TYPE="ext4" /dev/mapper/live-rw: LABEL="_Fedora-17-x86_6" UUID="b39d6418-8f98-4350-a48a-e70b0dd203f9" TYPE="ext4" /dev/mapper/live-osimg-min: LABEL="_Fedora-17-x86_6" UUID="b39d6418-8f98-4350-a48a-e70b0dd203f9" TYPE="ext4" /dev/sda1: UUID="4a4815b0-e85b-43a9-83bd-f003797bd4a1" TYPE="ext4"
This is the HD on the external enclosue. I stopped the dd blanking process during operation.
Edit
====
# mount /dev/sda1 /mnt
# df -h /mnt# cp Desktop/testing_20121226.txt /mntCode:Filesystem Size Used Avail Use% Mounted on /dev/sda1 149G 2.4G 140G 2% /mnt
# ls /mnt/The HD is now workign again. I won't use it for production but for testing purpose onlyCode:lost+found testing_20121226.txt
Thanks for your help.
satimisLast edited by satimis; 12-26-2012 at 12:05 PM.


Reply With Quote

