LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Editing boot parameters of a live installlation? (https://www.linuxquestions.org/questions/linux-desktop-74/editing-boot-parameters-of-a-live-installlation-4175673547/)

Motte 04-19-2020 02:16 PM

Editing boot parameters of a live installlation?
 
Hello everyone,

first off: I was unsure where to post this question. Hopefully I chose correctly :)

I want to use SystemRescueCD installed on a usb drive. Installlation wasn't a problem. In order to have my changes saved permanently I followed the instructions in the manual (http://www.system-rescue-cd.org/manu...backing_store/).
Now I can type in cow_level=persistence (this is how I called the additional partition on my drive) in GRUB and the changes are saved.

Having to always type in the same feels like this could be made a bit easier. So I looked at how to change boot parameters in the arch wiki (https://wiki.archlinux.org/index.php/Kernel_parameters) and I tried the methods both for syslinux and GRUB. Both don't work. Of course, I booted using the cow_label so my changes to the config files would be saved but it doesn't happen. What am I doing wrong?

teckk 04-19-2020 04:43 PM

Quote:

All the files of the system are stored in a large squashfs filesystem image file.
You'll need to find some info on how that .iso is made. You want to remaster the .iso. I don't see any info on that.

Basic steps.

Mount the iso loopback.
Copy that directory somewhere so that it's not read only.
Unsquash the file system.
Make changes to grub.conf or whatever else that you want to change.
I don't know if there is a checksum file that you need to update or not.
squash the file system
Make new .iso

You were looking at arch. Here is the idea.
https://wiki.archlinux.org/index.php...he_Install_ISO

Motte 04-23-2020 02:18 PM

Hi thanks for your answer!
At the moment I don't have a working linux installation :( Is there a way to do all that in windows? I know it's a heap I'm asking for :-/

Motte 04-25-2020 03:26 AM

Sorry for double post :(

I managed to modify the ISO using Windows. Here is what I did and I'm pretty sure the same could be done using Linux. Although it's not the gentleman's way, obviously. That one was described by teckk (thanks for the inspiration ;) ).

Here is what I did:
  1. I unpacked the ISO using 7zip.
  2. I again looked into How to edit Kernel parameters in the arch wiki to find the files that needed to be modified and where to put in the "cow_label XXX" parameter.
  3. In the same time, I used teckk's link https://wiki.archlinux.org/index.php...he_Install_ISO to find out which files belonged to the live system.
  4. In the ISO, I found several candidates that needed to be modified.
    These candidates are:
    • \boot\grub\grubsrcd.cfg
    • \isolinux\isolinux.cfg
    • \sysresccd\boot\syslinux\syslinux.cfg
    • \sysresccd\boot\syslinux\sysresccd_sys.cfg
  5. I modified all of them. (And this is where I chose the lazy trial and error method. The correct way, of course, is to find out which exact file needs to be modified. But I didn't want to spend too much time on this topic)
  6. Using the tool imgburn I created a new ISO. Be aware that the new ISO's labels need to be the same as of the original one e.g. SYSRCDXYZ where XYZ is the OS's version number. Check http://www.system-rescue-cd.org/Inst...n-a-USB-stick/ for details.

Now, when GRUB shows up, there is no "cow_label XXX" parameter in the boot parameters when pressing [TAB] on an entry, but it definitely works.

Again, I know this is not the absolutely correct way to achieve what I intend to. So, my follow-up question is:
Can this method cause any problem (e.g. damage the system in any way)?

ondoho 04-25-2020 04:22 AM

Congrats and thanks for sharing the solution! Others will benefit.
Please consider marking this SOLVED.

Motte 04-26-2020 02:59 PM

Hey there! Yeah I should've said something about marking it as solved. I didn't (and don't) want to because I'd like to make sure my solution is a viable one.
That's why a I asked another question:
Quote:

Can this method cause any problem (e.g. damage the system in any way)?
Don't want to create another thread because it directly relates to the topic of this one.

ondoho 04-27-2020 02:01 AM

OK, I guess.
I think by now you'd've noticed if ti damaged your system.

Anyhow, the only real answer to the question above is "Yes, but so can anything you do on your computer".

Motte 05-02-2020 05:15 PM

I didn't notice anything so far. Probably because there was no need to use my rescue thumb...
You're absolutely correct. I just thought it would be appropriate to make sure my lazy solution was ok to go with. I'll put a nice and shiny SOLVED on this case then :)


All times are GMT -5. The time now is 03:37 AM.