From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C67qS-0007US-Uy for qemu-devel@nongnu.org; Sat, 11 Sep 2004 09:23:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C67qR-0007Tu-3n for qemu-devel@nongnu.org; Sat, 11 Sep 2004 09:23:12 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C67qQ-0007Tk-W2 for qemu-devel@nongnu.org; Sat, 11 Sep 2004 09:23:11 -0400 Received: from [131.111.8.138] (helo=ppsw-8.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C67kx-0006D5-1v for qemu-devel@nongnu.org; Sat, 11 Sep 2004 09:17:31 -0400 From: "Mark A. Williamson" Subject: Re: [Qemu-devel] installing a boot loader into the disk images Date: Sat, 11 Sep 2004 14:18:14 +0100 References: <200409111456.42032.elcuco@kdemail.net> In-Reply-To: <200409111456.42032.elcuco@kdemail.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-8-i" Content-Transfer-Encoding: 7bit Message-Id: <200409111418.14548.mark.williamson@cl.cam.ac.uk> Sender: maw48@hermes.cam.ac.uk Reply-To: mark.williamson@cl.cam.ac.uk, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org > I am sorry if this if offtopic here, if it is, please point me to the > correct location. (did not find a qemu-users list or something). I think the consensus is that the users list has some problems at the moment. > I found some nice utilities to make a HD image from a a dir, and another > one for mounting the image on the host, however they are not enough. I need > a way to partition the HD image, and decide which partition will be (ext3 > or swap for example), and most importat: I need to install from the host a > boot loader on the HD image. > > The last one is really tricky since last time I tried, lilo did not want to > use a file, but it insisted on a real device. I did not try grub yet. I assume you're on a linux host: if it's just a raw HD image, use the losetup command to bind the image file to a loop block device (e.g. /dev/loop0), then install grub / lilo on that. The loop block device is handy becuase it allows you to make a file appear as a block device to the rest of the OS. Unfortunately, it does not support partitions within the "file" device. There are patches available on the internet which if applied to your host kernel may enable this... An alternative approach would be to get a working Linux install in QEmu, with two virtual hard drives - one containing the stock Linux distro, one containing your own. Then use the stock distro in QEmu to prepare the other disk... HTH, Mark