ventoy / vtoyboot

Work with ventoy to support boot Linux distros in a vdisk file (vhd/vdi/raw ...)
GNU General Public License v3.0
275 stars 23 forks source link

Manjaro in .vhd.vtoy: upgrading kernel/nvidia only works correct in original .vhd VirtualBox? #10

Closed GvY85 closed 3 years ago

GvY85 commented 3 years ago

After the previous issue was fixed, (many thanks!) I ran into the following:

It seems that the Grub configuration and/or Kernel modules get messed up trying to upgrade the kernel and/or nVidia drivers on any other system then on the original VirtualBox. I tried to update Manjaro to 21.0.7 involving a kernel upgrade (same kernel, just a security update) and got some errors rebuilding Grub. Not entirely sure if Ventoy is to blame because that part still seemed to work but I could not boot afterwards and Grub had defaulted back to the text based menu because it could not find the pre-boot image containing the grapical menu and that is used for Luks disk encryption.

I worked around this by taking my working image, renaming it back to ,vhd and starting it in the VirtualBox that initially made it and then upgraded all the packages and the kernel/nvidia driver. Then renamed it back to .vhd.vtoy and it works fine. So I dont know if this is something in Ventoy or that a VirtualBox installation isnt as 'portable' as it seems and you cant really update core stuff on a different pc?

Thanks for the help.

ventoy commented 3 years ago

The root disk is different when you boot vtoy by Ventoy. So there may be error when you rebuilding the new grub configuration. Update kernel and drivers doesn't matter.

Can you give me the details about the error when you rebuilding grub configuration.

GvY85 commented 3 years ago

Sure, here you go:

[2021-06-28T13:17:39+0200] [PACMAN] Running '/usr/bin/pacman --noconfirm --noprogressbar -S linux510 linux510-nvidia'
[2021-06-28T13:17:45+0200] [ALPM] transaction started
[2021-06-28T13:17:46+0200] [ALPM] installed linux510 (5.10.42-1)
[2021-06-28T13:17:46+0200] [ALPM] installed linux510-nvidia (465.31-6)
[2021-06-28T13:17:50+0200] [ALPM-SCRIPTLET] In order to use nvidia module, reboot the system.
[2021-06-28T13:17:50+0200] [ALPM] transaction completed
[2021-06-28T13:17:50+0200] [ALPM] running '30-systemd-update.hook'...
[2021-06-28T13:17:50+0200] [ALPM] running '60-depmod.hook'...
[2021-06-28T13:17:54+0200] [ALPM] running '90-mkinitcpio-install.hook'...
[2021-06-28T13:17:54+0200] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'default'
[2021-06-28T13:17:54+0200] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64.img
[2021-06-28T13:17:54+0200] [ALPM-SCRIPTLET] ==> Starting build: 5.10.42-1-MANJARO
[2021-06-28T13:17:54+0200] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2021-06-28T13:17:54+0200] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2021-06-28T13:17:55+0200] [ALPM-SCRIPTLET]   -> Running build hook: [autodetect]
[2021-06-28T13:17:55+0200] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2021-06-28T13:17:55+0200] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2021-06-28T13:17:55+0200] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2021-06-28T13:17:55+0200] [ALPM-SCRIPTLET]   -> Running build hook: [keymap]
[2021-06-28T13:17:55+0200] [ALPM-SCRIPTLET]   -> Running build hook: [consolefont]
[2021-06-28T13:17:55+0200] [ALPM-SCRIPTLET] ==> WARNING: consolefont: no font found in configuration
[2021-06-28T13:17:55+0200] [ALPM-SCRIPTLET]   -> Running build hook: [lvm2]
[2021-06-28T13:17:56+0200] [ALPM-SCRIPTLET]   -> Running build hook: [ventoy]
[2021-06-28T13:17:58+0200] [ALPM-SCRIPTLET]   -> Running build hook: [encrypt]
[2021-06-28T13:17:58+0200] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2021-06-28T13:17:58+0200] [ALPM-SCRIPTLET]   -> Running build hook: [fsck]
[2021-06-28T13:17:58+0200] [ALPM-SCRIPTLET]   -> Running build hook: [ramroot]
[2021-06-28T13:17:58+0200] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2021-06-28T13:17:58+0200] [ALPM-SCRIPTLET] ==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64.img
[2021-06-28T13:18:01+0200] [ALPM-SCRIPTLET] ==> Image generation successful
[2021-06-28T13:18:01+0200] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'fallback'
[2021-06-28T13:18:01+0200] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64-fallback.img -S autodetect
[2021-06-28T13:18:01+0200] [ALPM-SCRIPTLET] ==> Starting build: 5.10.42-1-MANJARO
[2021-06-28T13:18:01+0200] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2021-06-28T13:18:01+0200] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2021-06-28T13:18:01+0200] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2021-06-28T13:18:01+0200] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2021-06-28T13:18:03+0200] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2021-06-28T13:18:03+0200] [ALPM-SCRIPTLET]   -> Running build hook: [keymap]
[2021-06-28T13:18:03+0200] [ALPM-SCRIPTLET]   -> Running build hook: [consolefont]
[2021-06-28T13:18:03+0200] [ALPM-SCRIPTLET] ==> WARNING: consolefont: no font found in configuration
[2021-06-28T13:18:03+0200] [ALPM-SCRIPTLET]   -> Running build hook: [lvm2]
[2021-06-28T13:18:03+0200] [ALPM-SCRIPTLET]   -> Running build hook: [ventoy]
[2021-06-28T13:18:03+0200] [ALPM-SCRIPTLET]   -> Running build hook: [encrypt]
[2021-06-28T13:18:04+0200] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2021-06-28T13:18:05+0200] [ALPM-SCRIPTLET]   -> Running build hook: [fsck]
[2021-06-28T13:18:05+0200] [ALPM-SCRIPTLET]   -> Running build hook: [ramroot]
[2021-06-28T13:18:06+0200] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2021-06-28T13:18:06+0200] [ALPM-SCRIPTLET] ==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64-fallback.img
[2021-06-28T13:18:11+0200] [ALPM-SCRIPTLET] ==> Image generation successful
[2021-06-28T13:18:11+0200] [ALPM] running '90-nvidia-utils.hook'...
[2021-06-28T13:18:11+0200] [ALPM] running '99-grub.hook'...
[2021-06-28T13:18:11+0200] [ALPM-SCRIPTLET] Generating grub configuration file ...
[2021-06-28T13:18:12+0200] [ALPM-SCRIPTLET] Found linux image: /boot/vmlinuz-5.12-x86_64
[2021-06-28T13:18:12+0200] [ALPM-SCRIPTLET] Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.12-x86_64.img
[2021-06-28T13:18:12+0200] [ALPM-SCRIPTLET] /usr/bin/grub-probe: error: disk `cryptouuid/54216c75469f4e1298923af9f7d95cd0' not found.
[2021-06-28T13:18:12+0200] [ALPM-SCRIPTLET] /usr/bin/grub-probe: error: disk `cryptouuid/54216c75469f4e1298923af9f7d95cd0' not found.
[2021-06-28T13:18:12+0200] [ALPM-SCRIPTLET] Found initrd fallback image: /boot/initramfs-5.12-x86_64-fallback.img
[2021-06-28T13:18:12+0200] [ALPM-SCRIPTLET] /usr/bin/grub-probe: error: disk `cryptouuid/54216c75469f4e1298923af9f7d95cd0' not found.
[2021-06-28T13:18:12+0200] [ALPM-SCRIPTLET] Found linux image: /boot/vmlinuz-5.10-x86_64
[2021-06-28T13:18:12+0200] [ALPM-SCRIPTLET] Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.10-x86_64.img
[2021-06-28T13:18:12+0200] [ALPM-SCRIPTLET] /usr/bin/grub-probe: error: disk `cryptouuid/54216c75469f4e1298923af9f7d95cd0' not found.
[2021-06-28T13:18:12+0200] [ALPM-SCRIPTLET] Found initrd fallback image: /boot/initramfs-5.10-x86_64-fallback.img
[2021-06-28T13:18:12+0200] [ALPM-SCRIPTLET] /usr/bin/grub-probe: error: disk `cryptouuid/54216c75469f4e1298923af9f7d95cd0' not found.
[2021-06-28T13:18:12+0200] [ALPM-SCRIPTLET] Warning: os-prober will be executed to detect other bootable partitions.
[2021-06-28T13:18:12+0200] [ALPM-SCRIPTLET] Its output will be used to detect bootable binaries on them and create new boot entries.
[2021-06-28T13:18:16+0200] [ALPM-SCRIPTLET] Found Windows Boot Manager on /dev/nvme1n1p2@/efi/Microsoft/Boot/bootmgfw.efi
[2021-06-28T13:18:16+0200] [ALPM-SCRIPTLET] Adding boot menu entry for UEFI Firmware Settings ...
[2021-06-28T13:18:17+0200] [ALPM-SCRIPTLET] done
GvY85 commented 3 years ago

Do you need more info?

candrapersada commented 3 years ago

why when using Manjaro in Legacy BIOS mode it doesn't boot?

device-mapper: reload ioctl on ventoy (254:0) failed: Invalid argument
Command falied.
ventoy commented 3 years ago

@GvY85 Please try this vtoyboot release. You need to create a refresh vtoy and make the same operation for test. vtoyboot-1.0.14.tar.gz

GvY85 commented 3 years ago

Good news, it works.

-Renamed .vdi.vtoy back to .vdi -Booted in VirtualBox -Ran updated 1.0.14 vtoyboot -renamed back to .vdi.vtoy -booted from Ventoy -updated grub by switching kernels

only downside is that grub now (when running on actual pc instead of virtualbox) detects current windows installation on other drives and adds that to the boot menu as well. not sure if this can be fixed but at least it primairly works now.

log:

[2021-07-06T19:00:22+0200] [PACMAN] Running '/usr/bin/pacman --noconfirm --noprogressbar -S linux510 linux510-nvidia'
[2021-07-06T19:00:27+0200] [ALPM] transaction started
[2021-07-06T19:00:27+0200] [ALPM] installed linux510 (5.10.42-1)
[2021-07-06T19:00:27+0200] [ALPM] installed linux510-nvidia (465.31-6)
[2021-07-06T19:00:31+0200] [ALPM-SCRIPTLET] In order to use nvidia module, reboot the system.
[2021-07-06T19:00:31+0200] [ALPM] transaction completed
[2021-07-06T19:00:31+0200] [ALPM] running '30-systemd-update.hook'...
[2021-07-06T19:00:31+0200] [ALPM] running '60-depmod.hook'...
[2021-07-06T19:00:35+0200] [ALPM] running '90-mkinitcpio-install.hook'...
[2021-07-06T19:00:35+0200] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'default'
[2021-07-06T19:00:35+0200] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64.img
[2021-07-06T19:00:35+0200] [ALPM-SCRIPTLET] ==> Starting build: 5.10.42-1-MANJARO
[2021-07-06T19:00:35+0200] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2021-07-06T19:00:36+0200] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2021-07-06T19:00:36+0200] [ALPM-SCRIPTLET]   -> Running build hook: [autodetect]
[2021-07-06T19:00:36+0200] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2021-07-06T19:00:36+0200] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2021-07-06T19:00:36+0200] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2021-07-06T19:00:36+0200] [ALPM-SCRIPTLET]   -> Running build hook: [keymap]
[2021-07-06T19:00:36+0200] [ALPM-SCRIPTLET]   -> Running build hook: [consolefont]
[2021-07-06T19:00:36+0200] [ALPM-SCRIPTLET] ==> WARNING: consolefont: no font found in configuration
[2021-07-06T19:00:36+0200] [ALPM-SCRIPTLET]   -> Running build hook: [lvm2]
[2021-07-06T19:00:36+0200] [ALPM-SCRIPTLET]   -> Running build hook: [ventoy]
[2021-07-06T19:00:37+0200] [ALPM-SCRIPTLET]   -> Running build hook: [encrypt]
[2021-07-06T19:00:37+0200] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2021-07-06T19:00:37+0200] [ALPM-SCRIPTLET]   -> Running build hook: [fsck]
[2021-07-06T19:00:37+0200] [ALPM-SCRIPTLET]   -> Running build hook: [ramroot]
[2021-07-06T19:00:38+0200] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2021-07-06T19:00:38+0200] [ALPM-SCRIPTLET] ==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64.img
[2021-07-06T19:00:40+0200] [ALPM-SCRIPTLET] ==> Image generation successful
[2021-07-06T19:00:40+0200] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'fallback'
[2021-07-06T19:00:40+0200] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64-fallback.img -S autodetect
[2021-07-06T19:00:40+0200] [ALPM-SCRIPTLET] ==> Starting build: 5.10.42-1-MANJARO
[2021-07-06T19:00:40+0200] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2021-07-06T19:00:40+0200] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2021-07-06T19:00:40+0200] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2021-07-06T19:00:40+0200] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2021-07-06T19:00:42+0200] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2021-07-06T19:00:43+0200] [ALPM-SCRIPTLET]   -> Running build hook: [keymap]
[2021-07-06T19:00:43+0200] [ALPM-SCRIPTLET]   -> Running build hook: [consolefont]
[2021-07-06T19:00:43+0200] [ALPM-SCRIPTLET] ==> WARNING: consolefont: no font found in configuration
[2021-07-06T19:00:43+0200] [ALPM-SCRIPTLET]   -> Running build hook: [lvm2]
[2021-07-06T19:00:43+0200] [ALPM-SCRIPTLET]   -> Running build hook: [ventoy]
[2021-07-06T19:00:43+0200] [ALPM-SCRIPTLET]   -> Running build hook: [encrypt]
[2021-07-06T19:00:43+0200] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2021-07-06T19:00:44+0200] [ALPM-SCRIPTLET]   -> Running build hook: [fsck]
[2021-07-06T19:00:44+0200] [ALPM-SCRIPTLET]   -> Running build hook: [ramroot]
[2021-07-06T19:00:45+0200] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2021-07-06T19:00:45+0200] [ALPM-SCRIPTLET] ==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64-fallback.img
[2021-07-06T19:00:50+0200] [ALPM-SCRIPTLET] ==> Image generation successful
[2021-07-06T19:00:50+0200] [ALPM] running '90-nvidia-utils.hook'...
[2021-07-06T19:00:50+0200] [ALPM] running '99-grub.hook'...
[2021-07-06T19:00:50+0200] [ALPM-SCRIPTLET] Generating grub configuration file ...
[2021-07-06T19:00:50+0200] [ALPM-SCRIPTLET] Found theme: /usr/share/grub/themes/manjaro/theme.txt
[2021-07-06T19:00:50+0200] [ALPM-SCRIPTLET] Found linux image: /boot/vmlinuz-5.12-x86_64
[2021-07-06T19:00:50+0200] [ALPM-SCRIPTLET] Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.12-x86_64.img
[2021-07-06T19:00:50+0200] [ALPM-SCRIPTLET] Found initrd fallback image: /boot/initramfs-5.12-x86_64-fallback.img
[2021-07-06T19:00:50+0200] [ALPM-SCRIPTLET] Found linux image: /boot/vmlinuz-5.10-x86_64
[2021-07-06T19:00:50+0200] [ALPM-SCRIPTLET] Found initrd image: /boot/amd-ucode.img /boot/initramfs-5.10-x86_64.img
[2021-07-06T19:00:50+0200] [ALPM-SCRIPTLET] Found initrd fallback image: /boot/initramfs-5.10-x86_64-fallback.img
[2021-07-06T19:00:51+0200] [ALPM-SCRIPTLET] Warning: os-prober will be executed to detect other bootable partitions.
[2021-07-06T19:00:51+0200] [ALPM-SCRIPTLET] Its output will be used to detect bootable binaries on them and create new boot entries.
[2021-07-06T19:00:52+0200] [ALPM-SCRIPTLET] Found Windows Boot Manager on /dev/nvme1n1p2@/efi/Microsoft/Boot/bootmgfw.efi
[2021-07-06T19:00:53+0200] [ALPM-SCRIPTLET] Adding boot menu entry for UEFI Firmware Settings ...
[2021-07-06T19:00:53+0200] [ALPM-SCRIPTLET] Found memtest86+ image: /boot/memtest86+/memtest.bin
[2021-07-06T19:00:53+0200] [ALPM-SCRIPTLET] done
candrapersada commented 3 years ago

Legacy BIOS image vtoyboot-1.0.14.tar.gz

ventoy commented 3 years ago

@GvY85 Add windows boot entry is the default behavor of the system not Ventoy's problem.

@candrapersada You should create a new issue and give more details about your problem. What you did, what you see.... the more informatition you give the better.

GvY85 commented 3 years ago

@GvY85 Add windows boot entry is the default behavor of the system not Ventoy's problem.

I understand but you could argue that Ventoy wants to stay as much independent from the system as possible? So a Ventoy image integrating the guests systems OS is a bit counterintuitive to the philosophy behind Ventoy? But perhaps it is something that cant be fixed? If it can be fixed it would be nice if Ventoy would limit Grub rebuilds only to the Ventoy image/disks and not to any other drives in the system to keep in truely portable.

In any case, thanks for fixing the issue, I really love the product.

ventoy commented 3 years ago

Delete /etc/grub.d/30_os-prober and update grub may work.

ventoy commented 3 years ago

vtoyboot-1.0.15 fixed this.

GvY85 commented 3 years ago

Amazing! Thank you :)

candrapersada commented 3 years ago

why can't it update vtoyboot inside .vtoy? without having to go back to the virtual machine?

ventoy commented 3 years ago

@candrapersada The hardware envrioment is different. For example, in the VirtualMachine, only /dev/sda is exist, but in the physical machine, there may be /dev/sda /dev/sdb /dev/sdc .... The grub configuration need to probe for the disks to generate grub.cfg, so vtoyboot must be updated in the original VM environment. But only the first time is needed, for example, vtoyboot-1.0.15 must be run inside the VM for the first time. After that, you can run it again inside the physical environment.

candrapersada commented 2 years ago

will there be support for updates without VM in the future?