You are not logged in.

#1 2019-10-04 04:43:14

agalq12
Member
Registered: 2019-10-04
Posts: 2

Booting Archlinux from grub on existing os

Hello! I have a question, how can I boot into archlinux live iso on an existing linux via grub? using ubuntu live iso as an example, you write this in /etc/grub.d/40_custom this text is "menuentry" Ubuntu 14.04 (LTS) Live Desktop amd64 "{ set isofile = "/ boot / ubuntu-14.04-desktop-amd64.iso" loopback loop (hd0,2) $ isofilelinux (loop) /casper/vmlinuz.efi boot = casper isoscan / filename = $ {isofile} quiet splashinitrd (loop ) /casper/initrd.lz
} "but what settings are needed for archlinux? P.S. I know that it’s easier to boot from usb but the bios does not save the settings on my laptop, and the bios does not see the flash drive and I only have this option.

Offline

#2 2019-10-04 07:29:07

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 7,806

Re: Booting Archlinux from grub on existing os

Offline

#3 2019-10-04 08:04:05

ua4000
Member
Registered: 2015-10-14
Posts: 182

Re: Booting Archlinux from grub on existing os

This is also only an example, fine on my system, but you have to adopt it to YOUR system:

# commands:

sudoedit /etc/grub.d/90_archlinux-2019.07.01-x86_64.iso
sudo chmod +rx /etc/grub.d/90*
ls -la /etc/grub.d
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo less /boot/grub/grub.cfg

# /etc/grub.d/90_archlinux-2019.07.01-x86_64.iso

#!/bin/sh -e
export ISOFILE="/iso/archlinux-2019.07.01-x86_64.iso"
export ISOPATH="/dev/disk/by-label/root"
echo "Found ISOFILE image: ${ISOFILE}" >&2
cat << EOF
menuentry "${ISOFILE}" {
	load_video
	insmod loopback
	insmod iso9660
	insmod part_msdos
	insmod part_gpt
	insmod btrfs
	search -n -f --set=root ${ISOFILE}
	loopback loop ${ISOFILE}
	echo 'Loading Linux linux ...'
	linux (loop)/arch/boot/x86_64/vmlinuz img_dev=${ISOPATH} img_loop=${ISOFILE} earlymodules=loop
	echo 'Loading initial ramdisk ...'
	initrd (loop)/arch/boot/intel_ucode.img (loop)/arch/boot/x86_64/archiso.img
	}
EOF
exit 0

Offline

#4 2019-10-04 19:54:10

agalq12
Member
Registered: 2019-10-04
Posts: 2

Re: Booting Archlinux from grub on existing os

ok, I did it, but I have another problem, I have lvm2 so I needed other settings for /etc/grub.d/40_custom, I found them and pasted them into a file, and edited them for archlinux and for my disk "
menuentry "arch linux" {
  insmod part_msdos
  insmod lvm
  set iso_path = "/ iso / archlinux-2019.10.01-x86_64.iso"
  search --no-floppy --fs-uuid --set = root 846f269f-f1fb-4736-814c-b24565545360
  loopback loop ($ root) $ iso_path
  linux (loop) / arch / boot / x86_64 / vmlinuz img_dev = $ imgdevpath img_loop = $ isofile earlymodules = loop
  initrd (loop) /arch/boot/intel_ucode.img (loop) /arch/boot/amd_ucode.img (loop) /arch/boot/x86_64/archiso.img
} "but after when I boot, I  see the message" mounting 'y' to / run / archiso / img_dev "" waiting 30 seconds for device y "searching on the wiki, I found that this is a disk labeled problem and that I need to rename disk name to make it work, but how do I do it?
P.S sorry for my bad english

Offline

#5 2019-10-05 07:39:32

ua4000
Member
Registered: 2015-10-14
Posts: 182

Re: Booting Archlinux from grub on existing os

a) please use code tags
b) you are sure this is the exact content ? There are many many spaces at the wrong places...
c) variables ($) are not set: imgdevpath, isofile
d) you need for your system only one ucode
e) yes I set a label on my filesystem (by-label), in my example it's "root", can be done with gparted

Offline

Board footer

Powered by FluxBB