2

I cannot format anymore the hard drive of my laptop. Here is how I proceed: I am starting my computer with a USB live drive (Ubuntu 10.04 LTS - the Lucid Lynx).

Then I start disk utility and try to format the hard drive - I choosed to format the Master boot record but I get the following error:

Error creating partition table: helper exited with exit code 1: Error calling fsync(2) on /dev/sda: Input/output error

If I try to delete partitions I get the following error

Error erasing: helper exited with exit code 1: In part_del_partition: device_file=/dev/sda, offset=32256 Entering MS-DOS parser (offset=0, size=30005821440) MSDOS_MAGIC found looking at part 0 (offset 32256, size 4096157184, type 0x83) new part entry looking at part 1 (offset 10618836480, size 8414461440, type 0x83) new part entry looking at part 2 (offset 19033297920, size 1077511680, type 0x82) new part entry looking at part 3 (offset 20110809600, size 9895011840, type 0x07) new part entry Exiting MS-DOS parser MSDOS partition table detected got it got disk got partition - part->type=0 Error: Input/output error during write on /dev/sda ped_disk_commit_to_dev() failed

If I try to install ubuntu frrom the usb on the hard drive and choose erase and use the entire disk I get the error message

Input/output error during write on /dev/sda

For side infos I have at the moment 4 partitions on my hard drive: /dev/sda1 (ext2) /dev/sda2 (ext2) /dev/sda3 (swap) /dev/sda1 (ntfs) + /dev/sda (unlocated Space)

My ultimate goal is to reinstall ubuntu and have only 2 partitions...

I would really appreciate any help here!

Thanks

JB


@psusi I tried what as written in the other message qnd I got the following:

ubuntu@ubuntu:~$ sudo badblocks -b 512 /dev/sda
52464512 
52464520 
52464521 
52464522 
52464523 
52464524 
52464525 
52464526 
52464527 
ubuntu@ubuntu:~$ sudo dd if=/dev/sda of=/dev/null iflag=direct bs=512 skip=52464512 count=1 
1+0 records in 1+0 records out 512 bytes (512 B) copied, 0.0296602 s, 17.3 kB/s 
ubuntu@ubuntu:~$ sudo dd if=/dev/sda of=/dev/null iflag=direct bs=512 skip=52464520 count=1 
1+0 records in 1+0 records out 512 bytes (512 B) copied, 0.000283555 s, 1.8 MB/s 
ubuntu@ubuntu:~$ sudo dd if=/dev/sda of=/dev/null iflag=direct bs=512 skip=52464521 count=1 
1+0 records in 1+0 records out 512 bytes (512 B) copied, 0.000283835 s, 1.8 MB/s 
ubuntu@ubuntu:~$ sudo dd if=/dev/sda of=/dev/null iflag=direct bs=512 skip=52464522 count=1 
dd: reading `/dev/sda': Input/output error 0+0 records in 0+0 records out 0 bytes (0 B) copied, 30.8623 s, 0.0 kB/s 
ubuntu@ubuntu:~$ sudo dd if=/dev/sda of=/dev/null iflag=direct bs=512 skip=52464523 count=1 
1+0 records in 1+0 records out 512 bytes (512 B) copied, 0.0370136 s, 13.8 kB/s 
ubuntu@ubuntu:~$ sudo dd if=/dev/sda of=/dev/null iflag=direct bs=512 skip=52464524 count=1 
1+0 records in 1+0 records out 512 bytes (512 B) copied, 0.00264196 s, 194 kB/s 
ubuntu@ubuntu:~$ sudo dd if=/dev/sda of=/dev/null iflag=direct bs=512 skip=52464525 count=1 
1+0 records in 1+0 records out 512 bytes (512 B) copied, 0.00303921 s, 168 kB/s 
ubuntu@ubuntu:~$ sudo dd if=/dev/sda of=/dev/null iflag=direct bs=512 skip=52464526 count=1 
1+0 records in 1+0 records out 512 bytes (512 B) copied, 0.0029378 s, 174 kB/s 
ubuntu@ubuntu:~$ sudo dd if=/dev/sda of=/dev/null iflag=direct bs=512 skip=52464527 count=1 
1+0 records in 1+0 records out 512 bytes (512 B) copied, 0.00647233 s, 79.1 kB/s 



ubuntu@ubuntu:~$ sudo dd if=/dev/zero of=/dev/sda oflag=direct bs=512 seek=52464522 count=1
dd: writing `/dev/sda': Input/output error
1+0 records in
0+0 records out
0 bytes (0 B) copied, 7.88114 s, 0.0 kB/s

ubuntu@ubuntu:~$

I am not sure what to do next...

fossfreedom
  • 172,746
  • Do you have any indications that the disk is not dead? It looks like the installer can't write anything to the disk. – Sergey Dec 10 '12 at 22:35
  • It does indeed look like the disk it dead. Is it not spinning, or noisy, or running very hot? If not, you could try removing the partition table completely with the dd instructions given here: http://askubuntu.com/questions/190996/running-ubuntu-from-a-usb-flash-drive-on-acer . If you get an error from dd then you can be fairly sure that your drive is dead. You could try it in another computer or portable enclosure. – fabricator4 Jan 06 '13 at 00:22

1 Answers1

0

My money would be on the disk dying (or some other hardware problem). You can't copy/paste any files, smart status showing bad sectors, installer failing with I/O error... looks like you can't write anything to that disk although it still showing your files.

Sergey
  • 43,665
  • To your comment: the disk doesn t seem to be dead. I can mount sda1 and sda2 and read the files which are still on the disk. But on the other hand I cannot copy/paste any files on the drive... For the smart status of the disk utility the dot is green and just indicate that the disk has a few bad sectors... – user113923 Dec 11 '12 at 19:55
  • @user113923, how many bad sectors? That is not a good sign. Specifically what are the counts for uncorrectable and reallocated and pending reallocated sectors? – psusi Dec 12 '12 at 02:18
  • when I open the disk utility it tells me there are 2 bad sectors

    If I start a run self test I stopped it after 2 hours (it should have taken only 10 min) and it now tells me there are 1376275 bad sectors... For current pending sector count there are only 2... these are the only mistakes but with the large number of bad sectors I assume that the hard drive is dead, right?

    – user113923 Dec 14 '12 at 20:21
  • @psusi: what do you think, doctor? (user113923 didn't mention you in the comment so I'm just making sure you get a notification) – Sergey Dec 14 '12 at 20:35
  • @user113923, which field is showing all those bad sectors? There are pending, reallocated, and uncorrectable values. – psusi Dec 14 '12 at 23:52
  • @psusi,@Sergey, I started again a run self test but it never finishes... like the last time ... but this time there are only the 2 current pending sector count which shows a warning (ID:197 Number of sectors waiting to be remapped...) Actually The last time the hard drive was working properly, I tried to enlarge some partitions... and I am not sure if it was the right thing to do! Nevertheless, the changes didnt oper since the partions sizes remained unchanged. This informations mayy help also to find out what is going wrong? – user113923 Dec 15 '12 at 19:12
  • @psusi,@Sergey, if I check the filesystem on the session where ubuntu is installedm it says that the filesystem is not clean. – user113923 Dec 15 '12 at 21:51
  • @user113923, if there are only a few pending but no reallocated or offline_uncorrectable sectors, then you should be able to repair it. See http://askubuntu.com/a/45387/8500. – psusi Dec 15 '12 at 23:48
  • @psusi Sdditionally to the answer I posted 1 day ago; I tried to do a low level format with:
    ubuntu@ubuntu:~$ sudo dd if=/dev/zero of=/dev/sda dd: writing to `/dev/sda': Input/output error 52464521+0 records in 52464520+0 records out 26861834240 bytes (27 GB) copied, 80161.8 s, 335 kB/s
    – user113923 Dec 18 '12 at 10:39
  • @psusi The rpqrtition table still remained unchanged (and the files are still on the the different partitions). Should I also not format the MBR? How to do this? – user113923 Dec 18 '12 at 10:46
  • @user113923, if you did that dd command it would have blown away the partition table. Install the smartmontools package and add the output of sudo smartctl -a to your question. – psusi Dec 18 '12 at 16:30