From owner-freebsd-questions Sat Feb 2 7: 1:36 2002 Delivered-To: freebsd-questions@freebsd.org Received: from blackhelicopters.org (geburah.blackhelicopters.org [209.69.178.18]) by hub.freebsd.org (Postfix) with ESMTP id 0C67237B416 for ; Sat, 2 Feb 2002 07:01:29 -0800 (PST) Received: (from mwlucas@localhost) by blackhelicopters.org (8.11.6/8.11.6) id g12F1MB27764; Sat, 2 Feb 2002 10:01:22 -0500 (EST) (envelope-from mwlucas) Date: Sat, 2 Feb 2002 10:01:22 -0500 From: Michael Lucas To: D J Hawkey Jr Cc: David Wolfskill , questions at FreeBSD Subject: Re: Two FBSD slices on one disk - losing mountpoints? Message-ID: <20020202100122.A27729@blackhelicopters.org> References: <20020201071356.A482@sheol.localdomain> <20020202063656.A26864@blackhelicopters.org> <20020202060715.A9390@sheol.localdomain> <20020202072233.A27220@blackhelicopters.org> <20020202072901.A9696@sheol.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020202072901.A9696@sheol.localdomain>; from hawkeyd@visi.com on Sat, Feb 02, 2002 at 07:29:01AM -0600 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 You got it! To clarify a point that confused me for a long time: "mountpoints" are arbitrary. Repeat this to yourself until you know it in your heart. Mountpoints are simply an arbitrary map between a device node and a directory name. The only one you must have is "/". I could build a FreeBSD system with mountpoints of /, /gerbil, /licorice, and /MichaelTurnsThirtyFiveToday. And it would work. (It would be a piss-poor layout, mind you, but that's a separate issue.) But you can only have one physical device on one mount point. If /dev/ad0s1a is on /, you cannot also mount /dev/ad0s2a on /. Mountpoints are set by /etc/fstab, and only there. I had a laptop that worked in two different, very weird, environments. I stopped the boot in single-user-mode each time I moved and edited /etc/fstab to change which partition was /usr, so I would have the proper binaries for that environment. If you have followed industry standard practice and mounted a physical device on /usr, then you unmount that and remount it as /gerbil, well, life would be difficult. But you could do it, and the kernel wouldn't care. ($PATH would, but again, separate issue.) ==ml PS: As payment for all of our excellent help, you might decide to take notes as you do this and write it up for Daemon News. ;-) On Sat, Feb 02, 2002 at 07:29:01AM -0600, D J Hawkey Jr wrote: > *sigh* > > The further I go, the behinder I get. I'm re-arranging your reply a > little here... > > On Feb 02, at 07:22 AM, Michael Lucas wrote: > > > > On Sat, Feb 02, 2002 at 06:07:15AM -0600, D J Hawkey Jr wrote: > > > > > > This will give you the necessary warm fuzzies to know you aren't > > > > blowing up your system. > > > Then, after installation in ad0s1 is done and it's running, re-'disklabel' > > > the partitions in ad0s2 to their proper names? > > > > I gathered from your original message that you wanted two separate > > installs of FreeBSD on this one disk. Is this not the case? > > Right! That's where I'm even more confused now... > > > > > You cannot have two mount points of the same name at the same time. Try this: > > > > unmount ad0s2a / ; remount ad0s2a / as oldroot > > > > unmount ad0s2f /usr ; remount ad0s2f /oldusr > > > > umount ad0s2e /var ; remount ad0s2e /oldvar > > > > > > You mean while running FBSD in ad0s2, or while in 'sysinstall' on booting > > > the 4.5-REL install CD? > > > > While booting the 4.5 CD. > > > > [SNIP] > > > > You will also want to be sure to "toggle newfs" off on these existing > > partitions, so that the new install doesn't overwrite them! Gah, I > > haven't had coffee either! > > :-) > > This I already gathered. Make sure that "Y" in the "Newfs" column is set > only in ad0s1's (the new slice's) partitions. > > > You cannot have two like-named partitions in a single OS instance. > > But I can have two like-named partitions (we both mean "mountpoints" here) > across different slices? > > -------------- > > GAAAAA... gasp gasp... > > OK, let me re-cap, and then tell me where I'm wrong: > > - Boot the 4.5-REL CD, and [re-]allocate a slice for the new install > in 'fdisk'. Leave all other slices as they are. > - Move on to 'disklabel', and set up the new partitions in that new > slice. Whether 'disklabel' forces me to 'cuz I've allocated new > like-named mountpoints, or I pre-empt that limitation, re-name the > mountpoints of existing FBSD slice's partitions to something else. > Per a reply from David Wolfskill, mnemonics like "/S2", "/S2/usr" > for the second slice's mountpoints keeps things organised (**1). > - Make certain the "Y" in the "newfs" column is set only in the new > slice's partitions (**2). > - Close my eyes and pray as I commit these changes. > > (**1) These mountpoint names are written to the new slice's /etc/fstab > only; in any other existing FBSD slice, I have to manually add > this new slice's partitions and mountpoints, as "/S1", etc., to > the existing slice's /etc/fstab. > (**2) This is the only thing that governs what slice and partition > 'sysinstall' deals with? Or do mountpoint names play a role, too? > > > No problem, hope this helps. > > Sorry to be so thick-headed and anal. I'm one of those people that need > to see the big picture in order to work on a little piece of it. > > > Michael Lucas > > Dave > > -- > ______________________ ______________________ > \__________________ \ D. J. HAWKEY JR. / __________________/ > \________________/\ hawkeyd@visi.com /\________________/ > http://www.visi.com/~hawkeyd/ -- Michael Lucas mwlucas@FreeBSD.org, mwlucas@BlackHelicopters.org my FreeBSD column: http://www.oreillynet.com/pub/q/Big_Scary_Daemons http://www.blackhelicopters.org/~mwlucas/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message