Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Boot direct to Vdisk
#1
Using this ventoy_grub.cfg:

Code:
menuentry "Boot Mint (Xfce)" {   
    set my_vdisk_path="/Virtualbox/LinuxMint(Xfce).vdi.vtoy"
   
    if search -n -s vdiskhd -f "$my_vdisk_path"; then
        vtoyboot_common_func "($vdiskhd)$my_vdisk_path"
    else
        echo "$my_vdisk_path not found"
    fi
}

then after the first menu loads, which says it couldn't find any ISOs, I can press F6 and then boot my vdisk from there, either from the USB stick or the computer's HDD (which is obviously faster). That works but I want to skip straight to the second menu.

I created this ventoy.json:

Code:
{
    "control": [
        { "VTOY_DEFAULT_MENU_MODE": "0" },
        { "VTOY_FILT_DOT_UNDERSCORE_FILE": "1" },
        { "VTOY_SORT_CASE_SENSITIVE": "0" },
        { "VTOY_MAX_SEARCH_LEVEL": "1" },
        { "VTOY_MENU_TIMEOUT": "10" },
        { "VTOY_DEFAULT_KBD_LAYOUT": "QWERTY_UK" },
        { "VTOY_FILE_FLT_VTOY": "1" },
        { "VTOY_DEFAULT_IMAGE": "/Virtualbox/LinuxMint(Xfce).vdi.vtoy" },
    ],
   
   "image_list": [
    "/Virtualbox/LinuxMint(Xfce).vdi.vtoy"
    "/Virtualbox/LinuxMint(MATE).vdi.vtoy"
    ]
}


but it says "syntax error detected" when I boot with that. Can anyone see what's wrong?

Also, I'd like to try booting my vdisk on my PC from my grub4dos boot menu, without needing to use a USB stick, but it seems I need vdiskchain and it doesn't seem to be available anywhere to download, only if you can compile it using the files here https://github.com/ventoy/vdiskchain which I don't know how to do. Is there anywhere I can download it?
Reply
#2
Ah, I feel a bit stupid, now I see that the compiled vdiskchain is here https://github.com/ventoy/vdiskchain/releases/tag/v1.3

I'm still not sure why my ventoy.json isn't working. I removed the "image_list" section, so it now looks like this:

Code:
{
    "control": [
        { "VTOY_DEFAULT_MENU_MODE": "0" },
        { "VTOY_FILT_DOT_UNDERSCORE_FILE": "1" },
        { "VTOY_SORT_CASE_SENSITIVE": "0" },
        { "VTOY_MAX_SEARCH_LEVEL": "1" },
        { "VTOY_MENU_TIMEOUT": "10" },
        { "VTOY_DEFAULT_KBD_LAYOUT": "QWERTY_UK" },
        { "VTOY_FILE_FLT_VTOY": "1" },
        { "VTOY_DEFAULT_IMAGE": "/Virtualbox/LinuxMint(Xfce).vdi.vtoy" }
    ]
}

and I don't get a syntax error anymore but it doesn't have any effect and it still boots to the "Couldn't find any ISOs" screen and I have to press F6 to load my custom menu and then select the (only) entry there to boot the vtoy file.
Reply
#3
{ "VTOY_FILE_FLT_VTOY": "1" },  
You misunderstood this option.
Set it to "1" means that filt .vtoy files (doesn't show .vtoy files).
So just delete this line.
Reply
#4
(10-07-2021, 11:47 PM)doveman Wrote: Ah, I feel a bit stupid, now I see that the compiled vdiskchain is here https://github.com/ventoy/vdiskchain/releases/tag/v1.3

I'm still not sure why my ventoy.json isn't working. I removed the "image_list" section, so it now looks like this:

Code:
{
    "control": [
        { "VTOY_DEFAULT_MENU_MODE": "0" },
        { "VTOY_FILT_DOT_UNDERSCORE_FILE": "1" },
        { "VTOY_SORT_CASE_SENSITIVE": "0" },
        { "VTOY_MAX_SEARCH_LEVEL": "1" },
        { "VTOY_MENU_TIMEOUT": "10" },
        { "VTOY_DEFAULT_KBD_LAYOUT": "QWERTY_UK" },
        { "VTOY_FILE_FLT_VTOY": "1" },
        { "VTOY_DEFAULT_IMAGE": "/Virtualbox/LinuxMint(Xfce).vdi.vtoy" }
    ]
}

and I don't get a syntax error anymore but it doesn't have any effect and it still boots to the "Couldn't find any ISOs" screen and I have to press F6 to load my custom menu and then select the (only) entry there to boot the vtoy file.


There is not one person here that is experienced in Linux variants or Windows that hasn't felt stupid from time to time on the road to competency . Back in the day when I was a Notes 3/4/5 admin on Solaris 2.4 hired because i had a MCSE 4 on Windows and was decent on Domino only to find out on day one there was only 5 windows servers and the rest of the 500+ where on Solaris 2.4 and there were a few on this new Linux platform..... 

It was baptism by fire. we worked in a standard open office lay out of pods or clusters and my pod of 4 was me and 3 Unix Uber Admins who could Sed/Awk/Grep and pipe stuff on one line in Korn or C shell (in VI of course) that still takes me multiple lines today and probably a --help or 2 for proper syntax. I had windows and Novell experience since dos 1/2/3 days so I wasn't completely useless and my co workers where awesome but before any 1 of them would stop and actually help me if i couldn't fix something or properly describe what was wrong even I always got the same reply and questions.

"Have you checked the logs?" at first id be where are the logs? soon it was "hey i found the log and opened it in VI with that sudo thing .......help!!!! i think the command prompt is broke" but in a small amount of time. your average 3 or 4 years later i was pretty decent.

im waffling but the 2 things I learnt on day 1 I practice every day still and now i am the semi competent old guy in the office.

When someone asks me these are the lessons i learnt ... Check the logs. then check them again. if you can turn up the debug level do that and then check the logs again....if the log doenst have any errors in it your probablly looking at the wrong log.
And finally what's pertinent to your original question and you fixed it but don't know why,  the answer to your syntax error was a comma at the end of this line
{ "VTOY_DEFAULT_IMAGE": "/Virtualbox/LinuxMint(Xfce).vdi.vtoy" }
 
after the squigly bracket which tells the computer that theres meant to be another line between 2 squiglys and finished with no comma before the square bracket

The advice given then and what i will say now that applies to any text based editing of anything that has syntax is its just like in carpentry we measure twice and cut once in VI or NANO or Atom or notepad or whatever your comfortable using read twice and commit or hit enter once specially in prod. 

Learn to indent in a pattern  so that you can easily see or at least minimize the time to figure out you have not closed something that was opened possibly hundred or thousands of lines ago is the very foundation of a good sysadmin .
if you have learnt to indent properly you should easily find this kind of simple error. 

squiglys are always the first character in a script  using Ventoys methodology followed usually by squares which are signifying the start of an array of more squiglys.  The first square one can be at the end of a line as above but i always put the closing one one after 3 spaces or whatever it might be as long as its consistant. this as you can see from your own code is easy to see.

If we have squares and regular brackets in play as well construct the document so its obvious where something was opened and now needs to be closed. alot of the editors will do this for you today and dont even go near VI or VIM till nano or something else is second nature.. and never ever feel stupid asking questions cos their is a bunch of us salty dogs out there that will happily assist you in forums just like this.... not one of us hasn't seen systems completely brought to there knees by random carriage returns and missing commas. :-} . if you get someone with very bad communication skills and they just seem angry and mad at the world that guy probably really knows his sh!t but not one of us got to be any good until we had made thousands of mistakes like missing commas.
Reply
#5
Cool memories, ubershark. Cool

Please edit your post to separate you contribution from doveman's quote.
Idea When a post helps you in any way, please rate it. Thank you. [Image: rateit.png]
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)