You are not logged in.

#1 2010-07-24 23:07:03

emk
Member
Registered: 2010-05-11
Posts: 39

USB Stick unrecognized/read only after Gparted

Hi

I partitioned a brand new USB thumb drive with Gparted and then installed Fedora LiveOS on it. This was just a test as I really wanted to use Larch to get Arch on the stick. So I tried to repartitioned it again. But Gaparted now complains that the stick is read only and so does not change anything.

I then moved to fdisk. fdisk will allow me to look at the partitions and will even change them. But after using Fdisk to repartition and then running mkfs.whatever-i-want the partitions can not be mounted. Even dd exits with a read only drive error.

Fdisk can manipulate the partitions but it complains that DOS mode is not supported and asks me to give the c and u commands. Despite this the drive is not recognised when I plug it into the computer.

After using fdisk on the drive several times, gparted now claims that there is no valid partition table on the drive and so shows only unallocated space. But it still won't write any partition info to the device, claiming its read only!

I'm stumped! Anybody have a clue how to get around this?

emk

Offline

#2 2010-07-24 23:22:13

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: USB Stick unrecognized/read only after Gparted

Perhaps if you zero the flash drive first before parttioning it for Larch, you will be successful.

This is done with :

dd if=/dev/zero of=/dev/<your flash device>

Be sure to ID the flash device as sda...not sda(x).

This will ensure that the device can be utilized to install any OS in r/w unless the device is unfit for use...............

It is not certain that you want only Larch on the drive.................


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#3 2010-07-24 23:27:51

emk
Member
Registered: 2010-05-11
Posts: 39

Re: USB Stick unrecognized/read only after Gparted

thanks for the reply.

I had tried this earlier under Fedora LiveCD with no luck. I'm rebooting into Arch and will try there....

emk

Offline

#4 2010-07-24 23:40:48

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: USB Stick unrecognized/read only after Gparted

Perhaps you would enjoy CTK archlive which will load on flash with ~550mb of archlinux pkgs.

It has options for english, normal boot p is in french.  Use alt F2 to enable run of ...setxkbmap us.... to help in using the system since the kb is in french mode.

In doing this, m is : and a is q  when running the above command.

An english addon is available for download and install to change all system packages to english.

It boots in ~17 seconds ..open box pacmanfm arora and midori browsers.

Really worth a look see in a "live" system.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#5 2010-07-24 23:49:15

emk
Member
Registered: 2010-05-11
Posts: 39

Re: USB Stick unrecognized/read only after Gparted

dd fails with an input/output error after writing 17MB. This is an 8GB stick. Fdisk shows no partitions. But is unable to write to the drive after I create partitions. Here is the output.
dd if=/dev/zero of=/dev/sdb

dd: writing to `/dev/sdb': Input/output error
32969+0 records in
32968+0 records out
16879616 bytes (17 MB) copied, 217.003 s, 77.8 kB/s

Output of dmesg when I plug in the drive

usb 4-1: new high speed USB device using ehci_hcd and address 2
Initializing USB Mass Storage driver...
scsi2 : usb-storage 4-1:1.0
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
scsi 2:0:0:0: Direct-Access     HP       v115w            1100 PQ: 0 ANSI: 0 CCS
sd 2:0:0:0: Attached scsi generic sg2 type 0
sd 2:0:0:0: [sdb] 15663104 512-byte logical blocks: (8.01 GB/7.46 GiB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Mode Sense: 43 00 00 00
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:0:0: [sdb] Assuming drive cache: write through
 sdb: sdb1
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:0:0: [sdb] Attached SCSI removable disk

So far this looks OK. I had earlier deleted my initial 2 partitions and created one vfat partition on the drive. But then when I try to mount the drive and to repartition with fdisk dmesg gives the following:

EXT4-fs (sdb1): VFS: Can't find ext4 filesystem
EXT2-fs (sdb1): error: can't find an ext2 filesystem on dev sdb1.
FAT: bogus number of reserved sectors
VFS: Can't find a valid FAT filesystem on dev sdb1.
usb 4-1: reset high speed USB device using ehci_hcd and address 2
usb 4-1: reset high speed USB device using ehci_hcd and address 2
usb 4-1: reset high speed USB device using ehci_hcd and address 2
usb 4-1: reset high speed USB device using ehci_hcd and address 2
usb 4-1: reset high speed USB device using ehci_hcd and address 2
usb 4-1: reset high speed USB device using ehci_hcd and address 2
sd 2:0:0:0: [sdb] Unhandled sense code
sd 2:0:0:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
sd 2:0:0:0: [sdb] Sense Key : 0x7 [current] 
sd 2:0:0:0: [sdb] ASC=0x27 ASCQ=0x0
sd 2:0:0:0: [sdb] CDB: cdb[0]=0x2a: 2a 00 00 00 10 70 00 00 f0 00
end_request: I/O error, dev sdb, sector 4208
Buffer I/O error on device sdb, logical block 526
lost page write due to I/O error on sdb
Buffer I/O error on device sdb, logical block 527
lost page write due to I/O error on sdb
Buffer I/O error on device sdb, logical block 528
lost page write due to I/O error on sdb
Buffer I/O error on device sdb, logical block 529
lost page write due to I/O error on sdb
Buffer I/O error on device sdb, logical block 530
lost page write due to I/O error on sdb
Buffer I/O error on device sdb, logical block 531
lost page write due to I/O error on sdb
Buffer I/O error on device sdb, logical block 532
lost page write due to I/O error on sdb
Buffer I/O error on device sdb, logical block 533
lost page write due to I/O error on sdb
Buffer I/O error on device sdb, logical block 534
lost page write due to I/O error on sdb
Buffer I/O error on device sdb, logical block 535
lost page write due to I/O error on sdb
sd 2:0:0:0: [sdb] Unhandled sense code
sd 2:0:0:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
sd 2:0:0:0: [sdb] Sense Key : 0x7 [current] 
sd 2:0:0:0: [sdb] ASC=0x27 ASCQ=0x0
sd 2:0:0:0: [sdb] CDB: cdb[0]=0x2a: 2a 00 00 00 11 60 00 00 f0 00
end_request: I/O error, dev sdb, sector 4448
sd 2:0:0:0: [sdb] Write Protect is on
sd 2:0:0:0: [sdb] Mode Sense: 43 00 80 00
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:0:0: [sdb] Unhandled sense code
sd 2:0:0:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
sd 2:0:0:0: [sdb] Sense Key : 0x7 [current] 
sd 2:0:0:0: [sdb] ASC=0x27 ASCQ=0x0
sd 2:0:0:0: [sdb] CDB: cdb[0]=0x2a: 2a 00 00 00 80 c0 00 00 08 00
end_request: I/O error, dev sdb, sector 32960
sd 2:0:0:0: [sdb] Assuming drive cache: write through
 sdb: unknown partition table
usb 4-1: reset high speed USB device using ehci_hcd and address 2

I don't have any ext4 partitions on it. THere should only be vfat. My initial partitions  were ext3 and vfat. I then switched the ext3 to ext2 after the problems begun and finally just went with a big vfat. I initially used gparted on the drive so as to label the partitions. I really feel that gparted may be the culprit here but I have no proof. This is a brand new stick that had not been written to before.

And from gparted:

libparted : 2.3
======================
Unable to open /dev/sdb read-write (Read-only file system).  /dev/sdb has been opened read-only.
Unable to open /dev/sdb read-write (Read-only file system).  /dev/sdb has been opened read-only.
Unable to open /dev/sdb read-write (Read-only file system).  /dev/sdb has been opened read-only.
/dev/sdb: unrecognised disk label

[1]+  Done                    gparted

emk

Last edited by emk (2010-07-25 00:02:50)

Offline

#6 2010-07-24 23:54:27

emk
Member
Registered: 2010-05-11
Posts: 39

Re: USB Stick unrecognized/read only after Gparted

Thanks for the info on CTK archive. I'll check it out. If I can get this fscking thumbdrive to work. Nice idea! I'll try fsck on it.:)

Offline

#7 2010-07-24 23:55:24

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: USB Stick unrecognized/read only after Gparted

What flash device are you using?


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#8 2010-07-25 00:00:11

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: USB Stick unrecognized/read only after Gparted

Some posts describe fails to mount with SD devices in recent posts.  This may be what you experience.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#9 2010-07-25 00:07:56

emk
Member
Registered: 2010-05-11
Posts: 39

Re: USB Stick unrecognized/read only after Gparted

Its a HP v115w 8gb stick bought from Microcenter: http://www.microcenter.com/single_produ … id=0322872

I've been searching the forums but can't quite find something similar. Do you know of similar threads?

thanks

emk

Offline

#10 2010-07-25 00:17:47

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: USB Stick unrecognized/read only after Gparted

You may have to zero the first 512MB of your drive to remove msdos mbr data.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#11 2010-07-25 00:45:03

emk
Member
Registered: 2010-05-11
Posts: 39

Re: USB Stick unrecognized/read only after Gparted

lilsirecho wrote:

You may have to zero the first 512MB of your drive to remove msdos mbr data.

Can't figure out how. dd will not write to the drive nor will fdisk. I have noticed something though. If I switch the usb port that I plug the stick into on my laptop, dd will attempt to write to the drive. It then fails with the input/output error. On the second try dd just says it can't write to it.

emk

Offline

#12 2010-07-25 01:38:08

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: USB Stick unrecognized/read only after Gparted

Perhaps you can try the dd zero on another machine?


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

Board footer

Powered by FluxBB