boot iso image directly with grub / Testing / Arch Linux 32 Forums

You are not logged in.

#1 2017-12-29 10:03:35

ula8000
Member
Registered: 2017-12-27
Posts: 11

boot iso image directly with grub

For all who wants to test the iso without installing or without usb/dvd.

#! /bin/sh -e
# install:
# sudoedit /etc/grub.d/90_archlinux-2017.11.01-i686.iso
# sudo chmod +x /etc/grub.d/90_*; ls -la /etc/grub.d/90_*
# sudo grub-mkconfig -o /boot/grub/grub.cfg

export ISOFILE=/@data/iso/archlinux-2017.11.01-i686.iso
export imgdevpath=/dev/disk/by-label/root
echo "Found ISOFILE image: ${ISOFILE}" >&2
cat << EOF
menuentry "${ISOFILE}" {
	load_video
	search -n -f --set=root ${ISOFILE}
	loopback loop ${ISOFILE}
	linux (loop)/arch/boot/i686/vmlinuz img_dev=$imgdevpath img_loop=${ISOFILE} earlymodules=loop
	initrd (loop)/arch/boot/i686/archiso.img
	}
EOF
exit 0

Tested on an asus 1000h netbook.
Check/update the folders. My iso was on an BTRFS subvol "@data" - omit if you use fat32/ext4, the partition was named "root".

Offline

Board footer

Powered by FluxBB