Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed Ubuntu on the USB stick and afterwards tried to clean up the disc to install another version of Ubuntu.

I was not able to do it (even when tried to delete files by using sudo -rm), because of the read-only files.

Trying to format the disk with gparted: the disks has flags boot and lbs. After unmounting the disk I get the code in console:

/dev/sdb: unrecognised disk label
Input/output error during write on /dev/sdb

After typing in the terminal

fdisk -l

I receive this message:

Disk /dev/sdb: 8441 MB, 8441462784 bytes 64 heads, 32 sectors/track, 8050 cylinders, total 16487232 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: 0x704e26c8   
Disk /dev/sdb doesn't contain a valid partition table`

After running:

fdisk /dev/sdb
n (and than all default, so: primary, partition number 1, first sector 2048, last sector 16487231)

and trying to write a new partition table I get this message:

The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

After running

dmesg | tail

The code:

[ 8223.479979] Info fld=0x0
[ 8223.479984] sd 12:0:0:0: [sdb]  
[ 8223.479990] Add. Sense: Write protected
[ 8223.479995] sd 12:0:0:0: [sdb] CDB: 
[ 8223.479998] Write(10): 2a 00 00 00 00 00 00 00 08 00
[ 8223.480043] end_request: critical target error, dev sdb, sector 0
[ 8223.480050] Buffer I/O error on device sdb, logical block 0
[ 8223.480054] lost page write due to I/O error on sdb
[ 9080.052379] FAT-fs (sdb1): invalid media value (0x10)
[ 9080.052389] FAT-fs (sdb1): Can't find a valid FAT filesystem

After running:

sudo dd if=/dev/zero of=/dev/sdX bs=512 count=1

I got:

1+0 records in
1+0 records out
512 bytes (512 B) copied, 0,011829 s, 43,3 kB/s

so I guessed it worked. Unmounted the disk, rebooted the system and the problem persist.

  • Do you have some ideas how to repair it?

I would be thankful for help!

share|improve this question
That message is normal. Please edit your question and describe the exact steps (fdisk commands) you used to create the new partition table. From what I can see, you have probably created it correctly and you will see it as soon as you unmount and remount the USB drive. – terdon Apr 13 '14 at 16:19
hey @terdon, I edited the fdisk commands, than tried several times to remount the disk. Unfortunately, the disk is still not recognized by the gparted. – kachaby Apr 13 '14 at 16:57
And does this persist after a reboot? – terdon Apr 13 '14 at 17:15
Did you use the dd command to originally create install flash drive? That does not use partition table, so random data in partition table sector confuses partition tools. You may be able to just zero MBR including partition table. But be absolutely sure you have correct drive. sudo dd if=/dev/zero of=/dev/sdX bs=512 count=1 Double check that drive is sdb or sdc and change sdX to correct drive. Otherwise you can really damage a working drive. – oldfred Apr 13 '14 at 17:18
Yes, I rebooted the system several times. As well, I run sudo dd (see edited post), but the problem persist. – kachaby Apr 13 '14 at 18:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.