elementary / os

The OS build system
https://elementary.io
GNU General Public License v3.0
1.01k stars 131 forks source link

Grub boot ISO from HDD(NTFS) #450

Open sonichy opened 3 years ago

sonichy commented 3 years ago

I need to boot from HDD not USB(Ventoy). Edit /etc/grub.d/40_custom, add these at end, sudo update-grub.

Success

menuentry "ubuntu 16" {
    set root=(hd0,5)
    set isofile="/ISO/ubuntu-16.04.7-desktop-amd64.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile locale=zh_CN
    initrd (loop)/casper/initrd
}

Fail

menuentry "elementaryos" {
    set root=(hd0,5)
    set isofile="/ISO/elementaryos-5.1-stable.20200814.iso"
    loopback loop $isofile
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile locale=zh_CN
    initrd (loop)/casper/initrd.lz
}

echo:

......
stdin: Not a typewriter
stdin: Not a typewriter
stdin: Not a typewriter
stdin: Not a typewriter
stdin: Not a typewriter
stdin: Not a typewriter
......
fizzka commented 3 years ago

same problem for elementaryos-6.0

enigma131 commented 1 year ago

Same on elementary 7 Have try also : menuentry "ElementaryOs-7.0 stable" { set iso="/isos/elementaryos-7.0-stable.20230129rc.iso" set isoname=ElementaryOs_7.0 loopback loop (hd0,6)$iso linux (loop)/boot/vmlinuz root=live:LABEL=${isoname} iso-scan/filename=${iso} locale.LANG=fr_FR.UTF-8 vconsole.> echo 'initrd loading, please wait ...' initrd (loop)/boot/initrd.img }

enigma131 commented 1 year ago

Solved via toram : menuentry "ElementaryOs-7.0 stable" { set iso="/isos/elementaryos-7.0-stable.20230129rc.iso" loopback loop (hd0,6)$iso linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$iso noprompt noeject toram echo 'initrd loading, please wait ...' initrd (loop)/casper/initrd.lz }