|
|
CompactFlash Partitioning with fdisk
|
|
03/08/2011 1:12 PM
post83831
|
CompactFlash Partitioning with fdisk
Hi,
I am having problem partitioning Kingston 8GB (CF/8GB) CompactFlash using fdisk.
Please let me describe what I want to do is to delete previous partitions on CF and create two new partition: one raw
and second qnx6. Therefore my procedure should be,
//Delete Previous Partitions
#fdisk /dev/hd0 delete –a
//Create around 16 MB first raw partition.
#fdisk /dev/hd0 add -b -c 0,15 -t 180
//Create second qnx6fs partition.
#fdisk /dev/hd0 add -t 179
But problem is that when I issue first command to delete previous partitions something wrong happens and two known
partitions appears when I do fdisk /dev/hd0 info.
Here is my steps and fdisk output
// Previous condition
# fdisk /dev/hd0 info
/dev/hd0 info Physical disk characteristics: (/dev/hd0)
Disk type : Direct Access (0)
Cylinders : 7647
Heads : 64
Sectors/Track : 32
Total Sectors : 15662304
Warning: total sectors field does not agree with
cylinders*sectors/track*heads!! (15662304 vs 15661056)
Partition table information:
0: (180) beg(h=1,s=1,c=0) end(h=63,s=32,c=15) off=32, size=32736
1: (179) beg(h=0,s=1,c=16) end(h=63,s=224,c=208) off=32768, size=1968128
2: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
3: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
signature1=0x55, signature2=0xAA
# fdisk /dev/hd0 delete -a
//After deleting partitions
# fdisk /dev/hd0 info
Physical disk characteristics: (/dev/hd0)
Disk type : Direct Access (0)
Cylinders : 7647
Heads : 64
Sectors/Track : 32
Total Sectors : 0
Warning: total sectors field does not agree with
cylinders*sectors/track*heads!! (0 vs 15661056)
Partition table information:
0: (0) beg(h=0,s=0,c=0) end(h=0,s=72,c=4) off=0, size=88604672
1: (0) beg(h=16,s=0,c=0) end(h=0,s=0,c=0) off=0, size=1769734144
2: (192) beg(h=179,s=72,c=5) end(h=0,s=0,c=0) off=256, size=18274
3: (144) beg(h=0,s=72,c=5) end(h=16,s=72,c=4) off=71834633, size=71867395
signature1=0x01, signature2=0x28
Please can anyone tell me where things are going wrong? This problem only exist with 8 GB Kingston CompactFlash. I have
tested other 1 and 2 GB CFs and everything's fine.
I have also attached sloginfo.
Thank you very much,
Apurva
|
|
|
|
|
|
|
RE: CompactFlash Partitioning with fdisk
|
|
03/09/2011 8:13 AM
post83858
|
RE: CompactFlash Partitioning with fdisk
Did you tried to run "mount -e"?
# fdisk /dev/hd0 info
# fdisk /dev/hd0 delete -a
# mount -e /dev/hd0
# fdisk /dev/hd0 info
Christophe
> From: Apurva P [mailto:community-noreply@qnx.com]
> Sent: Tuesday, March 08, 2011 7:13 PM
> To: general-filesystems
> Subject: CompactFlash Partitioning with fdisk
>
> Hi,
>
> I am having problem partitioning Kingston 8GB (CF/8GB) CompactFlash using
> fdisk.
>
> Please let me describe what I want to do is to delete previous partitions on CF
> and create two new partition: one raw and second qnx6. Therefore my
> procedure should be,
>
> //Delete Previous Partitions
> #fdisk /dev/hd0 delete –a
>
> //Create around 16 MB first raw partition.
> #fdisk /dev/hd0 add -b -c 0,15 -t 180
>
> //Create second qnx6fs partition.
> #fdisk /dev/hd0 add -t 179
>
>
> But problem is that when I issue first command to delete previous partitions
> something wrong happens and two known partitions appears when I do fdisk
> /dev/hd0 info.
>
> Here is my steps and fdisk output
>
> // Previous condition
> # fdisk /dev/hd0 info
>
> /dev/hd0 info Physical disk characteristics: (/dev/hd0)
> Disk type : Direct Access (0)
> Cylinders : 7647
> Heads : 64
> Sectors/Track : 32
> Total Sectors : 15662304
>
> Warning: total sectors field does not agree with
> cylinders*sectors/track*heads!! (15662304 vs 15661056)
>
> Partition table information:
> 0: (180) beg(h=1,s=1,c=0) end(h=63,s=32,c=15) off=32, size=32736
> 1: (179) beg(h=0,s=1,c=16) end(h=63,s=224,c=208) off=32768,
> size=1968128
> 2: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
> 3: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0 signature1=0x55,
> signature2=0xAA
>
>
> # fdisk /dev/hd0 delete -a
>
> //After deleting partitions
> # fdisk /dev/hd0 info
>
> Physical disk characteristics: (/dev/hd0)
> Disk type : Direct Access (0)
> Cylinders : 7647
> Heads : 64
> Sectors/Track : 32
> Total Sectors : 0
>
> Warning: total sectors field does not agree with
> cylinders*sectors/track*heads!! (0 vs 15661056)
>
> Partition table information:
> 0: (0) beg(h=0,s=0,c=0) end(h=0,s=72,c=4) off=0, size=88604672
> 1: (0) beg(h=16,s=0,c=0) end(h=0,s=0,c=0) off=0, size=1769734144
> 2: (192) beg(h=179,s=72,c=5) end(h=0,s=0,c=0) off=256, size=18274
> 3: (144) beg(h=0,s=72,c=5) end(h=16,s=72,c=4) off=71834633,
> size=71867395 signature1=0x01, signature2=0x28
>
>
> Please can anyone tell me where things are going wrong? This problem only
> exist with 8 GB Kingston CompactFlash. I have tested other 1 and 2 GB CFs and
> everything's fine.
>
> I have also attached sloginfo.
>
> Thank you very much,
> Apurva
>
>
>
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post83831
|
|
|
|
|
|
|
Re: RE: CompactFlash Partitioning with fdisk
|
|
03/10/2011 2:25 AM
post83885
|
Re: RE: CompactFlash Partitioning with fdisk
Hi Christophe
Wow. This mount -e /dev/hd0 statement seems to solve the partitioning problem :-) . But now I am facing a new problem. :
-(
After partitioning, when I try to format second partition with qnx6fs, that device node /dev/hd0t179 disappears and
formatting fails.
Here is output...
// Before Partitioning
#fdisk /dev/hd0 info
fdisk /dev/hd0 info Physical disk characteristics: (/dev/hd0)
Disk type : Direct Access (0)
Cylinders : 7647
Heads : 64
Sectors/Track : 32
Total Sectors : 15662304
Warning: total sectors field does not agree with
cylinders*sectors/track*heads!! (15662304 vs 15661056)
Partition table information:
0: (180) beg(h=1,s=1,c=0) end(h=63,s=32,c=15) off=32, size=32736
1: (179) beg(h=0,s=1,c=16) end(h=63,s=224,c=208) off=32768, size=1968128
2: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
3: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
signature1=0x55, signature2=0xAA
# ls -l /dev/
total 24083649
n------rw- 1 root root 0 Jan 01 00:01 bpf
n------rw- 1 root root 0 Jan 01 00:01 bpf0
crw-rw-rw- 1 root root 0, 1 Jan 01 00:01 console
brw------- 1 root root 4, 0 Jan 01 00:01 hd0
brw------- 1 root root 1, 8 Jan 01 00:01 hd0t180
dr-xr-xr-x 2 root root 0 Jan 01 00:01 io-net
.
.
.
# fdisk /dev/hd0 delete -a
# mount -e /dev/hd0
# fdisk /dev/hd0 info
Physical disk characteristics: (/dev/hd0)
Disk type : Direct Access (0)
Cylinders : 7647
Heads : 64
Sectors/Track : 32
Total Sectors : 15662304
Warning: total sectors field does not agree with
cylinders*sectors/track*heads!! (15662304 vs 15661056)
Partition table information:
0: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
1: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
2: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
3: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
signature1=0x55, signature2=0xAA
# ls -l /dev/
total 24050913
n------rw- 1 root root 0 Jan 01 00:02 bpf
n------rw- 1 root root 0 Jan 01 00:02 bpf0
crw-rw-rw- 1 root root 0, 1 Jan 01 00:01 console
brw------- 1 root root 4, 0 Jan 01 00:01 hd0
dr-xr-xr-x 2 root root 0 Jan 01 00:02 io-net
.
.
.
# fdisk /dev/hd0 add -b -c 0,15 -t 180
# fdisk /dev/hd0 add -c 16,976 -t 179
# mount -e /dev/hd0
# fdisk /dev/hd0 info
Physical disk characteristics: (/dev/hd0)
Disk type : Direct Access (0)
Cylinders : 7647
Heads : 64
Sectors/Track : 32
Total Sectors : 15662304
Warning: total sectors field does not agree with
cylinders*sectors/track*heads!! (15662304 vs 15661056)
Partition table information:
0: (180) beg(h=1,s=1,c=0) end(h=63,s=32,c=15) off=32, size=32736
1: (179) beg(h=0,s=1,c=16) end(h=63,s=224,c=208) off=32768, size=1968128
2: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
3: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
signature1=0x55, signature2=0xAA
# ls -l /dev/
total 26051777
n------rw- 1 root root 0 Jan 01 00:02 bpf
n------rw- 1 root root 0 Jan 01 00:02 bpf0
crw-rw-rw- 1 root root 0, 1 Jan 01 00:01 console
brw------- 1 root root 4, 0 Jan 01 00:02 hd0
brw------- 1 root root 1, 9 Jan 01 00:02 hd0t179
brw------- 1 root root 1, 8 Jan 01 00:02 hd0t180
dr-xr-xr-x 2 root root 0 Jan 01 00:02 io-net
.
.
.
# mkqnx6fs -q /dev/hd0t179
mkqnx6fs: unable to write indirect blocks
#
# mkqnx6fs -q /dev/hd0t179
# ls -l /dev/
ls: No such device or address (/dev/hd0t179)
ls: No such device or address...
View Full Message
|
|
|
|
|
|
|
CompactFlash Partitioning with fdisk
|
|
03/10/2011 4:07 AM
post83887
|
CompactFlash Partitioning with fdisk
No I don't see what can be the problem.
Did you tried to:
- check the sloginfo?
- create the 179 with a size less of 4GB?
- create only one 179 partition on the complete disk (only to check if
this works)?
- create first the 179 and after the 180?
Christophe
> -----Original Message-----
> From: Apurva P [mailto:community-noreply@qnx.com]
> Sent: Thursday, March 10, 2011 8:25 AM
> To: general-filesystems
> Subject: Re: RE: CompactFlash Partitioning with fdisk
>
> Hi Christophe
>
> Wow. This mount -e /dev/hd0 statement seems to solve the partitioning
> problem :-) . But now I am facing a new problem. :-(
>
> After partitioning, when I try to format second partition with qnx6fs,
that
> device node /dev/hd0t179 disappears and formatting fails.
>
> Here is output...
>
>
> // Before Partitioning
> #fdisk /dev/hd0 info
> fdisk /dev/hd0 info Physical disk characteristics: (/dev/hd0)
> Disk type : Direct Access (0)
> Cylinders : 7647
> Heads : 64
> Sectors/Track : 32
> Total Sectors : 15662304
>
> Warning: total sectors field does not agree with
> cylinders*sectors/track*heads!! (15662304 vs 15661056)
>
> Partition table information:
> 0: (180) beg(h=1,s=1,c=0) end(h=63,s=32,c=15) off=32, size=32736
> 1: (179) beg(h=0,s=1,c=16) end(h=63,s=224,c=208) off=32768,
size=1968128
> 2: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
> 3: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
signature1=0x55,
> signature2=0xAA
>
>
> # ls -l /dev/
> total 24083649
> n------rw- 1 root root 0 Jan 01 00:01 bpf
> n------rw- 1 root root 0 Jan 01 00:01 bpf0
> crw-rw-rw- 1 root root 0, 1 Jan 01 00:01 console
> brw------- 1 root root 4, 0 Jan 01 00:01 hd0
> brw------- 1 root root 1, 8 Jan 01 00:01 hd0t180
> dr-xr-xr-x 2 root root 0 Jan 01 00:01 io-net
> .
> .
> .
>
> # fdisk /dev/hd0 delete -a
> # mount -e /dev/hd0
> # fdisk /dev/hd0 info
> Physical disk characteristics: (/dev/hd0)
> Disk type : Direct Access (0)
> Cylinders : 7647
> Heads : 64
> Sectors/Track : 32
> Total Sectors : 15662304
>
> Warning: total sectors field does not agree with
> cylinders*sectors/track*heads!! (15662304 vs 15661056)
>
> Partition table information:
> 0: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
> 1: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
> 2: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
> 3: (0) beg(h=0,s=0,c=0) end(h=0,s=0,c=0) off=0, size=0
signature1=0x55,
> signature2=0xAA
>
>
> # ls -l /dev/
> total 24050913
> n------rw- 1 root root 0 Jan 01 00:02 bpf
> n------rw- 1 root root 0 Jan 01 00:02 bpf0
> crw-rw-rw- 1 root root 0, 1 Jan 01 00:01 console
> brw------- 1 root root 4, 0 Jan 01 00:01 hd0
> dr-xr-xr-x 2 root root 0 Jan 01 00:02 io-net
> .
> .
> .
>
> # fdisk /dev/hd0 add -b -c 0,15 -t 180
> # fdisk /dev/hd0 add -c 16,976 -t 179
> # mount -e /dev/hd0
> # fdisk /dev/hd0 info
> Physical disk characteristics: (/dev/hd0)
> Disk type : Direct Access (0)
> Cylinders : 7647
> Heads : 64
> Sectors/Track : 32
> Total Sectors : 15662304
>
> Warning: total sectors field does not agree with
> cylinders*sectors/track*heads!! (15662304 vs 15661056)
>
> Partition table information:
> 0: (180) beg(h=1,s=1,c=0)...
View Full Message
|
|
|
|
|
|
|
Re: CompactFlash Partitioning with fdisk
|
|
03/09/2011 8:39 AM
post83861
|
Re: CompactFlash Partitioning with fdisk
"After deleting partitions
# fdisk /dev/hd0 info
Physical disk characteristics: (/dev/hd0)
...
Total Sectors :>>>> 0<<<<
Warning: total sectors field does not agree with
cylinders*sectors/track*heads!! (>>>>0<<<< vs 15661056)"
------------------------------------------------------
As long as the system cannot determine total sectors (15662304) from the device, not sure how it could work! Have you
tried rebooting AFTER deleting all partitions? In theory, that should update total sectors.
I will venture that the CF flash units that work have 63 spt (not 32) - as well as 255 heads (not 64).
Dennis
|
|
|
|
|
|
|
Re: CompactFlash Partitioning with fdisk
|
|
03/10/2011 2:33 AM
post83886
|
Re: CompactFlash Partitioning with fdisk
Hi Dennis,
Yeah, good catch, I totally missed that 0 Total Sectors.
> "After deleting partitions
> # fdisk /dev/hd0 info
>
> Physical disk characteristics: (/dev/hd0)
> ...
> Total Sectors :>>>> 0<<<<
>
> Warning: total sectors field does not agree with
> cylinders*sectors/track*heads!! (>>>>0<<<< vs 15661056)"
>
> ------------------------------------------------------
> As long as the system cannot determine total sectors (15662304) from the
> device, not sure how it could work! Have you tried rebooting AFTER deleting
> all partitions? In theory, that should update total sectors.
Anyway this problem got solved when I did mount -e /dev/hd0 after deleting partitions as Christophe mentioned.
>
> I will venture that the CF flash units that work have 63 spt (not 32) - as
> well as 255 heads (not 64).
>
I am not sure on this as I have other 1 GB CF which works perfectly fine and has spt and head similar to Kingston's 8GB
CF.
Physical disk characteristics: (/dev/hd0)
Disk type : Direct Access (0)
Cylinders : 977
Heads : 64
Sectors/Track : 32
Total Sectors : 2001888
Warning: total sectors field does not agree with
cylinders*sectors/track*heads!! (2001888 vs 2000896)
Best Regards,
Apurva
|
|
|
|
|
|