From owner-freebsd-questions Thu Jan 30 10: 9:52 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C549B37B401 for ; Thu, 30 Jan 2003 10:09:48 -0800 (PST) Received: from smtp.a1poweruser.com (oh-chardon6a-34.clvhoh.adelphia.net [68.169.105.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51EF643F3F for ; Thu, 30 Jan 2003 10:09:47 -0800 (PST) (envelope-from barbish@a1poweruser.com) Received: from barbish (unknown [10.0.10.6]) by smtp.a1poweruser.com (Postfix) with SMTP id ECF3131; Thu, 30 Jan 2003 13:17:51 -0500 (EST) Reply-To: From: "JoeB" To: "Mike Meyer" , Cc: "Chuck Swiger" , "Giorgos Keramidas" , Subject: RE: Fixit instructions Date: Thu, 30 Jan 2003 13:09:45 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <15929.15511.113620.677592@guru.mired.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hay aren't you forgetting the most important usage. Use the fixit cdrom to boot small running FBSD environment so you can restore your tape backup to the failed hard drive, or dd your bkup image. -----Original Message----- From: owner-freebsd-questions@FreeBSD.ORG [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Mike Meyer Sent: Thursday, January 30, 2003 9:54 AM To: bastill@adam.com.au Cc: Chuck Swiger; Giorgos Keramidas; freebsd-questions@FreeBSD.org Subject: Re: Fixit instructions In <1043907672.3e38c458244c1@webmail.adam.com.au>, bastill@adam.com.au typed: > Quoting Mike Meyer : > > You don't have to boot the fixit cd - just mount it and look. I'm sure > > that what you will find on the CD is a pretty complete FreeBSD system, > > with the layout described in the hier man page. > > Close, but... > root@BAPhD ~ #ls /cdrom > .cshrc bin etc modules sys > .profile boot filename.txt proc tmp > COPYRIGHT cdrom.inf floppies root usr > CVS-REPO commerce kernel.GENERIC rr_moved var > README.TXT dev mnt sbin > > Note the absence of mnt2 and stand, both of which I was aked to examine. Those > directories are set up on booting the cdrom and entering Fixit mode. > bin, sbin and usr/bin on the cd are indeed readable ( and extensive) directly > from the CD. Right. Those aren't on the fixit disk, they are on the root file system used by the boot process. That's a stripped system file system used for installing FreeBSD. It mounts the fixit cdrom to give you the rest of the FreeBSD world. > I don't mean to be difficult or over-demanding about this, especially to people > who are offering help, but what I was expecting was trhat some helpful guru > would have prepared a "Fixit Handbook" which might have chapters like "Repairing > a corrupt partition table" and "Restoring a lost directory" and ... whatever. > Perhaps the book Chuck suggested would do that. If such a book exists, I don't know about it. Part of the problem is that the commands for this only exist at two levels: the straightforward (you want fsck), and the incredibly baroque world of hex file editors that you're going to point at the disk. One handles all the cases you are liable to run into in real life. The other requires an intimate knowledge of the on-disk file structure, and a hex calculator - and even then what you are doing is incredibly risky. > Reading man pages doesn't tell me with any clarity which commands go with what > do do something. One really needs far more knowledge than I have to make sense > of it all. On the other hand, a "reading guide" might do a lot of good, and makes a lot of sense. Something that says things like "For problems with DOS partitions (aka slices), see fdisk(8), boot0cfg(8) and /usr/include/sys/disklabel.h. For problems with FreeBSD partitions, see disklabel(8) and /usr/include/sys/disklabel.h. For problems with the file system, see fsck(8), /usr/include/ufs/ufs/dinode.h and /usr/include/ufs/ufs/dir.h." Come to think of it, about the only reason one should be mounting the fixit CDROM is because your root file system is screwed. I think I just covered everything you need to know about fixing broken file systems. The problem is, that's not complete. You may need to know how to create dev entries - at least on 4.7. You'll want to know about mount in order to mount working file systems, and to check the broken file system once you've fixed it. If the breakage causes you to change what's mounted where, I tend to fix that in fixit mode with ed, so you may want to know about that. Maybe what's needed is an "Essential BSD commands" handbook entry, that covers the lists the commands available in Fixit mode that are actually useful for fixing a broken system? http://www.mired.org/consulting.html Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message