2006/3/24, Iain Buchanan <[EMAIL PROTECTED]>:
SuicidalPuppy martoni # fdisk /dev/sda
You will not be able to write the partition table.
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1015, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1015, default 1015):
Using default value 1015
Command (m for help): p
Disk /dev/sda: 262 MB, 262144000 bytes
9 heads, 56 sectors/track, 1015 cylinders
Units = cylinders of 504 * 512 = 258048 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 1015 255752 83 Linux
Command (m for help): w
Unable to write /dev/sda
On Fri, 2006-03-24 at 07:03 +0100, Martin S wrote:
> I lent my USB stick to a guy for a job the other day. Apparently his
> Win98 box wanted to install drivers for it to work, so he pulled it
> before Wintendo (anything < 2000) could get to doing its stuff.
>
> Now I get
>
> SuicidalPuppy martoni # mount /mnt/usb/
> mount: block device /dev/sda is write-protected, mounting read-only
> mount: wrong fs type, bad option, bad superblock on /dev/sda,
> missing codepage or other error
> In some cases useful info is found in syslog - try
> dmesg | tail or so
The "read-only" is a bit misleading - I get this message when mount
can't understand the filesystem, even though it may be ok.
If you don't need any data from the drive, see if you can re-fdisk and
re-format it. Unplug it first and plug in again, just in case you did
something bad with hdparm.
SuicidalPuppy martoni # fdisk /dev/sda
You will not be able to write the partition table.
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1015, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1015, default 1015):
Using default value 1015
Command (m for help): p
Disk /dev/sda: 262 MB, 262144000 bytes
9 heads, 56 sectors/track, 1015 cylinders
Units = cylinders of 504 * 512 = 258048 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 1015 255752 83 Linux
Command (m for help): w
Unable to write /dev/sda
Regards,
Martin S

