mirror of
https://github.com/fsquillace/junest.git
synced 2026-08-10 13:54:50 +00:00
Page:
How to build a JuNest image using QEMU
Pages
Automatic fallback to Junest for not found commands in the native Linux system
Configure Nvidia GPU drivers for use with PyTorch and CUDA
Create a Jupyter notebook in JuNest
Home
How to build a JuNest image using QEMU
How to create desktop launchers on programs installed in JuNest
How to install Tomighty in JuNest
How to run JuNest as a container
How to run services using Systemd
How to use JuNest within Travis CI
Linux distros with user namespace enabled by default
Pass audio through to Pulseaudio in host OS
No results
2
How to build a JuNest image using QEMU
Filippo Squillace edited this page 2015-07-19 23:12:09 +00:00
First steps
This tutorial show how to create a JuNest image for x86 inside QEMU. Of course, for images of different architecture (i.e. x86_64, arm, etc) the procedure would be the same.
You first need to create an empty image:
qemu-img create archlinux-i686.img 8G
Install ArchLinux
- You need first to download the ArchLinux image.
- Run QEMU for i386 architecture:
qemu-system-i386 -hda archlinux-i686.img -boot d -cdrom ../archlinux-2014
.12.01-dual.iso -m 1024
- Follow the procedure from the ArchLinux website
- It is suggested to create just one partition /dev/sda1 on DOS partition table:
cfdisk /dev/sda
mkfs.ext4 /dev/sda1
Install JuNest and needed dependencies for the building
- Configure the ArchLinux in order to install internet with netctl
- JuNest image needs some packages to be already available inside ArchLinux:
pacman -S git base-devel arch-install-scripts
- (Optional) Install haveged in order to generate entropy. This is useful when you need to create the keyring for pacman:
pacman -Syu haveged
systemctl start haveged
systemctl enable haveged
- Install package-query from AUR
#as user
mkdir package-query && cd package-query
wget https://aur.archlinux.org/packages/pa/package-query/PKGBUILD
makepkg -fsc
#as root
pacman -U package-query.*.xz
- Install JuNest
Build JuNest image
Before building the image it is better to update the OS first:
pacman -Syu
Use JUNEST_TEMPDIR if you want to place the building directory on a partition with more space (default is /tmp)
JUNEST_TEMPDIR=/tmp/ junest -b
Retrieve the JuNest image
- fdisk gives the start and end offsets in 512-byte sectors, so multiply by 512 to get the correct offset to pass to mount:
fdisk -l archlinux-i686.img
- Mount the QEMU image to extract the JuNest tar.gz file:
mkdir /mnt/archlinux-i686
mount -o loop,offset=OFFSET archlinux-i686.img /mnt/archlinux-i686