LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-05-2021, 02:44 AM   #1
lex luthier
Member
 
Registered: May 2021
Posts: 32

Rep: Reputation: Disabled
Need Exact Terminal Commands To Edit /etc/default/grub Mint Mate 19.3 Help Please


Hello... I have just done a clean (re)install of Mint Mate 19.3

During installation I was not prompted to set a root password.

I would like to have the grub screen menu screen displayed at startup permanently.

I had nothing but trouble in attempting this in my previous mint mate 19.3 installation, and don't want to mess things up.

I used to do this easily in 18.3 but I read that the editor I used then had been removed in 19.3

So, help. please, and thank you !
 
Old 06-05-2021, 05:03 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,418

Rep: Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338Reputation: 2338
You want us volunteers who are just perhaps a bit to solve your problems, dress them up, and serve them up on a plate for you? That's not how these forums work.

There's vi & alternatives, nano, pico, joe or, heaven forbid, you could use an X terminal.

You are correct about root. so in a terminal, type
Code:
sudo passwd root
then follow the prompts. I'd advise caution with root.
 
Old 06-05-2021, 05:18 AM   #3
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,677

Rep: Reputation: Disabled
Well, I don't know what editor you used back in 18.3, but basically any text editor will do. Have you tried nano? It should be installed by default.

Alternatively, edit it with a script (you have to run it as root or via sudo):
Code:
#!/bin/sh
file='/etc/default/grub'
for v in GRUB_TIMEOUT=-1 GRUB_TIMEOUT_STYLE=menu
do
  key=${v%=*} val=${v#*=}
  if grep -q ^"$key"= "$file"
  then sed -i "/^$key=/s/=.*/=$val/" "$file"
  else echo $v >>"$file"
  fi
done

Last edited by shruggy; 06-05-2021 at 05:26 AM.
 
Old 06-05-2021, 05:48 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,147

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
Sounds like a job for ed.
 
Old 06-05-2021, 06:29 AM   #5
KC1DI
Member
 
Registered: Jun 2002
Location: Maine
Distribution: Kubuntu/Mint/MX
Posts: 88

Rep: Reputation: 31
The command you should use is
Code:
xed admin:///etc/default/grub
enter your password when asked and edit what is needed save the file and then in the terminal upgrade grub with this command
Code:
sudo update-grub
 
Old 06-05-2021, 06:35 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,552

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
Quote:
During installation I was not prompted to set a root password.
If you have been using Mint for several versions you should be aware that your primary user has root privileges using sudo and the root user is not used in a default install. Use any of the text editors mentioned aboe from a terminal.
 
Old 06-05-2021, 10:39 AM   #7
lex luthier
Member
 
Registered: May 2021
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
You want us volunteers who are just perhaps a bit to solve your problems, dress them up, and serve them up on a plate for you? That's not how these forums work.

There's vi & alternatives, nano, pico, joe or, heaven forbid, you could use an X terminal.

You are correct about root. so in a terminal, type
Code:
sudo passwd root
then follow the prompts. I'd advise caution with root.
Sorry, was not intending to seem like I deserved a privileged response. Just being perhaps more specific than usual.

And thank you !
 
Old 06-05-2021, 10:43 AM   #8
lex luthier
Member
 
Registered: May 2021
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Sounds like a job for ed.
Yes. I suffered under Windows too long to act in a caviler manner when changing anything in the "guts".
 
Old 06-05-2021, 11:01 AM   #9
lex luthier
Member
 
Registered: May 2021
Posts: 32

Original Poster
Rep: Reputation: Disabled
Thanks again, KC1DI. I ran the command: xed admin:///etc/default/grub as suggested. The etc/default/grub file opened, but when i started to change the first line I got this:

** (xed:22280): WARNING **: 00:59:00.228: The specified location is not mounted

So I bailed out posthaste. What does that mean? It was frightening at best. -ll
 
Old 06-06-2021, 02:29 AM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by lex luthier View Post
Thanks again, KC1DI. I ran the command: xed admin:///etc/default/grub as suggested. The etc/default/grub file opened, but when i started to change the first line I got this:

** (xed:22280): WARNING **: 00:59:00.228: The specified location is not mounted

So I bailed out posthaste. What does that mean? It was frightening at best. -ll
Probably unrelated - just a warning anyhow.
Being careful is one thing - and good for you - but this is going too far.

Why don't you just 'sudo nano /etc/default/grub' instead.
 
Old 06-06-2021, 03:07 AM   #11
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,988
Blog Entries: 33

Rep: Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471
lex luthier,

I agree with ondoho's suggestion.

If you are not familiar with using nano, vi, vim etc, then install gedit:
Code:
sudo apt install gedit
Ignore any gedit warnings.
 
Old 06-07-2021, 03:54 AM   #12
KC1DI
Member
 
Registered: Jun 2002
Location: Maine
Distribution: Kubuntu/Mint/MX
Posts: 88

Rep: Reputation: 31
Quote:
Originally Posted by lex luthier View Post
Thanks again, KC1DI. I ran the command: xed admin:///etc/default/grub as suggested. The etc/default/grub file opened, but when i started to change the first line I got this:

** (xed:22280): WARNING **: 00:59:00.228: The specified location is not mounted

So I bailed out posthaste. What does that mean? It was frightening at best. -ll
That warning is nothing to worry about. Go ahead and make your changes and save the file. What is it you want to modify bye the way?
 
  


Reply



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
LXer: The Right Way To Edit /etc/passwd and /etc/group files in Linux using vipw and vigr commands LXer Syndicated Linux News 0 03-31-2020 12:30 AM
LXer: Ubuntu MATE 15.04 Arrives With MATE Desktop 1.8.2 and MATE Tweak LXer Syndicated Linux News 0 05-15-2015 09:30 AM
I need help using the commands to change etc\default\grub blockie Linux - Newbie 11 04-27-2014 01:12 AM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:56 AM.

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