Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] QEMU on a partition
Date: Fri, 02 Mar 2018 15:00:16
Message-Id: 4515057.t7Q5UCHQmi@dell_xps
In Reply to: Re: [gentoo-user] QEMU on a partition by Peter Humphrey
1 On Friday, 2 March 2018 11:34:09 GMT Peter Humphrey wrote:
2 > On Friday, 2 March 2018 11:12:36 GMT Helmut Jarausch wrote:
3 > > Hi,
4 > >
5 > > I'd like to install a second Gentoo system on a partition by running
6 > > QEMU using that partition (directly) - this is to create and update a
7 > > Gentoo
8 > > system with different CFLAGS (for an older machine).
9
10 The QEMU guest's complete filesystem is contained within a *virtual* disk
11 image. As far as the host OS is concerned, the guest's disk with all
12 partitions on it, is a file. You can store this image file wherever you want
13 and map the QEMU on the host to launch it.
14
15
16 > > Having no experience in such setups my initial problem is how to
17 > > install grub2 on that partition (only). I don't want to modify the MBR
18 > > of the whole drive containing that partition.
19
20 You do not install the guest's GRUB or any other boot loader on the host's
21 partition. You install it within the virtual disk after you have launched the
22 guest having attached a LiveCD to it, using QEMU.
23
24
25 > I do the same for my Atom machine by NFS-exporting its /usr/portage to a
26 > chroot on my main machine. The question of booting doesn't arise; all that's
27 > needed is a copy of /etc/portage* and the world file. If that sounds
28 > interesting I can show you some more detail.
29 >
30 > * Things like -march and --jobs differ to suit the host machine, but that's
31 > about all.
32
33 As noted above you'll need to set up CFLAGS in the guest's make.conf file to
34 suit the *guest* platform and its CPU. Setting up "-march=native" won't work
35 here.
36
37 --
38 Regards,
39 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] QEMU on a partition R0b0t1 <r030t1@×××××.com>