ventoy / vtoyboot

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

kernel 6.1 dm_patch not loading, also dm_patch: module verification failed: signature and/or required key missing - tainting kernel #62

Open hgkamath opened 1 year ago

hgkamath commented 1 year ago

Description

VTOY_LINUX_REMOUNT has been enabled using global plugson.
But, VTOY_LINUX_REMOUNT is not working.
This feature (https://github.com/ventoy/Ventoy/issues/1326, https://github.com/ventoy/Ventoy/issues/2234, ventoy/vtoyboot/#43, also filed by me) used to work for me before. It has been some time since I last booted this way. So there is no reason why this should not work. [EDIT] Reason it is not working is that the dm_patch is out of compatibility sync with the linux kernel 6.1.11

dm-patch is not loading, Hence, cannot mount /dev/sdc1

dmesg shows: [ 6.220342] dm_patch: module verification failed: signature and/or required key missing - tainting kernel [EDIT] I determined this message isn't only a secureboot signature issue, it throws up even if secureboot is disabled. I think it is thrown because its an external binary kernel module, the kernel decided that such binary blobs are taint. The signature/taint warning is thrown even when the dm_patch module loads and host-partition is mountable, not just when it is rejected.

misc

log

[root@fedora tmp]# uname -a
Linux fedora 6.1.11-200.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Feb  9 19:20:24 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

[root@fedora tmp]# mount -t ntfs3 /dev/sdc1 /mnt/c1
mount: /mnt/c1: /dev/sdc1 already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.

[root@fedora tmp]# sgdisk /dev/mapper/ventoy -p
Disk /dev/mapper/ventoy: 97386496 sectors, 46.4 GiB
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): 8833D6B6-ABF3-44CD-8375-595D238C2600
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 97386462
Partitions will be aligned on 2048-sector boundaries
Total free space is 4029 sectors (2.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          522239   254.0 MiB   EF00  EFI System Partition
   2          522240          526335   2.0 MiB     EF02  BIOS boot partition
   3          526336         2099199   768.0 MiB   8300  Linux filesystem
   4         2099200        97384447   45.4 GiB    8300  

[root@fedora vtoyboot-1.0.25]# dmesg | grep dm_patch
[    6.220342] dm_patch: module verification failed: signature and/or required key missing - tainting kernel

[root@fedora tools]# modinfo ./dm_patch_64.ko 
filename:       /root/tmp/vtoyboot-1.0.25/tools/./dm_patch_64.ko
license:        GPL
author:         longpanda <admin@ventoy.net>
description:    dmpatch driver
depends:        
retpoline:      Y
intree:         Y
name:           dm_patch
vermagic:       5.13.19-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx SMP mod_unload modversions 

I wonder if the module was compiled/built for kernel-5.13.19

[root@fedora gana]# rpm -qa | grep -i "^kernel-[56]"
kernel-6.1.11-200.fc37.x86_64
kernel-6.0.18-300.fc37.x86_64
kernel-5.19.17-300.fc37.x86_64

[root@fedora vtoyboot-1.0.25]# ./vtoyboot.sh 

**********************************************
      vtoyboot 1.0.25
      longpanda admin@ventoy.net
      https://www.ventoy.net
**********************************************

Current system use dracut as initramfs tool
updating the initramfs, please wait ...
updating initramfs for 5.19.17-300.fc37.x86_64 please wait ...
updating initramfs for 6.0.18-300.fc37.x86_64 please wait ...
grub mkconfig ...
PROBE_PATH=/usr/sbin/grub2-probe EDITENV_PATH=/usr/bin/grub2-editenv MKCONFIG_PATH=/usr/sbin/grub2-mkconfig
/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
This is ventoy enviroment
replace shim efi ...
bootx64.efi no need 2

vtoyboot process successfully finished.

Also tried

[root@fedora vtoyboot-1.0.25]# ./vtoyboot.sh -s

**********************************************
      vtoyboot 1.0.25
      longpanda admin@ventoy.net
      https://www.ventoy.net
**********************************************

Current system use dracut as initramfs tool
updating the initramfs, please wait ...
updating initramfs for 6.1.8-200.fc37.x86_64 please wait ...
grub mkconfig ...
PROBE_PATH=/usr/sbin/grub2-probe EDITENV_PATH=/usr/bin/grub2-editenv MKCONFIG_PATH=/usr/sbin/grub2-mkconfig
/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
This is ventoy enviroment
recover shim efi ...
BACK=/boot/efi/EFI/BOOT/BOOTX64.EFI
BOOT=/boot/efi/EFI/BOOT/BOOTX64.EFI_VTBK

vtoyboot process successfully finished.
hgkamath commented 1 year ago

TLDR: This comment is about secureboot investigation. I don't think secureboot is the issue

The thing is the EFI parition on the main SSD, is different from the EFI partition inside the vtoy-image

[root@fedora tmp]# blkid | grep 2c1fa
/dev/sda1: UUID="4AC2-A5E2" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="2c1fa0a2-9abe-4b33-88df-46df556287ec"

[root@fedora tmp]# efibootmgr | grep Fedora
Boot0001* Fedora    HD(1,GPT,585525aa-723b-4695-954a-cf6db7ab7262,0x800,0x7f000)/File(\EFI\Fedora\shimx64.efi)
Boot0003* Fedora    HD(1,GPT,2c1fa0a2-9abe-4b33-88df-46df556287ec,0x800,0x82000)/File(\EFI\fedora\shim.efi) File(.䍒)

I will try do this inside a qemu-VM on win10, so that it presents only 1 attached disk, to eliminate this confusion.
Below is running vtoyboot.sh -s inside single vdisk qemu-VM on win10

root@fedora vtoyboot-1.0.25]# ./vtoyboot.sh -s

**********************************************
vtoyboot 1.0.25
longpanda admin@ventoy.net
https://www.ventoy.net
**********************************************

Current system use dracut as initramfs tool
updating the initramfs, please wait ...
updating initramfs for 6.1.8-200.fc37.x86_64 please wait ...
grub mkconfig ...
PROBE_PATH=/usr/sbin/grub2-probe EDITENV_PATH=/usr/bin/grub2-editenv MKCONFIG_PATH=/usr/sbin/grub2-mkconfig
/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
/etc/grub2.cfg --> /boot/grub2/grub.cfg
biosgrub partition exist
GPT check /dev/vda failed, code=5
recover shim efi ...
no backup file found, no need.

vtoyboot process successfully finished.

unsure how this matters uefi changes inside qemu-VM are not persistent. I think the vtyoboot.sh in qemu-VM is bailing out without properly installing signed kernel-object, because it assumes regualar non-efi grub2 just because it found a biosgrub partition.

No change on reboot to ventoy

[root@fedora vtoyboot-1.0.25]# cat /etc/os-release  | grep ^VERSION=
VERSION="37 (Workstation Edition)"

[root@fedora gana]# dmesg | grep dm_patch
[    6.156108] dm_patch: module verification failed: signature and/or required key missing - tainting kernel

[root@fedora vtoyboot-1.0.25]# journalctl -k | grep taint
Feb 12 19:23:26 fedora kernel: dm_patch: module verification failed: signature and/or required key missing - tainting kernel

[root@fedora vtoyboot-1.0.25]# grep dm_patch /proc/modules 
[root@fedora vtoyboot-1.0.25]# 

[root@fedora gana]# mount -t ntfs3 /dev/sdc1 /mnt/c1
mount: /mnt/c1: /dev/sdc1 already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.

It seems to me this dm_module needs to be signed and accepted by UEFI. I have my own MOK, (gana), is there a way I can get dm_patch*.ko files to be signed by my own signing MOK private key?

[root@fedora tools]# pwd
/root/tmp/vtoyboot-1.0.25/tools

[root@fedora vtoyboot-1.0.25]# find . | grep dm_patch
./tools/dm_patch_64.ko
./tools/dm_patch_32.ko

[root@fedora tools]# modinfo ./dm_patch_64.ko 
filename:       /root/tmp/vtoyboot-1.0.25/tools/./dm_patch_64.ko
license:        GPL
author:         longpanda <admin@ventoy.net>
description:    dmpatch driver
depends:        
retpoline:      Y
intree:         Y
name:           dm_patch
vermagic:       5.13.19-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx SMP mod_unload modversions 

[root@fedora tools]# ./vtoydump64 -lv
=== ventoy runtime data ===
disk name : /dev/sdc
disk size : 2000398934016
disk part : 1
filesystem: ntfs
image size: 49861885952
image path: /transcend/m02_lnx.raw.img.vtoy
=== ventoy image location ===
0 97386496 linear /dev/sdc1 1973076888

[root@fedora tools]# ./vtoycheck64 /dev/mapper/ventoy
biosgrub partition exist

boot sequences

There are about 4 ways, I intend this image to be booted

details of boot sequence during QEMU-VM-UEFI boot

  1. qemu UEFI by default looks for EFI SYS partition inside image /dev/vda1
  2. grub-EFI shim has a grub config-file with a config-command that continues by loading grub config and bootloader spec on /dev/vda2.
    
    [root@fedora vtoyboot-1.0.25]# cat /boot/efi/EFI/Fedora/grub.cfg 
    search --no-floppy --fs-uuid --set=dev 4394595a-336c-4b9d-a5e7-5c6e1c676b0b
    set prefix=($dev)/grub2

export $prefix configfile $prefix/grub.cfg

3. grub-EFI shim reads the bootloaders entries, and OS boot inside VM proceeds

#### details of boot sequence during QEMU-VM MBR non-efi regular boot type-1
This I used before I managed to get EFI working in QEMU.   
I used a smaller 256MIB disk containing a boot ext4 partition.  
QEMU has 2 disks attached the small one is hdd1 and the 40GiB one is hdd2.  
While this boot sequence is no longer used, I know it works, and is a failsafe if qemu EFI boot screws up.
1.  qemu reads mbr of the small disk, loads stage-1 from mbr, followed by stage-2 from parition-1, which is a ext4 partition with non-efi regular grub2. 
2. A single line config command transfers control to the grub2 config files in hdd2 partition-3 (ext4) boot partition and proceeds to load the grub2 config files, bootloader spec, and proceeds to boot OS 

#### details of boot sequence during QEMU-VM protective MBR non-efi regular boot type-2 
I had this in mind when making this partition, but I do not use this boot method, and do not believe I fully set it up. In theory it is possible.
1. qemu reads the protective mbr, before the gpt, sees the 4MiB partition-2 (type EF02), which contains grub2 x86-64 stage-1, loads the stage-1 core.  The stage-1 core-file chains to stage-2 in the partition-3 ext4 boot partition /grub2/x86_64 folder, which then parses the grub configuration 
2.  grub-2 on partition-3 ext4, parses the grub2 config files , bootloader spec and proceeds to boot OS

#### details of boot sequence during real-UEFI boot
1. HP UEFI  
   - by default probes on Drive1 SSD (```/dev/sda```) for for EFISYS partition (```/dev/sda1```) 
     - and then by default load the ```EFI/BOOT``` Microsoft bootloader  for Win10  
       However,  by pressing F9, I make it load the ```EFI/Fedora``` grub-EFI shim bootloader
2.  grub-EFI shim has a grub config-file with a config-command that continues by loading grub config and bootloader spec on ```/dev/sda7```.

[root@fedora vtoyboot-1.0.25]# cat /mnt/a1/EFI/fedora/grub.cfg search --no-floppy --fs-uuid --set=dev 46ea2285-3971-4e8e-9412-7a34fa16de09 set prefix=($dev)/grub2 export $prefix configfile $prefix/grub.cfg

3. User selects 15KJ_Ventoy from the menu 
    - The manual configuration is made in custom.cfg , which makes grub-EFI chain-load to ventoy EFI-loader on 32Mb Ventoy partition  ```/dev/sdc2```.  The ventoy partition type is changed from EFI_SYS (```EF02```) to ```0700``` because ```/dev/sdc``` has its own EFI_SYS partition  .  ( ```/dev/sdc3``` is also a EFI partition on Drive3 (HDD2) that has EFI loaders for another Linux and Win11, but that does not play a role here. )

[root@fedora vtoyboot-1.0.25]# cat /mnt/a7/grub2/custom.cfg menuentry "15KJ_Ventoy" { insmod part_gpt insmod fat insmod search_fs_uuid insmod chain search --fs-uuid --no-floppy --set=root 3A2F-294B chainloader /EFI/BOOT/BOOTX64.EFI }

 4. ventoy grub-EFI then scans ```/dev/sdc1``` and populates its menu
 5. user selects ```m02_lnx.raw.img.vtoy```
 6. ventoy grub-EFI using loopback emulation loads the kernel and initramfs from partition-3 (boot partition inside image) and starts boot sequence. Job of Linux OS coming up is to treat loopback device  as ```hd3``` and pivot onto root filesystem at ```(hd3,gpt3)``` 

### issue still happens after disabling secureboot 
I have disabled secureboot temporarily in the HP UEFIBIOS setup. But ```dm_patch``` failed to patch. Hence, this bug might not be due to secureboot signatures or EFI MOK keys.

[root@fedora gana]# grep dm_patch /proc/modules [root@fedora gana]# mount -t ntfs3 /dev/sdc1 /mnt/c1 mount: /mnt/c1: /dev/sdc1 already mounted or mount point busy. dmesg(1) may have more information after failed mount system call. [root@fedora gana]# dmesg | grep dm_p [ 5.781574] dm_patch: module verification failed: signature and/or required key missing - tainting kernel [root@fedora gana]# mokutil --sb-state SecureBoot disabled



### Ref
- [ventoy/DMPATCH/dmpatch.c](https://github.com/ventoy/Ventoy/blob/master/DMPATCH/dmpatch.c)
hgkamath commented 1 year ago

I inserted a rd.break=pre-mount kernel boot option to kernel conf 6.1.11-200.fc37.x86_64.conf in /boot/loader/entries . Rebooted while secureboot still disabled. Then I copied /tmp/vtoy.log off initramfs

[root@fedora gana]# cat /mnt/a12/gana/tmp/vtoy.log 
ventoy_do_dm_patch
get_addr=0xffffffff9aa9f7a0 get_size=496
put_addr=0xffffffff9aa9f990 put_size=224
kprobe_reg_addr=ffffffff9a1ed630 kprobe_unreg_addr=ffffffff9a1ecc20
ro_addr=ffffffff9a089430 rw_addr=ffffffff9a089460 printk_addr=0
template module is /lib/modules/6.1.11-200.fc37.x86_64/kernel/fs/zonefs/zonefs.ko.xz zonefs.ko.xz
insmod: ERROR: could not insert module /tmp/dm_patch.ko: Invalid parameters

This is same error message as mentioned by candrapersada 20220527 for manjaro linux. #43 comment 1079845959 for which you provided a fix, which I don't think is applicable here as dm_mod is pre-compiled into the fedora kernel

[root@fedora qq]# grep -Ei "dm_mod|dm_get_table_device" /proc/kallsyms
ffffffff81a9f7a0 T dm_get_table_device
ffffffff83b08768 d __initcall__kmod_dm_mod__585_3392_dm_init6
ffffffff83b089cc d __initcall__kmod_dm_mod__324_300_dm_init_init7

[root@fedora qq]# lsmod | grep -E "[[:blank:],]dm"
[root@fedora qq]# find /lib/modules/6.1.11-200.fc37.x86_64/ | grep "dm-mod"
[root@fedora qq]# cat /proc/modules | grep ^dm
[root@fedora qq]# 

[root@fedora qq]# modinfo dm-mod
name:           dm_mod
filename:       (builtin)
license:        GPL
file:           drivers/md/dm-mod
author:         Joe Thornber <dm-devel@redhat.com>
description:    device-mapper driver
alias:          devname:mapper/control
alias:          char-major-10-236
parm:           reserved_rq_based_ios:Reserved IOs in request-based mempools (uint)
parm:           use_blk_mq:Use block multiqueue for request-based DM devices (bool)
parm:           dm_mq_nr_hw_queues:Number of hardware queues for request-based dm-mq devices (uint)
parm:           dm_mq_queue_depth:Queue depth for request-based dm-mq devices (uint)
parm:           stats_current_allocated_bytes:Memory currently used by statistics (ulong)
parm:           kcopyd_subjob_size_kb:Sub-job size for dm-kcopyd clients (uint)
parm:           major:The major number of the device mapper (uint)
parm:           reserved_bio_based_ios:Reserved IOs in bio-based mempools (uint)
parm:           dm_numa_node:NUMA node for DM device memory allocations (int)
parm:           swap_bios:Maximum allowed inflight swap IOs (int)
parm:           create:Create a mapped device in early boot (charp)
hgkamath commented 1 year ago

With vtoyboot-1.0.20 + kernel-5.19.17-300.fc37.x86_64 does load dm_patch (but with a stack trace) and was able to remount host partition

[root@fedora gana]# cat /proc/modules | grep dm_patch
dm_patch 16384 0 - Live 0xffffffffc047a000 (E)
[root@fedora gana]# uname -a
Linux fedora 5.19.17-300.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 24 14:59:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@fedora gana]# dmesg | grep dm_patch
[    5.616193] dm_patch: module verification failed: signature and/or required key missing - tainting kernel
[    5.627203] Modules linked in: dm_patch(E) i915 nouveau rtsx_pci_sdmmc mmc_core drm_buddy mxm_wmi crct10dif_pclmul crc32_pclmul drm_display_helper crc32c_intel cec ghash_clmulni_intel drm_ttm_helper rtsx_pci r8169 serio_raw hid_multitouch ttm video wmi aacraid mvsas libsas vmw_pvscsi megaraid_sas megaraid smartpqi pmcraid uas vhci_hcd usbip_core xhci_plat_hcd usb_storage nvme nvme_core mptspi scsi_transport_spi mptsas mptscsih mptbase scsi_transport_sas sunrpc be2iscsi bnx2i cnic uio cxgb4i cxgb4 tls cxgb3i cxgb3 mdio libcxgbi libcxgb qla4xxx iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ip6_tables ip_tables fuse
[root@fedora gana]# mount -t ntfs3 /dev/sdc1 /mnt/c1
[root@fedora gana]# df | grep sdc1
/dev/sdc1           1283425276 1045566332 237858944  82% /mnt/c1
[root@fedora gana]# echo hello > /mnt/c1/tmpq/testspace.txt
[root@fedora gana]# echo Jupiter >> /mnt/c1/tmpq/testspace.txt
[root@fedora gana]# umount /dev/sdc1
[root@fedora gana]# mount -t ntfs3 /dev/sdc1 /mnt/c1
[root@fedora gana]# cat /mnt/c1/tmpq/testspace.txt
hello
Jupiter
[root@fedora gana]# rm -f /mnt/c1/tmpq/testspace.txt 
[root@fedora gana]# umount /dev/sdc1

This is an older kernel (20221024). Seemed to happen when dracut-initqueue was started, and there was a stack trace

Feb 13 22:28:32 fedora dracut-initqueue[760]: find: 'standard output': Broken pipe
Feb 13 22:28:32 fedora dracut-initqueue[760]: find: write error
[    5.616193] dm_patch: module verification failed: signature and/or required key missing - tainting kernel
[    5.627192] ------------[ cut here ]------------
[    5.627196] WARNING: CPU: 7 PID: 777 at block/holder.c:80 bd_link_disk_holder+0x138/0x160
[    5.627203] Modules linked in: dm_patch(E) i915 nouveau rtsx_pci_sdmmc mmc_core drm_buddy mxm_wmi crct10dif_pclmul 
crc32_pclmul drm_display_helper crc32c_intel cec ghash_clmulni_intel drm_ttm_helper rtsx_pci r8169 serio_raw hid_multi
touch ttm video wmi aacraid mvsas libsas vmw_pvscsi megaraid_sas megaraid smartpqi pmcraid uas vhci_hcd usbip_core xhc
i_plat_hcd usb_storage nvme nvme_core mptspi scsi_transport_spi mptsas mptscsih mptbase scsi_transport_sas sunrpc be2i
scsi bnx2i cnic uio cxgb4i cxgb4 tls cxgb3i cxgb3 mdio libcxgbi libcxgb qla4xxx iscsi_boot_sysfs iscsi_tcp libiscsi_tc
p libiscsi scsi_transport_iscsi ip6_tables ip_tables fuse
[    5.627249] CPU: 7 PID: 777 Comm: dmsetup Tainted: G            E     5.19.17-300.fc37.x86_64 #1
[    5.627252] Hardware name: Hewlett-Packard HP ENVY TS 17 Notebook PC/1966, BIOS F.70 10/20/2017
[    5.627253] RIP: 0010:bd_link_disk_holder+0x138/0x160
[    5.627257] Code: 00 84 c0 74 14 4d 89 6f 08 4d 89 7d 00 49 89 6d 08 4d 89 ac 24 a8 00 00 00 48 8b bb 48 03 00 00 e
8 1d 1e 0a 00 e9 25 ff ff ff <0f> 0b e9 f0 fe ff ff 48 8b 73 48 49 8b bc 24 a0 00 00 00 e8 d0 f7
[    5.627259] RSP: 0018:ffffade600697ac8 EFLAGS: 00010246
[    5.627261] RAX: 0000000000000000 RBX: ffff970947344b00 RCX: 0000000000000200
[    5.627263] RDX: ffff97094f5bd180 RSI: ffff97094487da00 RDI: ffff97094487da70
[    5.627264] RBP: 0000000000800021 R08: 0000000000000006 R09: 0000000000000008
[    5.627266] R10: 0000000000000021 R11: ffff970947302d80 R12: ffff97094487da00
[    5.627267] R13: ffff97094ef57800 R14: ffff97094487da70 R15: ffff970947344b00
[    5.627269] FS:  00007f8d13d2b840(0000) GS:ffff970c8f3c0000(0000) knlGS:0000000000000000
[    5.627270] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    5.627272] CR2: 000055dc8f92bd78 CR3: 0000000102a12005 CR4: 00000000001706e0
[    5.627274] Call Trace:
[    5.627276]  <TASK>
[    5.627279]  dm_get_table_device+0x107/0x1e0
[    5.627285]  dm_get_device+0x18f/0x230
[    5.627288]  linear_ctr+0xad/0x110
[    5.627291]  dm_table_add_target+0x15f/0x340
[    5.627294]  table_load+0x106/0x2c0
[    5.627297]  ? dev_suspend+0x2e0/0x2e0
[    5.627300]  ctl_ioctl+0x1f2/0x450
[    5.627306]  dm_ctl_ioctl+0xa/0x20
[    5.627309]  __x64_sys_ioctl+0x90/0xd0
[    5.627314]  do_syscall_64+0x5b/0x80
[    5.627318]  ? fpregs_restore_userregs+0x12/0xe0
[    5.627322]  ? exit_to_user_mode_prepare+0x18f/0x1f0
[    5.627326]  ? syscall_exit_to_user_mode+0x17/0x40
[    5.627328]  ? do_syscall_64+0x67/0x80
[    5.627331]  ? do_user_addr_fault+0x1e2/0x670
[    5.627336]  ? exc_page_fault+0x70/0x170
[    5.627338]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
[    5.627342] RIP: 0033:0x7f8d14028d6f
[    5.627352] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 18 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[    5.627353] RSP: 002b:00007fff2cc71d60 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[    5.627356] RAX: ffffffffffffffda RBX: 000055dc8f926c40 RCX: 00007f8d14028d6f
[    5.627357] RDX: 000055dc8f927d70 RSI: 00000000c138fd09 RDI: 0000000000000003
[    5.627358] RBP: 0000000000000003 R08: 00007f8d14150998 R09: 00007fff2cc71c20
[    5.627359] R10: 00007f8d1414e81d R11: 0000000000000246 R12: 00007f8d1414e6b6
[    5.627361] R13: 00007f8d1414e38c R14: 000055dc8f927da0 R15: 00007f8d1414e78c
[    5.627364]  </TASK>
[    5.627365] ---[ end trace 0000000000000000 ]---
[root@fedora gana]# systemctl status dracut-initqueue.service 
○ dracut-initqueue.service - dracut initqueue hook
     Loaded: loaded (/usr/lib/systemd/system/dracut-initqueue.service; static)
     Active: inactive (dead) since Mon 2023-02-13 22:28:34 IST; 5h 7min left
   Duration: 908ms
       Docs: man:dracut-initqueue.service(8)
             man:dracut.bootup(7)
   Main PID: 658 (code=exited, status=0/SUCCESS)
        CPU: 567ms

Feb 13 22:28:30 fedora systemd[1]: Starting dracut-initqueue.service - dracut initqueue hook...
Feb 13 22:28:32 fedora dracut-initqueue[760]: find: 'standard output': Broken pipe
Feb 13 22:28:32 fedora dracut-initqueue[760]: find: write error
Feb 13 22:28:33 fedora systemd[1]: Finished dracut-initqueue.service - dracut initqueue hook.
Feb 13 22:28:34 fedora systemd[1]: dracut-initqueue.service: Deactivated successfully.
Feb 13 22:28:34 fedora systemd[1]: Stopped dracut-initqueue.service - dracut initqueue hook.

Same traceback happens with vtoyboot-1.0.25 + kernel-5.19.17-300.fc37.x86_64. But, it failed to load dm_patch and hence was unable to remount host partition.

[    5.523304] dm_patch: module verification failed: signature and/or required key missing - tainting kernel
[    5.526198] ------------[ cut here ]------------
[    5.526201] WARNING: CPU: 2 PID: 783 at block/holder.c:80 bd_link_disk_holder+0x138/0x160
[    5.526207] Modules linked in: dm_patch(E) i915 nouveau rtsx_pci_sdmmc mmc_core drm_buddy mxm_wmi crct10dif_pclmul drm_display_helper crc32_pclmul crc32c_intel ghash_clmulni_intel cec drm_ttm_helper serio_raw r8169 hid_multitouch rtsx_pci ttm wmi video aacraid mvsas libsas vmw_pvscsi megaraid_sas megaraid smartpqi pmcraid uas vhci_hcd usbip_core xhci_plat_hcd usb_storage nvme nvme_core mptspi scsi_transport_spi mptsas mptscsih mptbase scsi_transport_sas sunrpc be2iscsi bnx2i cnic uio cxgb4i cxgb4 tls cxgb3i cxgb3 mdio libcxgbi libcxgb qla4xxx iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ip6_tables ip_tables fuse
[    5.526240] CPU: 2 PID: 783 Comm: dmsetup Tainted: G            E     5.19.17-300.fc37.x86_64 #1
[    5.526242] Hardware name: Hewlett-Packard HP ENVY TS 17 Notebook PC/1966, BIOS F.70 10/20/2017
[    5.526243] RIP: 0010:bd_link_disk_holder+0x138/0x160
[    5.526246] Code: 00 84 c0 74 14 4d 89 6f 08 4d 89 7d 00 49 89 6d 08 4d 89 ac 24 a8 00 00 00 48 8b bb 48 03 00 00 e8 1d 1e 0a 00 e9 25 ff ff ff <0f> 0b e9 f0 fe ff ff 48 8b 73 48 49 8b bc 24 a0 00 00 00 e8 d0 f7
[    5.526247] RSP: 0018:ffffa426c04d7ab0 EFLAGS: 00010246
[    5.526249] RAX: 0000000000000000 RBX: ffff942d006bd140 RCX: 0000000000000200
[    5.526250] RDX: ffff942d0d6fd180 RSI: ffff942d0f046000 RDI: ffff942d0f046070
[    5.526251] RBP: 0000000000800021 R08: 0000000000000006 R09: 0000000000000008
[    5.526252] R10: 0000000000000021 R11: ffff942d0708c180 R12: ffff942d0f046000
[    5.526253] R13: ffff942d0dfbc800 R14: ffff942d0f046070 R15: ffff942d006bd140
[    5.526255] FS:  00007f92c3227840(0000) GS:ffff94304f280000(0000) knlGS:0000000000000000
[    5.526256] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    5.526257] CR2: 000055cb152f6d78 CR3: 00000001114a6001 CR4: 00000000001706e0
[    5.526258] Call Trace:
[    5.526260]  <TASK>
[    5.526262]  dm_get_table_device+0x107/0x1e0
[    5.526267]  dm_get_device+0x18f/0x230
[    5.526269]  linear_ctr+0xad/0x110
[    5.526271]  dm_table_add_target+0x15f/0x340
[    5.526273]  table_load+0x106/0x2c0
[    5.526276]  ? dev_suspend+0x2e0/0x2e0
[    5.526278]  ctl_ioctl+0x1f2/0x450
[    5.526282]  dm_ctl_ioctl+0xa/0x20
[    5.526284]  __x64_sys_ioctl+0x90/0xd0
[    5.526288]  do_syscall_64+0x5b/0x80
[    5.526291]  ? exit_to_user_mode_prepare+0x18f/0x1f0
[    5.526294]  ? syscall_exit_to_user_mode+0x17/0x40
[    5.526296]  ? do_syscall_64+0x67/0x80
[    5.526298]  ? handle_mm_fault+0xae/0x280
[    5.526301]  ? do_user_addr_fault+0x1e2/0x670
[    5.526304]  ? do_syscall_64+0x67/0x80
[    5.526306]  ? exc_page_fault+0x70/0x170
[    5.526307]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
[    5.526310] RIP: 0033:0x7f92c3524d6f
[    5.526318] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 18 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[    5.526319] RSP: 002b:00007fff278b4200 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[    5.526321] RAX: ffffffffffffffda RBX: 000055cb152f1c40 RCX: 00007f92c3524d6f
[    5.526322] RDX: 000055cb152f2d70 RSI: 00000000c138fd09 RDI: 0000000000000003
[    5.526323] RBP: 0000000000000003 R08: 00007f92c364c998 R09: 00007fff278b40c0
[    5.526323] R10: 00007f92c364a81d R11: 0000000000000246 R12: 00007f92c364a6b6
[    5.526324] R13: 00007f92c364a38c R14: 000055cb152f2da0 R15: 00007f92c364a78c
[    5.526327]  </TASK>
[    5.526327] ---[ end trace 0000000000000000 ]---

But, Neither vtoyboot-1.0.20 or vtoyboot-1.0.25 + kernel-6.1.11-200.fc37.x86_64 could load dm_patch and hence was unable to remount host partition. There was no stack trace.

○ dracut-initqueue.service - dracut initqueue hook
     Loaded: loaded (/usr/lib/systemd/system/dracut-initqueue.service; static)
     Active: inactive (dead) since Mon 2023-02-13 23:01:15 IST; 5h 26min left
   Duration: 899ms
       Docs: man:dracut-initqueue.service(8)
             man:dracut.bootup(7)
   Main PID: 655 (code=exited, status=0/SUCCESS)
        CPU: 627ms

Feb 13 23:01:11 fedora systemd[1]: Starting dracut-initqueue.service - dracut initqueue hook...
Feb 13 23:01:13 fedora dracut-initqueue[776]: find: 'standard output': Broken pipe
Feb 13 23:01:13 fedora dracut-initqueue[776]: find: write error
Feb 13 23:01:13 fedora dracut-initqueue[789]: insmod: ERROR: could not insert module /tmp/dm_patch.ko: Invalid parameters
Feb 13 23:01:14 fedora systemd[1]: Finished dracut-initqueue.service - dracut initqueue hook.
Feb 13 23:01:15 fedora systemd[1]: dracut-initqueue.service: Deactivated successfully.
Feb 13 23:01:15 fedora systemd[1]: Stopped dracut-initqueue.service - dracut initqueue hook.

I conclude the dm_patch is out of compatibility with the recent kernels

hgkamath commented 1 year ago

Distributing dm_patch as a out-of-kernel-source-tree binary blob is a bad idea

The dm-module in the kernel is also updated from one kernel-version to the next.

kernel 6.2 is going to have new dm param in the module initialization code dm-init

Also, the ntfs3 module which was introduced in 5.15, with every release is getting bug-fixes that improve its reliability. So staying on an old kernel version is not a good idea.

hgkamath commented 1 year ago

Fedora-Workstation-Live-x86_64-Rawhide-20230213.n.0.iso 2023-02-14 02:39 2.0G sha256sum 8b92790aa713ac071603e66b6f4b68373b4411c9faa7f67659f37ec313f69311 dm_patch_64.ko failed to load

[root@localhost-live ~]# cat /mnt/a12/gana/tmp/vtoy2_fed38.log 
============== VENTOY =================
724 blocks
7127 blocks
130 blocks
Use x86_64 busybox toolkit ...
kenel version=Linux version 6.2.0-0.rc8.57.fc39.x86_64 (mockbuild@86703d3778704ddb965db8af5b490003) (gcc (GCC) 13.0.1 20230127 (Red Hat 13.0.1-0), GNU ld version 2.39-9.fc38) #1 SMP PREEMPT_DYNAMIC Mon Feb 13 16:43:46 UTC 2023
kenel cmdline=BOOT_IMAGE=/images/pxeboot/vmlinuz root=live:CDLABEL=Fedora-WS-Live-rawh-20230213-n-0 rd.live.image quiet rhgb rd.break=pre-mount
handover to init_chain
remove whole sbin directory
=====ventoy_unpack_initramfs: #/initrd001 0 FD37 /initrd001_tmp#
vtx=FD37 xzcat
253661 blocks
Now hand over to ventoy.sh
#### install vtoytool #####
try /ventoy/tool/vtoytool/00/ ...
vtoytool_64 OK
use vtoy_fuse_iso_64
/ventoy/tool/unsquashfs_64: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
use unsquashfs_32
use veritysetup64
kernel version
Linux version 6.2.0-0.rc8.57.fc39.x86_64 (mockbuild@86703d3778704ddb965db8af5b490003) (gcc (GCC) 13.0.1 20230127 (Red Hat 13.0.1-0), GNU ld version 2.39-9.fc38) #1 SMP PREEMPT_DYNAMIC Mon Feb 13 16:43:46 UTC 2023
OS=###rhel7###
VTKS=  VTOVERLAY=
vtInstDD=
vtNeedRepo=
patch /sbin/dmsquash-live-root ...
... /dev/sdc already exist ...
##### INOTIFYD: /dev/sdc2 is created (YES) ...
find ventoy partition ...
create_ventoy_device_mapper /dev/sdc --readonly
dmsetup avaliable in system /ventoy/tool/dmsetup
device-mapper module check success
######### ventoy_dm_patch ############
/ventoy/tool/dm_patch_64.ko exist OK
get dm_get_table_device address 0xffffffffb1bdb050 544
get dm_put_table_device address 0xffffffffb1bdb280 224
get_addr=0xffffffffb1bdb050 get_size=544
put_addr=0xffffffffb1bdb280 put_size=224
kprobe_reg_addr=ffffffffb121e8f0 kprobe_unreg_addr=ffffffffb121ddd0
ro_addr=ffffffffb109aa00 rw_addr=ffffffffb109aaa0 printk_addr=0
template module is /lib/modules/6.2.0-0.rc8.57.fc39.x86_64/kernel/fs/zonefs/zonefs.ko.xz zonefs.ko.xz
/ventoy/tool/vtoykmod -u /ventoy/tool/dm_patch_64.ko /ventoy/zonefs.ko.xz 
/ventoy/tool/vtoykmod -f /ventoy/tool/dm_patch_64.ko 4096 0x0 0xffffffffb109aa00 0xffffffffb109aaa0 0xffffffffb1bdb050 544 0xffffffffb1bdb280 224 0xffffffffb121e8f0 0xffffffffb121ddd0 
==== create ventoy device mapper success ====
no need to replace block device
mknod /dev/ventoy 253 0
vtScript=/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root /dev/ventoy
link /dev/dm-0 to /dev/mapper/ventoy
VTLABEL=Fedora-WS-Live-rawh-20230213-n-0
link /dev/dm-0 to /dev/disk/by-label/Fedora-WS-Live-rawh-20230213-n-0
[root@localhost-live ~]# dmesg | grep dm_p
[    8.406655] dm_patch: module verification failed: signature and/or required key missing - tainting kernel
[root@localhost-live ~]# lsmod | grep -E "[[:blank:],]dm"
[root@localhost-live ~]# grep dm_patch /proc/modules 
[root@localhost-live live]# mkdir /mnt/c1
[root@localhost-live live]# mount -t ntfs3 /dev/sdc1 /mnt/c1
mount: /mnt/c1: /dev/sdc1 already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.
[root@localhost-live ~]# 

[root@localhost-live ~]# systemctl status dracut-pre-udev.service 
○ dracut-pre-udev.service - dracut pre-udev hook
     Loaded: loaded (/usr/lib/systemd/system/dracut-pre-udev.service; static)
     Active: inactive (dead) since Wed 2023-02-15 14:39:34 EST; 23min ago
   Duration: 3min 5.087s
       Docs: man:dracut-pre-udev.service(8)
             man:dracut.bootup(7)
   Main PID: 673 (code=exited, status=0/SUCCESS)
        CPU: 2.163s

Feb 15 14:36:27 fedora rpc.statd[703]: Version 2.6.2 starting
Feb 15 14:36:27 fedora rpc.statd[703]: Initializing NSM state
Feb 15 14:36:27 fedora rpc.statd[703]: Running as root.  chown /var/lib/nfs/statd to choose different user
Feb 15 14:36:27 fedora rpc.idmapd[708]: Setting log level to 0
Feb 15 14:36:29 fedora dracut-pre-udev[807]: insmod: can't insert '/ventoy/tool/dm_patch_64.ko': invalid parameter
Feb 15 14:36:29 fedora systemd[1]: Finished dracut-pre-udev.service - dracut pre-udev hook.
Feb 15 14:39:33 fedora rpc.idmapd[708]: exiting on signal 15
Feb 15 14:39:34 fedora systemd[1]: dracut-pre-udev.service: Deactivated successfully.
Feb 15 14:39:34 fedora systemd[1]: Stopped dracut-pre-udev.service - dracut pre-udev hook.
Feb 15 14:39:34 fedora systemd[1]: dracut-pre-udev.service: Consumed 2.163s CPU time.
ventoy commented 1 year ago

Try the latest vtoyboot-1.0.26

youk commented 1 year ago

Same issue with recent Arch/SystemRescue that run on 6.1.x kernels. Ventoy 1.0.89.

[    7.518455] dm_patch: module verification failed: signature and/or required key missing - tainting kernel
[    7.518895] traps: Missing ENDBR: dmpatch_init+0x0/0x230 [dm_patch]
[    7.518914] kernel BUG at arch/x86/kernel/traps.c:255!
[    7.518924] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
[    7.518932] CPU: 4 PID: 583 Comm: insmod Tainted: G            E      6.1.20-1-lts #1 2bd5908fc4afa4994e35c5a97d82e9f11202cf4e
ventoy commented 1 year ago

@hgkamath @youk Try latest vtoyboot-1.0.28

youk commented 1 year ago

@ventoy I'm not using vtoyboot. Should I expect an update to Ventoy?

ventoy commented 1 year ago

@youk Ventoy-1.0.89 test systemrescue-10.00-amd64.iso (linux kernel 6.1.20-1-lts) OK. When VTOY_LINUX_REMOUNT=1 then you can mount the Ventoy partition after you boot into systemrescue. (Don't care about the dmesg, just mount it.)

youk commented 1 year ago

@ventoy As I mentioned, it doesn't work for me:

/dev/sda1 already mounted or mount point busy
ventoy commented 1 year ago

@youk

  1. Which ISO did you test?
  2. run the following command in the terminal and give the result
    uname -a
    blkid
    mount | grep sda
ventoy commented 1 year ago

@youk How did you get /dev/sda1 already mounted or mount point busy ? blkid didn't print any partition for /dev/sda which is your Ventoy disk?

youk commented 1 year ago

I tested systemrescue-10.00-amd64.iso.

[root@sysrescue ~]# uname -a
Linux sysrescue 6.1.20-1-lts #1 SMP PREEMPT_DYNAMIC Fri, 17 Mar 2023 13:31:00 +0000 x86_64 GNU/Linux
[root@sysrescue ~]# blkid
/dev/nvme0n1p3: UUID="3021cbd8-230e-4c61-8f2a-6faeb8fd6b5f" TYPE="swap" PARTUUID="70482933-fb53-49b7-80a7-0ceb9362066d"
/dev/nvme0n1p1: UUID="A544-D3FB" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="61d97585-3738-4b8b-bb99-511c96f0089b"
/dev/nvme0n1p2: UUID="e42d229f-bb34-460b-80cc-4b50fcdf1754" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="3389a50c-da5f-4a62-b54b-26dabe24b0f3"
/dev/loop0: TYPE="squashfs"
/dev/mapper/ventoy: BLOCK_SIZE="2048" UUID="2023-03-19-07-47-17-00" LABEL="RESCUE1000" TYPE="iso9660" PTUUID="598e2bd5" PTTYPE="dos"
/dev/sda2: SEC_TYPE="msdos" LABEL_FATBOOT="VTOYEFI" LABEL="VTOYEFI" UUID="440A-1007" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="VTOYEFI" PARTUUID="1b71b668-1175-4484-94a7-a84a8c338aa6"
/dev/sda3: LABEL="ext4" UUID="937ff581-c66d-4722-8c90-677cc0be0eea" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="9ca013fe-2c95-445a-8572-1d5b41c898b6"
/dev/sda1: LABEL="Ventoy" UUID="4E21-0000" BLOCK_SIZE="512" TYPE="exfat" PTTYPE="dos" PARTLABEL="Ventoy" PARTUUID="6b727c7f-7118-4379-96b9-8335dd118226"
[root@sysrescue ~]# mount | grep sda

SystemRescue 9.x works fine (kernel 5.15).

ventoy commented 1 year ago

run

mkdir abc
mount /dev/sda1 abc
youk commented 1 year ago
mount: /root/abc: /dev/sda1 already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.
ventoy commented 1 year ago

The following gif shows how I tested in VMWare.

test

youk commented 1 year ago

I see. But I am not running virtual machine. I am running real hardware.

ventoy commented 1 year ago

I will test in my laptop later, but I don't think there is anything difference about this. Did you test exactly as what I did step by step? Maybe you can make a video about your process.

ventoy commented 1 year ago

Besides, did you enable secure boot in your BIOS? If yes, then try disable it and retry for test.

EDIT: no need anymore. I test with secure boot enabled in VMware, and it also work fine. So I will test later in my PC and laptop.

youk commented 1 year ago

I will test in my laptop later, but I don't think there is anything difference about this.

The difference is that VMware has USB arbitrator service that switches USB devices between guest OS/host.

youk commented 1 year ago

I made a quick test. On my system this feature stopped working starting with kernel 5.18. So, works with archlinux-2022.05.01 (5.17.5), but doesn't work with archlinux-2022.06.01 (5.18.1) – and above.

youk commented 1 year ago

Maybe you can make a video about your process.

Sorry, I see no point in wasting time on that. I can post my Ventoy config if you suspect that I am doing something wrong. But please note that the same config is used for booting multiple ISOs. Some of them work as expected, others don't. The only significant difference among them is the kernel version.

ventoy commented 1 year ago

Please make a double check that you does use the latest Ventoy-1.0.89 release. I fixed an issue about VTOY_LINUX_REMOUNT option in Ventoy-1.0.89 for new kernel version, so for old release (e.g. Ventoy-1.0.88/Ventoy-1.0.87 ...) there indeed exist such similar issue. https://github.com/ventoy/Ventoy/commit/879a7592bdd58d1788e952efde9895fc48a3484e

youk commented 1 year ago

I am positive I am using 1.0.89:

image

ventoy commented 1 year ago

I test in my laptop and it also work fine.

IMG_3228 IMG_3229

DevReaper0 commented 1 year ago

I'm running Arch with kernel version 6.2.7 and am still getting the "/dev/sda1 already mounted or mount point busy" error.

ventoy commented 1 year ago

@DaRubyMiner360 Did you use Ventoy 1.0.89? Did you test ISO or vdisk ?
Run the following cmd

uname -a
blkid
mount
mkdir abc
mount /dev/sda1 abc
youk commented 1 year ago

I test in my laptop and it also work fine.

I can only conclude that the problem is related to hardware as well. I am ready to provide required diagnostic info in case you would like to pursue this issue. Thanks.

youk commented 1 year ago
mkdir abc
mount /dev/sda1 abc

BTW, modern mount has the option to create a directory:

mount -m /dev/sda1 abc
ventoy commented 1 year ago

@youk Can you give me a photo as my second photo above? (run the same commands in the terminal)

DevReaper0 commented 1 year ago

I am using Ventoy 1.0.89 with a vdisk. VTOY_LINUX_REMOUNT is enabled. The output of the commands:

[root@archlinux ~]# uname -a
Linux archlinux 6.2.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 18 Mar 2023 01:06:36 +0000 x86_64 GNU/Linux
[root@archlinux ~]# blkid
/dev/mapper/ventoy1: UUID="FD44-AE93" BLOCK_SIZE="512" TYPE="vfat"
/dev/nvme0n1p3: TYPE="BitLocker" PARTLABEL="Basic data partition" PARTUUID="63028025-84a9-4e76-8365-0e239feecac0"
/dev/nvme0n1p1: UUID="C691-9657" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="e958c44b-63ba-4257-95fc-0c937c65bff7"
/dev/mapper/ventoy2: UUID="b81a83e3-1d6e-4228-ab25-00107a83be83" BLOCK_SIZE="4096" TYPE="ext4"
/dev/sda2: SEC_TYPE="msdos" LABEL_FATBOOT="VTOYEFI" LABEL="VTOYEFI" UUID="1BF1-A7FE" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="f7fa2432-02"
/dev/sda1: LABEL="Ventoy" UUID="4E21-0000" BLOCK_SIZE="512" TYPE="exfat" PTTYPE="dos" PARTUUID="f7fa2432-01"
/dev/zram0: LABEL="zram0" UUID="33807b4d-34c9-4864-83a9-93ca1696d64f" TYPE="swap"
/dev/nvme0n1p2: PARTLABEL="Microsoft reserved partition" PARTUUID="7a3cae8b-dd56-4197-a902-fa26f62d1fe9"
/dev/mapper/ventoy: PTUUID="7e6c6daa-559f-45d9-9099-e8d0f5ad27e4" PTTYPE="gpt"
[root@archlinux ~]# mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=3751684k,nr_inodes=937921,mode=755,inode64)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/mapper/ventoy2 on / type ext4 (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=34,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=19029)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-sysctl.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-tmpfiles-setup-dev.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=3762444k,nr_inodes=1048576,inode64)
/dev/mapper/ventoy1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
ramfs on /run/credentials/systemd-tmpfiles-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-resolved.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=752488k,nr_inodes=188122,mode=700,uid=1000,gid=1000,inode64)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
jetbrains-toolbox on /tmp/.mount_jetbra7VlR7x type fuse.jetbrains-toolbox (ro,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
[root@archlinux ~]# mkdir abc
[root@archlinux ~]# mount /dev/sda1 abc
mount: /root/abc: /dev/sda1 already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.
ventoy commented 1 year ago

@DaRubyMiner360

  1. Did you use the latest vtoyboot-1.0.28 when you make this vdisk?
  2. If you boot arch ISO file from Ventoy with VTOY_LINUX_REMOUNT=1, can it mount the Ventoy partition?
ventoy commented 1 year ago

@youk Please mount /dev/sda2 and run as follows: image

Or just run as follows: image and copy the allmd5.txt to /dev/sda3 and then upload here.

youk commented 1 year ago

allmd5.txt

ventoy commented 1 year ago

Checksums are OK. As you said, it may be related to hardware. (maybe specific for CPU/Chipset combination)

ventoy commented 1 year ago

I google some docs, and one suggest is to add ibt=off boot option, you can try. When systemrescue boot option display, press e to enter grub shell and add ibt=off option in the kernel parameters as follows and finally press F10 to boot: image

ventoy commented 1 year ago

https://forum.garudalinux.org/t/intel-ibt-was-disabled-in-your-grub-configuration-to-prevent-an-issue-with-nvidia-graphics-cards/20102/5

The ibt=off kernel parameter turns off the new Indirect Branch Tracking security feature that was added to kernel 5.18.

It's a new hardware security feature that works on Intel 11th gen and newer processors to prevent certain types of attacks. Most of these already have software mitigations added to the kernels of various OSes, so this is simply moving some of that mitigation into newer hardware.

Unfortunately it was discovered that Nvidia's latest GPU driver triggers this security measure, so for the time being it is being disabled so that the Nvidia driver will continue to work. Hopefully it gets fixed soon and can be re-enabled in the future.

youk commented 1 year ago

I google some docs, and one suggest is to add ibt=off boot option, you can try.

It helped. Thanks for your assistance!

For reference, CPU is Intel 12th gen.

ventoy commented 1 year ago

You mean that when you add ibt=off option, then the mount is OK ?

youk commented 1 year ago

You mean that when you add ibt=off option, then the mount is OK ?

Correct.

ventoy commented 1 year ago

Please try this version.
Update to this version and retry (don't add ibt=off boot option to see whethe it can work now) ventoy-1.0.89A-windows.zip

youk commented 1 year ago

Nope, it didn't work out.

ventoy commented 1 year ago

The same result?

youk commented 1 year ago

Yes, the same error message.

ventoy commented 1 year ago

OK. I will do some research later.

ventoy commented 1 year ago

@youk Try this CI release: https://github.com/ventoy/Ventoy/actions/runs/4522443888 https://www.ventoy.net/en/doc_github_ci.html

youk commented 1 year ago

@ventoy Good, basically it works now. But still doesn't work when injection plugin is used – the same error message when remounting.

ventoy commented 1 year ago

@youk

With injection plugin, when you boot into Ventoy menu, press c to enter grub shell and run vtbreak 0 1 and then return to boot the ISO file. image

And this time you will get some debug message as follows. Take a photo about it and upload here. image

Please take two photos, one with injection plugin, and another without injection plugin.

ventoy commented 1 year ago

The dm_patch module install and run success in both with plugin and without plugin. So I don't know why without plugin can mount OK but with plugin can NOT mount OK. Please take a photo about the following commands with injection plugin.

blkid
mount | grep sda
mount -m  /dev/sda1  abc