Is there any reason for extensive use of quotes and escape characters with kernel boot parameters in Grub4Dos, just like there is in Grub2?
I have created menu.lst entry to boot Clonezilla Live from the hard drive based on Grub2 code provided on Clonezilla's web page. The code contains lots of quotes and escape characters as Clonezilla's developers had apparently encountered problems in Grub2 if quote marks were not preceded by a backslash. I assume that all this \".....\" on the kernel line is not really needed in Grub4Dos because it has limited number of internal variables compared to Grub2 and it is easy to see that all kernel parameters are different than those variables (in which case there is no reason to enclose them in quote marks). Please let me know if I am missing something.
Also, is there any command available in Grub4Dos which would get the full list of internal variables printed? The set command won't do it (it will only show user defined variables). To my knowledge the internal variables have not changed for years and are as follows (but I might be wrong):
@date @path @random @retval @root @time
? ?_BOOT ?_UUID ?_WENV
Here is the code for booting Clonezilla Live from the hard drive, with quotes and backslashes cleaned-up. Both the original and cleaned-up version works ok.
set BOP1=... ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" ocs_live_batch=\"no\" ... set BOP1=... ocs_live_run=ocs-live-general ocs_live_extra_param= ocs_live_batch=no ... set BOP3=ocs_repository=\"dev:///dev/sda8\" set BOP3=ocs_repository=dev:///dev/sda8
Complete code before clean-up:
title Clonezilla\nVer: 2.7.2-39-amd64. To enter interactive mode run: ocs-sr -x set BOP1=boot=live union=overlay username=user config components noswap edd=on nomodeset enforcing=0 noeject locales=en_US.UTF-8 keyboard-layouts=NONE ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" ocs_live_batch=\"no\" vga=788 ip= net.ifnames=0 nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 toram=live-hd,syslinux,EFI,boot,.disk,utils set BOP2=live-media-path=/live-hd bootfrom=/dev/sda7 set BOP3=ocs_repository=\"dev:///dev/sda8\" root (hd0,6) kernel /live-hd/vmlinuz %BOP1% %BOP2% %BOP3% initrd /live-hd/initrd.img
Complete code after clean-up:
title Clonezilla\nVer: 2.7.2-39-amd64. To enter interactive mode run: ocs-sr -x set BOP1=boot=live union=overlay username=user config components noswap edd=on nomodeset enforcing=0 noeject locales=en_US.UTF-8 keyboard-layouts=NONE ocs_live_run=ocs-live-general ocs_live_extra_param= ocs_live_batch=no vga=788 ip= net.ifnames=0 nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 toram=live-hd,syslinux,EFI,boot,.disk,utils set BOP2=live-media-path=/live-hd bootfrom=/dev/sda7 set BOP3=ocs_repository=dev:///dev/sda8 root (hd0,6) kernel /live-hd/vmlinuz %BOP1% %BOP2% %BOP3% initrd /live-hd/initrd.img
To verify after boot-up that all parameters were properly passed to the kernel by the boot loader see /proc/cmdline
Clonezilla's documentation:
https://clonezilla.org/livehd.php
----------
Grub4Dos v0.4.6a 2020-03-04
Edited by Lex24, 31 July 2021 - 09:18 AM.