From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: How does install-grub work? Date: Mon, 29 Aug 2016 23:45:46 +0200 Message-ID: <20160829234546.6fc60417@scratchpost.org> References: <20160822132018.19828-1-david@craven.ch> <20160822132018.19828-6-david@craven.ch> <20160827104228.5db67f6a@scratchpost.org> <20160829123149.0e260af6@scratchpost.org> <20160829161919.5277eb35@scratchpost.org> <20160829201656.4390d2db@scratchpost.org> <20160829205734.0b49dc92@scratchpost.org> <20160829225056.240c8d0e@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beUNS-0006OI-Qg for guix-devel@gnu.org; Mon, 29 Aug 2016 17:45:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beUNO-0002lm-NE for guix-devel@gnu.org; Mon, 29 Aug 2016 17:45:57 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:51805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beUNO-0002kw-Ft for guix-devel@gnu.org; Mon, 29 Aug 2016 17:45:54 -0400 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: David Craven Cc: guix-devel On Mon, 29 Aug 2016 22:54:27 +0200 David Craven wrote: > for actual boards, isn't uboot usually written to flash instead of to a MBR? That depends on the board - sometimes it's written to flash. For Allwinner hardware, it's written to a fixed section (fixed sectors) on either a SD card or NAND flash or eMMC. It's not in the MBR but after it and before the first partition. Many pieces of hardware have U-Boot as something like a BIOS - it's not meant to be updated. And if you do want to update it, you go to the U-Boot prompt and update it from within itself. I think that's why the extlinux.conf exists in the first place - you just put it somewhere where the [potentially immutable forever] U-Boot can find it and it will pick it up (at least when the partition is marked Active). Interestingly enough, the situation is similar with Libreboot and its integrated Grub. That's why I added comment in the source code that asks whether it makes sense to seperate the config storing part from the bootloader installation part - the latter can be unnecessary while the former can be very necessary at the same time.