From owner-freebsd-questions Sat Jun 8 22: 3: 4 2002 Delivered-To: freebsd-questions@freebsd.org Received: from empty1.ekahuna.com (empty1.ekahuna.com [198.144.200.196]) by hub.freebsd.org (Postfix) with ESMTP id 6F0BB37B400 for ; Sat, 8 Jun 2002 22:02:59 -0700 (PDT) Received: from pc-02 (pc02.ekahuna.com [198.144.200.197]) by empty1.ekahuna.com (Post.Office MTA v3.5.3 release 223 ID# 0-0U10L2S100V35) with ESMTP id com for ; Sat, 8 Jun 2002 22:02:58 -0700 From: "Philip J. Koenig" Organization: The Electric Kahuna Organization To: questions@FreeBSD.ORG Date: Sat, 8 Jun 2002 22:02:57 -0700 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Filesystem paradox, take 2 Reply-To: pjklist@ekahuna.com X-mailer: Pegasus Mail for Win32 (v3.12c) Message-ID: <20020609050258756.AAA535@empty1.ekahuna.com@pc02.ekahuna.com> 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 This may be some age-old Unix question that was answered 20 yrs ago, but bear with me, I'm not an age-old Unix sysadmin. :-) I'm trying to copy a working FreeBSD system from one disk and controller to another - from an Adaptec embedded 7892 controller (ie equivalent to a 2940-U2W) to an AMI/LSI Megaraid controller. The system has 2 slices: a small DOS one, and a large FreeBSD one. I've been using DOS utilities (Ghost or DriveImage) but I don't think the issues would be any different if I were to use dd. The first problem is after image-copying the disk to the RAID logical drive, the disklabel is incorrect. (the offset is incorrect, it doesn't start at 0) I can correct this, but something is awry. On a normal system I can do "disklabel -r da0" and it gives me essentially the same output as "disklabel -r da0s2". After copying the slices to the logical drive, "disklabel -r amrd0s2" works, but not "disklabel -r amrd0". I'm not sure why. So I use boot0cfg to put the bootmanager on the MBR. FreeBSD starts to boot, but can't mount the root filesystem, I get the "mountroot" prompt. Now this is the first "catch-22": it can't mount the root filesystem because a file ON the root filesystem tells it the wrong stuff. (/etc/fstab, which still has the old device names) This is already a very problematic design, although I realize this is the way it's been done for years. (personally I think this stuff should be in the partition table or MBR, instead of in the filesystem you're trying to mount) The 2nd paradox is that after I manually specify the root filesystem to mount: mountroot> ufs:/dev/amrd0s2a ..it mounts root read-only because it tells me the filesystem is dirty so I have to run fsck. But!! fsck won't run, because it depends on /etc/fstab to tell it what filesystems to check, and I see no way to manually specify a device! AND, I can't edit fstab, because it's on / and / is mounted read-only! Argh! SO I say, I'll boot off the fixit-CD again. But the fixit environment for some reason doesn't know about amrd0s2a (no device with that name in /dev, only amrd0s2, and MAKEDEV won't create it - complains about illegal group name or somesuch), so I can't even mount the filesystem from the fixit environment to fsck it or edit fstab.. paradox #3!! Can anyone offer me some tips here? I think I've pulled all my hair out by now.. Phil PS: my next try is going to be deleting the FreeBSD slice from the RAID logical drive, boot off fixit CD, create a new FreeBSD slice, use disklabel to re-create all the filesystems, and copy/restore it in the conventional way - ie with a dump/restore or tar/untar pipe. But I sure wish I didn't have to go through all that.. -- Philip J. Koenig pjklist@ekahuna.com Electric Kahuna Systems -- Computers & Communications for the New Millenium To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message