Create Alpine Linux PV DomU: Difference between revisions

From Alpine Linux
(Created page with "To create an Alpine Linux PV DomU you will need a Dom0 and an Alpine Linux iso, here we will use the "mini" iso. The first step it to mount the image and extract the kernel and i...")
 
No edit summary
Line 34: Line 34:
# DomU settings
# DomU settings
memory = 128
memory = 128
name = alpine
name = "alpine"
vcpus = 1
vcpus = 1
</pre>
</pre>

Revision as of 06:57, 30 December 2011

To create an Alpine Linux PV DomU you will need a Dom0 and an Alpine Linux iso, here we will use the "mini" iso. The first step it to mount the image and extract the kernel and initramfs images:

# mkdir -p /mnt/alpine_iso
# mount -o loop /path/to/the/iso /mnt/alpine_iso
# cp /mnt/alpine_iso/boot/grsec /path/to/save/kernel/
# cp /mnt/alpine_iso/boot/grsec.gz /path/to/save/kernel/
# umount /mnt/alpine_iso
# rm -f /mnt/alpine_iso

Now we have the kernel at /path/to/save/kernel/grsec and the initramfs at /path/to/save/kernel/grsec.gz. Now we should create an empty file, that will be the hard drive of the DomU, you can also use a physical partition if you like (in this example we are using a 2GB disk):

# dd if=/dev/zero of=/path/to/disk.img bs=1M count=2000

The next step is to create a basic configuration file, so we can launch the DomU (save it where you like, although the most common place is /etc/xen/).

# Alpine Linux PV DomU

# Kernel paths for install
kernel = "/path/to/save/kernel/grsec"
ramdisk = "/path/to/save/kernel/grsec.gz"

# Path to HDD and iso file
disk = ['file:/path/to/disk.img,xvda,w']
disk = ['file:/path/to/the/iso,xvdc:cdrom,r']

# Network configuration
vif = ['bridge=br0']

# DomU settings
memory = 128
name = "alpine"
vcpus = 1

Now that we have all the necessary files, we can start the DomU to proceed with the install:

# xl create -c /path/to/conf