[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] installing a boot loader into the disk images

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
User-agent: KMail/1.6.2

> 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 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]