From owner-freebsd-questions@FreeBSD.ORG Fri Jul 31 18:36:25 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CFE61065672 for ; Fri, 31 Jul 2009 18:36:25 +0000 (UTC) (envelope-from af.gourmet@videotron.ca) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id 1FFBA8FC14 for ; Fri, 31 Jul 2009 18:36:24 +0000 (UTC) (envelope-from af.gourmet@videotron.ca) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=UTF-8 Received: from [192.168.0.51] ([96.21.103.185]) by VL-MH-MR001.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTP id <0KNN00DWBT0N3ZV0@VL-MH-MR001.ip.videotron.ca> for freebsd-questions@freebsd.org; Fri, 31 Jul 2009 14:36:24 -0400 (EDT) Message-id: <4A7339A7.4010303@videotron.ca> Date: Fri, 31 Jul 2009 14:36:23 -0400 From: PJ User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) To: Roland Smith References: <4A71DB2A.4040401@videotron.ca> <20090730190458.GA36265@slackbox.xs4all.nl> <4A71F297.1080903@videotron.ca> <20090730220618.GA40281@slackbox.xs4all.nl> In-reply-to: <20090730220618.GA40281@slackbox.xs4all.nl> Cc: freebsd-questions@freebsd.org Subject: Re: how to boot or access problem file system X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Jul 2009 18:36:26 -0000 Roland Smith wrote: > On Thu, Jul 30, 2009 at 03:20:55PM -0400, PJ wrote: > >> Roland Smith wrote: >> >>> On Thu, Jul 30, 2009 at 01:40:58PM -0400, PJ wrote: >>> >>> >>>> What can be done to access a file system that seems to have the boot >>>> sector screwed up? >>>> > > I forgot to mention that your boot sector is fine. If it were screwed > up, you wouldn't get to the boot prompt. > > Since the boot code cannot locate your kernel, there are several things > that could have gone wrong. See below. > > > >>>> The /usr files should be ok but how to access? >>>> >>> Use fsck_ffs to try and repair the filesystem. >>> >>> >> how can I use it if I can't boot or access the file system? >> > > Use a livefs cd or use the Fixit option in the main menu of sysinstall > on an install disk. That should get you a shell where you can run > fsck_ffs on your disk partitions. > > If you have booted from CD, list the disk devices with e.g. 'ls > /dev/ad*'. If you have SCSI drives, use 'da' instead of 'ad'. > What does that command list? On my machine, I'll get > something like this: > > /dev/ad4 /dev/ad4s1d /dev/ad6 /dev/ad6s1d > /dev/ad4s1 /dev/ad4s1e /dev/ad6s1 /dev/ad6s1e > /dev/ad4s1a /dev/ad4s1f /dev/ad6s1a /dev/ad6s1f > /dev/ad4s1b /dev/ad4s1g /dev/ad6s1b /dev/ad6s1g > /dev/ad4s1c /dev/ad4s1g.eli /dev/ad6s1c /dev/ad6s1g.eli > > If you only see e.g. /dev/ad4 and /dev/ad6, your slice table has been > overwritten (with fdisk) and your data is lost. If you see /dev/ad4s1 > but not /dev/ad4s1a-g, the BSD partitions have been removed and your > data is lost as well. > > Since there is only one slice on both ad4 and ad6 (otherwise you'd see > /dev/ad4s2x) The next step is to examine the disk labels: > > bsdlabel /dev/ad4s1 > # /dev/ad4s1: > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > a: 1024000 16 4.2BSD 2048 16384 64008 > b: 16777216 1024016 swap > c: 976768002 0 unused 0 0 # "raw" part, don't edit > d: 4194304 17801232 4.2BSD 2048 16384 28528 > e: 104857600 21995536 4.2BSD 2048 16384 28528 > f: 41943040 126853136 4.2BSD 2048 16384 28528 > g: 807971826 168796176 4.2BSD 2048 16384 0 > > This tells us that the a, d, e, f and g partition are carrying a BSD > filesystem, and should be checked with fsck_ffs. > > Try these steps and report back what you find. > > >>>> I don't have a problem with irrecoverable files, I would just finally >>>> understand how things work and what can be done on FBSD. >>>> >>> Make regular backups. Especially before big upgrades. >>> >>> >> Maybe the real problem is that the manual is too screwed up (why are >> there so many problems being brought up on the mailing lists? we can't >> all be that stupid.) >> > > It is a mailing list for questions. Ipso facto you'll see questions and > problems on this list. People who are not having problems will not be > posting very much. :-) > > As to the handbook, this is by necessity written by people who are > knowledgeable on the subject they write on. Unfortunately this sometimes > lead to really basic steps/assumptions being skipped because they are > self-evident for the writer. If you gain enough knowledge about a > subject it becomes really hard to write for people new to the system > because you've internalized a lot of stuff by then. > > If you have specific questions about parts of the handbook, ask. > > > Roland > Thanks for replying Roland, I've been struggling with upgrading 7.0 to 7.2... it has taken a lot of my time and I am still not happy. I have it running now; Xorg finally came through but I have absolutely no idea how or why it finally started working. Actually, it was my last attempt to start it and I was totally surprised that it came up. I decided to try my former xorg.conf file which had the correct mouse driver etc. that hal did not find. X -configure was useless and totally off the track and tweaking the xorg.conf.new file did not work. In total desperation I had installed all the xorg files needed or not and hoped that might help... at first, it did not, at least I couldn't tell as there was no change. But getting flashplayer to work... that's an impossibility as I can see on this machine. Nor does gnash work... it installs and shows up under about:plugins on Firefox... but that's as far as it goest... same for flashplayer9 and linux-f8-flashplayer10 can't find the files to download ( but a few days ago they were available and worked on the amd64 system). Anyway... back to the messed up 7.1 installation. I ran livefs 7.1 and chose option 6 (I think; it was the last on the list) and I got the boot cursor (I think) ... so I entered? and got the list of commands. BTW, I don't know where to find some instructions on how to use the livefs and the command line procedures to work with to do a reccovery. For one, I find that the screen scrolls by so fast, I miss half of what is going on and I don't know how to get more to work... it never has before... I finally got a list of the devices with lsdev and thatgives me cd devices: cd0: Device 0x1 disk devices: disk0: BIOS drive a: disk1: BIOS drive C: disk1s1: Unknown fs: 0x7 (I think this must be ntfs ? but ? ) disk2: BIOS drive D: disk3: BIOS drive E: disk3s1a: FFS disk3s1b: swap disk3s1d: FFS disk3s1e: FFS disk3s1f: FFS pxe devices: ====== ls shows what apears to be the filesystem: a couple of files and directories ====== using more to read files, I found that the file system does not appear to be what I had... for example, rc.conf doesn't exist; which leads me to believe that what I am looking at is some default stuff for setup How can I see all the commands? They scroll by too fast. What's the use of having such help when you can't see the output? This has always been a deterrent for me to try to delve deeper into FBSD... doesn't anyone in FreeBSD-land ever think about the enduser? I, for one, expect things to be intuitive if not logical and I just don't find it here of in the manuals...which, BTW, show up through Google in different forms and configurations. How do I see the contents of the other disks as I seem to be looking at disk3? Is it possible to switch to another disk and see what is there? -- Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." ------------------------------------------------------------- Phil Jourdan --- pj@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php