Date: Wed, 3 Feb 2010 13:25:27 -0500 From: Jerry McAllister <jerrymc@msu.edu> To: Steve Franks <bahamasfranks@gmail.com> Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: can't make an 'a' slice except with auto-defaults Message-ID: <20100203182526.GA15860@gizmo.acns.msu.edu> In-Reply-To: <20100203183722.06ead46a.freebsd@edvax.de> References: <539c60b91002021859h6761ef1fk244d69000e089c65@mail.gmail.com> <20100203151808.GC15086@gizmo.acns.msu.edu> <539c60b91002030926r28d67355u3930058b9fc759d7@mail.gmail.com> <20100203183722.06ead46a.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 03, 2010 at 06:37:22PM +0100, Polytropon wrote: > On Wed, 3 Feb 2010 10:26:06 -0700, Steve Franks <bahamasfranks@gmail.com> wrote: > > I'm just trying > > to make a fresh disk ready for dump/restore with a 1G /, so I guess > > sysinstall is out as an option at this time. > > Why so complicated? The command > > # newfs /dev/ad1 > > will prepare the disk, assuming ad1 is the new disk. It > will create one single partition covering the whole disk, > with no slice. You can then run > > # mount /dev/ad1 /mnt > > to access it; /dev/ad1 is the same as /dev/ad1c, "the > whole disk". This gets you what is referred to as a "dangerously dedicated" disk in the documentation. If you are doing nothing unusual with other OSen, then it works fine. But, it is also not at all hard to use fdisk and bsdlabel to create the full slice+partition. Here is the basic routine. dd if=/dev/zero of=/dev/ad1 bs=512 count=1024 fdisk -BI ad1 dd if=/dev/zero of=/dev/ad1s1 bs=512 count=1024 bsdlabel -w -B ad1s1 bsdlabel -e ad1s1 The second bsdlabel command puts you in to an edit session. Edit the partition table to something like this, then save[write] and exit. (Just those two lines for a single partition disk) # /dev/ad1s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: 89867610 0 unused 0 0 # "raw" part, don't edit h: * 0 4.2BSD 2048 16384 8 You can use any partition identifier except 'c', but I like to reserve 'a' for bootable root (/) and 'b' for swap to reduce the confusion in my head. If the disk will not be bootable take out the 'B' from each of the fdisk and bsdlabel commands. You probably do not need the two dd-s, but sometimes they are needed if the system cannot read the sector 0 on the disk for some reason. Finally, when that is done, do: newfs /dev/ad1s1d Make yourself a mount point and mount the new disk. mkdir /bigwork mount /dev/ad1s1d /bigwork Edit /etc/fstab so it will mount automatically. It is not weird or mysterious, though I admit the man pages for both fdisk and bsdlabel could stand a going through. They do not follow the conventions of most man pages in the way they describe the switches and parameters. Fortunately they have lots of examples (but could use even more). ////jerry > > By the way, have you tried the program > > # sade > > instead of sysinstall? > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... > _______________________________________________ > 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?20100203182526.GA15860>