Once upon a time, my computer was broken. The GRUB was fine but unable to load the kernel, I couldn’t remember exactly, but it was sort of kernel panic. After a spell of frustration, finally, I found a way to solve this problem. That is load ISO image from the hard drive.
Today I would like to share tips and tricks how to boot Arch Linux ISO from your hard-drive. Let’s get started
Software Requirements
- Arch Linux ISO image in your hard drive, Download the Arch Linux ISO here
- GRUB must be installed in your laptop
Here is the breakdown of commands above.
- We set the ISO image as arch.iso and store it in root path as /arch.iso.
- Turn on laptop and press c during GRUB screen to enter console command
- (optional) Press ls to list available hard disks and it’s partitions
- In this case, arch.iso is stored in (hd0,gpt1). So let’s inspect what inside this partition by typing ls (hd0,gpt1) . Please take note the UUID for use later.
- Let’s mount the ISO image with command: loopback iso (hd0,gpt1)/arch.iso
- Inspect the mounted iso with ls (iso)
- Now let set the Linux and the initrd then boot it
grub> linux (iso)/arch/boot/x86_64/vmlinuz img_dev="/dev/disk/by-uuid/uuid-of-disk-partition" img_loop=/arch.iso earlymode
grub> initrd (iso)/arch/boot/x86_64/archiso.img
grub> boot
Voila!
Conclusion
- Arch Linux is great
- I think we can boot any Linux iso images from hard drive, just need a little adjustment in vmlinuz params
- Make sure to save ISO image in your hard drive in case of boot failure