Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lideming/arch-ntfs-img-boot
Booting Arch Linux from an image file in NTFS
https://github.com/lideming/arch-ntfs-img-boot
archlinux initcpio mkinitcpio
Last synced: 4 days ago
JSON representation
Booting Arch Linux from an image file in NTFS
- Host: GitHub
- URL: https://github.com/lideming/arch-ntfs-img-boot
- Owner: lideming
- Created: 2023-01-14T11:25:38.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-14T14:08:37.000Z (almost 2 years ago)
- Last Synced: 2024-11-08T06:06:19.639Z (about 2 months ago)
- Topics: archlinux, initcpio, mkinitcpio
- Language: Shell
- Homepage:
- Size: 1000 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# arch-ntfs-img-boot
This repo provides two initcpio hooks (`mountntfs`, `loopfile`) for booting Arch Linux from an image file in NTFS filesystem.
## Usage
1. Prepare for a working Arch Linux OS root in an image file.
1. It is mounted by `losetup /dev/loop0 arch.img && mount /dev/loop0 /mnt`
1. `/boot` should be in a partition outside the image file. Otherwise, the GRUB bootloader may fail to find it. (TODO: use GRUB loopback to support `/boot` in file)1. (Chroot to the OS in file)
1. Copy the files in `initcpio` into `/etc/initcpio/`.
1. Add initcpio hooks `mountntfs` `loopfile`.
1. Edit `/etc/mkinitcpio.conf`, in `HOOKS`, add `mountntfs loopfile` after `block`.
1. Rebuild initcpio (`mkinitcpio -P`).1. Add kernel cmdline parameters.
1. (GRUB bootloader for example)
1. Edit `/etc/default/grub`
1. Add `mountntfs=:/ntfs loopfile=/ntfs/arch.img` in cmdline.
(This mounts `` and maps the `arch.img` file as `/dev/loop0`.)
1. Run `grub-mkconfig -o /boot/grub/grub.cfg`