grub update displays error

New to Debian (Or Linux in general)? Ask your questions here!

grub update displays error

Postby jamby » 2018-11-04 17:40

Hi
I've added to the /etc/default/grub file changing this line GRUB_CMDLINE_LINUX_DEFAULT="quiet isolcpus=0,1,2" the last part isolcpus=. I read that to write this into the grub.cfg file I need to run "update-grub". But when I run that I get this error:
Generating grub configuration file ...
/etc/grub.d/00_header: 331: /etc/grub.d/00_header: Bad substitution


Reading the grub docs says I could run "grub-install" but I am a chicken to do it since I know so little about grub2
anybody know what the next step should be?

Debian 9
grub 2.02~beta3-5

Thanks
Jim
jamby
 
Posts: 18
Joined: 2018-08-04 22:23

Re: grub update displays error

Postby p.H » 2018-11-04 18:05

Running grub-install is totally useless for this problem.
Please post the complete contents of /etc/default/grub.
Does the error remain if you revert the change ?
p.H
 
Posts: 631
Joined: 2017-09-17 07:12

Re: grub update displays error

Postby jamby » 2018-11-04 18:49

p.H.

Yes the error remains when changed back.

Listing of /etc/default/grub:
GRUB_CMDLINE_LINUX=""
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet isolcpus=0,1,2"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"


Thanks
Jim
jamby
 
Posts: 18
Joined: 2018-08-04 22:23

Re: grub update displays error

Postby Head_on_a_Stick » 2018-11-04 19:25

jamby wrote:
Code: Select all
/etc/grub.d/00_header: 331: /etc/grub.d/00_header: Bad substitution

Have you edited /etc/grub.d/00_header at all?

Here is mine, see if it fixes things:

https://gist.github.com/Head-on-a-Stick ... 845acbd585
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8172
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: grub update displays error

Postby jamby » 2018-11-04 19:54

Head_on_a_Stick

Only diff was in line 333 the value {GRUB_RECORDFAIL_TIMEOUT:10} I changed to match yours {GRUB_RECORDFAIL_TIMEOUT:-30}.
And that made the difference, update-grub worked.

Thank you
Jim

now back to the my /dev/chair
jamby
 
Posts: 18
Joined: 2018-08-04 22:23

Re: grub update displays error

Postby p.H » 2018-11-04 21:59

So it appears that you edited a script in /etc/grub.d/. You should avoid doing this unless it is really necessary. If you wanted to change the recordfail timeout, you just needed to set GRUB_RECORDFAIL_TIMEOUT in /etc/default/grub.
p.H
 
Posts: 631
Joined: 2017-09-17 07:12


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable