Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Design ventoy (support for setting different backgrounds for different folders).
#1
google translate:
In the video,https://disk.yandex.ru/i/4y6jChViAZXNvA , ventoy is installed on an external SSD disk with a capacity of 256GB. 8 themes are used:
- main menu,
- external menu(launching ventoy_grub.cfg),
- file manager (the idea and the main part of the code is nguyen ha thai trong, the author of the topics on the forum "grubfm_ventoyfm iso" and "ventoyfm1062")
- directory antivirus "/ISO/Antivirus"
- directory Windows Installation disks "/ISO/Install windows"
- directory linux Live-cd "/ISO/linux"
- directory the loaders "/ISO/multiboot"
- directory working with HDD,ssd,flash disks "/ISO/sistem utilit"

The difference from the original ventoy is only in adding code to the grub.conf file.
Native auto-search for files in { "VTOY_DEFAULT_SEARCH_ROOT": "/ventoymenu" }, but this folder is empty and therefore will not be displayed in the main menu.
The second Auto-search is carried out by the built-in file manager. Launching iso, img files... carried out by ventoy. Launching text files
with the cat command. In the file manager mode, not all iso, img files are launched from partitions other than hd0,1.
But these files are not launched from these places by other programs - a1ive/grub2-filemanager and nguyentumine/AIO-Boot.

Disadvantage and a big request to help:
Icons, aliases, themes... added manually:
for example, I have
Code:
if   regexp '^\b.*[kK][rR][dD].*$' "${name_icon}"; then
        set icon="Kaspersky";
    elif regexp '^\b.*[dD][rR][wW][eE][bB].*$' "${name_icon}"; then
        set icon="drweb";
    elif regexp '^\b.*[eE][sS][eE][tT].*$' "${name_icon}"; then
        set icon="eset";
    elif regexp '^\b.*[aA][vV][iI][rR][aA].*$' "${name_icon}"; then
        set icon="avira";
        ....

in the ventoy.json file

Code:
    "menu_class": [
            {
                "key": "krd",
                "class": "Kaspersky"
            },
            {
                "key": "drweb",
                "class": "drweb"
            },
            {
                "key": "eset",
                "class": "eset"
            },
            {
                "key": "avira",
                "class": "avira"
            },
            ....


1. Therefore, the request is how to extract data from the ventoy.json file from the terminal (in the grub.conf file).
Maybe longpanda has some kind of function.
2. Or how to run a binary file. The analog in the linux terminal is ./path/file_name
3. How to transfer data from the grub.conf file to the label component file theme.txt .
An analogue of "menu_tip" in the file ventoy.json or +label {text = "@VTOY_HOTKEY_TIP@"... in the file theme.txt .

For example, launching Kaspersky Rescue Disk antivirus
(press "Ctrl+r" - "GRUB2 Mode" will be displayed at the bottom, in the center of the screen and ... that's it :) then start.)
Reply
#2
(02-02-2022, 08:40 PM)AlexBryansk Wrote: google translate:
In the video,https://disk.yandex.ru/i/4y6jChViAZXNvA , ventoy is installed on an external SSD disk with a capacity of 256GB. 8 themes are used:
- main menu,
- external menu(launching ventoy_grub.cfg),
- file manager (the idea and the main part of the code is nguyen ha thai trong, the author of the topics on the forum "grubfm_ventoyfm iso" and "ventoyfm1062")
- directory antivirus "/ISO/Antivirus"
- directory Windows Installation disks "/ISO/Install windows"
- directory linux Live-cd "/ISO/linux"
- directory the loaders "/ISO/multiboot"
- directory working with HDD,ssd,flash disks "/ISO/sistem utilit"

The difference from the original ventoy is only in adding code to the grub.conf file.
Native auto-search for files in { "VTOY_DEFAULT_SEARCH_ROOT": "/ventoymenu" }, but this folder is empty and therefore will not be displayed in the main menu.
The second Auto-search is carried out by the built-in file manager. Launching iso, img files... carried out by ventoy. Launching text files
with the cat command. In the file manager mode, not all iso, img files are launched from partitions other than hd0,1.
But these files are not launched from these places by other programs - a1ive/grub2-filemanager and nguyentumine/AIO-Boot.

Disadvantage and a big request to help:
Icons, aliases, themes... added manually:
for example, I have
Code:
if   regexp '^\b.*[kK][rR][dD].*$' "${name_icon}"; then
        set icon="Kaspersky";
    elif regexp '^\b.*[dD][rR][wW][eE][bB].*$' "${name_icon}"; then
        set icon="drweb";
    elif regexp '^\b.*[eE][sS][eE][tT].*$' "${name_icon}"; then
        set icon="eset";
    elif regexp '^\b.*[aA][vV][iI][rR][aA].*$' "${name_icon}"; then
        set icon="avira";
        ....

in the ventoy.json file

Code:
    "menu_class": [
            {
                "key": "krd",
                "class": "Kaspersky"
            },
            {
                "key": "drweb",
                "class": "drweb"
            },
            {
                "key": "eset",
                "class": "eset"
            },
            {
                "key": "avira",
                "class": "avira"
            },
            ....


1. Therefore, the request is how to extract data from the ventoy.json file from the terminal (in the grub.conf file).
Maybe longpanda has some kind of function.
2. Or how to run a binary file. The analog in the linux terminal is ./path/file_name
3. How to transfer data from the grub.conf file to the label component file theme.txt .
An analogue of "menu_tip" in the file ventoy.json or +label {text = "@VTOY_HOTKEY_TIP@"... in the file theme.txt .

For example, launching Kaspersky Rescue Disk antivirus
(press "Ctrl+r" - "GRUB2 Mode" will be displayed at the bottom, in the center of the screen and ... that's it Smile then start.)
ventoyfm of the future created by serhat100
https://www.tnctr.com/topic/1104765-alta..._g4e-1064/
video clip
https://disk.yandex.com.tr/i/JOMCDMRPePAbGg
Reply
#3
(02-03-2022, 06:39 AM)nguyen ha thai trong Wrote:
(02-02-2022, 08:40 PM)AlexBryansk Wrote: For example, launching Kaspersky Rescue Disk antivirus
(press "Ctrl+r" - "GRUB2 Mode" will be displayed at the bottom, in the center of the screen and ... that's it Smile then start.)
ventoyfm of the future created by serhat100
https://www.tnctr.com/topic/1104765-alta..._g4e-1064/
video clip
https://disk.yandex.com.tr/i/JOMCDMRPePAbGg

Kaspersky Rescue Disk antivirus

The krd.iso file should be in the root of any partition of the hdd and also the data name should be created in a folder with krd.iso in it. 

krd.iso.cfg

set timeout=0

menuentry "${chosen_path}" --class=kapersky {
set iso_path="${vtoy_iso_part}/${chosen_path}"
set lang="en"
if cpuid -l; then set _kernel="k-x86_64"; else set _kernel_="k-x86"; fi
loopback loop $iso_path
linux (loop)/boot/grub/${_kernel} net.ifnames=0 lang=${lang} dostartx trace isoloop=krd.iso
initrd (loop)/boot/grub/initrd.xz
}

Reply
#4
Thanks for the reply.
I didn't set the task to run some file. This is handled by Venntoy. Therefore, I do not create menuentry manually.
I set the task to change the appearance. Namely, each catalog has its own theme.
Reply
#5
(02-04-2022, 06:26 AM)AlexBryansk Wrote: Thanks for the reply.
I didn't set the task to run some file. This is handled by Venntoy. Therefore, I do not create menuentry manually.
I set the task to change the appearance. Namely, each catalog has its own theme.
serhat100 only adds a small code in grub.cfg to boot linux iso files from any partition, has built-in functions for f7, f8 keys to switch back and forth with grubfm, g4efi, the rest is original ventoy1.0.64
Reply
#6
(02-03-2022, 07:19 AM)serhat100 Wrote:
(02-03-2022, 06:39 AM)nguyen ha thai trong Wrote:
(02-02-2022, 08:40 PM)AlexBryansk Wrote: For example, launching Kaspersky Rescue Disk antivirus
(press "Ctrl+r" - "GRUB2 Mode" will be displayed at the bottom, in the center of the screen and ... that's it Smile then start.)
ventoyfm of the future created by serhat100
https://www.tnctr.com/topic/1104765-alta..._g4e-1064/
video clip
https://disk.yandex.com.tr/i/JOMCDMRPePAbGg

Kaspersky Rescue Disk antivirus

The krd.iso file should be in the root of any partition of the hdd and also the data name should be created in a folder with krd.iso in it. 

krd.iso.cfg

set timeout=0

menuentry "${chosen_path}" --class=kapersky {
set iso_path="${vtoy_iso_part}/${chosen_path}"
set lang="en"
if cpuid -l; then set _kernel="k-x86_64"; else set _kernel_="k-x86"; fi
loopback loop $iso_path
linux (loop)/boot/grub/${_kernel} net.ifnames=0 lang=${lang} dostartx trace isoloop=krd.iso
initrd (loop)/boot/grub/initrd.xz
}

this code boot fails, must use grubfm to boot ok from any partition
Reply
#7
Try using linux16 and initrd16 commands instead?
Reply
#8
(02-04-2022, 07:32 PM)Steve2926 Wrote: Try using linux16 and initrd16 commands instead?
boot still fails as above
Reply
#9
Code:
# ISO file must be located at /data/krd.iso
menuentry "Kaspersky Rescue Disk 2018 (PTN 3)" {
set iso_path="/data/krd.iso"
set lang="en"
set root=(${vtoydev},3)
# en=English; ru=Russian
# if [ x$lang != xru ]; then set lang=en; fi
# booting ${iso_path}
search -s root -f ${iso_path}
loopback loop ${iso_path}
if cpuid -l; then set _kernel="k-x86_64"; else set _kernel_="k-x86"; fi
linux (loop)/boot/grub/${_kernel} net.ifnames=0 lang=${lang} dostartx isoloop=krd.iso
initrd (loop)/boot/grub/initrd.xz
}


This works for me from VBOX. Seems OK with both NTFS and FAT32 formatted partitions (not tried exFAT). Tested under VBOX+Win10, UEFI64 and Legacy BIOS VMs.
Search line can be deleted.
Please stop cross-posting. This thread is about backgrounds not booting ISOs !
Reply
#10
(hd1,...)/krd.iso
(hd1,...)/data/krd.iso

It works if I have two krd.iso in any part of the hard disk. Could you please test the following line of code as follows.

set iso_path="${vtoy_iso_part}${chosen_path}"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)