Re: Tool for generating a rootfs for foreign arch (aarch64 on x86_64, for example)?

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

 



On Thu, Jun 22, 2017 at 09:55:31AM -0400, Josh Boyer wrote:
> On Thu, Jun 22, 2017 at 9:33 AM, Neal Gompa <ngompa13@xxxxxxxxx> wrote:
> > The missing piece here is that I want to be able to construct a rootfs
> > or an image for an architecture that *isn't* the same as my host
> > machine.
> 
> For what purpose?

I don't know what Neal is up to, but some uses for a debootstrap-like
tool include:

* Creating chroots, eg. for confinement of daemons, or testing
  your code under different distros/versions.

* Installing the distribution.  Mount a new disk on /tmp/sysroot and
  run debootstrap /tmp/sysroot, then either unmount the disk and use
  it to boot a new machine, or run a VM on this disk, or pivot-root
  into the new distro.

* Building containers.

There are two subcases, the cross-architecture sub-case (host arch !=
chroot arch) and the non-root sub-case (run debootstrap as non-root).

The non-root sub-case is useful for testing, or any case where you
don't want to run stuff as root for security / integrity reasons.  The
difficult part is setting the right owner/mode on new files.

The cross-architecture sub-case is useful where you want to install
the distro as above, but for a different architecture.

The presence of RPM scripts makes this really hard to do in general.
Debootstrap concatenates all the applicable scripts into "init" script
which you're supposed to run on first boot in the new environment
(where presumably your CPU is able to run them).  I don't think this
is possible for RPM scripts which are more complex.

My opinion is that all RPM scripts should go away, to be replaced by
declarative metadata about what users/groups/services/etc are required
by the RPM, and it would be up to RPM to execute the right set of
commands to bring the system into line with the requirements of the
installed packages.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux