Ventoy Forums
Coexistence of Centos on Ventoy and Reserved Partitions - Printable Version

+- Ventoy Forums (https://forums.ventoy.net)
+-- Forum: Ventoy General Use —— Ventoy 使用交流 (https://forums.ventoy.net/forumdisplay.php?fid=1)
+--- Forum: Ventoy Discussion Forum (https://forums.ventoy.net/forumdisplay.php?fid=2)
+--- Thread: Coexistence of Centos on Ventoy and Reserved Partitions (/showthread.php?tid=2452)

Pages: 1 2


Coexistence of Centos on Ventoy and Reserved Partitions - xk-devops - 05-10-2023

After installing Ventoy on a disk and installing Centos in Reserved, only Centos can be accessed when booting up. Can Ventoy coexist with Centos in Reserved? Choose whether to access Ventoy or Ventoy when booting up? Thank you. And I have donated and hope to receive help, but no one in the group has replied to the message!
[Image: WEB3674d4ae3b84f9b95c66a8c2589b5382?meth...cdac15a62e]


RE: Coexistence of Centos on Ventoy and Reserved Partitions - AlexBryansk - 05-10-2023

You mean:
1. You installed ventoy first.
2. Then we installed Centos.
3. you have lost the menu item - download Ventoy.

If so, add the Ventoy boot "menuentry" to grub Centos.


RE: Coexistence of Centos on Ventoy and Reserved Partitions - xk-devops - 05-11-2023

(05-10-2023, 08:53 PM)AlexBryansk Wrote: You mean:
1. You installed ventoy first.
2. Then we installed Centos.
3. you have lost the menu item - download Ventoy.

If so, add the Ventoy boot "menuentry"  to grub Centos.
Thank you for your reply, but I have not studied grub. Could you please add the menu from the grub/grub.cfg file in the second partition directly to the grub.cfg file in Centos. If there is an example, it would be greatly appreciated


RE: Coexistence of Centos on Ventoy and Reserved Partitions - xk-devops - 05-11-2023

(05-11-2023, 12:59 AM)xk-devops Wrote:
(05-10-2023, 08:53 PM)AlexBryansk Wrote: You mean:
1. You installed ventoy first.
2. Then we installed Centos.
3. you have lost the menu item - download Ventoy.

If so, add the Ventoy boot "menuentry"  to grub Centos.
Thank you for your reply, but I have not studied grub. Could you please add the menu from the grub/grub.cfg file in the second partition directly to the grub.cfg file in Centos. If there is an example, it would be greatly appreciated
Hello, I have added grub/grub.cfg under the second partition of Ventoy to Centos'/etc/grub.d/40_ In the custom file, the option 'Ventoy' appears on reboot, but the retrieved path is incorrect and the partition where iso is stored cannot be directly retrieved. I saw VTOY in the document_ DEFAULT_ SEARCH_ The ROOT variable can be used to set the search path, but how can this variable be set to search for partitions that store iso


RE: Coexistence of Centos on Ventoy and Reserved Partitions - Steve2926 - 05-11-2023

If the USB drive no longer boots to Ventoy then Ventoy may not work because Ventoy checks the MBR for Ventoy boot code which has been replaced by Centos.
You need to run the Ventoy Update process so it installs the Ventoy boot code so that it boots to Ventoy.
Then from the Ventoy menu you should be able to boot to Centos on partition 3.
Also are you UEFI-booting or Legacy/BIOS booting or both?


RE: Coexistence of Centos on Ventoy and Reserved Partitions - xk-devops - 05-12-2023

(05-11-2023, 01:10 PM)Steve2926 Wrote: If the USB drive no longer boots to Ventoy then Ventoy may not work because Ventoy checks the MBR for Ventoy boot code which has been replaced by Centos.
You need to run the Ventoy Update process so it installs the Ventoy boot code so that it boots to Ventoy.
Then from the Ventoy menu you should be able to boot to Centos on partition 3.
Also are you UEFI-booting or Legacy/BIOS booting or both?
Thank you for your reply. I am UEFI guide. But in the future, both may be compatible. May I ask how to boot Centos in Ventoy and add Centos' grub.cfg to Ventoy's grub


RE: Coexistence of Centos on Ventoy and Reserved Partitions - AlexBryansk - 05-12-2023

I have Ventoy and CentOS_7 on different media and everything works. Relative to my system.


1.

When you turn on the computer, by default, the CentOS_7 menu is loaded in UEFI mode. To add the "start VENTOY" item to the CentOS_7 menu, write to the "sdb2/boot/efi/EFI/centos/grub.cfg" file (I have a CentOS_7 boot sector on sdb2, you probably have sdb3):

In the file "sdb2/boot/efi/EFI/centos/grub.cfg" write:
Code:
menuentry 'CentOS_7 Linux' --class centos
......
}
......
### BEGIN /etc/grub.d/30_os-prober ###

  menuentry "start VENTOY" --class ventoy {
        search --set=root -f  /ventoy/ventoy.cpio;
        chainloader (${root})/efi/boot/BOOTx64.efi;
        boot;
  }

2.

To start CentOS_7 from Ventoy menu by "F6":

a)
Find the UUID of the CentOS boot sector (you probably have sdb3): ls, blkid, lsblk...
For example, we enter the command: 
Code:
lsblk -o  +uuid,LABEL,PARTLABEL,model


System response:
Code:
[root@localhost ~]# lsblk -o  +uuid,LABEL,PARTLABEL,model
NAME              MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT                  UUID                                   LABEL        PARTLABEL                    MODEL                                                     
sdb                 8:16   0 232,9G  0 disk                                                                                                              Samsung SSD 860
├─sdb1              8:17   0   200M  0 part /boot/efi                   3438-B9A1                                           EFI System Partition        
├─sdb2              8:18   0     1G  0 part /boot                       d251a781-25aa-41f4-aft3-d6972bc010db                                            
└─sdb3              8:19   0 231,7G  0 part                             e4vhO5-5ePN-rPof-r77Q-y11x-Txt3-KKZHRm                                          
  ├─centos00-root 253:0    0    50G  0 lvm  /                           d9a6d9e5-d5e0-4bfc-ab98-5ba1dd918aa9                                            
  ├─centos00-swap 253:1    0   7,8G  0 lvm  [SWAP]                      570215de-e3e3-407e-9b1f-41f25b5445bf                                            
  └─centos00-home 253:2    0   174G  0 lvm  /home                       12e67e6d-8af0-42f1-b1e0-0fedfce4a72b

I have CentOS bootloader on sdb2  --  uuid: d251a781-25aa-41f4-aft3-d6972bc010db

b)
In the file "/ventoy/ventoy_grub.cfg" or "/grub/grub.cfg" (but it will be in the main Ventoy menu) we write:

Code:
menuentry "  start grub.cfg CentOS" --class  centos{
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_gpt
    insmod ext2
    search --no-floppy --fs-uuid --set=root d251a781-25aa-41f4-aft3-d6972bc010db
    configfile /grub2/grub.cfg
}



RE: Coexistence of Centos on Ventoy and Reserved Partitions - xk-devops - 05-13-2023

(05-12-2023, 08:55 PM)AlexBryansk Wrote: I have Ventoy and CentOS_7 on different media and everything works. Relative to my system.


1.

When you turn on the computer, by default, the CentOS_7 menu is loaded in UEFI mode. To add the "start VENTOY" item to the CentOS_7 menu, write to the "sdb2/boot/efi/EFI/centos/grub.cfg" file (I have a CentOS_7 boot sector on sdb2, you probably have sdb3):

In the file "sdb2/boot/efi/EFI/centos/grub.cfg" write:
Code:
menuentry 'CentOS_7 Linux' --class centos
......
}
......
### BEGIN /etc/grub.d/30_os-prober ###

  menuentry "start VENTOY" --class ventoy {
        search --set=root -f  /ventoy/ventoy.cpio;
        chainloader (${root})/efi/boot/BOOTx64.efi;
        boot;
  }

2.

To start CentOS_7 from Ventoy menu by "F6":

a)
Find the UUID of the CentOS boot sector (you probably have sdb3): ls, blkid, lsblk...
For example, we enter the command: 
Code:
lsblk -o  +uuid,LABEL,PARTLABEL,model


System response:
Code:
[root@localhost ~]# lsblk -o  +uuid,LABEL,PARTLABEL,model
NAME              MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT                  UUID                                   LABEL        PARTLABEL                    MODEL                                                     
sdb                 8:16   0 232,9G  0 disk                                                                                                              Samsung SSD 860
├─sdb1              8:17   0   200M  0 part /boot/efi                   3438-B9A1                                           EFI System Partition        
├─sdb2              8:18   0     1G  0 part /boot                       d251a781-25aa-41f4-aft3-d6972bc010db                                            
└─sdb3              8:19   0 231,7G  0 part                             e4vhO5-5ePN-rPof-r77Q-y11x-Txt3-KKZHRm                                          
  ├─centos00-root 253:0    0    50G  0 lvm  /                           d9a6d9e5-d5e0-4bfc-ab98-5ba1dd918aa9                                            
  ├─centos00-swap 253:1    0   7,8G  0 lvm  [SWAP]                      570215de-e3e3-407e-9b1f-41f25b5445bf                                            
  └─centos00-home 253:2    0   174G  0 lvm  /home                       12e67e6d-8af0-42f1-b1e0-0fedfce4a72b

I have CentOS bootloader on sdb2  --  uuid: d251a781-25aa-41f4-aft3-d6972bc010db

b)
In the file "/ventoy/ventoy_grub.cfg" or "/grub/grub.cfg" (but it will be in the main Ventoy menu) we write:

Code:
menuentry "  start grub.cfg CentOS" --class  centos{
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_gpt
    insmod ext2
    search --no-floppy --fs-uuid --set=root d251a781-25aa-41f4-aft3-d6972bc010db
    configfile /grub2/grub.cfg
}
Thank you very much. I will try and see according to the method you provided. Thank you very much again


RE: Coexistence of Centos on Ventoy and Reserved Partitions - xk-devops - 05-25-2023

(05-13-2023, 12:14 PM)xk-devops Wrote:
(05-12-2023, 08:55 PM)AlexBryansk Wrote: I have Ventoy and CentOS_7 on different media and everything works. Relative to my system.


1.

When you turn on the computer, by default, the CentOS_7 menu is loaded in UEFI mode. To add the "start VENTOY" item to the CentOS_7 menu, write to the "sdb2/boot/efi/EFI/centos/grub.cfg" file (I have a CentOS_7 boot sector on sdb2, you probably have sdb3):

In the file "sdb2/boot/efi/EFI/centos/grub.cfg" write:
Code:
menuentry 'CentOS_7 Linux' --class centos
......
}
......
### BEGIN /etc/grub.d/30_os-prober ###

  menuentry "start VENTOY" --class ventoy {
        search --set=root -f  /ventoy/ventoy.cpio;
        chainloader (${root})/efi/boot/BOOTx64.efi;
        boot;
  }

2.

To start CentOS_7 from Ventoy menu by "F6":

a)
Find the UUID of the CentOS boot sector (you probably have sdb3): ls, blkid, lsblk...
For example, we enter the command: 
Code:
lsblk -o  +uuid,LABEL,PARTLABEL,model


System response:
Code:
[root@localhost ~]# lsblk -o  +uuid,LABEL,PARTLABEL,model
NAME              MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT                  UUID                                   LABEL        PARTLABEL                    MODEL                                                     
sdb                 8:16   0 232,9G  0 disk                                                                                                              Samsung SSD 860
├─sdb1              8:17   0   200M  0 part /boot/efi                   3438-B9A1                                           EFI System Partition        
├─sdb2              8:18   0     1G  0 part /boot                       d251a781-25aa-41f4-aft3-d6972bc010db                                            
└─sdb3              8:19   0 231,7G  0 part                             e4vhO5-5ePN-rPof-r77Q-y11x-Txt3-KKZHRm                                          
  ├─centos00-root 253:0    0    50G  0 lvm  /                           d9a6d9e5-d5e0-4bfc-ab98-5ba1dd918aa9                                            
  ├─centos00-swap 253:1    0   7,8G  0 lvm  [SWAP]                      570215de-e3e3-407e-9b1f-41f25b5445bf                                            
  └─centos00-home 253:2    0   174G  0 lvm  /home                       12e67e6d-8af0-42f1-b1e0-0fedfce4a72b

I have CentOS bootloader on sdb2  --  uuid: d251a781-25aa-41f4-aft3-d6972bc010db

b)
In the file "/ventoy/ventoy_grub.cfg" or "/grub/grub.cfg" (but it will be in the main Ventoy menu) we write:

Code:
menuentry "  start grub.cfg CentOS" --class  centos{
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_gpt
    insmod ext2
    search --no-floppy --fs-uuid --set=root d251a781-25aa-41f4-aft3-d6972bc010db
    configfile /grub2/grub.cfg
}
Thank you very much. I will try and see according to the method you provided. Thank you very much again
Hello, after trying your method, only method 2 (To start CentOS_7 from Ventoy menu by "F6") was successful. Adding Ventoy to Centos' grub did not succeed. I tried it in a traditional legal system, and the code is as follows. Is there a solution
Code:
### BEGIN /etc/grub.d/10_linux ###
menuentry "Ventoy" --class=custom {
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_gpt
    insmod xfs
    insmod fat
    #search --no-floppy --fs-uuid --set=root 83A6-E98E
    search --set=root -f  /ventoy/ventoy.cpio
    chainloader (${root})/ventoy/ventoy_x64.efi
    configfile /grub/grub.cfg
}



RE: Coexistence of Centos on Ventoy and Reserved Partitions - AlexBryansk - 05-25-2023

In a similar topic:
使用gurb2 启动 ventory


Longpanda advised:

对于 Legacy BIOS 模式:
chainloader (hd1)+1
boot

对于 UEFI 模式:
chainoader (hd1,2)/efi/boot/grubx64_real.efi
boot