Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to build a JuNest image using QEMU

Filippo Squillace edited this pageJul 19, 2015 ·2 revisions

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 theArchLinux 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 theArchLinux website
    • It is suggested to create just one partition /dev/sda1 on DOS partition table:
cfdisk /dev/sdamkfs.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 havegedsystemctl start havegedsystemctl enable haveged
  • Install package-query from AUR
#as usermkdir package-query && cd package-querywget https://aur.archlinux.org/packages/pa/package-query/PKGBUILDmakepkg -fsc#as rootpacman -U package-query.*.xz

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-i686mount -o loop,offset=OFFSET archlinux-i686.img /mnt/archlinux-i686
Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp