From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 21 15:45:41 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EEABA16A41F for ; Wed, 21 Dec 2005 15:45:40 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CF7E43D5F for ; Wed, 21 Dec 2005 15:45:40 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 4293834 for multiple; Wed, 21 Dec 2005 10:47:17 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id jBLFjcIe014980; Wed, 21 Dec 2005 10:45:38 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 21 Dec 2005 10:46:13 -0500 User-Agent: KMail/1.8.2 References: <43A8DD54.4000701@gmail.com> In-Reply-To: <43A8DD54.4000701@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512211046.14217.jhb@freebsd.org> X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: Tony Subject: Re: Problem booting FreeBSD from cboot FreeBSD from cdrom using grubdrom using grub X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2005 15:45:41 -0000 On Tuesday 20 December 2005 11:43 pm, Tony wrote: > Hi, > I'm trying to make an iso image that will boot FreeBSD using GRUB boot > loader. > Grub will boot /boot/loader and the loader will boot /boot/kernel. It > goes well on my disk, but when I try to make a livecd, it fails. I spend > some time figuring out that /boot/loader does not probe cd it self, it > depends on boot2 to tell him which cd to boot from. So I did some hack > on /boot/loader. Why do you need to use GRUB? The current cdboot + /boot/loader stuff works as is. boot2 doesn't actually pass the special CD flag, cdboot does. The patch below is not quite acceptable for the tree as there are non-CD cases where you could get that error. If you ahve a way to patch GRUB to set the CD flag in the bootinfo struct when it boots from CD that would be ideal. > Bellow is the diff: > *** sys/boot/i386/loader/main.c.bak Sun Dec 11 19:32:29 2005 > --- sys/boot/i386/loader/main.c Sun Dec 11 22:04:29 2005 > *************** > *** 228,235 **** > if ((new_currdev.d_type == biosdisk.dv_type) && > ((new_currdev.d_kind.biosdisk.unit = bd_bios2unit(biosdev)) == > -1)) { > printf("Can't work out which disk we are booting from.\n" > ! "Guessed BIOS device 0x%x not found by probes, defaulting > to disk0:\n", biosdev); > ! new_currdev.d_kind.biosdisk.unit = 0; > } > env_setenv("currdev", EV_VOLATILE, i386_fmtdev(&new_currdev), > i386_setcurrdev, env_nounset); > --- 228,238 ---- > if ((new_currdev.d_type == biosdisk.dv_type) && > ((new_currdev.d_kind.biosdisk.unit = bd_bios2unit(biosdev)) == > -1)) { > printf("Can't work out which disk we are booting from.\n" > ! "Guessed BIOS device 0x%x not found by probes, defaulting > to cd0(%d):\n", biosdev, biosdev); > ! bc_add(biosdev); > ! new_currdev.d_type = bioscd.dv_type; > ! new_currdev.d_dev = &bioscd; > ! new_currdev.d_kind.bioscd.unit = bc_bios2unit(biosdev); > } > env_setenv("currdev", EV_VOLATILE, i386_fmtdev(&new_currdev), > i386_setcurrdev, env_nounset); > > Then the kernel starts, but when the kernel try to mount the root fs, it > stops. I have the follow line in my /etc/fstab > /dev/acd0c / cd9660 ro 0 0 > > I am stranded. Can anyone help? I'm using FreeBSD 5.4 > > thanks > Tony > > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org