Re: recovery after power outage
On Mon, Feb 12, 2007 at 08:14:28PM -0500, Marty Landman wrote: > On 2/12/07, Jerry McAllister <[EMAIL PROTECTED]> wrote: > > > >On Fri, Feb 09, 2007 at 04:48:44PM -0500, Marty Landman wrote: > > > >> >>> Information from DOS bootblock is: > >> >>> The data for partition 1 is: > >> >>> sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > >> >>>start 63, size 490223412 (239366 Meg), flag 80 (active) > >> >>>beg: cyl 0/ head 1/ sector 1; > >> >>>end: cyl 1023/ head 254/ sector 63 > >> > >> >What does bsdlabel show for it? > >> > > >> >> As root, do:bsdlabel ad1s1 > >> > >> %sudo bsdlabel ad1s1 > >> # /dev/ad1s1: > >> 8 partitions: > >> #size offsetfstype [fsize bsize bps/cpg] > >> c: 4902234120unused0 0 # "raw" part, > >don't > >> edit > >> % > >> > >> So where do I stand? > > > >Hmmm. Well, that looks like a slice that has not been partitioned - > >which is essentially what you have been telling us it is. That is > >not 'dangerously dedicated'. It is instead an incompletely partitioned > >and build slice. > > This HD was working fine for months until the system crashed due to a power > outage. My point is I think it had been done right to begin with but the > drive's data has been corrupted now. Since fsck isn't able to deal with it > wonder if the data is essentially gone now. > > It has type 'unused' which is what the 'c' partition should be and > >as such, should not be used. > > Are you saying I should not have set this drive up as the c partition? > Instead it should have been something like ad1s1a for example? That is true. You should not use the 'c' partition. That is documented. Too late now, but yes, ad1s1a would be better. -- next time. > I am wondering what would happen it you tried to mount /dev/ad1s1 > >without the 'c'. > > %sudo mount /dev/ad1s1 > mount: /dev/ad1s1: unknown special file or file system > %sudo mount /dev/ad1s1c > mount: /dev/ad1s1c: unknown special file or file system > % I am presuming you actually gave it a mount point in those mount commands and just didn't reproduce it here. > I don't know if fsck might work on that. You might try it (as /dev/ad1s1) > >with a '-d' flag to see what it might try without actually writing > >anything > >to the drive and potentially wrecking something. Make sure it is not > >mounted before trying the fsck. > > %sudo fsck -d /dev/ad1s1 > fsck: Could not determine filesystem type > %sudo fsck -d /dev/ad1s1c > start (null) wait fsck_unused /dev/ad1s1c > % Well, it is not finding something it needs, probably in the partition label. > Did you build a filesystem on this slice with newfs? > > I believe that's how I did it. > > If so, you can try looking for superblocks. > > How do I do that? You will have to read up on that. I pulled about some superblocks about 9 years ago, but don't remember much about that. Anyway, they point the filesystem and there are a lot of duplicates. If one is bad, it is sometimes possible to use the next one or so to get things repaired. You can read up the superblock with 'dd' just like below. You can put in a skip count in dd to skip what you don't want to read and then read up just the length you need. You will have to look that up. > If you have space for it somewhere, you could also try to dd some of > >the drive. > > dd if=/dev/ad1s1 of=some_file_on_another_disk bs=512 count=1 > > > Ok that works, and there is data there. > > That would copy 5 MBThen you could play with that data in hex > >or with some debugger (hexdump??) that lets you muck with it a byte > >at a time in hex, ASCII, octal, etc and see what you can find. > > > [EMAIL PROTECTED]: not a directory. > [EMAIL PROTECTED] ufs > [EMAIL PROTECTED]@Invalid %s > ^@/[EMAIL PROTECTED]: %s^@/boot/loader^@/boot/kernel/kernel^@ > FreeBSD/i386 boot > Default: %u:%s(%u,%c)%s > boot: [EMAIL PROTECTED] [EMAIL PROTECTED] %s > [EMAIL PROTECTED]@[EMAIL PROTECTED]: %s > [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED] %u lba %u > > Ok I haven't taken to picking apart the bits in this, but that's the stuff > that looked like English in the plaintext version. > > Are you saying Jerry that if fsck won't deal with this data then my only > option is to learn/pick apart the internals of the data on that disk myself? Pretty much, that's it. > I mean what else can I try? Could I - since have already saved the first 5 > MB of the data - try writing a new mbr and see if that let's fsck fix the > rest? Well, it is not an MBR that you need. That is for booting although it would not hurt to have one. But the slice table or the partition label might be clobbered. The slice table is written by fdisk and the partition label is written by bsdlabel. I don't know if you can manage to rewrite those in place without making the rest of thing inaccessible or if it would just go there and happily point to where it used to. I have never tried that. If I were to
Re: recovery after power outage
On 2/12/07, Jerry McAllister <[EMAIL PROTECTED]> wrote: On Fri, Feb 09, 2007 at 04:48:44PM -0500, Marty Landman wrote: > >>> Information from DOS bootblock is: > >>> The data for partition 1 is: > >>> sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > >>>start 63, size 490223412 (239366 Meg), flag 80 (active) > >>>beg: cyl 0/ head 1/ sector 1; > >>>end: cyl 1023/ head 254/ sector 63 > > >What does bsd label show for it? > > > >> As root, do:bsdlabel ad1s1 > > %sudo bsdlabel ad1s1 > # /dev/ad1s1: > 8 partitions: > #size offsetfstype [fsize bsize bps/cpg] > c: 4902234120unused0 0 # "raw" part, don't > edit > % > > So where do I stand? Hmmm. Well, that looks like a slice that has not been partitioned - which is essentially what you have been telling us it is. That is not 'dangerously dedicated'. It is instead an incompletely partitioned and build slice. This HD was working fine for months until the system crashed due to a power outage. My point is I think it had been done right to begin with but the drive's data has been corrupted now. Since fsck isn't able to deal with it wonder if the data is essentially gone now. It has type 'unused' which is what the 'c' partition should be and as such, should not be used. Are you saying I should not have set this drive up as the c partition? Instead it should have been something like ad1s1a for example? I am wondering what would happen it you tried to mount /dev/ad1s1 without the 'c'. %sudo mount /dev/ad1s1 mount: /dev/ad1s1: unknown special file or file system %sudo mount /dev/ad1s1c mount: /dev/ad1s1c: unknown special file or file system % I don't know if fsck might work on that. You might try it (as /dev/ad1s1) with a '-d' flag to see what it might try without actually writing anything to the drive and potentially wrecking something. Make sure it is not mounted before trying the fsck. %sudo fsck -d /dev/ad1s1 fsck: Could not determine filesystem type %sudo fsck -d /dev/ad1s1c start (null) wait fsck_unused /dev/ad1s1c % Did you build a filesystem on this slice with newfs? I believe that's how I did it. If so, you can try looking for superblocks. How do I do that? If you have space for it somewhere, you could also try to dd some of the drive. dd if=/dev/ad1s1 of=some_file_on_another_disk bs=512 count=1 Ok that works, and there is data there. That would copy 5 MBThen you could play with that data in hex or with some debugger (hexdump??) that lets you muck with it a byte at a time in hex, ASCII, octal, etc and see what you can find. [EMAIL PROTECTED]: not a directory. [EMAIL PROTECTED] ufs [EMAIL PROTECTED]@Invalid %s ^@/[EMAIL PROTECTED]: %s^@/boot/loader^@/boot/kernel/kernel^@ FreeBSD/i386 boot Default: %u:%s(%u,%c)%s boot: [EMAIL PROTECTED] [EMAIL PROTECTED] %s [EMAIL PROTECTED]@[EMAIL PROTECTED]: %s [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED] %u lba %u Ok I haven't taken to picking apart the bits in this, but that's the stuff that looked like English in the plaintext version. Are you saying Jerry that if fsck won't deal with this data then my only option is to learn/pick apart the internals of the data on that disk myself? I mean what else can I try? Could I - since have already saved the first 5 MB of the data - try writing a new mbr and see if that let's fsck fix the rest? Pretty much over my head here, would rather not lose this 50 GB of data but not sure what more I can do. Marty -- Web Installed Formmail - http://face2interface.com/formINSTal/ Webmaster's BBS - http://bbs.face2interface.com/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: recovery after power outage
On Fri, Feb 09, 2007 at 04:48:44PM -0500, Marty Landman wrote: > On 2/9/07, Jerry McAllister <[EMAIL PROTECTED]> wrote: > > > >On Fri, Feb 09, 2007 at 12:06:20PM -0500, Marty Landman wrote: > > > >>> Information from DOS bootblock is: > >>> The data for partition 1 is: > >>> sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > >>>start 63, size 490223412 (239366 Meg), flag 80 (active) > >>>beg: cyl 0/ head 1/ sector 1; > >>>end: cyl 1023/ head 254/ sector 63 > > > >Hmmm. That looks pretty normal to me. > > Cool, hoping that is an omen of good things to come. > > >What does bsd label show for it? > > > >> As root, do:bsdlabel ad1s1 > > %sudo bsdlabel ad1s1 > # /dev/ad1s1: > 8 partitions: > #size offsetfstype [fsize bsize bps/cpg] > c: 4902234120unused0 0 # "raw" part, don't > edit > % > > So where do I stand? Hmmm. Well, that looks like a slice that has not been partitioned - which is essentially what you have been telling us it is. That is not 'dangerously dedicated'. It is instead an incompletely partitioned and build slice. It has type 'unused' which is what the 'c' partition should be and as such, should not be used. I am wondering what would happen it you tried to mount /dev/ad1s1 without the 'c'. It shouldn't hurt anything to try that. I don't know if fsck might work on that. You might try it (as /dev/ad1s1) with a '-d' flag to see what it might try without actually writing anything to the drive and potentially wrecking something. Make sure it is not mounted before trying the fsck. Did you build a filesystem on this slice with newfs? I don't remember if you said. If so, you can try looking for superblocks. Again, I might try using just /dev/ad1s1 without the 'c' to check things. If you have space for it somewhere, you could also try to dd some of the drive. dd if=/dev/ad1s1 of=some_file_on_another_disk bs=512 count=1 That would copy 5 MBThen you could play with that data in hex or with some debugger (hexdump??) that lets you muck with it a byte at a time in hex, ASCII, octal, etc and see what you can find. You would have to look at it with filesystem documentation in hand to make any sense of it. jerry > > Marty > > -- > Web Installed Formmail - http://face2interface.com/formINSTal/ > Webmaster's BBS - http://bbs.face2interface.com/ > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: recovery after power outage
On 2/9/07, Jerry McAllister <[EMAIL PROTECTED]> wrote: On Fri, Feb 09, 2007 at 12:06:20PM -0500, Marty Landman wrote: >> Information from DOS bootblock is: >> The data for partition 1 is: >> sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) >>start 63, size 490223412 (239366 Meg), flag 80 (active) >>beg: cyl 0/ head 1/ sector 1; >>end: cyl 1023/ head 254/ sector 63 Hmmm. That looks pretty normal to me. Cool, hoping that is an omen of good things to come. What does bsd label show for it? > As root, do:bsdlabel ad1s1 %sudo bsdlabel ad1s1 # /dev/ad1s1: 8 partitions: #size offsetfstype [fsize bsize bps/cpg] c: 4902234120unused0 0 # "raw" part, don't edit % So where do I stand? Marty -- Web Installed Formmail - http://face2interface.com/formINSTal/ Webmaster's BBS - http://bbs.face2interface.com/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: recovery after power outage
On Fri, Feb 09, 2007 at 12:06:20PM -0500, Marty Landman wrote: > On 2/9/07, Jerry McAllister <[EMAIL PROTECTED]> wrote: > > > >On Fri, Feb 09, 2007 at 07:46:10AM -0500, Marty Landman wrote: > > > >> %sudo fsck -F ad1s1c > >> fsck: exec fsck_unused for /dev/ad1s1c in /sbin:/usr/sbin: No such file > >or > >> directory > >> fsck: exec fsck_unused for /dev/ad1s1c in /sbin:/usr/sbin: No such file > >or > >> directory > >> > >> What is that telling me? > > > >Never saw that before, but it looks like it can't find /dev/ad1s1c > > > Ok. > > Did you copy/paste this or retype it in by hand > > > Retyped that by hand iirc, however now that I'm booting also have an ssh > session up so no more typos. Kind of guessed it was just a typo. > > Maybe using fdisk manually will give some more information. > >From root, run: fdisk ad1 > > > %sudo fdisk ad1 > Password: > *** Working on device /dev/ad1 *** > parameters extracted from in-core disklabel are: > cylinders=486344 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=486344 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: > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) >start 63, size 490223412 (239366 Meg), flag 80 (active) >beg: cyl 0/ head 1/ sector 1; >end: cyl 1023/ head 254/ sector 63 > The data for partition 2 is: > > The data for partition 3 is: > > The data for partition 4 is: > > % Hmmm. That looks pretty normal to me. This does not look like the 'dangerously dedicated' disk that I mentioned earlier. What does bsd label show for it? As root, do:bsdlabel ad1s1 If that has a usable label, then I think the next thing is to try and read up and check the first and maybe a later superblock. That I would have to study on. I did that maybe 9 years ago and don't remember what I did. jerry > > Marty > > -- > Web Installed Formmail - http://face2interface.com/formINSTal/ > Webmaster's BBS - http://bbs.face2interface.com/ > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: recovery after power outage
On 2/9/07, Jerry McAllister <[EMAIL PROTECTED]> wrote: On Fri, Feb 09, 2007 at 07:46:10AM -0500, Marty Landman wrote: > %sudo fsck -F ad1s1c > fsck: exec fsck_unused for /dev/ad1s1c in /sbin:/usr/sbin: No such file or > directory > fsck: exec fsck_unused for /dev/ad1s1c in /sbin:/usr/sbin: No such file or > directory > > What is that telling me? Never saw that before, but it looks like it can't find /dev/ad1s1c Ok. Did you copy/paste this or retype it in by hand Retyped that by hand iirc, however now that I'm booting also have an ssh session up so no more typos. Maybe using fdisk manually will give some more information. From root, run: fdisk ad1 %sudo fdisk ad1 Password: *** Working on device /dev/ad1 *** parameters extracted from in-core disklabel are: cylinders=486344 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=486344 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: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 490223412 (239366 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 2 is: The data for partition 3 is: The data for partition 4 is: % Marty -- Web Installed Formmail - http://face2interface.com/formINSTal/ Webmaster's BBS - http://bbs.face2interface.com/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: recovery after power outage
On Fri, Feb 09, 2007 at 07:46:10AM -0500, Marty Landman wrote: > On 2/8/07, Pieter de Goeje <[EMAIL PROTECTED]> wrote: > > > >If the slice and partition table are still intact (as they were before the > >outage), a normal fsck -F on /dev/ad1s1a will get the pc booting again. > > > Well I managed to get the machine booting by editing /etc/fstab > > %cat /etc/fstab > # DeviceMountpoint FStype Options Dump > Pass# > /dev/ad0s1b noneswapsw 0 0 > /dev/ad0s1a / ufs rw 1 1 > /dev/ad0s1d /tmpufs rw 2 2 > /dev/ad0s1f /usrufs rw 2 2 > /dev/ad0s1e /varufs rw 2 2 > #/dev/ad1s1c/hoss ufs rw 2 2 > /dev/acd0 /cdrom cd9660 ro,noauto 0 0 > > That's a great start, however I'd like to recover what I can from ad1s1c. > > %sudo fsck -F ad1s1c > fsck: exec fsck_unused for /dev/ad1s1c in /sbin:/usr/sbin: No such file or > directory > fsck: exec fsck_unused for /dev/ad1s1c in /sbin:/usr/sbin: No such file or > directory > > What is that telling me? Never saw that before, but it looks like it can't find /dev/ad1s1c > You > >can do this from a FreeBSD live cd such as FreesBIE or the fixit cd. You > >can > >then fsck the the rest of the filesystems in single user mode. You may > >also > >want to use the live CD to backup the important bits before, ehm, further > >corrupting/restoring the filesystems. ;) > > > Sorry Pieter I'm lost again. Can't I use sysinstall? Fdisk? Wish I > understood the next steps here. Don't confound fsck and fdisk. Anyway, he is assuming you cannot boot and get a running system By eliminating the /dev/ad1s1c from needing to be mounted at boot you now have a running system that you can use to work on getting as much as you can back from /hoss, so the fixit cd is no longer needed (unless something else goes wrong). > FWIW when I do a sysinstall and then use the fdisk utility I get > > Disk name: ad1FDISK Partition > Editor > DISK Geometry: 30515 cyls/255 heads/63 sectors = 490223475 sectors > (239366MB) > > Offset Size(ST)End Name PType Desc Subtype > Flags > > 0126125- 12 unused0 > 126 490223412 490223537 ad1cs1 8freebsd 165 > 490223538 11214 490234751- 12 unused0 > > Which appears that I perhaps have not totally hosed this disk up. Did you copy/paste this or retype it in by hand - which would account for the 'Name' column containing "ad1cs1" rather than "ad1s1c". If it was copy/paste, that looks really strange. I am not used to looking at fdisk output from within sysinstall. I wouldn't have thought I would see a partition name 'c' within the fdisk slice output, but maybe I just never noticed it before. Maybe using fdisk manually will give some more information. >From root, run: fdisk ad1 and see what it says. The output should be more familiar to me. jerry > > Marty > > > -- > Web Installed Formmail - http://face2interface.com/formINSTal/ > Webmaster's BBS - http://bbs.face2interface.com/ > > -- > Web Installed Formmail - http://face2interface.com/formINSTal/ > Webmaster's BBS - http://bbs.face2interface.com/ > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: recovery after power outage
On 2/8/07, Pieter de Goeje <[EMAIL PROTECTED]> wrote: If the slice and partition table are still intact (as they were before the outage), a normal fsck -F on /dev/ad1s1a will get the pc booting again. Well I managed to get the machine booting by editing /etc/fstab %cat /etc/fstab # DeviceMountpoint FStype Options Dump Pass# /dev/ad0s1b noneswapsw 0 0 /dev/ad0s1a / ufs rw 1 1 /dev/ad0s1d /tmpufs rw 2 2 /dev/ad0s1f /usrufs rw 2 2 /dev/ad0s1e /varufs rw 2 2 #/dev/ad1s1c/hoss ufs rw 2 2 /dev/acd0 /cdrom cd9660 ro,noauto 0 0 That's a great start, however I'd like to recover what I can from ad1s1c. %sudo fsck -F ad1s1c fsck: exec fsck_unused for /dev/ad1s1c in /sbin:/usr/sbin: No such file or directory fsck: exec fsck_unused for /dev/ad1s1c in /sbin:/usr/sbin: No such file or directory What is that telling me? You can do this from a FreeBSD live cd such as FreesBIE or the fixit cd. You can then fsck the the rest of the filesystems in single user mode. You may also want to use the live CD to backup the important bits before, ehm, further corrupting/restoring the filesystems. ;) Sorry Pieter I'm lost again. Can't I use sysinstall? Fdisk? Wish I understood the next steps here. FWIW when I do a sysinstall and then use the fdisk utility I get Disk name: ad1FDISK Partition Editor DISK Geometry: 30515 cyls/255 heads/63 sectors = 490223475 sectors (239366MB) Offset Size(ST)End Name PType Desc Subtype Flags 0126125- 12 unused0 126 490223412 490223537 ad1cs1 8freebsd 165 490223538 11214 490234751- 12 unused0 Which appears that I perhaps have not totally hosed this disk up. Marty -- Web Installed Formmail - http://face2interface.com/formINSTal/ Webmaster's BBS - http://bbs.face2interface.com/ -- Web Installed Formmail - http://face2interface.com/formINSTal/ Webmaster's BBS - http://bbs.face2interface.com/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: recovery after power outage
On Thursday 08 February 2007 03:08, Marty Landman wrote: > On 2/7/07, Pieter de Goeje <[EMAIL PROTECTED]> wrote: > > ad1s1c is a partition that contains the entire disk or slice in this > > case. Dangerously dedicated is when you have no slices: ad1a, ad1b, ad1c > > etc. You > > should _only_ fsck the individual partitions (ad0s1a), never the complete > > disk (ad0) or individual slices (ad0s1). You may risk destroying your > > filesystem(s) if you do so. Unless ofcourse you know what you're doing > > and you have placed a filesystem directly on either the disk or the slice > > it self. > > I see, thanks for explaining that. If I can recover this disk then I'll > partition it into a couple of slices and mount each of those instead of > what I was now doing. > > > /dev/ad1s1c: NOT LABELED AS A BSD FILE SYSTEM (unused) > > Yes, ad1s1c is normally not used as a filesystem, so you would better not > > fsck > > it. > > Oops, then what can I do? Well it looks like fsck detected it and didn't do any harm here. I'm not really sure though. > > > Also it won't reboot now, although I've run fsck complete including on > > > > > ads0. Do I have to edit /etc/fstab so ads1 isn't mounted to get a good > > > boot? Unfortunately /usr isn't getting mounted and I have not editor > > > available afaik. > > > > It should not be necessary to edit /etc/fstab. However after what you've > > described above it might be necessary to restore the partition table, mbr > > and > > slice table to get your system booting again. > > Could you please be more explicit Pieter? I don't know how to do any of > that. Yikes! If the slice and partition table are still intact (as they were before the outage), a normal fsck -F on /dev/ad1s1a will get the pc booting again. You can do this from a FreeBSD live cd such as FreesBIE or the fixit cd. You can then fsck the the rest of the filesystems in single user mode. You may also want to use the live CD to backup the important bits before, ehm, further corrupting/restoring the filesystems. ;) If the above doesn't work, probably something in either your slice table or partition table is wrong. If you have dedicated the entire disk to FreeBSD during the installation process, and chose the default disk layout, it should be possible to regenerate both using sysinstall (the freebsd installer) from the FreeBSD CD. However, if you made changes to the default setup, and you do not remember exactly what they were, and you do not have a backup of the output of "bsdlabel ad1s1" things will get really tough here. In any case, I think you'll find the last section of http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disk-organization.html a useful read on FreeBSD disk organisation. Regards, Pieter de Goeje ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: recovery after power outage
On 2/7/07, Pieter de Goeje <[EMAIL PROTECTED]> wrote: ad1s1c is a partition that contains the entire disk or slice in this case. Dangerously dedicated is when you have no slices: ad1a, ad1b, ad1c etc. You should _only_ fsck the individual partitions (ad0s1a), never the complete disk (ad0) or individual slices (ad0s1). You may risk destroying your filesystem(s) if you do so. Unless ofcourse you know what you're doing and you have placed a filesystem directly on either the disk or the slice it self. I see, thanks for explaining that. If I can recover this disk then I'll partition it into a couple of slices and mount each of those instead of what I was now doing. /dev/ad1s1c: NOT LABELED AS A BSD FILE SYSTEM (unused) Yes, ad1s1c is normally not used as a filesystem, so you would better not fsck it. Oops, then what can I do? Also it won't reboot now, although I've run fsck complete including on > ads0. Do I have to edit /etc/fstab so ads1 isn't mounted to get a good > boot? Unfortunately /usr isn't getting mounted and I have not editor > available afaik. It should not be necessary to edit /etc/fstab. However after what you've described above it might be necessary to restore the partition table, mbr and slice table to get your system booting again. Could you please be more explicit Pieter? I don't know how to do any of that. Yikes! Marty ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: recovery after power outage
On 2007/02/06 17:06, Marty Landman seems to have typed: > Jerry McAllister wrote: > >> Just run /sbin/fsck /dev/ad1s1c. Actually that would be a somewhat >> unusual address - what they call a 'dangerously dedicated' disk. > > Can you explain or point me to more info on why that was a poor choice on my > part? To explain more this is a 250 GB hard drive which is the primary slave > and is mostly used as a data repository and shared via samba on my home > office lan. http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#DANGEROUSLY-DEDICATED ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: recovery after power outage
On Tue, Feb 06, 2007 at 09:06:05PM -0500, Marty Landman wrote: > Jerry McAllister wrote: > > >Well, do as it says - choose a shell and run fsck manually. > > Heh, for starters I assumed (always a bad thing) that fsck wasn't available > because I did a 'which fsck' and got 'which not found' as a response. But > fsck itself is there. Which is a built in shell command and you hadn't declared a shell yet. But, fsck is run from a binary file and can be reached by specifying the full path. > >Just run /sbin/fsck /dev/ad1s1c. Actually that would be a somewhat > >unusual address - what they call a 'dangerously dedicated' disk. > > Can you explain or point me to more info on why that was a poor choice on my > part? To explain more this is a 250 GB hard drive which is the primary slave > and is mostly used as a data repository and shared via samba on my home > office lan. Mainly because it is non or less standard and some things may not play nicely with it. As long as it is used only in a FreeBSD situation and there is never a problem with the disk, then it will work fine. But it is usually advisable to keep to the high road unless there is a reason not to. > > >But I think fsck should be able to work through it. > > snip > > >It the manual fscks don't work, then you may have to try some > >extreme tactics to recover things on that partition or abandon > > snip > > >If you end up rebuilding the drive, then the next time make a > >FreeBSD slice and then make a partition within that slice to > >avoid that 'dangerously dedicated' config. > > I am not getting past this error with fsck. Get 16 lines saying: > > ad1: FAILURE - READ_DMA status=51 error=40 > LBA=xxx > > for xxx in [191..206] > > then a msg listing disk sectors that can't be read 128 through 143 and > finally: > > /dev/ad1s1c: NOT LABELED AS A BSD FILE SYSTEM (unused) > > If I can recover the disk which has about 60GB's used out of 250GB and lose > a few sectors it's really not a bad deal probably, but how do I go about > trying at this point? > > Also it won't reboot now, although I've run fsck complete including on ads0. > Do I have to edit /etc/fstab so ads1 isn't mounted to get a good boot? > Unfortunately /usr isn't getting mounted and I have not editor available > afaik. Now you are getting beyond my experience. I am thinking something in the label got mushed or possibly the primary superblock got wacked. Sometimes the label can be rewritten, if the new one is identical to the old one, and then used to access the disk. And, there are lots of spare superblocks written on the filesystem and it is possible to use one as an alternate. But I have never had to do either of these things, so someone else with experience there would be a better guide. jerry > > Marty > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: recovery after power outage
On Wednesday 07 February 2007 03:06, Marty Landman wrote: > Jerry McAllister wrote: > > Well, do as it says - choose a shell and run fsck manually. > > Heh, for starters I assumed (always a bad thing) that fsck wasn't available > because I did a 'which fsck' and got 'which not found' as a response. But > fsck itself is there. > > > Just run /sbin/fsck /dev/ad1s1c. Actually that would be a somewhat > > unusual address - what they call a 'dangerously dedicated' disk. ad1s1c is a partition that contains the entire disk or slice in this case. Dangerously dedicated is when you have no slices: ad1a, ad1b, ad1c etc. You should _only_ fsck the individual partitions (ad0s1a), never the complete disk (ad0) or individual slices (ad0s1). You may risk destroying your filesystem(s) if you do so. Unless ofcourse you know what you're doing and you have placed a filesystem directly on either the disk or the slice it self. > > Can you explain or point me to more info on why that was a poor choice on > my part? To explain more this is a 250 GB hard drive which is the primary > slave and is mostly used as a data repository and shared via samba on my > home office lan. Your filesystem layout seems perfectly fine. > > > But I think fsck should be able to work through it. > > snip > > > It the manual fscks don't work, then you may have to try some > > extreme tactics to recover things on that partition or abandon > > snip > > > If you end up rebuilding the drive, then the next time make a > > FreeBSD slice and then make a partition within that slice to > > avoid that 'dangerously dedicated' config. > > I am not getting past this error with fsck. Get 16 lines saying: > > ad1: FAILURE - READ_DMA status=51 error=40 > LBA=xxx This is not an error of fsck but an error of the ata subsystem. It says that something went wrong while doing disk I/O. > > for xxx in [191..206] > > then a msg listing disk sectors that can't be read 128 through 143 and > finally: > > /dev/ad1s1c: NOT LABELED AS A BSD FILE SYSTEM (unused) Yes, ad1s1c is normally not used as a filesystem, so you would better not fsck it. > > If I can recover the disk which has about 60GB's used out of 250GB and lose > a few sectors it's really not a bad deal probably, but how do I go about > trying at this point? > > Also it won't reboot now, although I've run fsck complete including on > ads0. Do I have to edit /etc/fstab so ads1 isn't mounted to get a good > boot? Unfortunately /usr isn't getting mounted and I have not editor > available afaik. It should not be necessary to edit /etc/fstab. However after what you've described above it might be necessary to restore the partition table, mbr and slice table to get your system booting again. > > Marty If you have any more questions about the FreeBSD filesystem, please don't hesitate to ask. Regards, Pieter de Goeje ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: recovery after power outage
Jerry McAllister wrote: Well, do as it says - choose a shell and run fsck manually. Heh, for starters I assumed (always a bad thing) that fsck wasn't available because I did a 'which fsck' and got 'which not found' as a response. But fsck itself is there. Just run /sbin/fsck /dev/ad1s1c. Actually that would be a somewhat unusual address - what they call a 'dangerously dedicated' disk. Can you explain or point me to more info on why that was a poor choice on my part? To explain more this is a 250 GB hard drive which is the primary slave and is mostly used as a data repository and shared via samba on my home office lan. But I think fsck should be able to work through it. snip It the manual fscks don't work, then you may have to try some extreme tactics to recover things on that partition or abandon snip If you end up rebuilding the drive, then the next time make a FreeBSD slice and then make a partition within that slice to avoid that 'dangerously dedicated' config. I am not getting past this error with fsck. Get 16 lines saying: ad1: FAILURE - READ_DMA status=51 error=40 LBA=xxx for xxx in [191..206] then a msg listing disk sectors that can't be read 128 through 143 and finally: /dev/ad1s1c: NOT LABELED AS A BSD FILE SYSTEM (unused) If I can recover the disk which has about 60GB's used out of 250GB and lose a few sectors it's really not a bad deal probably, but how do I go about trying at this point? Also it won't reboot now, although I've run fsck complete including on ads0. Do I have to edit /etc/fstab so ads1 isn't mounted to get a good boot? Unfortunately /usr isn't getting mounted and I have not editor available afaik. Marty ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: recovery after power outage
On Tue, Feb 06, 2007 at 11:54:17AM -0500, Marty Landman wrote: > My fbsd 6.0 box is having filesystem problems on boot since a blackout > yesterday. Here's a synopsis: > > /dev/ad0s1a: clean > /dev/ad0s1d: DEFER FOR BACKGROUND CHECKING > ...repeats for ad0s1f & e > then reports error=40 for ad1 (twice) and reports an > unexpected inconsistency for my ad1s1c device which is the primary slave hd. > > Tells me to run fsck manually and asks which shell I want. Maybe this is my > fault for not partitioning appropriately, can't get to many commands > including fsck guess it's because of the fs problems. > > How can I try and recover from this? Well, do as it says - choose a shell and run fsck manually. Probably you want the default shell = /bin/sh. The output says ad0s1a is clean, so your fsck should be available. Just run /sbin/fsck /dev/ad1s1c. Actually that would be a somewhat unusual address - what they call a 'dangerously dedicated' disk. But I think fsck should be able to work through it. You will probably have to sit there and answer 'y' to a bunch of prompts or do fsck -y /dev/ad1s1c to force a y to everything. The fsck that runs at boot pops out and stops the boot if it runs in to anything it is scared to assume it will fix. But in most cases, there isn't anything you can do but answer 'y' anyway. If that causes something to be lost, you probably wouldn't be able to recover it anyway. When the manual fsck-s all finish - which can take a long time, then reboot and see what happens. It should come all the way up. It the manual fscks don't work, then you may have to try some extreme tactics to recover things on that partition or abandon it. If you end up rebuilding the drive, then the next time make a FreeBSD slice and then make a partition within that slice to avoid that 'dangerously dedicated' config. Good luck, jerry > > Marty > > -- > Web Installed Formmail - http://face2interface.com/formINSTal/ > Webmaster's BBS - http://bbs.face2interface.com/ > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: recovery after power outage
In response to "Marty Landman" <[EMAIL PROTECTED]>: > My fbsd 6.0 box is having filesystem problems on boot since a blackout > yesterday. Here's a synopsis: > > /dev/ad0s1a: clean > /dev/ad0s1d: DEFER FOR BACKGROUND CHECKING > ...repeats for ad0s1f & e > then reports error=40 for ad1 (twice) and reports an > unexpected inconsistency for my ad1s1c device which is the primary slave hd. > > > Tells me to run fsck manually and asks which shell I want. Maybe this is my > fault for not partitioning appropriately, can't get to many commands > including fsck guess it's because of the fs problems. > > How can I try and recover from this? If you can't mount the filesystem that has fsck on it, you're going to have to boot off a CD (FreeSBIE or the FreeBSD fixit cd) and run fsck from there. -- Bill Moran Collaborative Fusion Inc. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"