From owner-freebsd-questions@FreeBSD.ORG Sun Jun 8 09:38:56 2003 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 131BB37B401 for ; Sun, 8 Jun 2003 09:38:56 -0700 (PDT) Received: from adsl-64-161-78-226.dsl.lsan03.pacbell.net (adsl-64-161-78-226.dsl.lsan03.pacbell.net [64.161.78.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 584FD43F3F for ; Sun, 8 Jun 2003 09:38:55 -0700 (PDT) (envelope-from oremanj@adsl-64-161-78-226.dsl.lsan03.pacbell.net) Received: (qmail 78833 invoked by uid 1001); 8 Jun 2003 16:40:36 -0000 Date: Sun, 8 Jun 2003 09:40:36 -0700 From: Joshua Oreman To: "leon j. breedt" Message-ID: <20030608164036.GB78775@webserver.get-linux.org> References: <20030608125911.GA37790@shell.spyder.web.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030608125911.GA37790@shell.spyder.web.za> User-Agent: Mutt/1.4.1i cc: questions@freebsd.org Subject: Re: GRUB 0.92 on FreeBSD 5.x 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: Sun, 08 Jun 2003 16:38:56 -0000 On Sun, Jun 08, 2003 at 01:59:11PM +0100 or thereabouts, leon j. breedt seemed to write: > hi, > > is it a new feature of 5.x disallowing direct writes to the device nodes > /dev/ad*? > > getting weird behaviour trying to use the GRUB 0.92 port on all versions > of 5.x i've used so far (currently on 5.1-RELEASE). > > the problem being that i can't see any disks in the 'grub' shell. the > 'device' command works, and then a subsequent command like 'root' still > fails with "No such disk". > > i've tracked down the problem to a call in the GRUB source where its > trying to open(2) the device node /dev/ad0 with O_RDWR which fails with > EPERM, which causes GRUB to delete the drive from its device map without > any warning, just silent failure. > > i am running the 'grub' executable as root though. > > when i patch that section of the source file (asmstub.c, function > get_diskinfo()) to accept EPERM and only open in read-only mode, > suddenly i can see my drives. but obviously anything wanting to modify > the drive, like 'setup', fails. > > is my only recourse to install GRUB from floppy when using it from > FreeBSD? I think so. GEOM makes it impossible to write to disks that are currently "in use". Best bet is to boot from a floppy. -- Josh > > please cc me on replies, i'm not subscribed to -questions. > > thanks > leon > _______________________________________________ > 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"