LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Hardware (http://www.linuxquestions.org/questions/forumdisplay.php?f=18)
-   -   Restoring Geometry on my 1G Flashdrive (http://www.linuxquestions.org/questions/showthread.php?t=4175447198)

hal8000b 01-25-2013 12:23 PM

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.

jefro 01-25-2013 04:00 PM

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.

hal8000b 01-28-2013 04:57 PM

[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

jefro 01-28-2013 05:32 PM

Thanks for the update.


All times are GMT -5. The time now is 07:03 AM.