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 22:50:56 +0200 Message-ID: <20160829225056.240c8d0e@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> 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]:34181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beTWQ-00033F-Vh for guix-devel@gnu.org; Mon, 29 Aug 2016 16:51:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beTWM-0000Pi-QP for guix-devel@gnu.org; Mon, 29 Aug 2016 16:51:09 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:48644) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beTWM-0000PH-Jm for guix-devel@gnu.org; Mon, 29 Aug 2016 16:51:06 -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:29:40 +0200 David Craven wrote: >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... > @Danny: Did you write install-uboot.c? I don't have a clue what it's > doing =P 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.