How to set "toram" as default in grub menu

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Gabe2004
Level 1
Level 1
Posts: 9
Joined: Sun Nov 21, 2021 11:26 pm

How to set "toram" as default in grub menu

Post by Gabe2004 »

I am trying to modify a Linux Mint distro (20.2 Mate) to have the "toram" flag set by default under the Start Linux Mint boot option.
I have mounted the installation iso and modified the content of 3 files by adding "toram" after "quiet splash" and then made a new iso.
The files are:
/boot/grub/grub.cfg
/boot/grub/loopback.cfg
/isolinux/isolinux.cfg
Nothing happened. I mean Mint did not boot to ram but continued to operate from the usb.
Can someone guide me in the right direction.
Thank you.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
shedyed
Level 4
Level 4
Posts: 313
Joined: Wed Feb 03, 2021 5:12 pm

Re: How to set "toram" as default in grub menu

Post by shedyed »

Hmmm, what about /usr/share/grub/default/grub, it has a line there for the defaults e.g. on mine it's

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

and in your case, put the toram between the quotes. See that it gets picked up, because I've been running live sessions using ventoy. This is a nonproduction machine, so I can test things out like running e24 on Mint.

I am not sure if you need to run update grub or some similar utility
Gabe2004
Level 1
Level 1
Posts: 9
Joined: Sun Nov 21, 2021 11:26 pm

Re: How to set "toram" as default in grub menu

Post by Gabe2004 »

Thank you shedyed.
I will try your suggestion.
As far as the rest of your answer, I am not yet proficient enough to what you did but I will look for the information about ventoy, e24 and run upgrade grub.
All of which I am not familiar with but hoping to learn soon.
Gabe2004
Level 1
Level 1
Posts: 9
Joined: Sun Nov 21, 2021 11:26 pm

Re: How to set "toram" as default in grub menu

Post by Gabe2004 »

While trying to save /usr/share/grub/default/grub I am getting the following message:
"You do not have the permissions necessary to save the file".
Any ideas of how to solve this?
Thank you
User avatar
zcot
Level 9
Level 9
Posts: 2838
Joined: Wed Oct 19, 2016 6:08 pm

Re: How to set "toram" as default in grub menu live session.

Post by zcot »

you would need the update-grub command to rebuild the images, but that doesn't work like that with an iso like that(read-only file system).

Generally you can't just edit the thing and save a new iso, that doesn't work.

There's a method to creating a correct iso like this but it is advanced.

Your best bet is using something like a Ventoy setup or something similar.
Gabe2004
Level 1
Level 1
Posts: 9
Joined: Sun Nov 21, 2021 11:26 pm

Re: How to set "toram" as default in grub menu

Post by Gabe2004 »

Thank you zcot.
SimonPeter
Level 5
Level 5
Posts: 579
Joined: Tue Jul 13, 2021 5:13 am

Re: How to set "toram" as default in grub menu

Post by SimonPeter »

Gabe2004 wrote: Mon Nov 22, 2021 5:44 pm I am trying to modify a Linux Mint distro (20.2 Mate) to have the "toram" flag set by default under the Start Linux Mint boot option.
I have mounted the installation iso and modified the content of 3 files by adding "toram" after "quiet splash" and then made a new iso.
The files are:
/boot/grub/grub.cfg
/boot/grub/loopback.cfg
/isolinux/isolinux.cfg
Nothing happened. I mean Mint did not boot to ram but continued to operate from the usb.
Can someone guide me in the right direction.
Thank you.
What about sed'ing the ISO in-place:
sed -i 's/quiet splash/toram splash/g' /path/to/the/ISO/file .
-- do this AT YOUR OWN RISK.

But, AFAIK modifying these files should add it "toram" to the kernel parameters, provided you don't use another bootloader (like a separate GRUB, rEFInd etc.,) to boot it.
The files are:
/boot/grub/grub.cfg
/boot/grub/loopback.cfg
/isolinux/isolinux.cfg
Last edited by SimonPeter on Thu Nov 25, 2021 5:24 am, edited 1 time in total.
Gabe2004
Level 1
Level 1
Posts: 9
Joined: Sun Nov 21, 2021 11:26 pm

Re: How to set "toram" as default in grub menu

Post by Gabe2004 »

Thank you SimonPeter.
I don't understand what you wrote but I will try and piece it together.
SimonPeter
Level 5
Level 5
Posts: 579
Joined: Tue Jul 13, 2021 5:13 am

Re: How to set "toram" as default in grub menu

Post by SimonPeter »

Gabe2004 wrote: Thu Nov 25, 2021 1:01 am Thank you SimonPeter.
I don't understand what you wrote but I will try and piece it together.
You're welcome.

I was saying that you can use sed (can be used to find and replace inside binary files) to replace all occurrences of "quiet splash" with "toram splash" (note that they are strings with the same length) -- do this AT YOUR OWN RISK.

What you have currently done (modifying /boot/grub/{grub,loopback}.cfg and /isolinux/isolinux.cfg) is fine too -- that must add the kernel parameters correctly for the live system, provided you don't use another bootloader, like another GRUB install (not the one in the live system) and/or use rEFInd (and the like) to boot that live system.
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: How to set "toram" as default in grub menu

Post by Hoser Rob »

Gabe2004 wrote: Thu Nov 25, 2021 1:01 am Thank you SimonPeter.
I don't understand what you wrote but I will try and piece it together.
PLease make damn sure you do a Timeshift system backup before doing all this.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
SimonPeter
Level 5
Level 5
Posts: 579
Joined: Tue Jul 13, 2021 5:13 am

Re: How to set "toram" as default in grub menu

Post by SimonPeter »

Hoser Rob wrote: Thu Nov 25, 2021 9:13 am
Gabe2004 wrote: Thu Nov 25, 2021 1:01 am Thank you SimonPeter.
I don't understand what you wrote but I will try and piece it together.
PLease make damn sure you do a Timeshift system backup before doing all this.
I second @Hoser Rob .
It is safe (and highly recommended) to make a good and secure backup of all your data (and your installed system).

BTW we're talking about modifying a LIVE SYSTEM, and NOT about an installed system.
Gabe2004
Level 1
Level 1
Posts: 9
Joined: Sun Nov 21, 2021 11:26 pm

Re: How to set "toram" as default in grub menu

Post by Gabe2004 »

Sorry for the late reply.
Thank you for the advice @Hoser Rob. I am just experimenting with Linux now so no harm will be done in any case.
On my main computer I have 2 backups just to be safe and I alternate the backup medium.
Gabe2004
Level 1
Level 1
Posts: 9
Joined: Sun Nov 21, 2021 11:26 pm

Re: How to set "toram" as default in grub menu

Post by Gabe2004 »

SimonPeter wrote: Thu Nov 25, 2021 5:23 am
Gabe2004 wrote: Thu Nov 25, 2021 1:01 am Thank you SimonPeter.
I don't understand what you wrote but I will try and piece it together.
You're welcome.

I was saying that you can use sed (can be used to find and replace inside binary files) to replace all occurrences of "quiet splash" with "toram splash" (note that they are strings with the same length) -- do this AT YOUR OWN RISK.

What you have currently done (modifying /boot/grub/{grub,loopback}.cfg and /isolinux/isolinux.cfg) is fine too -- that must add the kernel parameters correctly for the live system, provided you don't use another bootloader, like another GRUB install (not the one in the live system) and/or use rEFInd (and the like) to boot that live system.
"toram splash" worked but only if I let the 9 second boot delay to expire on it's own.
If I hit TAB and then ENTER my system froze.
I'll have to look into this a bit further but for now I have a Live usb that boots to ram.
Locked

Return to “Beginner Questions”