I am opening this topic again as some more experimenting taking place, and I am struggling with fdisk.
I am experimenting with changing the geometry of the USB stick, to do with setting up 128KB cylinder boundaries.
The aim to set out H and S values and let C take up proper value.
I start with this, the final result I am aiming for.
[root@KDE-mini-Cprog gert]# fdisk -l /dev/sdc
Disk /dev/sdc: 4005 MB, 4005560320 bytes
151 heads, 48 sectors/track, 1079 cylinders, total 7823360 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: 0x000af4cd
Device Boot Start End Blocks Id System
/dev/sdc1 1 7820591 3910295+ 83 Linux
[root@KDE-mini-Cprog gert]#
Then I load the original USB stick Image via dd
[root@KDE-mini-Cprog gert]# dd if=/media/USB465-1B/Data-Recovered-100711/Data/x8-ISO_Files/MyLiveCDs/ bs=1M of=/dev/sdc
3820+0 records in
3820+0 records out
4005560320 bytes (4.0 GB) copied, 502.664 s, 8.0 MB/s
[root@KDE-mini-Cprog gert]#[root@KDE-mini-Cprog gert]# fdisk -l /dev/sdc
Disk /dev/sdc: 4005 MB, 4005560320 bytes
255 heads, 63 sectors/track, 486 cylinders, total 7823360 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: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 * 63 7807589 3903763+ 83 Linux
[root@KDE-mini-Cprog gert]#
Now change geometry with fdisk, by the way here I have to umount the device to get success
[root@KDE-mini-Cprog gert]# fdisk -H 151 -S 48 /dev/sdc
Command (m for help): p
Disk /dev/sdc: 4005 MB, 4005560320 bytes
151 heads, 48 sectors/track, 1079 cylinders, total 7823360 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: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 * 63 7807589 3903763+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@KDE-mini-Cprog gert]#
So the partition table has been altered, I pulled out the stick and inserted it again.
[root@KDE-mini-Cprog gert]# fdisk /dev/sdc
Command (m for help): p
Disk /dev/sdc: 4005 MB, 4005560320 bytes
255 heads, 63 sectors/track, 486 cylinders, total 7823360 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: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 * 63 7807589 3903763+ 83 Linux
Command (m for help): q
I quit here a bit worried as there is no sign of partition table having changed.
Proceed to re-establish a file system as changing CHS value seem to upset the existing partition. Reformatting as follows.
[root@KDE-mini-Cprog gert]# mke2fs -t ext3 -L problem /dev/sdc1
mke2fs 1.42 (29-Nov-2011)
Filesystem label=problem
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
244320 inodes, 975940 blocks
48797 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1002438656
30 block groups
32768 blocks per group, 32768 fragments per group
8144 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
[root@KDE-mini-Cprog gert]#
Looking again at geometry with fdisk
[root@KDE-mini-Cprog gert]# fdisk -l /dev/sdc
Disk /dev/sdc: 4005 MB, 4005560320 bytes
255 heads, 63 sectors/track, 486 cylinders, total 7823360 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: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 * 63 7807589 3903763+ 83 Linux
[root@KDE-mini-Cprog gert]#
And also with sfdisk
[root@KDE-mini-Cprog gert]# sfdisk -g /dev/sdc
/dev/sdc: 486 cylinders, 255 heads, 63 sectors/track
[root@KDE-mini-Cprog gert]#
So far is there anything wrong in my method?