I am getting the WRONG values reported from fdisk on centos 6. This is listing an 8G CF card on /dev/sde
Disk /dev/sde: 8019 MB, 8019099648 bytes 247 heads, 62 sectors/track, 1022 cylinders Units = cylinders of 15314 * 512 = 7840768 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xd1b46611
It should be 255 heads, 63 sectors/track.
Under centos 5 this is reported correctly.
I even tried specifying the -S 63 -H 255 on the fdisk command line - that did not help.
my symptom is when I setup my CF card to run linux - I get a grub error 2.
What kind of madness is happening?
Jerry
on 9/15/2011 1:57 PM Jerry Geis spake the following:
I am getting the WRONG values reported from fdisk on centos 6. This is listing an 8G CF card on /dev/sde
Disk /dev/sde: 8019 MB, 8019099648 bytes 247 heads, 62 sectors/track, 1022 cylinders Units = cylinders of 15314 * 512 = 7840768 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xd1b46611
It should be 255 heads, 63 sectors/track.
Under centos 5 this is reported correctly.
I even tried specifying the -S 63 -H 255 on the fdisk command line - that did not help.
my symptom is when I setup my CF card to run linux - I get a grub error 2.
What kind of madness is happening?
Jerry
I think the fdisk in 6 tries to align on 4k boundaries. Does fdisk -c do the same thing?
On 09/15/2011 06:03 PM, Jerry Geis wrote:
I think the fdisk in 6 tries to align on 4k boundaries. Does fdisk -c do the same thing?
Scott - thanks I just tried -cu and same result.
jerry
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
have you tried sfdisk?
On 09/16/2011 06:59 AM, Steve Clark wrote:
On 09/15/2011 06:03 PM, Jerry Geis wrote:
I think the fdisk in 6 tries to align on 4k boundaries. Does fdisk -c do the same thing?
Scott - thanks I just tried -cu and same result.
jerry
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
have you tried sfdisk?
Steve - I had not - but asking sfdisk to list the device on centos has the wrong geometry to start with just like fdisk does. it should be 255 heads and 63 sectors.
sfdisk -v sfdisk (util-linux-ng 2.17.2)
sfdisk -l /dev/sde
Disk /dev/sde: 1022 cylinders, 247 heads, 62 sectors/track Warning: The partition table looks like it was made for C/H/S=*/255/63 (instead of 1022/247/62). For this listing I'll assume that geometry. Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System /dev/sde1 * 0+ 974- 975- 7830616+ b W95 FAT32 end: (c,h,s) expected (974,221,63) found (1023,254,63) /dev/sde2 0 - 0 0 0 Empty /dev/sde3 0 - 0 0 0 Empty /dev/sde4 0 - 0 0 0 Empty
---------------- This is centos 5 sfdisk -v sfdisk (util-linux 2.13-pre7)
sfdisk -l /dev/sdb
Disk /dev/sdb: 974 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System /dev/sdb1 * 0+ 851 852- 6843658+ 83 Linux /dev/sdb2 852 973 122 979965 82 Linux swap / Solaris /dev/sdb3 0 - 0 0 0 Empty /dev/sdb4 0 - 0 0 0 Empty
On 09/16/2011 08:10 AM, Jerry Geis wrote:
On 09/16/2011 06:59 AM, Steve Clark wrote:
On 09/15/2011 06:03 PM, Jerry Geis wrote:
I think the fdisk in 6 tries to align on 4k boundaries. Does fdisk -c do the same thing?
Scott - thanks I just tried -cu and same result.
jerry
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
have you tried sfdisk?
Steve - I had not - but asking sfdisk to list the device on centos has the wrong geometry to start with just like fdisk does. it should be 255 heads and 63 sectors.
sfdisk -v sfdisk (util-linux-ng 2.17.2)
sfdisk -l /dev/sde
Disk /dev/sde: 1022 cylinders, 247 heads, 62 sectors/track Warning: The partition table looks like it was made for C/H/S=*/255/63 (instead of 1022/247/62). For this listing I'll assume that geometry. Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sde1 * 0+ 974- 975- 7830616+ b W95 FAT32 end: (c,h,s) expected (974,221,63) found (1023,254,63) /dev/sde2 0 - 0 0 0 Empty /dev/sde3 0 - 0 0 0 Empty /dev/sde4 0 - 0 0 0 Empty
This is centos 5 sfdisk -v sfdisk (util-linux 2.13-pre7)
sfdisk -l /dev/sdb
Disk /dev/sdb: 974 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdb1 * 0+ 851 852- 6843658+ 83 Linux /dev/sdb2 852 973 122 979965 82 Linux swap / Solaris /dev/sdb3 0 - 0 0 0 Empty /dev/sdb4 0 - 0 0 0 Empty
Hmm... I have an automated script that installs C6 on devices - I have used it on sata drives, ssds and CF. The first thing I do is dd of=$DRIVE if=/dev/zero bs=1024 count=1 to wipe out the existing partition table then I do
# 1MB = 2048 512byte sectors DSIZE=`sfdisk -s -uS $DRIVE` DSIZE=$((DSIZE*2)) Log "DSIZE is $DSIZE" #OFFSET=2048 OFFSET=8 SWAP=1000000 BOOT=600000 PSIZE=$(((DSIZE-(OFFSET+BOOT+SWAP+10))/2)) PSIZE=$((PSIZE+(PSIZE%2))) PSTART=$((PSIZE+BOOT+SWAP+OFFSET)) Log "PSIZE is $PSIZE" Log "PSTART is $PSTART" # partition the disk for /boot, swap, / #/sbin/sfdisk -q -uS $DRIVE << EOF #8,600000,L,* #,1000000,S #,,L #EOF /sbin/sfdisk -f -q -uS $DRIVE << EOF $OFFSET,$BOOT,L,* $((OFFSET+BOOT)),$SWAP,S $((OFFSET+BOOT+SWAP)),$PSIZE,L $PSTART,,L EOF
I am creating two linux partitions and a swap partition. The swap is fixed and the two linux partitions are approximately equal. I have had no problem booting C6 after doing this.
On 09/16/2011 08:37 AM, Steve Clark wrote:
On 09/16/2011 08:10 AM, Jerry Geis wrote:
On 09/16/2011 06:59 AM, Steve Clark wrote:
On 09/15/2011 06:03 PM, Jerry Geis wrote:
I think the fdisk in 6 tries to align on 4k boundaries. Does fdisk -c do the same thing?
Scott - thanks I just tried -cu and same result.
jerry
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
have you tried sfdisk?
Steve - I had not - but asking sfdisk to list the device on centos has the wrong geometry to start with just like fdisk does. it should be 255 heads and 63 sectors.
sfdisk -v sfdisk (util-linux-ng 2.17.2)
sfdisk -l /dev/sde
Disk /dev/sde: 1022 cylinders, 247 heads, 62 sectors/track Warning: The partition table looks like it was made for C/H/S=*/255/63 (instead of 1022/247/62). For this listing I'll assume that geometry. Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sde1 * 0+ 974- 975- 7830616+ b W95 FAT32 end: (c,h,s) expected (974,221,63) found (1023,254,63) /dev/sde2 0 - 0 0 0 Empty /dev/sde3 0 - 0 0 0 Empty /dev/sde4 0 - 0 0 0 Empty
This is centos 5 sfdisk -v sfdisk (util-linux 2.13-pre7)
sfdisk -l /dev/sdb
Disk /dev/sdb: 974 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdb1 * 0+ 851 852- 6843658+ 83 Linux /dev/sdb2 852 973 122 979965 82 Linux swap / Solaris /dev/sdb3 0 - 0 0 0 Empty /dev/sdb4 0 - 0 0 0 Empty
Hmm... I have an automated script that installs C6 on devices - I have used it on sata drives, ssds and CF. The first thing I do is dd of=$DRIVE if=/dev/zero bs=1024 count=1 to wipe out the existing partition table then I do
# 1MB = 2048 512byte sectors DSIZE=`sfdisk -s -uS $DRIVE` DSIZE=$((DSIZE*2)) Log "DSIZE is $DSIZE" #OFFSET=2048 OFFSET=8 SWAP=1000000 BOOT=600000 PSIZE=$(((DSIZE-(OFFSET+BOOT+SWAP+10))/2)) PSIZE=$((PSIZE+(PSIZE%2))) PSTART=$((PSIZE+BOOT+SWAP+OFFSET)) Log "PSIZE is $PSIZE" Log "PSTART is $PSTART" # partition the disk for /boot, swap, / #/sbin/sfdisk -q -uS $DRIVE << EOF #8,600000,L,* #,1000000,S #,,L #EOF /sbin/sfdisk -f -q -uS $DRIVE << EOF $OFFSET,$BOOT,L,* $((OFFSET+BOOT)),$SWAP,S $((OFFSET+BOOT+SWAP)),$PSIZE,L $PSTART,,L EOF
I am creating two linux partitions and a swap partition. The swap is fixed and the two linux partitions are approximately equal. I have had no problem booting C6 after doing this.
Steve,
Thanks - I will try this script probably Monday - heading out today.
Jerry
On 09/16/2011 08:37 AM, Steve Clark wrote:
On 09/16/2011 08:10 AM, Jerry Geis wrote:
On 09/16/2011 06:59 AM, Steve Clark wrote:
On 09/15/2011 06:03 PM, Jerry Geis wrote:
I think the fdisk in 6 tries to align on 4k boundaries. Does fdisk -c do the same thing?
Scott - thanks I just tried -cu and same result.
jerry
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
have you tried sfdisk?
Steve - I had not - but asking sfdisk to list the device on centos has the wrong geometry to start with just like fdisk does. it should be 255 heads and 63 sectors.
sfdisk -v sfdisk (util-linux-ng 2.17.2)
sfdisk -l /dev/sde
Disk /dev/sde: 1022 cylinders, 247 heads, 62 sectors/track Warning: The partition table looks like it was made for C/H/S=*/255/63 (instead of 1022/247/62). For this listing I'll assume that geometry. Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sde1 * 0+ 974- 975- 7830616+ b W95 FAT32 end: (c,h,s) expected (974,221,63) found (1023,254,63) /dev/sde2 0 - 0 0 0 Empty /dev/sde3 0 - 0 0 0 Empty /dev/sde4 0 - 0 0 0 Empty
This is centos 5 sfdisk -v sfdisk (util-linux 2.13-pre7)
sfdisk -l /dev/sdb
Disk /dev/sdb: 974 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdb1 * 0+ 851 852- 6843658+ 83 Linux /dev/sdb2 852 973 122 979965 82 Linux swap / Solaris /dev/sdb3 0 - 0 0 0 Empty /dev/sdb4 0 - 0 0 0 Empty
Hmm... I have an automated script that installs C6 on devices - I have used it on sata drives, ssds and CF. The first thing I do is dd of=$DRIVE if=/dev/zero bs=1024 count=1 to wipe out the existing partition table then I do
# 1MB = 2048 512byte sectors DSIZE=`sfdisk -s -uS $DRIVE` DSIZE=$((DSIZE*2)) Log "DSIZE is $DSIZE" #OFFSET=2048 OFFSET=8 SWAP=1000000 BOOT=600000 PSIZE=$(((DSIZE-(OFFSET+BOOT+SWAP+10))/2)) PSIZE=$((PSIZE+(PSIZE%2))) PSTART=$((PSIZE+BOOT+SWAP+OFFSET)) Log "PSIZE is $PSIZE" Log "PSTART is $PSTART" # partition the disk for /boot, swap, / #/sbin/sfdisk -q -uS $DRIVE << EOF #8,600000,L,* #,1000000,S #,,L #EOF /sbin/sfdisk -f -q -uS $DRIVE << EOF $OFFSET,$BOOT,L,* $((OFFSET+BOOT)),$SWAP,S $((OFFSET+BOOT+SWAP)),$PSIZE,L $PSTART,,L EOF
I am creating two linux partitions and a swap partition. The swap is fixed and the two linux partitions are approximately equal. I have had no problem booting C6 after doing this.
-- Stephen Clark *NetWolves* Sr. Software Engineer III Phone: 813-579-3200 Fax: 813-882-0209 Email: steve.clark@netwolves.com http://www.netwolves.com
Just now getting back to this ....
I found that adding the parameter "-I 128" to my mke2fs command makes my CF card programming procedure work with CentOS 6 where previously it only worked under CentOS 5.
Thanks,
Jerry