Morgan@pavilion:~
$ sudo nano /etc/grub.d/40_custom
Morgan@pavilion:~
$ sudo update-grub
Generating grub configuration file ...
Found theme: /boot/grub/themes/mx_linux/theme.txt
Found linux image: /boot/vmlinuz-6.1.0-35-amd64
Found initrd image: /boot/initrd.img-6.1.0-35-amd64
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 196
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
Morgan@pavilion:~
$ nl -ba /boot/grub/grub.cfg.new | sed -n '180,210p'
180 ### END /etc/grub.d/20_memtest86+ ###
181
182 ### BEGIN /etc/grub.d/30_os-prober ###
183 ### END /etc/grub.d/30_os-prober ###
184
185 ### BEGIN /etc/grub.d/30_uefi-firmware ###
186 ### END /etc/grub.d/30_uefi-firmware ###
187
188 ### BEGIN /etc/grub.d/40_custom ###
189 # This file provides an easy way to add custom menu entries. Simply type the
190 # menu entries you want to add after this comment. Be careful not to change
191 # the 'exec tail' line above.
192 menuentry "Puppy Linux (BookwormPup64)"
193 set root=(hd0,2)
194 linux /dpupbw6410.0.11frugal/vmlinuz root=/dev/sda2 pmedia=atahd
195 initrd /dpupbw6410.0.11frugal/initrd.gz
196 }
197 ### END /etc/grub.d/40_custom ###
198
199 ### BEGIN /etc/grub.d/41_custom ###
200 if [ -f ${config_directory}/custom.cfg ]; then
201 source ${config_directory}/custom.cfg
202 elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
203 source $prefix/custom.cfg;
204 fi
205 ### END /etc/grub.d/41_custom ###
Morgan@pavilion:~