From owner-freebsd-questions@FreeBSD.ORG Tue Apr 10 22:26:30 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4B3B316A405 for ; Tue, 10 Apr 2007 22:26:30 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id 0DB5B13C483 for ; Tue, 10 Apr 2007 22:26:29 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id l3AMOiDM017302; Tue, 10 Apr 2007 18:24:44 -0400 (EDT) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id l3AMOhGS017299; Tue, 10 Apr 2007 18:24:43 -0400 (EDT) (envelope-from jerrymc) Date: Tue, 10 Apr 2007 18:24:28 -0400 From: Jerry McAllister To: fbsd bsd Message-ID: <20070410222428.GA17204@gizmo.acns.msu.edu> References: <427980.59792.qm@web63515.mail.re1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <427980.59792.qm@web63515.mail.re1.yahoo.com> User-Agent: Mutt/1.4.2.2i Cc: freebsd-questions@freebsd.org Subject: Re: disklabel error in 4.11 release X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Apr 2007 22:26:30 -0000 On Tue, Apr 10, 2007 at 01:21:18PM -0700, fbsd bsd wrote: > Hey *, having a bit of a problem with disklabel. A bit of background. > > I'm building a lab with Olive boxes in it (http://juniper.cluepon.net/index.php/Olive), which are basically i386 machines running JunOS. Please note that this whole procedure is entirely unsupported by Juniper and I would never *ever* recommend anyone run production traffic on an Olive box. At any rate, it requires a base install of FBSD 4.11, which you then do a pkg_add of their software over. > > The problem I'm having is that the package add fails every time. I personally have no experience with disklabel so it took me a bit to track down, but it seems like the raw device is not allowing anything to edit the first sectors. Keep in mind that an Olive install effectively turns your BSD box into a Juniper box, so the boot procedure will be different, which is why I'm leaning toward this. Also, this is the output of disklabel querying the kernel, then the device. > > > olive1# disklabel ad4 > # /dev/ad4: > type: unknown > disk: amnesiac > label: fictitious > flags: > bytes/sector: 512 > sectors/track: 63 > tracks/cylinder: 255 > sectors/cylinder: 16065 > cylinders: 9726 > sectors/unit: 156250000 > rpm: 3600 > interleave: 1 > trackskew: 0 > cylinderskew: 0 > headswitch: 0 # milliseconds > track-to-track seek: 0 # milliseconds > drivedata: 0 > > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > c: 156250000 0 unused 0 0 # (Cyl. 0 - 9726*) > olive1# > olive1# > olive1# > olive1# > olive1# > olive1# > olive1# disklabel -r ad4 > disklabel: bad pack magic number (label is damaged, or pack is unlabeled) > olive1# > > > Attempts to use disklabel -e to edit the device label end in: > :q > disklabel: Operation not supported by device > re-edit the label? [y]: n > olive1# I don't know ab out the pkg_add below but that seems to be a later problem anyway. First comes disklabel issues. Three things to consider: Do you really have a drive 'ad4'? that would be the 5th ide type drive on the machine. If not, then you need to straighten out your drive designators. If you do have an ad4 (see dmesg to check), then you are attempting what they call a 'dangerously dedicated' drive by putting on a label without creating slices and putting the label in there. Maybe that is what is expected if this system you are trying to install mucks with the boot sector. But, it could also indicate you are not quite doing what you want. Be sure about what you are doing. What drive/slice/partition are you booted to? If it is to ad4 then the system probably will not allow you (or pkg_add) to write to that disk slice table or partition table - which, by the way, must be done as root. > > Finally, here is the failure of the pkg_add: > olive1# pkg_add jinstall-7.2R4.2-domestic-signed.tgz > Verified SHA1 checksum of jinstall-7.2R4.2-domestic.tgz > Adding jinstall... I don't see anywhere that you are saying where to install this stuff so I assume it is on the drive that you are running from. In that case, is it trying to write to a drive slice table or boot block that you are running from? As above, that isn't allowed. Anyway, as is probably obvious, I am not familiar with this piece of software you are trying to install so I don't know just what to expect from it. One more thing to ask: Is it really necessary to try to install it in such an old version of FreeBSD? Will it not work in FreeBSD 6.2? That would be better if it can be done. ////jerry > sysctl: unknown oid 'hw.re.model' > disklabel: bad pack magic number (label is damaged, or pack is unlabeled) > > WARNING: This package will load JUNOS 7.2R4.2 software. > WARNING: It will save JUNOS configuration files, and SSH keys > WARNING: (if configured), but erase all other files and information > WARNING: stored on this machine. It will attempt to preserve dumps > WARNING: and log files, but this can not be guaranteed. This is the > WARNING: pre-installation stage and all the software is loaded when > WARNING: you reboot the system. > > Saving the config files ... > Installing the bootstrap installer ... > disklabel: bad pack magic number (label is damaged, or pack is unlabeled) > > WARNING: Failed while trying to install bootstrap loaders > > Deleting bootstrap installer ... > disklabel: bad pack magic number (label is damaged, or pack is unlabeled) > > WARNING: This installation attempt will be aborted. > WARNING: If you wish to force the installation despite these warnings > WARNING: you may use the 'force' option on the command line. > pkg_add: install script returned error status > pkg_add: install script returned error status > olive1# > > > If anyone has any tips I'd appreciate it. > > > > --------------------------------- > Be a PS3 game guru. > Get your game face on with the latest PS3 news and previews at Yahoo! Games. > _______________________________________________ > 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" >