LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-25-2022, 03:13 AM   #1
murdo
Member
 
Registered: Aug 2021
Location: Scotland
Distribution: Slackware64-Current
Posts: 91

Rep: Reputation: 28
Grub mkconfig fails to run: "unterminated `s' command"


Pretty much the title; I updated my kernel with the most recent Slackware Current changes, tried running
Code:
grub-mkconfig -o /boot/grub/grub.cfg
to refresh grub, and I get the error
Code:
sed: -e expression #1, char 11: unterminated `s' command
Never had something like this happen before, grub's always worked. I'm now worried if I shut down my system I won't be able to boot it again.
 
Old 01-25-2022, 04:00 AM   #2
teoberi
Member
 
Registered: Jan 2018
Location: Romania
Distribution: Slackware64-current (servers)/Windows 11/Ubuntu (workstations)
Posts: 624

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Without running
Code:
grub-mkconfig -o /boot/grub/grub.cfg
my systems boot with the latest kernel update (Upgraded ? Rebuilt).
If you use symbolic links, the previous command is not required, especially if you have manually modified the file grub.cfg.
 
Old 01-25-2022, 04:19 AM   #3
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,467

Rep: Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226
Quote:
Originally Posted by murdo View Post
Pretty much the title; I updated my kernel with the most recent Slackware Current changes, tried running
Code:
grub-mkconfig -o /boot/grub/grub.cfg
to refresh grub, and I get the error
Code:
sed: -e expression #1, char 11: unterminated `s' command
Never had something like this happen before, grub's always worked. I'm now worried if I shut down my system I won't be able to boot it again.
Can you post your /etc/default/grub ?
 
Old 01-25-2022, 08:30 AM   #4
murdo
Member
 
Registered: Aug 2021
Location: Scotland
Distribution: Slackware64-Current
Posts: 91

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by teoberi View Post
Without running
Code:
grub-mkconfig -o /boot/grub/grub.cfg
my systems boot with the latest kernel update (Upgraded ? Rebuilt).
If you use symbolic links, the previous command is not required, especially if you have manually modified the file grub.cfg.
That's interesting. In the past I've failed to run that command after upgrading the kernel and Current hasn't booted; I had to log in to 14.2 and re-run the command from there, after which Current was able to boot.

I haven't manually modified grub.cfg, since it says not to in the file and I don't know how the stuff in there works.


Quote:
Originally Posted by marav View Post
Can you post your /etc/default/grub ?
Yep! Contents here:

Code:
# If you change this file, run grub-mkconfig -o /boot/grub/grub.cfg
# afterwards to update /boot/grub/grub.cfg.

GRUB_DEFAULT="Slackware-15.0 GNU/Linux"
#GRUB_HIDDEN_TIMEOUT="0"
GRUB_HIDDEN_TIMEOUT_QUIET="false"
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR="$( sed s/Slackware /Slackware-/ /etc/slackware-version )"
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""

# 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"
#GRUB_GFXMODE="1024x768x32"

# Font used on the graphical terminal:

# 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"

GRUB_DISABLE_OS_PROBER="false"

GRUB_SAVEDEFAULT="false"
GRUB_FONT="/boot/grub/unicode.pf2"
There's also a grub.new, I just noticed -- here are the contents for it:

Code:
# If you change this file, run grub-mkconfig -o /boot/grub/grub.cfg
# afterwards to update /boot/grub/grub.cfg.

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=$( sed 's/Slackware /Slackware-/' /etc/slackware-version )
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""

# 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
#GRUB_GFXMODE=1024x768x32

# Font used on the graphical terminal:
#GRUB_FONT=/usr/share/grub/dejavusansmono.pf2

# 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"
 
Old 01-25-2022, 08:42 AM   #5
giomat
Member
 
Registered: Jul 2017
Posts: 342

Rep: Reputation: 243Reputation: 243Reputation: 243
check the line with
Code:
GRUB_DISTRIBUTOR=...
there's a syntax difference for sed with the .new file
 
Old 01-25-2022, 08:43 AM   #6
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,467

Rep: Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226
Quote:
Originally Posted by murdo View Post
That's interesting. In the past I've failed to run that command after upgrading the kernel and Current hasn't booted; I had to log in to 14.2 and re-run the command from there, after which Current was able to boot.

I haven't manually modified grub.cfg, since it says not to in the file and I don't know how the stuff in there works.
in your /etc/default/grub
Code:
GRUB_DISTRIBUTOR="$( sed s/Slackware /Slackware-/ /etc/slackware-version )"
should be - with the simple quotes -
Code:
GRUB_DISTRIBUTOR=$( sed 's/Slackware /Slackware-/' /etc/slackware-version )
 
Old 01-25-2022, 09:59 AM   #7
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,467

Rep: Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226Reputation: 4226
Comment in my "reputation popup" (not very visible, but thanks anyway)
Code:
Fixed my issue cleanly and simply
Good

feel free to mark this thread as solved ;-)

note: I didn't notice you were from Scotland. I have a couple of malt-based ideas if you want to give me a favor.

Last edited by marav; 01-25-2022 at 10:05 AM.
 
  


Reply

Tags
grub



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] seeking clarification on using 'update-grub' and/or 'grub-mkconfig' frankfenderbender Linux - General 13 11-02-2019 09:55 PM
[SOLVED] got back reinstall grub then ran grub-mkconfig --- not found oops BW-userx Slackware 2 01-17-2018 04:19 PM
[SOLVED] Strange multiple "calling: info" with grub-mkconfig and grub-install giocitta Linux - Software 4 07-14-2017 09:13 AM
Unable to run grub-mkconfig, can't get system to boot. orsty9001 Linux - Desktop 1 01-24-2016 04:11 PM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration