Re: Invalid fdisk partition table found (fwd)
On Sat, 26 Nov 2011 19:07:57 -0700 (MST) Warren Block wbl...@wonkity.com wrote: On Sat, 26 Nov 2011, Robert wrote: Some difference today. Not sure at what point this happened but one of my CF cards now reads: [robert@dell64] ~ fdisk /dev/da1 *** Working on device /dev/da1 *** parameters extracted from in-core disklabel are: cylinders=2057 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=2057 heads=255 sectors/track=63 (16065 blks/cyl) fdisk: invalid fdisk partition table found Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 33045642 (16135 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 8/ head 254/ sector 63 The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: UNUSED Now showing 16GB but still not right. ... I also did this in single user with the same results. Ideally, I would like to change these cards to FAT32 but I cannot get there with fdisk and am not sure how to get there with gpart or if I can. Creating an MS-DOS layout with gpart(8), where the disk is da0: # gpart destroy -F da0 da0 destroyed # gpart create -s mbr da0 da0 created # gpart add -t \!11 da0 da0s1 added Warren, Thanks for hanging in there with me. I am about ready to give up, but here is where everything stands now. [robert@dell64] ~ gpart destroy -F da1 da1 destroyed [robert@dell64] ~ sudo gpart create -s mbr da1 Password: da1 created [robert@dell64] ~ sudo gpart add -t \!11 da1 da1s1 added [robert@dell64] ~ gpart show da1 = 32 60448 da1 MBR (29M) 32 604481 fat32 (29M) [robert@dell64] ~ newfs_msdos -F32 /dev/da1s1 /dev/da1s1: 60296 sectors in 7537 FAT32 clusters (4096 bytes/cluster) BytesPerSec=512 SecPerClust=8 ResSectors=32 FATs=2 Sectors=60448 Media=0xf0 SecPerTrack=32 Heads=64 HiddenSecs=0 FATsecs=59 RootCluster=2 FSInfo=1 Backup=2 [robert@dell64] ~ sudo mount_msdosfs /dev/da1s1 /mnt mount_msdosfs: /dev/da1s1: Invalid argument [robert@dell64] ~ fdisk /dev/da1 *** Working on device /dev/da1 *** parameters extracted from in-core disklabel are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) fdisk: invalid fdisk partition table found Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 32, size 59360 (28 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 28/ head 63/ sector 32 The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: UNUSED [robert@dell64] ~ sudo gpart destroy da1 Password: gpart: Device busy [robert@dell64] ~ dd if=/dev/null of=/dev/da1 0+0 records in 0+0 records out 0 bytes transferred in 0.18 secs (0 bytes/sec) [robert@dell64] ~ gpart show da1 gpart: No such geom: da1. [robert@dell64] ~ Now I lost the info that I created with gpart. 11 is 0x0b, the FAT32 partition type. There might be a more mnemonic string for it, this is the first time I've ever used gpart for FAT32. The exclamation is for gpart/GPT, and the backslash is to keep the shell from messing with it. # gpart show da0 = 63 15662997 da0 MBR (7.5G) 63 156629971 fat32 (7.5G) # ls /dev/da0* /dev/da0 /dev/da0s1 # newfs_msdos -F32 /dev/da0s1 fdisk(8) may be easier, just set the partition type to 11. I haven't had any luck with the second CF card as it still show 29MB. I will try some more later today or tomorrow. What happened to make the one card show 16G? I wish I knew :-). I was doing everything that you and Julian suggested and somewhere along the line it started showing 16G. Yesterday I got it to show FAT32 (tyoe 12) along with 16G but on da1 without a s1. I then put it in a WinXP box but it did not even bring up the drive. When I put it back in the FreeBSD box it was back to 28MB. This is the card that I show above. It acts like there is some sort of write protect on sector 1 or the cards are defective. Robert ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Invalid fdisk partition table found (fwd)
On Mon, 28 Nov 2011, Robert wrote: Thanks for hanging in there with me. I am about ready to give up, but here is where everything stands now. Before giving up, a few more suggestions. First, check the BIOS settings. It's possible the computer has a BIOS that protects the boot block from viruses by making it read-only. Second, sudo is not the same as being root, there are differences. So I'd also suggest trying these as root, just in case. [robert@dell64] ~ gpart destroy -F da1 da1 destroyed [robert@dell64] ~ sudo gpart create -s mbr da1 Password: da1 created [robert@dell64] ~ sudo gpart add -t \!11 da1 da1s1 added [robert@dell64] ~ gpart show da1 = 32 60448 da1 MBR (29M) 32 604481 fat32 (29M) [robert@dell64] ~ newfs_msdos -F32 /dev/da1s1 /dev/da1s1: 60296 sectors in 7537 FAT32 clusters (4096 bytes/cluster) BytesPerSec=512 SecPerClust=8 ResSectors=32 FATs=2 Sectors=60448 Media=0xf0 SecPerTrack=32 Heads=64 HiddenSecs=0 FATsecs=59 RootCluster=2 FSInfo=1 Backup=2 [robert@dell64] ~ sudo mount_msdosfs /dev/da1s1 /mnt mount_msdosfs: /dev/da1s1: Invalid argument That's odd. da1s1 went away after being formatted. Have these cards been heavily used to the point where they may be failing? If the card is failing, I'd expect there to be something in /var/log/messages. For that matter, even sysutils/smartmontools might work on these. [robert@dell64] ~ fdisk /dev/da1 Something I noticed when testing yesterday: fdisk results may not agree with gpart until the card has been reconnected. In particular fdisk showed the single FAT32 partition as the last instead of the first. *** Working on device /dev/da1 *** parameters extracted from in-core disklabel are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) fdisk: invalid fdisk partition table found [robert@dell64] ~ sudo gpart destroy da1 Password: gpart: Device busy gpart won't destroy a GEOM unless it's unused. So either delete all the partitions first, or use 'gpart destroy -F'. Interesting that here the partition still exists, though. [robert@dell64] ~ dd if=/dev/null of=/dev/da1 0+0 records in 0+0 records out 0 bytes transferred in 0.18 secs (0 bytes/sec) This didn't write anything (0+0 records). Should be dd if=/dev/zero of=/dev/da1 bs=512 count=35 count=35 to make sure MBR/disklabel or primary GPT are wiped out. It acts like there is some sort of write protect on sector 1 This is what made me think of a BIOS virus-protect mentioned above. Hopefully that's the problem. or the cards are defective. It's worth contacting the manufacturer. Maybe they have a reset or reformat program. If you do get to the point of discarding the cards, I'd be interested in experimenting on them. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Invalid fdisk partition table found (fwd)
On Mon, 28 Nov 2011 08:02:55 -0700 (MST) Warren Block wbl...@wonkity.com wrote: On Mon, 28 Nov 2011, Robert wrote: Thanks for hanging in there with me. I am about ready to give up, but here is where everything stands now. Before giving up, a few more suggestions. First, check the BIOS settings. It's possible the computer has a BIOS that protects the boot block from viruses by making it read-only. Second, sudo is not the same as being root, there are differences. So I'd also suggest trying these as root, just in case. I saw nothing in BIOS to suggest any protection. I am doing the testing on a Dell Precision 490. I did discover that an external card reader I was using on the Windows XP computer is defective. It had a bent pin and another recessed pin. I hope that is not what damaged these cards. Have these cards been heavily used to the point where they may be failing? I couldn't say for sure but I am waiting for answers from the photographer/owner about other questions. She does take an incredible amount of photos so I would guess they have been used and clear many times. If the card is failing, I'd expect there to be something in /var/log/messages. Nothing shows in /var/log/messages For that matter, even sysutils/smartmontools might work on these. [root@dell64] ~# smartctl /dev/da1 smartctl 5.42 2011-10-20 r3458 [FreeBSD 8.2-STABLE amd64] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net /dev/da1: Unknown USB bridge [0x0644:0x0200 (0x400)] Smartctl: please specify device type with the -d option. [root@dell64] ~# smartctl -d scsi -a /dev/da1 smartctl 5.42 2011-10-20 r3458 [FreeBSD 8.2-STABLE amd64] (local build) Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net Vendor: TEAC Product: USB HS-CF Card Revision: 4.00 User Capacity:30,965,760 bytes [30.9 MB] Logical block size: 512 bytes Device type: disk Local Time is:Mon Nov 28 10:20:13 2011 PST Device does not support SMART Error Counter logging not supported Device does not support Self Test logging [robert@dell64] ~ fdisk /dev/da1 Something I noticed when testing yesterday: fdisk results may not agree with gpart until the card has been reconnected. In particular fdisk showed the single FAT32 partition as the last instead of the first. Interesting that here the partition still exists, though. [robert@dell64] ~ dd if=/dev/null of=/dev/da1 0+0 records in 0+0 records out 0 bytes transferred in 0.18 secs (0 bytes/sec) This didn't write anything (0+0 records). Should be dd if=/dev/zero of=/dev/da1 bs=512 count=35 I was attempting to force another look at /dev/da1 to see any change not actually zero out anything. I did a lot of my testing in single user but switched to multi so that I could more easily cut and paste tests and results. Her are the results as root: [root@dell64] ~# gpart create -s mbr da1 da1 created [root@dell64] ~# gpart add -t \!11 da1 da1s1 added [root@dell64] ~# gpart show da1 = 32 60448 da1 MBR (29M) 32 604481 fat32 (29M) [root@dell64] ~# newfs_msdos -F32 /dev/da1s1 /dev/da1s1: 60296 sectors in 7537 FAT32 clusters (4096 bytes/cluster) BytesPerSec=512 SecPerClust=8 ResSectors=32 FATs=2 Sectors=60448 Media=0xf0 SecPerTrack=32 Heads=64 HiddenSecs=0 FATsecs=59 RootCluster=2 FSInfo=1 Backup=2 At this point I removed the card and using a different external card reader placed it in the WinXP system. Windows said the card was not formatted and asked. I attempted to format but windows failed saying the card could not be formatted. I put it back in FreeBSD system and here is what I see. [root@dell64] ~# gpart show da1 = 32 60448 da1 MBR (29M) 32 604481 fat32 (29M) [root@dell64] ~# mount_msdosfs /dev/da1s1 /mnt mount_msdosfs: /dev/da1s1: Invalid argument [root@dell64] ~# gpart show da1 = 32 60448 da1 MBR (29M) 32 604481 fat32 (29M) It acts like there is some sort of write protect on sector 1 This is what made me think of a BIOS virus-protect mentioned above. Hopefully that's the problem. or the cards are defective. It's worth contacting the manufacturer. Maybe they have a reset or reformat program. If you do get to the point of discarding the cards, I'd be interested in experimenting on them. I will spend some time today or tomorrow on the manufacturer's chat. If I do give it up and it is OK with the owner I will contact you offline. Thanks for you help. Robert ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Invalid fdisk partition table found (fwd)
On Mon, 28 Nov 2011, Robert wrote: I did discover that an external card reader I was using on the Windows XP computer is defective. It had a bent pin and another recessed pin. I hope that is not what damaged these cards. Ouch. That sounds like a logical cause. Although the card itself has sockets, and would hopefully still work in a good reader... A bad pin would explain why they show similar but not identical capacity. Have these cards been heavily used to the point where they may be failing? I couldn't say for sure but I am waiting for answers from the photographer/owner about other questions. She does take an incredible amount of photos so I would guess they have been used and clear many times. I was thinking of them being used as drive in a computer application. In that kind of use, flash drives are reported to last 1.5 to 3 years. I was attempting to force another look at /dev/da1 to see any change not actually zero out anything. Oh. A little easier: true /dev/da0 I did a lot of my testing in single user but switched to multi so that I could more easily cut and paste tests and results. Sorry, forgot to mention that earlier. It really should make no difference here. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Invalid fdisk partition table found (fwd)
On Fri, 25 Nov 2011 13:29:51 -0700 (MST) Warren Block wbl...@wonkity.com wrote: On Fri, 25 Nov 2011, Robert wrote: On Thu, 24 Nov 2011 13:45:37 -0700 (MST) Warren Block wbl...@wonkity.com wrote: On Thu, 24 Nov 2011, Robert wrote: [robert@dell64] ~ sudo gpart destroy -F da1 da1 destroyed clip And it starts with a default table equal to the size of the drive. Is it supposed to still show sysid 165 ? I was under the impression that dd if=/dev/zero would clean out everything including sector 1. The partition table was cleared, that's why it said invalid fdisk partition table found. Rather than starting with an invalid table, it created a valid default table in memory. Do both cards report the same size? Yes..sort of 28, 29 MB Some difference today. Not sure at what point this happened but one of my CF cards now reads: [robert@dell64] ~ fdisk /dev/da1 *** Working on device /dev/da1 *** parameters extracted from in-core disklabel are: cylinders=2057 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=2057 heads=255 sectors/track=63 (16065 blks/cyl) fdisk: invalid fdisk partition table found Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 33045642 (16135 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 8/ head 254/ sector 63 The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: UNUSED Now showing 16GB but still not right. [robert@dell64] ~ sudo gpart destroy -F da1 Password: da1 destroyed [robert@dell64] ~ gpart create -s MBR da1 da1 created [robert@dell64] ~ gpart add -t freebsd -s 15G da1 da1s1 added [robert@dell64] ~ gpart set -a active -i 1 da1 active set on da1s1 [robert@dell64] ~ gpart bootcode -b /boot/boot0 da1 bootcode written to da1 [robert@dell64] ~ ls -l /dev/da1* crw-rw 1 root operator0, 145 Nov 26 08:48 /dev/da1 crw-rw 1 root operator0, 129 Nov 26 13:48 /dev/da1s1 [robert@dell64] ~ sudo mount /dev/da1s1 /mnt mount: /dev/da1s1 : Invalid argument I also did this in single user with the same results. Ideally, I would like to change these cards to FAT32 but I cannot get there with fdisk and am not sure how to get there with gpart or if I can. If they weren't the same, I was going to suggest maybe they've been heavily used and worn out. But I don't know if capacity shrinks as blocks go bad and spares are used up, or if they just quit working. And I'd expect them to be very different unless they had the exact same usage, like in a mirror. I haven't had any luck with the second CF card as it still show 29MB. I will try some more later today or tomorrow. robert ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Invalid fdisk partition table found (fwd)
On Sat, 26 Nov 2011, Robert wrote: Some difference today. Not sure at what point this happened but one of my CF cards now reads: [robert@dell64] ~ fdisk /dev/da1 *** Working on device /dev/da1 *** parameters extracted from in-core disklabel are: cylinders=2057 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=2057 heads=255 sectors/track=63 (16065 blks/cyl) fdisk: invalid fdisk partition table found Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 33045642 (16135 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 8/ head 254/ sector 63 The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: UNUSED Now showing 16GB but still not right. ... I also did this in single user with the same results. Ideally, I would like to change these cards to FAT32 but I cannot get there with fdisk and am not sure how to get there with gpart or if I can. Creating an MS-DOS layout with gpart(8), where the disk is da0: # gpart destroy -F da0 da0 destroyed # gpart create -s mbr da0 da0 created # gpart add -t \!11 da0 da0s1 added 11 is 0x0b, the FAT32 partition type. There might be a more mnemonic string for it, this is the first time I've ever used gpart for FAT32. The exclamation is for gpart/GPT, and the backslash is to keep the shell from messing with it. # gpart show da0 = 63 15662997 da0 MBR (7.5G) 63 156629971 fat32 (7.5G) # ls /dev/da0* /dev/da0/dev/da0s1 # newfs_msdos -F32 /dev/da0s1 fdisk(8) may be easier, just set the partition type to 11. I haven't had any luck with the second CF card as it still show 29MB. I will try some more later today or tomorrow. What happened to make the one card show 16G? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Invalid fdisk partition table found (fwd)
Robert wrote: Ideally, I would like to change these cards to FAT32 but I cannot get there with fdisk and am not sure how to get there with gpart or if I can. You can get a small script that erases the primary GPT table from the front of the HD and the secondary GPT table from the end of the HD. http://wiki.freenas.org/faq:0129 Then follow instructions found here. http://forums.freebsd.org/showthread.php?t=13780 This will leave you with fat32 format on your md cards. Then insert into ms/windows system and use windows explorer to select the drive letter of the md card, right mouse click for pull down menu, select format to reformat for ntfs format. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Invalid fdisk partition table found (fwd)
Warren Block wrote: On Sat, 26 Nov 2011, Robert wrote: Some difference today. Not sure at what point this happened but one of my CF cards now reads: [robert@dell64] ~ fdisk /dev/da1 *** Working on device /dev/da1 *** parameters extracted from in-core disklabel are: cylinders=2057 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=2057 heads=255 sectors/track=63 (16065 blks/cyl) fdisk: invalid fdisk partition table found Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 33045642 (16135 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 8/ head 254/ sector 63 The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: UNUSED Now showing 16GB but still not right. ... I also did this in single user with the same results. Ideally, I would like to change these cards to FAT32 but I cannot get there with fdisk and am not sure how to get there with gpart or if I can. Creating an MS-DOS layout with gpart(8), where the disk is da0: # gpart destroy -F da0 da0 destroyed # gpart create -s mbr da0 da0 created # gpart add -t \!11 da0 da0s1 added 11 is 0x0b, the FAT32 partition type. There might be a more mnemonic string for it, this is the first time I've ever used gpart for FAT32. The exclamation is for gpart/GPT, and the backslash is to keep the shell from messing with it. # gpart show da0 = 63 15662997 da0 MBR (7.5G) 63 156629971 fat32 (7.5G) # ls /dev/da0* /dev/da0/dev/da0s1 # newfs_msdos -F32 /dev/da0s1 fdisk(8) may be easier, just set the partition type to 11. The correct partition type is 12 not 11. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Invalid fdisk partition table found (fwd)
On Thu, 24 Nov 2011 13:45:37 -0700 (MST) Warren Block wbl...@wonkity.com wrote: On Thu, 24 Nov 2011, Robert wrote: [robert@dell64] ~ sudo gpart destroy -F da1 da1 destroyed [robert@dell64] ~ fdisk /dev/da1 *** Working on device /dev/da1 *** parameters extracted from in-core disklabel are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) fdisk: invalid fdisk partition table found The partition table was cleared. Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 32, size 59360 (28 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 28/ head 63/ sector 32 And it starts with a default table equal to the size of the drive. Is it supposed to still show sysid 165 ? I was under the impression that dd if=/dev/zero would clean out everything including sector 1. I see the flashing lights like it is writing to the CF card but nothing changes. More suggestions welcome. These are quite expensive CF cards. The dd/fdisk and gpart results show the same problem, so it likely isn't in the partitioning. Do both cards report the same size? Yes..sort of 28, 29 MB I found recently that there is some oddness with certain Sandisk flash memory that made it non-responsive to anything. FreeBSD couldn't do a thing with it. Before throwing it away, I tried it on a Windows Vista system... which recognized and formatted it without a complaint. Now it works on everything. Special vendor-specific code in Windows? XP Pro shows and error that the disk cannot be formatted. I tried it in the wifes Windows 7 and it shows no drive attached. Another option would be to attempt formatting the cards with a camera. I'll have to ask the camera owner if she tried that. OT. The last 2 times that I have sent replies to two list regarding this question, I have not seen it come through to me. Julian's relies as well as yours come through. Robert ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Invalid fdisk partition table found (fwd)
On Fri, 25 Nov 2011, Robert wrote: On Thu, 24 Nov 2011 13:45:37 -0700 (MST) Warren Block wbl...@wonkity.com wrote: On Thu, 24 Nov 2011, Robert wrote: [robert@dell64] ~ sudo gpart destroy -F da1 da1 destroyed [robert@dell64] ~ fdisk /dev/da1 *** Working on device /dev/da1 *** parameters extracted from in-core disklabel are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) fdisk: invalid fdisk partition table found The partition table was cleared. Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 32, size 59360 (28 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 28/ head 63/ sector 32 And it starts with a default table equal to the size of the drive. Is it supposed to still show sysid 165 ? I was under the impression that dd if=/dev/zero would clean out everything including sector 1. The partition table was cleared, that's why it said invalid fdisk partition table found. Rather than starting with an invalid table, it created a valid default table in memory. Do both cards report the same size? Yes..sort of 28, 29 MB If they weren't the same, I was going to suggest maybe they've been heavily used and worn out. But I don't know if capacity shrinks as blocks go bad and spares are used up, or if they just quit working. And I'd expect them to be very different unless they had the exact same usage, like in a mirror. OT. The last 2 times that I have sent replies to two list regarding this question, I have not seen it come through to me. Julian's relies as well as yours come through. Maybe spam or duplicate filtering. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Invalid fdisk partition table found (fwd)
Hi, Please keep this on list. Forwarded from: Julian Stacey j...@berklix.com http://www.berklix.com/~jhs/ --- Forwarded Message From travelin...@cox.net Thu Nov 24 05:15:33 2011 From: Robert travelin...@cox.net To: Julian H. Stacey j...@berklix.com Subject: Re: Invalid fdisk partition table found Message-ID: 2023192154.5b0a64ab@dell64 In-Reply-To: 20232108.panl80g3041...@fire.js.berklix.net References: 2023123347.4f439c9c@dell64 20232108.panl80g3041...@fire.js.berklix.net X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Julian and Warren thanks for the responses. On Wed, 23 Nov 2011 22:08:00 +0100 Julian H. Stacey j...@berklix.com wrote: Robert wrote: Greetings [robert@dell64] ~ uname -a FreeBSD dell64.shasta204.local 8.2-STABLE FreeBSD 8.2-STABLE #34: Fri Nov 18 06:43:01 PST 2011 root@dell64.shasta204.local:/usr/obj/usr/src/sys/GENERIC amd64 I have two Lexar Professional 600X 16GB compact flash cards that are unusable. fdisk shows: clip Is there any way I can restore these CF cards to 16GB? Any help or suggestions will be greatly appreciated. @ suggestions: 1 Try bsdlabel -B -w -r /dev/da1 [robert@dell64] ~ sudo bsdlabel -B -w -r /dev/da1 Password: [robert@dell64] ~ echo unplug, reinsert Not sure if you actually wanted me to unplug and reinsert the CF card...so I did both [robert@dell64] ~ echo unplug, reinsert unplug, reinsert and physically unplugged and reinserted the CF card newfs /dev/da1a ^ ??? [robert@dell64] ~ sudo newfs /dev/da1a newfs: /dev/da1a: could not find special device [robert@dell64] ~ sudo newfs /dev/da1 /dev/da1: 29.5MB (60480 sectors) block size 16384, fragment size 2048 using 4 cylinder groups of 7.39MB, 473 blks, 960 inodes. super-block backups (for fsck -b #) at: 160, 15296, 30432, 45568 cg 0: bad magic number [robert@dell64] ~ fdisk /dev/da1 *** Working on device /dev/da1 *** parameters extracted from in-core disklabel are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) fdisk: invalid fdisk partition table found Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 32, size 59360 (28 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 28/ head 63/ sector 32 The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: UNUSED No change from before. 2 Base of _my_ man fdisk When running multi user, you cannot write unless you first run this: sysctl kern.geom.debugflags=16 I had failed to mention in the original post that I had seen something in my searches about problems since 7.1. I had tried booting from an old 6.2 disk and attempted all of this under fixit with no luck. And also tried in single user mode. Warren, [robert@dell64] ~ sudo gpart destroy -F da1 gpart: geom 'da1': Invalid argument [robert@dell64] ~ sudo gpart create -s GPT da1 da1 created [robert@dell64] ~ sudo gpart bootcode -b /boot/pmbr da1 bootcode written to da1 [robert@dell64] ~ sudo gpart destroy -F da1 da1 destroyed [robert@dell64] ~ fdisk /dev/da1 *** Working on device /dev/da1 *** parameters extracted from in-core disklabel are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) fdisk: invalid fdisk partition table found Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 32, size 59360 (28 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 28/ head 63/ sector 32 The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: UNUSED I see the flashing lights like it is writing to the CF card but nothing changes. More suggestions welcome. These are quite expensive CF cards. Thanks again Robert --- End of Forwarded Message ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Invalid fdisk partition table found (fwd)
On Thu, 24 Nov 2011 12:16:17 +0100 Julian H. Stacey j...@berklix.com wrote: Hi, Please keep this on list. Hi Julian, I noticed soon after my response that I must have hit reply instead of all so I resent my information to questions@. This morning I didn't see my email to questions@ so I checked the archives and my response is there. No idea why it did not get sent out to the masses. Anyway, I am still having this problem so I will paste my response below. Julian and Warren thanks for the responses. On Wed, 23 Nov 2011 22:08:00 +0100 Julian H. Stacey j...@berklix.com wrote: Robert wrote: Greetings [robert@dell64] ~ uname -a FreeBSD dell64.shasta204.local 8.2-STABLE FreeBSD 8.2-STABLE #34: Fri Nov 18 06:43:01 PST 2011 root@dell64.shasta204.local:/usr/obj/usr/src/sys/GENERIC amd64 I have two Lexar Professional 600X 16GB compact flash cards that are unusable. fdisk shows: clip Is there any way I can restore these CF cards to 16GB? Any help or suggestions will be greatly appreciated. @ suggestions: 1 Try bsdlabel -B -w -r /dev/da1 [robert@dell64] ~ sudo bsdlabel -B -w -r /dev/da1 Password: [robert@dell64] ~ echo unplug, reinsert Not sure if you actually wanted me to unplug and reinsert the CF card...so I did both [robert@dell64] ~ echo unplug, reinsert unplug, reinsert and physically unplugged and reinserted the CF card newfs /dev/da1a ^ ??? [robert@dell64] ~ sudo newfs /dev/da1a newfs: /dev/da1a: could not find special device [robert@dell64] ~ sudo newfs /dev/da1 /dev/da1: 29.5MB (60480 sectors) block size 16384, fragment size 2048 using 4 cylinder groups of 7.39MB, 473 blks, 960 inodes. super-block backups (for fsck -b #) at: 160, 15296, 30432, 45568 cg 0: bad magic number [robert@dell64] ~ fdisk /dev/da1 *** Working on device /dev/da1 *** parameters extracted from in-core disklabel are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) fdisk: invalid fdisk partition table found Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 32, size 59360 (28 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 28/ head 63/ sector 32 The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: UNUSED No change from before. 2 Base of _my_ man fdisk When running multi user, you cannot write unless you first run this: sysctl kern.geom.debugflags=16 I had failed to mention in the original post that I had seen something in my searches about problems since 7.1. I had tried booting from an old 6.2 disk and attempted all of this under fixit with no luck. And also tried in single user mode. Warren, [robert@dell64] ~ sudo gpart destroy -F da1 gpart: geom 'da1': Invalid argument [robert@dell64] ~ sudo gpart create -s GPT da1 da1 created [robert@dell64] ~ sudo gpart bootcode -b /boot/pmbr da1 bootcode written to da1 [robert@dell64] ~ sudo gpart destroy -F da1 da1 destroyed [robert@dell64] ~ fdisk /dev/da1 *** Working on device /dev/da1 *** parameters extracted from in-core disklabel are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) fdisk: invalid fdisk partition table found Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 32, size 59360 (28 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 28/ head 63/ sector 32 The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: UNUSED I see the flashing lights like it is writing to the CF card but nothing changes. More suggestions welcome. These are quite expensive CF cards. Thanks again Robert ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Invalid fdisk partition table found (fwd)
On Thu, 24 Nov 2011, Robert wrote: [robert@dell64] ~ sudo gpart destroy -F da1 da1 destroyed [robert@dell64] ~ fdisk /dev/da1 *** Working on device /dev/da1 *** parameters extracted from in-core disklabel are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=29 heads=64 sectors/track=32 (2048 blks/cyl) fdisk: invalid fdisk partition table found The partition table was cleared. Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 32, size 59360 (28 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 28/ head 63/ sector 32 And it starts with a default table equal to the size of the drive. I see the flashing lights like it is writing to the CF card but nothing changes. More suggestions welcome. These are quite expensive CF cards. The dd/fdisk and gpart results show the same problem, so it likely isn't in the partitioning. Do both cards report the same size? I found recently that there is some oddness with certain Sandisk flash memory that made it non-responsive to anything. FreeBSD couldn't do a thing with it. Before throwing it away, I tried it on a Windows Vista system... which recognized and formatted it without a complaint. Now it works on everything. Special vendor-specific code in Windows? Another option would be to attempt formatting the cards with a camera. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org