Whonix / Gentoo-Port

3 stars 0 forks source link

tool for creation of base VM images? #1

Open adrelanos opened 10 years ago

adrelanos commented 10 years ago

To create a Gentoo based VM base image, a tool to create bootable* base VM images is required. One that can be used by cmd line only, so the build process can be fully automated.

Similar to:

(Those tools are for Debian - we need an equivalent for Gentoo - or port one to Gentoo - or invent one for Gentoo.)

@martincmelik any idea?

Otherwise I'll use search engines and ask in the usual Gentoo support channels.

martinholovsky commented 10 years ago

Hi,

difficult but doable. Please take on mind that Gentoo cant be just packed, but has to be compiled with hardened gcc options and CPU capabilities.

If you can describe more what exactly you expect I can measure how long will take development.

Thank you

adrelanos commented 10 years ago

Something like this...

grml-debootstrap \
--filesystem ext4 \
--hostname host \
--password changeme \
--vmsize 100GB \
--target /path/to/raw/image

Creating a raw image. All file downloads verified. Grub bootable image. Bootable linux kernel. Including a minimal system with core utilities (such as emerge).

It doesn't have to be super configurable in the beginning. Just support for ext4 is okay if that suits purposes for Whonix Gentoo Port, what I think. If others want other file system options, they can send pull requests.

That's it. Other stuff, such as installing extra packages can be done by other tools. (Just mount, chroot, emerge, unchroot, unmount.)

Is this sufficient information?

adrelanos commented 9 years ago

Talked to @martincmelik. We concluded that his would be very useful for development, debugging purposed, continued rebuilds, testing and so forth.

However, as first implementation of the Whonix Hardened Gentoo port we can just run the existing build script (https://github.com/martincmelik/securix) from a Gentoo Live DVD.

adrelanos commented 9 years ago

Talked to @martincmelik again. We concluded, that for creating non-physically isolated Whonix, i.e. for creating VirtualBox .ova's or KVM .qcow2's the build process and build instructions would be much simpler, if such a tool existed.

Without such as tool, as per current "rough build plan" (https://github.com/Whonix/Gentoo-Port/issues/15), for building VM images, users would have to build inside a virtual machine, then shut down the VM, and on the host use some script to modify the VM settings. (I.e. setting up Whonix network settings, and more. Script is needed, because many settings are not reachable through VirtualBox's graphical user interface.)

adrelanos commented 9 years ago

Is there a Gentoo raw / Virtual Machine Image Creation Tool?: https://forums.gentoo.org/viewtopic-p-7680860.html

adrelanos commented 9 years ago

Is there a Gentoo raw / Virtual Machine Image Creation Tool?: https://forums.gentoo.org/viewtopic-p-7680860.html

Got some answers. No tool recommendations yet. However, according to advice posted by szatox and NeddySeagoon, creating a bootable VM image is relatively simple.

(@hartwork could also be interested in this.)

hartwork commented 9 years ago

On "relatively simple" my understanding is that doing steps manually is not too hard, but writing automation from scratch needs about as much work as coding a new grml-debootstrap.

memorylost731 commented 9 years ago

Having a step by step procedure might be the solution. Automation is not a necessity at the beginning.

ghost commented 8 years ago

There is the Gentoo Reference System see http://releases.freeharbor.net/

I was able to get automated gentoo builds working with packer and vagrant earlier this year. Right now though I would probably suggest using vagrant with ansible provisioning for ease of development.