Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grub2 直接启动 iso 系统镜像 #1

Open
qiuxiang opened this issue Sep 4, 2019 · 0 comments
Open

grub2 直接启动 iso 系统镜像 #1

qiuxiang opened this issue Sep 4, 2019 · 0 comments

Comments

@qiuxiang
Copy link
Owner

qiuxiang commented Sep 4, 2019

编辑 /etc/grub.d/40_custom

menuentry "Zorin" {
  set isofile="/tmp/Zorin-OS-15-Core-64-bit-r1.iso"
  loopback loop (hd0,9)$isofile
  linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile
  initrd (loop)/casper/initrd.lz4
}

menuentry "archlinux-2021.01.01-x86_64.iso" {
  set img_loop="/boot/archlinux-2021.01.01-x86_64.iso"
  set img_dev="/dev/disk/by-uuid/5a572766-ddd4-434b-ac11-638b6fb3e9a1"
  loopback loop $img_loop
  linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=$img_dev img_loop=$img_loop
  initrd (loop)/arch/boot/amd_ucode.img (loop)/arch/boot/intel_ucode.img (loop)/arch/boot/x86_64/initramfs-linux.img
}

menuentry "Manjaro" {
  set isofile="/tmp/manjaro-gnome-18.0.4-stable-x86_64.iso"
  search --no-floppy -f $isofile --set=root
  probe -u $root --set=uuid
  loopback loop (hd0,9)$isofile
  linux (loop)/boot/vmlinuz-x86_64 img_dev=/dev/disk/by-uuid/$uuid img_loop=$isofile
  initrd (loop)/boot/amd_ucode.img (loop)/boot/initramfs-x86_64.img
}

然后运行

sudo update-grub
@qiuxiang qiuxiang changed the title grub2 启动 ubuntu/manjaro iso grub2 直接启动 iso 系统镜像 Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant