LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 01-25-2013, 12:23 PM   #1
hal8000b
Member
 
Registered: Mar 2001
Location: UK
Distribution: Mint, Arch, Debian7
Posts: 170

Rep: Reputation: 21
Restoring Geometry on my 1G Flashdrive


I have a 1G flashdrive made by Easydisk link below:


http://www.amazon.co.uk/EasyDisk-fla.../dp/B00096JDIK


I should have known better than to trust windows with my data but it corrupted my disk. I have data back though windows had resized the drive
to 500M.


I have reset the geometry with linux fdisk but unsure of original CHS geometry.


This is output from dmesg:

fdisk /dev/sdc

Command (m for help): p

Disk /dev/sdc: 1031 MB, 1031798784 bytes
113 heads, 51 sectors/track, 349 cylinders, total 2015232 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: 0x000258ee

Device Boot Start End Blocks Id System
/dev/sdc1 2048 2015231 1006592 83 Linux


Code:
This is output from sfdisk:

sfdisk /dev/sdc
Checking that no-one is using this disk right now ...
OK

Disk /dev/sdc: 1015 cylinders, 32 heads, 62 sectors/track
Old situation:
Warning: The partition table looks like it was made
  for C/H/S=*/113/51 (instead of 1015/32/62).
For this listing I'll assume that geometry.
Units = cylinders of 2950656 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdc1          0+    349-    350-   1006592   83  Linux
                start: (c,h,s) expected (0,40,9) found (0,32,33)
                end: (c,h,s) expected (349,77,18) found (125,112,51)

Output from hdparm


hdparm -i /dev/sdc

/dev/sdc:
SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
HDIO_GET_IDENTITY failed: Invalid argument




Drive is working if I manually mount it although the kernel generates a few errors:

Output from dmesg below:

Quote:
usb 9-1: new high-speed USB device number 3 using ehci_hcd
usb 9-1: New USB device found, idVendor=13fe, idProduct=1d00
usb 9-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 9-1: Product: Disk
usb 9-1: Manufacturer: Easy
usb 9-1: SerialNumber: 9073020002BC
Initializing USB Mass Storage driver...
scsi8 : usb-storage 9-1:1.0
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver uas
scsi 8:0:0:0: Direct-Access Easy Disk V1.1 PQ: 0 ANSI: 0 CCS
sd 8:0:0:0: Attached scsi generic sg3 type 0
sd 8:0:0:0: [sdc] 2015232 512-byte logical blocks: (1.03 GB/984 MiB)
sd 8:0:0:0: [sdc] Write Protect is off
sd 8:0:0:0: [sdc] Mode Sense: 23 00 00 00
sd 8:0:0:0: [sdc] No Caching mode page present
sd 8:0:0:0: [sdc] Assuming drive cache: write through
sd 8:0:0:0: [sdc] No Caching mode page present
sd 8:0:0:0: [sdc] Assuming drive cache: write through
sdc: sdc1
sd 8:0:0:0: [sdc] No Caching mode page present
sd 8:0:0:0: [sdc] Assuming drive cache: write through
sd 8:0:0:0: [sdc] Attached SCSI removable disk
hdparm: sending ioctl 304 to a partition!
hdparm: sending ioctl 304 to a partition!
hdparm: sending ioctl 2285 to a partition!
hdparm: sending ioctl 2285 to a partition!
hdparm: sending ioctl 30d to a partition!
hdparm: sending ioctl 30d to a partition!
hdparm: sending ioctl 2285 to a partition!
hdparm: sending ioctl 2285 to a partition!
sr 2:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sr 2:0:0:0: [sr0] Sense Key : Illegal Request [current]
Info fld=0x56d32, ILI
sr 2:0:0:0: [sr0] Add. Sense: Illegal mode for this track
sr 2:0:0:0: [sr0] CDB: Read(10): 28 00 00 05 6d 32 00 00 01 00
end_request: I/O error, dev sr0, sector 1422536
quiet_error: 779 callbacks suppressed
Buffer I/O error on device sr0, logical block 355634
sr 2:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sr 2:0:0:0: [sr0] Sense Key : Illegal Request [current]
Info fld=0x56d32, ILI
sr 2:0:0:0: [sr0] Add. Sense: Illegal mode for this track
sr 2:0:0:0: [sr0] CDB: Read(10): 28 00 00 05 6d 32 00 00 01 00
end_request: I/O error, dev sr0, sector 1422536
Buffer I/O error on device sr0, logical block 355634
sd 8:0:0:0: [sdc] No Caching mode page present
sd 8:0:0:0: [sdc] Assuming drive cache: write through
sdc: sdc1
martian source 192.168.254.255 from 192.168.254.66, on dev eth0
ll header: ff:ff:ff:ff:ff:ff:64:0f:28:93:bb:71:08:00
usb 9-1: USB disconnect, device number 3
usb 9-1: new high-speed USB device number 4 using ehci_hcd
usb 9-1: New USB device found, idVendor=13fe, idProduct=1d00
usb 9-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 9-1: Product: Disk
usb 9-1: Manufacturer: Easy
usb 9-1: SerialNumber: 9073020002BC
scsi9 : usb-storage 9-1:1.0
scsi 9:0:0:0: Direct-Access Easy Disk V1.1 PQ: 0 ANSI: 0 CCS
sd 9:0:0:0: Attached scsi generic sg3 type 0
sd 9:0:0:0: [sdc] 2015232 512-byte logical blocks: (1.03 GB/984 MiB)
sd 9:0:0:0: [sdc] Write Protect is off
sd 9:0:0:0: [sdc] Mode Sense: 23 00 00 00
sd 9:0:0:0: [sdc] No Caching mode page present
sd 9:0:0:0: [sdc] Assuming drive cache: write through
sd 9:0:0:0: [sdc] No Caching mode page present
sd 9:0:0:0: [sdc] Assuming drive cache: write through
sdc: sdc1
sd 9:0:0:0: [sdc] No Caching mode page present
sd 9:0:0:0: [sdc] Assuming drive cache: write through
sd 9:0:0:0: [sdc] Attached SCSI removable disk

Not sure which is correct , maybe someone has same drive and can post output from fdisk or hdparm, or any suggestions?
Thanks in advance.
 
Old 01-25-2013, 04:00 PM   #2
jefro
Guru
 
Registered: Mar 2008
Posts: 11,592

Rep: Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419
I am not too sure it is a good working disk at this point.

I'd remove all partitions and then create a single new one and see what happens.
 
Old 01-28-2013, 04:57 PM   #3
hal8000b
Member
 
Registered: Mar 2001
Location: UK
Distribution: Mint, Arch, Debian7
Posts: 170

Original Poster
Rep: Reputation: 21
[Solved]

OK, I deleted all partitions and created a single partition using cfdisk.
I formatted it as ext3 mkfs.ext3 /dev/sdc1

Using sfdisk both the kernels idea of the geometry and geometry of disk now
match.

[root@Orac anc]# sfdisk -gG /dev/sdc
/dev/sdc: 1015 cylinders, 32 heads, 62 sectors/track
/dev/sdc: 1015 cylinders, 32 heads, 62 sectors/track

It automounts in KDE so marking as solved.
I dont do windows so no point in having NTFS or FAT32
 
Old 01-28-2013, 05:32 PM   #4
jefro
Guru
 
Registered: Mar 2008
Posts: 11,592

Rep: Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419
Thanks for the update.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Flashdrive Trash nmg49 Linux - Desktop 3 03-12-2012 05:15 PM
Getting frame buffer geometry to match monitor geometry Skaperen Linux - Desktop 0 03-13-2011 03:27 PM
usb flashdrive help l3it Red Hat 1 07-19-2009 04:16 AM
Flashdrive not detected Peter Mous Linux - Hardware 1 02-23-2007 03:43 PM
flashdrive on MDK 10.0 Trio3b Linux - Hardware 2 08-22-2005 03:18 AM


All times are GMT -5. The time now is 04:05 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration