In freebsd-questions Digest, Vol 166, Issue 12 At Message: 15 On Thu, 22 Feb 2007 18:12:48 -0500 Marty Landman <[EMAIL PROTECTED]> wrote:
> Thanks Derek, > > I tried deleting and recreating the one slice on that drive in sysinstall, > also rewriting the boot label. Didn't seem to help as shown: It's hard to guess if you don't show us the precise commands you issued, or at least the data you gave to sysinstall, and what you got back. > %sudo fdisk ad1cs1 > ******* Working on device /dev/ad1cs1 ******* > parameters extracted from in-core disklabel are: > cylinders=486332 heads=16 sectors/track=63 (1008 blks/cyl) > > Figures below won't work with BIOS for partitions not in cyl 1 > parameters to be used for BIOS calculations are: > cylinders=486332 heads=16 sectors/track=63 (1008 blks/cyl) > > Media sector size is 512 > Warning: BIOS sector numbering starts with sector 1 > Information from DOS bootblock is: > The data for partition 1 is: > <UNUSED> > The data for partition 2 is: > <UNUSED> > The data for partition 3 is: > <UNUSED> > The data for partition 4 is: > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > start 0, size 50000 (24 Meg), flag 80 (active) > beg: cyl 0/ head 0/ sector 1; > end: cyl 1023/ head 254/ sector 63 Apart from the fact that 'ad1cs1' is a nonsense, fdisk run on slices always shows garbage, in this case indicating that only slice 4 is in use, with a nonsense size. In fact, I get _exactly_ your above rubbish partition report from running 'fdisk ad0s4' or 'fdisk ad0s2' - both of which are FreeBSD slices - and other types of rubbish on ad0s1 (DOS) and ad0s3 (different DOS) .. fdisk just blindly reports what it finds in binary, scarcely checking for consistency. 'fdisk ad0' (here) shows the Right Stuff. So just show 'fdisk ad1' to see the disk's partition (slice) table (which may be damaged, but it's the only one you're interested in). If 'fdisk ad1' isn't showing any sensible data for 'partition 1' (ad1s1) then your boot sector is hosed. > %sudo fsck /dev/ad1cs1 > fsck: Could not determine filesystem type > %sudo fsck /dev/ad1c > fsck: exec fsck_unused for /dev/ad1c in /sbin:/usr/sbin: No such file or > directory You shouldn't be doing any of this with the 'c' partition, which is meant to cover the whole disk, but doesn't describe any of its slices. I gather you think your data should be on ad1s1. Does 'bsdlabel ad1s1' say anything sensible? If not, does bsdlabel ad1s2, ad1s3 or ad1s4, if fdisk ad1 shows anything in s2, s3 or s4. I wouldn't be running fsck (without the -n switch) or bsdlabel (with the -e switch) until you're pretty sure of what's going on where - though I gather it's a bit late for that sort of advice :( > %sudo mount /dev/ad1cs1 /hoss > mount: /dev/ad1cs1: Input/output error > %sudo mount /dev/ad1c /hoss > mount: /dev/ad1c on /hoss: incorrect super block > %sudo dd if=/dev/ad1s1 of=/tmp/scratch bs=512 count=1 skip=131 > dd: /dev/ad1s1: Input/output error > 0+0 records in > 0+0 records out > 0 bytes transferred in 1.199710 secs (0 bytes/sec) As you mentioned elsewhere, you appear to have a bunch of bad blocks early on this disk. They may or may not be critical to recovering the rest of your data, but with all this experimental poking around, things don't look too good. Have you a spare drive you can dd this one to, in its current state? > %sudo dd if=/dev/ad1s1 of=/tmp/scratch bs=512 count=1 skip=127 > 1+0 records in > 1+0 records out > 512 bytes transferred in 0.018295 secs (27986 bytes/sec) > %sudo dd if=/dev/ad1s1 of=/tmp/scratch bs=512 count=1 skip=144 > 1+0 records in > 1+0 records out > 512 bytes transferred in 0.024593 secs (20819 bytes/sec) > %sudo dd if=/dev/ad1s1 of=/tmp/scratch bs=512 count=1 skip=143 > dd: /dev/ad1s1: Input/output error > 0+0 records in > 0+0 records out > 0 bytes transferred in 1.319451 secs (0 bytes/sec) > % > > Wonder why it renamed my slice from ad1s1c to ad1cs1, and what I can do from > here. Which 'it' do you mean? ad1cs1 makes no sense at all, and ad1s1c you shouldn't usually be messing with at all (as it says, don't edit). What does 'ls -l /dev/ad1*' have to say? And please don't top-post .. > Marty > > On 2/22/07, Derek Ragona <[EMAIL PROTECTED]> wrote: > > > > You may have lost the partition table. You can try repartitioning the > > drive but do NOT do a newfs. You can easily try it in sysinstall. > > > > -Derek Yes, if you know precisely how the disk was partitioned before, which is perhaps dubious in this case .. hopefully Marty saved a copy of the boot sector for each disk earlier with boot0cfg -f ? Marty, if you don't mind reposting what I suppose you did earlier, show us these (all non-destructive): # fdisk ad1 # bsdlabel ad1s1 (or whatever slice 1-4 it may be, or try them all) # boot0cfg -v ad1 Cheers, Ian _______________________________________________ firstname.lastname@example.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"