How to edit initrd to use only the Save folders I want it to? (Solved)

versatile 64-bit multi-user Linux distribution

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
superchook
Posts: 51
Joined: Mon Dec 23, 2019 9:57 pm
Location: Sydney, Australia
Has thanked: 15 times
Been thanked: 4 times

How to edit initrd to use only the Save folders I want it to? (Solved)

Post by superchook »

I have created a bootable Fatdog64-812 USB stick using the method from the Help FAQ "How to install Fatdog64 to a flash drive that works for both BIOS and UEFI machines".
I have confirmed that it does indeed boot either using UEFI or BIOS. I have created two users "usb" and "someone_else" so that on boot up you are offered the choice of using either of those two save folders or neither of them. (You are only given the option of not using the save folder if there two or more users)
If I boot this computer (which runs Fatdog64-812 and has four user "accounts") using the USB stick I am offered six users the two from the USB stick plus the four from this computer.
I would like to edit the initrd from the USB so that it only finds the save folders on the USB and not any save folders on other drives in the computer.
I have examined the system-init script buried inside the initrd and on line 674 I see # look for savefiles in all devices. I would like to change this to # look for all savefiles in partition UUIDxxxx where using the UUID of the second partition of the USB stick. I think the lines 674 to 703 need to be edited or replaced by a new code block but that is a bit beyond me.
Could some kind person help me out here?
TIA
Ken

Last edited by superchook on Fri Jan 28, 2022 10:16 pm, edited 2 times in total.
jamesbond
Posts: 718
Joined: Tue Aug 11, 2020 3:02 pm
Location: The Pale Blue Dot
Has thanked: 124 times
Been thanked: 402 times

Re: Modifying initrd

Post by jamesbond »

Hi Ken,

Before you go down the rabbit hole of modifying initrd, how about adding the boot parameter "savefile=direct:usb" (or "savefile=ram:usb" if you use the RAM layer), and see if works for you?

superchook
Posts: 51
Joined: Mon Dec 23, 2019 9:57 pm
Location: Sydney, Australia
Has thanked: 15 times
Been thanked: 4 times

Re: How to edit initrd to use only the Save folders I want it to?

Post by superchook »

Many thanks, James, your suggestion solved my problem.
cheers.
Ken

Post Reply

Return to “FatDog64”