Re: Disklabel 101?
On Mon, Apr 09, 2001 at 09:16:51AM -0700, David Wolfskill wrote: > OK, since folks are comparing unusual disk layouts, here's one I've been > using on my laptop for the last few weeks (since I got it). Now, this > isn't something that you can tell sysinstall to do directly; more about > that should be at http://www.catwhisker.org/~david/FreeBSD/laptop.html. > > It should also be understood that I'm tracking both -CURRENT and -STABLE > on the machine; that I'm working (as time permits) on some code that > will permit the space pointed to by the 4th MBR "partition table" entry > to be used as a "suspend to disk partition". I just finished building > -CURRENT for today, and did the multi-user boot, so that's what it's > running at the moment. (I'll probably switch to today's -STABLE shortly > after posting this.) > > As in Mike's case, I share the swap space among the kernels; I also share > /var and /common -- basically, everything on what the 3rd "partition tabel" > entry points to. /common is where /usr/local points, as well as /home. > And /usr/obj in each case is a symlink to /common/*/obj (where "*" is one > of "C", "S1", or "S2"). /common/cvs is where I keep my CVS repository. > > It seems to be working OK for me so far. :-) > Well, I'll throw my config in the ring too. My 20G drive is sliced in two, with s1 being 7.5G, and s2 being as large as the rest of the drive. On s2, I have a 250M /, 200M /var, 100M swap, and the remainder (about 10G) as /usr. s1 contains only one partition, /usr/home on ad0s1a. I never saw the need for a separate /tmp, especially since every partition has soft updates enabled. /usr/home is located elsewhere because I switched to FreeBSD from Linux, and I wanted to devote my entire disk to FreeBSD. When I had Linux across the entire drive, I packed it into the first 7.5G, made a BSD slice in the upper region of the drive, installed it, copied my data over from Linux, wiped out Linux, turned the free space into s1, and made that /usr/home. It needs to be 7G for my MP3s. :) I like this. Since /usr always has about 7-8G free, any time I need a new operating system, all I need to do is move /usr/home onto /usr¸ and I have 7G to play with. -- Andrew Hesford [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-stable" in the body of the message
Re: Disklabel 101?
Mike Barton <[EMAIL PROTECTED]> types: > Are there any issues with placing swap first on the hard drive? Unless you > insist on filling the drive, it seems to me that this swap arrangement would > result in less stack travel. Not that I know of. In fact, I'm pretty sure that one of my systems has root on s2, with swap on s1, which is earlier on the hard disk. The idea behind root being first was similar, with root having the most used files on it. For instance, every time you open a file with an absolute path - say, by finding it on your command search path - you start with the root directory. Then again - the geometry of modern diskdrives is seriously non-intuitive. Final note - John Loverso pointed out to me that the current kernel does indeed expect c to be the entire slice. At the very least, it has to have the partition table in it. It's not clear what will fail if you make it cover the first part of the disk, but not the entire disk. I think I'm going to add playing with this to my list of things to do - Original Message - > From: "Mike Meyer" <[EMAIL PROTECTED]> > To: "The Babbler" <[EMAIL PROTECTED]> > Cc: "Rasputin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Saturday, April 07, 2001 5:48 AM > Subject: Re: Disklabel 101? > > > > The Babbler <[EMAIL PROTECTED]> types: > > > Rasputin wrote: > > > > man disklabel etc all assume you know what those letters mean. > > > > I know c is the whole partition, but that's it. > > > > > > c = entire disk > > > a = root > > > b = swap > > > d = ??? I don't know; it's never used > > > e+ = other partitions. > > > > > > BTW, does anybody know *why* BSD uses such a bizarre scheme? > > > > BSD does it this way because the Unix it was based on did it. This > > dates back to at least v6, where I first met it. Root and swap used to > > be wired into the kernel at config time, and making the first two > > partitions the system had to find while booting the first two in the > > table does make sense. C was required and unusuable; it included the > > cylinders that were reserved for bad block handling, and the tools > > that did that assumed it was there. It was also used for disk-disk > > backups at times. > > > > At the time, computers were typically used by more than one department > > at a time. This led to even more reasons to want to partition a disk. > > If memory serves, partition table information used to be in the kernel > > - wired into the driver for that disk - so all disks of the same type > > had to have the same partition table. So it was useful to stagger the > > partition sizes to provide more choices. A typical setup might have f, > > g and h about the same size and covering the entire disk. e was what > > was left in f after a & b were taken out. d was the usable disk beyond > > a & b (or something like that). > > > > The only thing that's still hardwired is that root has to be on a. The > > boot sequence is fubar if you don't do that, though it's been claimed > > that that's not hard to fix. The rest you can do pretty much any way > > you please. I.e. - you don't need swap at all, and I've got one system > > that has swap on a different slice than it's root file system. > > > > > -- > > Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ > > Independent WWW/Perforce/FreeBSD/Unix consultant, email for more > information. > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > > with "unsubscribe freebsd-stable" in the body of the message > > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-stable" in the body of the message > -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-stable" in the body of the message
Re: Disklabel 101?
Are there any issues with placing swap first on the hard drive? Unless you insist on filling the drive, it seems to me that this swap arrangement would result in less stack travel. - Original Message - From: "Mike Meyer" <[EMAIL PROTECTED]> To: "The Babbler" <[EMAIL PROTECTED]> Cc: "Rasputin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, April 07, 2001 5:48 AM Subject: Re: Disklabel 101? > The Babbler <[EMAIL PROTECTED]> types: > > Rasputin wrote: > > > man disklabel etc all assume you know what those letters mean. > > > I know c is the whole partition, but that's it. > > > > c = entire disk > > a = root > > b = swap > > d = ??? I don't know; it's never used > > e+ = other partitions. > > > > BTW, does anybody know *why* BSD uses such a bizarre scheme? > > BSD does it this way because the Unix it was based on did it. This > dates back to at least v6, where I first met it. Root and swap used to > be wired into the kernel at config time, and making the first two > partitions the system had to find while booting the first two in the > table does make sense. C was required and unusuable; it included the > cylinders that were reserved for bad block handling, and the tools > that did that assumed it was there. It was also used for disk-disk > backups at times. > > At the time, computers were typically used by more than one department > at a time. This led to even more reasons to want to partition a disk. > If memory serves, partition table information used to be in the kernel > - wired into the driver for that disk - so all disks of the same type > had to have the same partition table. So it was useful to stagger the > partition sizes to provide more choices. A typical setup might have f, > g and h about the same size and covering the entire disk. e was what > was left in f after a & b were taken out. d was the usable disk beyond > a & b (or something like that). > > The only thing that's still hardwired is that root has to be on a. The > boot sequence is fubar if you don't do that, though it's been claimed > that that's not hard to fix. The rest you can do pretty much any way > you please. I.e. - you don't need swap at all, and I've got one system > that has swap on a different slice than it's root file system. > > -- > Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ > Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-stable" in the body of the message > To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-stable" in the body of the message
Re: Disklabel 101?
Rasputin wrote: > > Is there a decent walkthrough anywhere on the Net for using > disklabel, fdisk , etc - along with an explanation of what a,c etc all > mean? > > man disklabel etc all assume you know what those letters mean. > I know c is the whole partition, but that's it. c = entire disk a = root b = swap d = ??? I don't know; it's never used e+ = other partitions. BTW, does anybody know *why* BSD uses such a bizarre scheme? > > I need to know because: > > <-EXTENDED-><--PHYSICAL> > > ad0s1ad0s5ad0s6 ad0s3 > <-winXX--><-msdos-><---BSD> > | 2Gb| 1.5Gb | 2Gb | / | swap | /usr | /var | > ^ > | > I have an old Slackware partition > that has FUBARed itself so throuoghly that it can't even be mounted. This isn't really disklabel at all; it's the low-level format, which is why I can help. > > (Actually there were about 3 partitions in there, but they're lost now) > It's in the second logical partition in an extended DOS partition on > my second physical partition (dev/ad0s6 in FreeBSD) > There's a Gb of data in ad0s5 (which is fine). FreeBSD doesn't know from extended partitions from what I can see. Does your FreeBSD actually see od0s5/ad0s6? 'Cause mine never seemed to found; I used PartitionMagic to convert my DOS partition from logical to primary largely to deal with this. Was I missing a big clue? Try typing "fdisk /dev/ad0" to get an idea of how FreeBSD really sees your disk. Anyway, as far as *I* am aware what you've really got is: ad0s1 - first partition = winXx ad0s2 - second partiion = extended ad0s3 = third partition = BSD The disklabel program is concerned only with dividing up ad0s3. You can make a file system on ad0s2 and it certianly ought not overlap anything, but run "fdisk" to be sure things are really confused. If you can access ad0s5/ad0s6, please let me know. It would be news to me! (And what release are you running, BTW?) > BSD dumps ad0s6 altogether when it boots; and fdisk from a > boot CD says something along the lines of: > "Second slice extended past end of disk" or similar > (box is offline today, so I can't check right now) > This concerns me; if I try to fdisk/newfs ad0s2 (assuming I > could see it), I risk losing ad0s3, which is the only bit of the disk > I really want to keep. > > I assume/hope that if I blow away the extended partition > entirely, I can just recreate it. > But I don't really know what it's called? > Is it ad0s2? > And won't I need to let BSD know where / has moved to? > > What I'd really like is some advice from anyone who knows this stuff. > But I'm surprised the Handbook doesn't go into a lot of detail on this, > since dual-boot systems are fairly common amongst cheapskates like me. > > If I can free up that 2Gb, maybe I'll have space for the docproj port... :) > -- > Rasputin > Jack of All Trades :: Master of Nuns > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-stable" in the body of the message -- "Brian, the man from babble-on" [EMAIL PROTECTED] Brian T. Schellenberger http://www.babbleon.org Support http://www.eff.org. Support decss defendents. Support http://www.programming-freedom.org. Boycott amazon.com. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-stable" in the body of the message
Disklabel 101?
Is there a decent walkthrough anywhere on the Net for using disklabel, fdisk , etc - along with an explanation of what a,c etc all mean? man disklabel etc all assume you know what those letters mean. I know c is the whole partition, but that's it. I need to know because: <-EXTENDED-><--PHYSICAL> ad0s1ad0s5ad0s6 ad0s3 <-winXX--><-msdos-><---BSD> | 2Gb| 1.5Gb | 2Gb | / | swap | /usr | /var | ^ | I have an old Slackware partition that has FUBARed itself so throuoghly that it can't even be mounted. (Actually there were about 3 partitions in there, but they're lost now) It's in the second logical partition in an extended DOS partition on my second physical partition (dev/ad0s6 in FreeBSD) There's a Gb of data in ad0s5 (which is fine). BSD dumps ad0s6 altogether when it boots; and fdisk from a boot CD says something along the lines of: "Second slice extended past end of disk" or similar (box is offline today, so I can't check right now) This concerns me; if I try to fdisk/newfs ad0s2 (assuming I could see it), I risk losing ad0s3, which is the only bit of the disk I really want to keep. I assume/hope that if I blow away the extended partition entirely, I can just recreate it. But I don't really know what it's called? Is it ad0s2? And won't I need to let BSD know where / has moved to? What I'd really like is some advice from anyone who knows this stuff. But I'm surprised the Handbook doesn't go into a lot of detail on this, since dual-boot systems are fairly common amongst cheapskates like me. If I can free up that 2Gb, maybe I'll have space for the docproj port... :) -- Rasputin Jack of All Trades :: Master of Nuns To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-stable" in the body of the message