Date: Sat, 21 Jul 2001 01:43:50 -0400 From: Garance A Drosihn <drosih@rpi.edu> To: freebsd-hackers@FreeBSD.ORG Cc: Bill Moran <wmoran@iowna.com> Subject: Re: Suggestions for sysinstall / disklabel Message-ID: <p05101005b77ebb5eb1bd@[128.113.24.47]> In-Reply-To: <20010720212726.B53370@dragon.nuxi.com> References: <59063B5B4D98D311BC0D0001FA7E452205FD9D73@l04.research.kpn.com> <p0510100cb77ced816fa2@[128.113.24.47]> <20010720212726.B53370@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
At 9:27 PM -0700 7/20/01, David O'Brien wrote: >On Thu, Jul 19, 2001 at 05:29:10PM -0400, Garance A Drosihn wrote: >> Now, remember that during the boot-up process, the "boot0" code requires >> that the "partition to boot from" be the first partition in the slice. >> The "boot1" code assumes that the "partition to boot from" is labelled >> "partition a". So, that partition which I will want to be "/ for >> release 5" needs to be both the first partition in the slice, and it >> needs to be labelled "partition a". > >That is not true. You can put `b' at the beginning of the slice (what >I think you mean by "first partition"), followed by `a' and the result >boots just fine. [this is for i386 only!, this is not true for the Alpha] Oh. But that is only an option for the swap partition, not some other UFS partition? Right? I'm still a little fuzzy on how these parts fit together. So boot0 just looks for the first UFS partition in the slice you selected, and assumes it is root? > > Why does disklabel make it "partition e"? Because it knows that it >> should use "partition a" for the partition which will be mounted >> as "/". > >You did a lot of extra work to undo this. Just let sysinstall make >it `e' and do your normal install. Then boot into your 4.3 and run >disklabel da0s3 (or ad0s3). Go to the `e' and change it to `a' and >save the label. Edit /etc/fstab and change the da0s3e to da0s3a. Yeah. Eventually I figured that out. I am not one to casually run disklabel to change partition names on an already-running system (in fact, this was the first time I have ever run disklabel directly). >Or better yet, don't create anything within the da0s3 slice -- leave that >to when you install -current in that slice. See my other email I just >sent for instructions around the next problem sysinstall will give you. I "needed" to create partitions in both slices for stable, due to the way I wanted to set things up. And I intended to install 4.3, update to stable, copy the 4.3-specific {/,/var,/usr} to the /x5 equivalent partitions (if you remember my naming scheme), and then update THAT to turn it into current. So, I did really want stable to come up with all of the partitions (both stable and current) that I defined. > > Anyway, the above is a long-winded justification for the following >> suggestions: >> 1) if disklabel has already been told about '/', then it >> should not try and reserve partition 'a' of OTHER SLICES >> to also be '/'. The first partition created in those >> other slices should just be labelled partition 'a'. > >I don't want my data partition in say sd0s4 to be `a'. `a' implies >root. So your suggestion will irritate some. But if "you" (meaning the "user doing the install") are creating a data partition in a "second slice", doesn't that pretty much imply that it can't possibly be root? [note that I don't have a long history of formatting unix partitions, so it wouldn't surprise me if I am suggesting things which seem weird to people with a longer history in bsd's]. [I'm not sure I made this obvious in my previous message, but these suggestions were meant for the situation where the user is doing a single install where they are spraying freebsd slices across multiple partitions -- as was in the case in the example I gave] In any case, sysinstall already will create 'a' partitions which are not "root", if you just ask it to create enough of them that it has run out of letters. Why should I care if it irritates "some" people if I what to use partition 'a' on a second slice as /home? It's my disk, it works, it does not break anything. [or does it?] > > 2) similarly, if it already has swap space defined, then > > it should not try to reserve partition 'b' of other >> slices to be swap. The second partition defined in >> those other slices should be labelled partition 'b'. > >What is wrong with having more than one slice with swap in it? >Nothing. Er, yeah. I do agree. I think I forgot some extra sentence in this suggestion, because I meant that to sound more like an "there should be a way that a user could tell sysinstall", and not that "sysinstall should never reserve 'b' for swap". At the time I was writing this I did mean to allow for swap partitions in multiple slices, although in my specific case I (personally, on my disk) knew that I only wanted one swap partition. I wanted disklabel to let me name things "the way I wanted", instead of "the way it thinks is good for me". >Of course I don't really know what you mean by "second partition >defined". Sysinstall orders the location of the [BSD] partitions within >the slice in the order you create the [BSD] partitions. Sysinstall also >knows that swap is always `b' and root is always `a'. Sysinstall skips >`d' because `d' used to mean the entire disk in pre-2.2.6. (`d' would >behave how others coming from non-PC Unixes would expect `c' to behave) >So you'll have to change your wording to be a little more exact for >others to follow your proposal. Yes, you've the right idea of what I meant, even if I didn't phrase it quite right. "Second partition defined" was supposed to mean "the second one I asked sysinstall to create in that slice". What sysinstall does makes good sense for the partitions I am creating in my "first freebsd slice". I'm just saying that [maybe] it should not use those same rules when I start creating partitions in a second slice. Ie, here I am doing an install in two slices. Sysinstall should not care why I am daft enough to do that, but it should assume that if I am creating partitions in two slices as part of an INSTALL, then I really do mean to have all of those partitions to be active (mounted) in the resulting system. > > Thinking about what people said about alpha installs, perhaps the >> following is another strategy disklabel could take. On the other >> hand, this may cause as many problems as it tries to solve. >> >> 4) never reserve 'a' or 'b'. Always create partitions in the >> order people typed them in, except that WHEN someone says >> they want to create '/', THEN both move that partition >> to the front of the slice and name it 'a' (renaming other >> partitions as needed). > >NO! Many want to put swap at the "beginning" of the disk as that is >the fastest part of the disk. The i386 has no problems booting from a >partition that is not located at the beginning of the disk(slice). The >problem with the Alpha is people try the same "trick", but it does not >work. Hmm. Okay. As I say, I'm still fuzzy on how some of these pieces fit together when installing a system. I end up doing a new (fresh, clean) install about every six months, and with each one I figure out a few more details. Certainly I don't want to suggest anything which gets in the way of some other user's idea of how their install should go. I am just trying to describe what I went thru, and suggest ways which would have made it easier for me to do what I wanted. I just make the suggestions, I don't guarantee they are GOOD suggestions... :-) I am sure that anyone with a long history of installs could have set up exactly what I wanted with very little pain, but it would be nice if a new-ish freebsd user could do things like this without needing to become an expert about every little detail of how these pieces fit together. While what I wanted to do is a bit unusual, my goal seems perfectly reasonable and workable, and yet I had to fight my way around what sysinstall/disklabel thought "was good for me". If it had just done what I asked it to do (without it helpfully renaming those partitions in the second slice), then I could have been up-and-running in very little time. I would have had exactly what I wanted, and I would not have had to learn a lot about the loader, or disklabel, or send naive questions to any freebsd mailing lists. -- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05101005b77ebb5eb1bd>