From owner-freebsd-questions@FreeBSD.ORG Mon Apr 25 15:49:46 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D097D16A4CE for ; Mon, 25 Apr 2005 15:49:46 +0000 (GMT) Received: from jbhosting.de (mail.jbhosting.de [80.190.201.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 968F843D5D for ; Mon, 25 Apr 2005 15:49:45 +0000 (GMT) (envelope-from jonas@schiebtsich.net) Received: (qmail 80876 invoked by uid 545); 25 Apr 2005 15:49:43 -0000 Received: from unknown (HELO sc-ws3.setcom.de) (jonsonn@jbhosting.de@213.155.74.230) by mx010.jbhosting.de with (RC4-MD5 encrypted) SMTP; 25 Apr 2005 15:49:43 -0000 From: jonas Organization: schiebtsich.net To: freebsd-questions@freebsd.org Date: Mon, 25 Apr 2005 17:49:04 +0200 User-Agent: KMail/1.7.2 References: <200504221904.06602.jonas@schiebtsich.net> In-Reply-To: <200504221904.06602.jonas@schiebtsich.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504251749.05046.jonas@schiebtsich.net> Subject: Re: how to mark a slice bootable using command line X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2005 15:49:46 -0000 I'm still stuck with this.. C'mon folks, there must be someone who knows how to do sysinstalls 'Set Bootable' command using command line. It all comes down to: I got four slices containing a FreeBSD installation. I can only boot the first. Hitting F2, F3 or F4 in the bootmanager gives me a beep, nothing more. If I run sysinstall, choose Configure, Fdisk, da0, hit the 'S' key (Set Bootable) once for every slice and write those "Changes" I can boot into any of those installations. Now I have read the man pages for fdisk and bsdlabel a couple of times, still I cannot figure out how to set this bootable flag using those tools (not that I didn't try all kinds of things like writing bootstrap code, setting active partitions, etc...). There must be a way to do this without sysinstall!? Sadly my knowledge in C is more than limited... I can see that sysinstall does 'chunk_info[current_chunk]->flags |= CHUNK_ACTIVE;' when I hit the S key but that's about it. Any pointer would be very much appreciated. Thanks in advance, first mail follows, On Friday 22 April 2005 19:04, jonas wrote: > Hi again questions list, > > I'm running into trouble installing a FreeBSD system from script using a > custom FreeSBIE (sysutils/freesbie). > > I'm using > `fdisk -f configfile /dev/da0` > to partition my da0 disk into four even-sized slices, > `boot0cfg -B /dev/da0` > to install the bootmanager to da0, > `disklabel -R /dev/da0s$c protofile` > to create partitions (which is called four times with $c being 1-4), > `newfs -O2 -U /dev/da0s$c$p` > to create filesystems (where $p is a, d and e - /tmp will be a memory disk, > there is no -U for a) > and finally untar the OS onto the new filesystems. > > Everything goes fine, except, I cannot boot from any slice other then the > first (F1 entry in bootman). Any other choice will simply have the speaker > beep. Obviously the slices are not marked bootable. > > Now if I launch sysinstall and choose Configure, Fdisk, da0, I can set the > bootable flag to those four slices. Obviously, in sysinstall this is > somehow linked to being the active slice, since it shows an 'A' next to the > slice and only one A can be set at a time. > > So I tried to use `fdisk -a -2` to setting slice 2 bootable, without > success. Also tried to set the slice bootable by using the -B switch to > disklabel, also, without success. > > Furthermore I cannot figure out any difference to the output of fdisk and > disklabel after using sysinstall, other than my slice of choice if now > bootable. > > So... how can I set this bootable flag by using command line tools like > fdisk and disklabel without the need of user input. Sadly the handbook > refers only to sysinstall... > > Thanks in advance for any pointers, -- br. j.