Run Arch Linux from a disk image! This initcpio module enables to use a file disk as a root filesystem.
- Arch Linux : this module is designed with Arch Linux boot process in mind, it may work with another distirbutions with little or no modifications.
- Root access : this module contains a custom hooks and some other files needed by mkinitcpio, and these locations is not accesible normally with non-root users.
filediskroot can enable to mount a rootfs inside a disk image, it looks for filediskrootblock
and filediskrootpath
kernel parameters and mount the disk/partition containing the rootfs disk image, and the rest of initrd scripts will take care of mounting the rootfs itself.
filediskroot is useful if you need to test an image containing arch without applying it to disk.
Sumply run make_package.sh
as root, then install the resulting package via pacman -U filediskroot.pkg.tar.xz
- Prepare arch root image via this page from Arch wiki (if you have disk image, you can skip this step)
- Mount the image
- chroot into the image
- Install the package as shown in (
Package Instalation
) section - Edit
/etc/mkinitcpio.conf
and add (looproot
) inside the hooks section - To use this module, you must include
looproot=/path/to/file[:partition number]
in your kernel parameters (with the leading slash). - Use
mkinitcpio -p linux
to recreate initcpio
- After instalation, you might see
filediskrootblock or filediskrootpath kernel parameters is not found or empty
if you didn't includefilediskrootblock
orfilediskrootpath
in your kernel parameters, this is not harmful. - Currently, Only a device path in dev is supported in
filediskrootblock
(You can set that to an UUID via /dev/disk/by-uuid/[UUID]). - Currently, you have to copy your boot files (kernel + initrd and the bootloader, if you dont have that already) from the boot drive before booting the image.
Author: Baselsayeh
Version: 1.0
Licence: GNU GPL v2