Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 关于Chrome OS (Brunch)
#1
ventoy是最新版1.0.88,我用brunch安装脚本生成的grub配置能够顺利启动Chrome OS,但是每次都要按F6选择。

Code:
menuentry "ChromeOS" --class "brunch" {
    img_path=/chromeos.img
    img_uuid=276bfdf6-92bb-4e24-b6f7-5817ef54969b
    search --no-floppy --set=root --file $img_path
    loopback loop $img_path
    source (loop,12)/efi/boot/settings.cfg
    if [ -z $verbose ] -o [ $verbose -eq 0 ]; then
        linux (loop,7)$kernel boot=local noresume noswap loglevel=7 options=$options chromeos_bootsplash=$chromeos_bootsplash $cmdline_params \
            cros_secure cros_debug img_uuid=$img_uuid img_path=$img_path \
            console= vt.global_cursor_default=0 brunch_bootsplash=$brunch_bootsplash quiet
    else
        linux (loop,7)$kernel boot=local noresume noswap loglevel=7 options=$options chromeos_bootsplash=$chromeos_bootsplash $cmdline_params \
            cros_secure cros_debug img_uuid=$img_uuid img_path=$img_path
    fi
    initrd (loop,7)/lib/firmware/amd-ucode.img (loop,7)/lib/firmware/intel-ucode.img (loop,7)/initramfs.img
}

menuentry "ChromeOS (settings)" --class "brunch-settings" {
    img_path=/chromeos.img
    img_uuid=276bfdf6-92bb-4e24-b6f7-5817ef54969b
    search --no-floppy --set=root --file $img_path
    loopback loop $img_path
    source (loop,12)/efi/boot/settings.cfg
    linux (loop,7)/kernel boot=local noresume noswap loglevel=7 options= chromeos_bootsplash= edit_brunch_config=1 \
        cros_secure cros_debug img_uuid=$img_uuid img_path=$img_path
    initrd (loop,7)/lib/firmware/amd-ucode.img (loop,7)/lib/firmware/intel-ucode.img (loop,7)/initramfs.img
}

之前尝试过直接启动,有几种结果:
1.报错:Not bootable file found for UEFI。
2.在某些情况下(比如复制全部ventoy分区的文件到另一个磁盘),能够进入brunch里面的grub,但是选择任意一个启动项都会在几秒后重启。
3.奇怪的是,如果硬盘直接安装了brunch版本的Chrome OS,会启动硬盘上的Chrome OS而不是img镜像。
我看了brunch里的grub配置,跟上面贴出的应该是一样的。更奇怪的是,如果直接启动不报错,我生成的第一个img启动会自动重启(无论是brunch版grub还是F6启动),重新生成一个才能通过F6启动,此时直接启动会报错(第一种情况)。我对比了安装脚本生成的两个grub配置,发现只有img_path和img_uuid不同,把新的grub覆盖旧的以后,第一个img也能通过F6正常启动了。
希望ventoy在下个版本直接使用上面的grub配置以支持brunch Chrome OS,最好多测试几台电脑,确保不会出现奇怪的问题。
Reply
#2
(01-28-2023, 12:54 PM)grub2 Wrote: ventoy是最新版1.0.88,我用brunch安装脚本生成的grub配置能够顺利启动Chrome OS,但是每次都要按F6选择。

Code:
menuentry "ChromeOS" --class "brunch" {
    img_path=/chromeos.img
    img_uuid=276bfdf6-92bb-4e24-b6f7-5817ef54969b
    search --no-floppy --set=root --file $img_path
    loopback loop $img_path
    source (loop,12)/efi/boot/settings.cfg
    if [ -z $verbose ] -o [ $verbose -eq 0 ]; then
        linux (loop,7)$kernel boot=local noresume noswap loglevel=7 options=$options chromeos_bootsplash=$chromeos_bootsplash $cmdline_params \
            cros_secure cros_debug img_uuid=$img_uuid img_path=$img_path \
            console= vt.global_cursor_default=0 brunch_bootsplash=$brunch_bootsplash quiet
    else
        linux (loop,7)$kernel boot=local noresume noswap loglevel=7 options=$options chromeos_bootsplash=$chromeos_bootsplash $cmdline_params \
            cros_secure cros_debug img_uuid=$img_uuid img_path=$img_path
    fi
    initrd (loop,7)/lib/firmware/amd-ucode.img (loop,7)/lib/firmware/intel-ucode.img (loop,7)/initramfs.img
}

menuentry "ChromeOS (settings)" --class "brunch-settings" {
    img_path=/chromeos.img
    img_uuid=276bfdf6-92bb-4e24-b6f7-5817ef54969b
    search --no-floppy --set=root --file $img_path
    loopback loop $img_path
    source (loop,12)/efi/boot/settings.cfg
    linux (loop,7)/kernel boot=local noresume noswap loglevel=7 options= chromeos_bootsplash= edit_brunch_config=1 \
        cros_secure cros_debug img_uuid=$img_uuid img_path=$img_path
    initrd (loop,7)/lib/firmware/amd-ucode.img (loop,7)/lib/firmware/intel-ucode.img (loop,7)/initramfs.img
}

之前尝试过直接启动,有几种结果:
1.报错:Not bootable UEFI image。
2.在某些情况下(比如复制全部ventoy分区的文件到另一个磁盘),能够进入brunch里面的grub,但是选择任意一个启动项都会在几秒后重启。
3.奇怪的是,如果硬盘直接安装了brunch版本的Chrome OS,会启动硬盘上的Chrome OS而不是img镜像。
我看了brunch里的grub配置,跟上面贴出的应该是一样的。更奇怪的是,如果直接启动不报错,我生成的第一个img启动会自动重启(无论是brunch版grub还是F6启动),重新生成一个才能通过F6启动,此时直接启动会报错(第一种情况)。我对比了安装脚本生成的两个grub配置,发现只有img_path和img_uuid不同,把新的grub覆盖旧的以后,第一个img也能通过F6正常启动了。
希望ventoy在下个版本直接使用上面的grub配置以支持brunch Chrome OS,最好多测试几台电脑,确保不会出现奇怪的问题。


nice, so can we startup chromeos with this config grub?
Reply
#3
(01-30-2023, 01:29 AM)oldman20 Wrote: nice, so can we startup chromeos with this config grub?
Yes, please follow this guide, move the "chromeos.img.grub.cfg" file to "ventoy/ventoy_grub.cfg" in the first partition when you're done, press F6 to boot your Chrome OS.
refer: https://www.ventoy.net/en/plugin_grubmenu.html
Reply
#4
我找到出现No bootable file found for UEFI的原因了,因为chromeos.img是动态扩展大小,不是固定大小,ventoy只能启动固定大小的raw image,但是原版grub却能通过挂载+source的方式启动,不知道brunch是否有处理或是patch过。
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)