Date: Sun, 22 Apr 2007 10:07:54 -0400 From: Jerry McAllister <jerrymc@msu.edu> To: "illoai@gmail.com" <illoai@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: bsdlabel editing to create a single partition Message-ID: <20070422140753.GA78978@gizmo.acns.msu.edu> In-Reply-To: <d7195cff0704211958v3f11eb48y90e5c4db35ff37e@mail.gmail.com> References: <907596.95892.qm@web58113.mail.re3.yahoo.com> <d7195cff0704211958v3f11eb48y90e5c4db35ff37e@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Apr 21, 2007 at 09:58:11PM -0500, illoai@gmail.com wrote: > On 21/04/07, L Goodwin <xrayv19@yahoo.com> wrote: > >I want to dedicate the entire disk to a single FreeBSD partition > >("da1s1a"), and > > am a little confused about editing partitions via "bsdlabel -e > > <slicename>". > > > >Prior to editing, it looks like this: > >---------------------------------------------------------------------------------------- > ># /dev/da1s1: > >8 partitions: > ># size offset fstype [fsize bsize bps/cpg] > >a: 17908300 16 unused 0 0 > >c: 17908316 0 unused 0 0 # "raw" part, don't edit > >---------------------------------------------------------------------------------------- > > > >I gather that I should change the following field values for "c:": > > fstype: 4.2BSD > > fsize: 2048 > > bsize: 16384 > > > >Questions: > >1) Do I change the "size" value for "a:" or leave at current size? > > NO > > > 2) Do I leave the "c:" line alone (in place) and if YES does > >its "size" and "offset" values need to be edited? > > Leave it alone. > > > > >If someone could show me what it should look like when done, I'd > >appreciate it. > > > >When I leave the "c:" entry in place, I get /dev/da1s1a and /dev/da1s1c in > >/dev/. > >Should I delete the "c:" entry? Here's what I have now: > >---------------------------------------------------------------------------------------- > > # /dev/da1s1: > > 8 partitions: > > # size offset fstype [fsize bsize bps/cpg] > > a: 17908300 16 4.2BSD 2048 16384 > > c: 17908316 0 unused 0 0 # "raw" part, don't > > edit > > ---------------------------------------------------------------------------------------- > > > > Don't edit the bsdlabel at all, just: > # newfs -U /dev/da1s1a > and it will automatically fill out the fsize, bsize, and bps/cpg > fields. You can then add a line to fstab, mount it, fill it with > text files containing the word "corn" ever and over. Almost, but not quite right, if I understand what is being said. You do want to do a bsdlabel and some minor editing as indicated below. First, did you do an 'fdisk -I da1' or 'fdisk -IB da1' if you want it bootable. The presence of the 16 in the offset field of the a: line makes me think that you did not. So, do the fdisk. (If you do not do the fdisk, then the bsdlabel must be done to da1 and not da1s1 plus the newfs would be 'newfs /dev/da1a and not /dev/da1s1a which will make it one of those "dangerously dedicated" disks, which I don't recommend) > > c: should nearly never be touched, and definitely never in > the course of simply setting up a disk for use. That is true. Do not change anything on the c: line. In your case you might want to dup that c: line and then change it to an a: line, change the type to BSD4.2 and put in the fsize, bsize and bps/cpg, though I think the system plugs in reasonable values if you don't put anything for them. If you intend to make the file system use all the space, then make the offset on that a: partition be '0' and the size be the same as the full size in the c: line. On the other hand you could just put '*' in the size and offset fields for the a: line. Then it will make the one partition that covers all the usable space. Then, when you get that bsdlabel -e done, you go ahead and do the newfs. newfs /dev/da1s1a NOTE, if you want to make the partition bootable, then after doing the fdisk -IB da1 you must do bsdlabel -w -B da1s1 before doing the bsdlabel -e da1s1. So, the order is: fdisk -I da1 or fdisk -IB da1 for a bootable slice bsdlabel -w da1s1 or bsdlabel -w -B da1s1 for bootable partition bsdlabel -e da1s1 newfs /dev/da1s1a ////jerry > > -- > -- > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070422140753.GA78978>