From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Craven Subject: Re: How does install-grub work? Date: Mon, 29 Aug 2016 22:54:27 +0200 Message-ID: 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=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beTZk-00045s-QV for guix-devel@gnu.org; Mon, 29 Aug 2016 16:54:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beTZg-0001J3-Kh for guix-devel@gnu.org; Mon, 29 Aug 2016 16:54:35 -0400 Received: from mail-yw0-x232.google.com ([2607:f8b0:4002:c05::232]:34009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beTZf-0001IM-Ba for guix-devel@gnu.org; Mon, 29 Aug 2016 16:54:32 -0400 Received: by mail-yw0-x232.google.com with SMTP id z8so93722359ywa.1 for ; Mon, 29 Aug 2016 13:54:28 -0700 (PDT) In-Reply-To: <20160829225056.240c8d0e@scratchpost.org> 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: Danny Milosavljevic Cc: guix-devel >>So for booting a vm we don't actually need a boot loader, since it passes the kernel image through the -kernel flag. > > Huh, that appears to be the case. Back when I used VMs the first time they simulated the entire PC, BIOS and all and there you would need the partition table, bootloader etc just as you would on a real PC. But it seems to have changed now... Does the u-boot bootloader routine have to do anything other than generating the extlinux.conf file? That would be enough so that there is an alternative to grub-install for the qemu use case and for actual boards, isn't uboot usually written to flash instead of to a MBR? > Yes, I wrote it. It makes sure it's safe to write to an unclaimed fixed-position section of a drive and then writes to it. > > Essentially it does > > $ dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8 > ^^^ ^^^ > depends on board depends on board > > but only after making sure that this doesn't clobber anything (payload data on parititons, the partition table etcetc). > > It's supposed to be analogous to grub-install, just for u-boot. Nice!