How to change directory name from "live" to "other"? Solved !

a very small Live CD shaped to look and act like Puppy Linux.

Moderator: fredx181

Post Reply
User avatar
bobol
Posts: 38
Joined: Sun Apr 30, 2023 9:56 am
Has thanked: 3 times
Been thanked: 7 times

How to change directory name from "live" to "other"? Solved !

Post by bobol »

Hello everyone
I am trying to modify the launch folder of the filesystem.squashfs
I tried the grub.cfg by boot= root= prefix= without success
I tried to modify the initrd1.xz without success by decompil cpio and rebuild initrd.xz reboot good but not change directory)
I tried to modify /lib/live/9990-main.sh without success

I would like to have a particular and personal file

in parallel I try to make a grubx64.ef with its own grub.cfg in the same folder

Can you help me please
thank's in advance.

Last edited by bobol on Mon May 01, 2023 4:17 pm, edited 2 times in total.
User avatar
fredx181
Posts: 2672
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 294 times
Been thanked: 1053 times
Contact:

Re: directory change "live" to "other"

Post by fredx181 »

bobol wrote: Sun Apr 30, 2023 10:14 am

Hello everyone
I am trying to modify the launch folder of the filesystem.squashfs
I tried the grub.cfg by boot= root= prefix= without success
I tried to modify the initrd1.xz without success by decompil cpio and rebuild initrd.xz reboot good but not change directory)
I tried to modify /lib/live/9990-main.sh without success

I would like to have a particular and personal file

in parallel I try to make a grubx64.ef with its own grub.cfg in the same folder

Can you help me please
thank's in advance.

The folder name "live" is coded in the "linuxrc" script (inside the initrd1.xz).
Besides that it will be very complicated to change, I wouldn't recommend it as it may have bad complications.

What's exactly the reason that you want to change it ?

One way to make it "personal" can be perhaps that you create a folder "other" (or whatever unique name) on the root of the partition, move the "live" folder in there (so you get /other/live) and change the linux and initrd line in grub.cfg, something like:
linux /other/live/vmlinuz1 noauto from=/other/ changes=/other
initrd /other/live/initrd1.xz

User avatar
bobol
Posts: 38
Joined: Sun Apr 30, 2023 9:56 am
Has thanked: 3 times
Been thanked: 7 times

Re: directory change "live" to "other"

Post by bobol »

Thx for your reply fredx
ok i' tried to modify init inside initrd1.xz
so it's linurx.rc inside
that's what it looked like to me a file inside the initrd1.xz ...

To answer you I created 2 different configs of ...dog (bookw), I have another configuration but less clean (2 fat32 and 2 ntfs on my usb key) I have thanks to refind each directed by a button to a respective grubx64. And so my goal to make it cleaner would be 1 single fat32 and a single ntfs...
I'll try your help... i'll create /other/live/ ...

and I'm also trying to change the grub.cfg path to the grubx64.efi...
I would like the supported grub to be the one that is contained in the same folder as grubx64, that's complicated too, isn't it ?

Very helpfull fredx
I've been racking my brains about the folder at the root for several days, your method is more than enough for me (for ntfs)...
I just miss the solution for the grubx under fat32, if you don't have a idea I will try with the 2 fat32 (it will just be messy)...

I just saw that refind could launch vmlinuz directly (I hadn't thought of that either) I'll try...

Thank's for your time !

Last edited by bobol on Sun Apr 30, 2023 1:13 pm, edited 1 time in total.
User avatar
bobol
Posts: 38
Joined: Sun Apr 30, 2023 9:56 am
Has thanked: 3 times
Been thanked: 7 times

Re: directory change "live" to "other"

Post by bobol »

I think i've find issue ??
i've make one iso with folder2iso
i've find grubx64.efi boot iso and grub.cfg with (on the same folder) here
i've comment menuentry iso path and mbr at root iso and grub inside too...

that's run !!
i'll comment inside iso the grub to point path changes...

So i've in my iso my remix dog in live folder inside
normally I should be able to read and write the changes, I will let you know

At more time !

User avatar
fredx181
Posts: 2672
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 294 times
Been thanked: 1053 times
Contact:

Re: directory change "live" to "other"

Post by fredx181 »

@bobol
For now, I don't have enough insight in your situation and what you're trying to accomplish exactly.
Also I don't have experience with "refind" and how to handle with grubx64.efi boot
Can only say how I do booting multiple systems on UEFI computer:
I have a smal (first)l FAT32 partition on my HD, other partitions are ext4 filesystems
The EFI folder contained in the ISO (includes grubx64.efi), I copied along with grub.cfg to that FAT32 partition (that's all that was needed for me, no more bootloader install stuff required) .
Manually editing is my thing so I have made many different entries in that grub.cfg that points to systems (from extracted ISO) on different partitions (e.g. Puppy, Fatdog, Debiandog (Bookworm, Bullseye, Buster)).

Some examples for Bookworm that may be useful for you perhaps (just to show the flexibility (anything is possible!), not to copy exactly):
Savefolder works only on a Linux filesystem.

Code: Select all

menuentry "Bworm changes EXIT savefolder in bworm" {
insmod ext2
search --no-floppy --fs-uuid --set=root  34b10665-11c5-493c-9bff-f4f1e7db86f2
linux /bworm/live/vmlinuz1 noauto from=/bworm changes=EXIT:/bworm  
initrd /bworm/live/initrd1.xz
}

menuentry "Bworm changes EXIT savefolder in bworm/live" {
insmod ext2
search --no-floppy --fs-uuid --set=root  34b10665-11c5-493c-9bff-f4f1e7db86f2
linux /bworm/live/vmlinuz1 noauto from=/bworm changes=EXIT:/bworm/live  
initrd /bworm/live/initrd1.xz
}

menuentry "Bworm changes EXIT savefile changes.dat" {
insmod ext2
search --no-floppy --fs-uuid --set=root  34b10665-11c5-493c-9bff-f4f1e7db86f2
linux /bworm/live/vmlinuz1 noauto from=/bworm changes=EXIT:/bworm/changes.dat  
initrd /bworm/live/initrd1.xz
}

menuentry "Bworm changes EXIT savefile otherchanges.dat" {
insmod ext2
search --no-floppy --fs-uuid --set=root 34b10665-11c5-493c-9bff-f4f1e7db86f2
linux /bworm/live/vmlinuz1 noauto from=/bworm changes=EXIT:/bworm/otherchanges.dat  
initrd /bworm/live/initrd1.xz
}

menuentry "Bworm 2 savefolder in bworm2" {
insmod ext2
search --no-floppy --fs-uuid --set=root ff46c108-01c3-4dfe-bfea-00395fdf3fd0
linux /bworm2/live/vmlinuz1 noauto from=/bworm2 changes=/bworm2 
initrd /bworm2/live/initrd1.xz
}
menuentry "B_worm savefolder in b_worm" {
insmod ext2
search --no-floppy --fs-uuid --set=root ff46c108-01c3-4dfe-bfea-00395fdf3fd0
linux /b_worm/live/vmlinuz1 noauto from=/b_worm changes=/b_worm  
initrd /b_worm/live/initrd1.xz
}

Hope this helps.

User avatar
bobol
Posts: 38
Joined: Sun Apr 30, 2023 9:56 am
Has thanked: 3 times
Been thanked: 7 times

Re: How to change directory name from "live" to "other"?

Post by bobol »

in fact I want to be able from the first screen to choose the defined debiandog (to avoid the secondary choice by grub, my choice by refind is done by touch).
For example, I made a shortcut to BW fgfs with icon x and BW es-de icon y without having to redo a secondary choice with the mandatory keyboard...

My refind config :
menuentry arcade {
icon /EFI/boot/icons/arcade.png
loader /arcade/grubx64.efi
}

my grub.cfg :
set timeout=0
menuentry "Linux ISO" {
search --no-floppy --label --set other
set iso_path="/arcade/arcade.iso"
export iso_path
search -s root -f ${iso_path}
loopback loop ${iso_path}
set root=loop
set prefix=(loop)/wee.mbr
configfile /grub.cfg
}

second test grub.cfg (same folder sda2 ntfs):
set timeout=0
menuentry "Linux ISO" {
search --no-floppy --label --set other
set iso_path="/arcade/arcade.iso"
export iso_path
search -s root -f ${iso_path}
loopback loop ${iso_path}
set root=loop
linux /live/vmlinuz1 noauto from=/ changes=/live/changes.dat nomagic base_only norootcopy
initrd /live/initrd1.xz
}

Same results for 2 grub.cfg
searching initrd1.xz

Thank's for your time.

User avatar
fredx181
Posts: 2672
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 294 times
Been thanked: 1053 times
Contact:

Re: How to change directory name from "live" to "other"?

Post by fredx181 »

For booting DD ISO (don't know about arcade), you can specify the path at the from= parameter from=$iso_path
This works for me booting DebLive_bookworm-amd64-UEFI.iso inside "bookworm" directory:

Code: Select all

menuentry "Linux ISO" {
set iso_path="/bookworm/DebLive_bookworm-amd64-UEFI.iso"
export iso_path
search -s root -f ${iso_path}
loopback loop ${iso_path}
set root=loop
linux /live/vmlinuz1 noauto from=$iso_path changes=/bookworm
initrd /live/initrd1.xz
}

You can specify the changes pointing to an existing directory or savefile (in my case it's in bookworm using save folder, for save file it can be e.g. changes=/bookworm/mychanges.dat)

edit: not sure again if this helps, a bit confusing for me, I'm not familiar with "arcade", though I can possibly advice about booting DD-bookworm with grub.

User avatar
bobol
Posts: 38
Joined: Sun Apr 30, 2023 9:56 am
Has thanked: 3 times
Been thanked: 7 times

Re: How to change directory name from "live" to "other"?

Post by bobol »

excellent fredx !!!! :thumbup: :thumbup2:
that's exactly it is the perfect config!
arcade is the name of the bookwdog that I remastered, with a direct boot without desktop on es-de...
well that's it for me, I'll come back to give you an overview of the rendering...

User avatar
bobol
Posts: 38
Joined: Sun Apr 30, 2023 9:56 am
Has thanked: 3 times
Been thanked: 7 times

Re: How to change directory name from "live" to "other"?

Post by bobol »

Image

User avatar
fredx181
Posts: 2672
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 294 times
Been thanked: 1053 times
Contact:

Re: How to change directory name from "live" to "other"? Solved !

Post by fredx181 »

Ok, great that it works for you now !! :thumbup2:
Looks nice , your setup ! , just curious, I have no knowledge about the way you did, is ISO booting required (rather than frugal install from extracted ISO) for to make it work ?

User avatar
bobol
Posts: 38
Joined: Sun Apr 30, 2023 9:56 am
Has thanked: 3 times
Been thanked: 7 times

Re: How to change directory name from "live" to "other"? Solved !

Post by bobol »

fredx181 wrote: Mon May 01, 2023 5:15 pm

Ok, great that it works for you now !! :thumbup2:
Looks nice , your setup ! , just curious, I have no knowledge about the way you did, is ISO booting required (rather than frugal install from extracted ISO) for to make it work ?

1 There is the principle:
frugal install + changes
remaster squashfs
delete old squash in frugal (extract all in iso, efi live...)
rebuild iso
launch iso with Nguyen Grubx launcher...
That's all !!!

did i answer the question :?:

2 if the question is can we launch the iso without the frugal installation then remaster the "changes"? I haven't tried it yet, I'll see if it's possible !

Path to Quick-remastergui : /usr/local/bin

I'm remastering, I'll come back to tell you if the result is good !

User avatar
fredx181
Posts: 2672
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 294 times
Been thanked: 1053 times
Contact:

Re: How to change directory name from "live" to "other"? Solved !

Post by fredx181 »

Well, I usually boot from a folder manually created (from initially extracted ISO), not from ISO, so in grub.cfg something like this:
linux /bworm/live/vmlinuz1 noauto from=/bworm changes=/bworm
Then by using Quick-remaster, the 01-filesystem.squashs is created in (in my case) /bworm/live/
When booting ISO directly, quick-remaster doesn't work (exits with message that it cannot create remaster because of read-only filesystem (ISO).
So that's one of the disadvantages of direct ISO booting (other may be that you can't add extra .squashfs modules at boot, less flexible that way).
edit:

rebuild iso
launch iso with Nguyen Grubx launcher..

I just though that perhaps you can skip rebuilding ISO and just replace 01-filesystem.squashs in the "live" frugal install folder.
But don't know enough about your setup, so please ignore if I misunderstood.

User avatar
bobol
Posts: 38
Joined: Sun Apr 30, 2023 9:56 am
Has thanked: 3 times
Been thanked: 7 times

Re: How to change directory name from "live" to "other"? Solved !

Post by bobol »

yes me too
i've work with base mksquashfs (all rights)
i can build custom squash by this script (base) here

i modified script but result was corrupted :

deleted comment it's not compatible !

Last edited by bobol on Tue May 02, 2023 12:01 pm, edited 2 times in total.
User avatar
fredx181
Posts: 2672
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 294 times
Been thanked: 1053 times
Contact:

Re: How to change directory name from "live" to "other"? Solved !

Post by fredx181 »

can build custom squash by this script (base) here

i modified script but result was corrupted :

That's for Slax, I would not recommend it, as DebianDog is very different.
As I said, quick-remaster should work fine if booted from manual frugal install (not CD or ISO).

User avatar
bobol
Posts: 38
Joined: Sun Apr 30, 2023 9:56 am
Has thanked: 3 times
Been thanked: 7 times

Re: How to change directory name from "live" to "other"? Solved !

Post by bobol »

I understand Fredx

if I correct in your script $BASE it should work !

in my case I manually replaced it with /mnt/live/mnt/...
job run perfect

To be more clear
1 I boot the original bworm iso with Nguyen's grubx
2 I'm still under the ddbw iso with the config you gave me for grub.cfg, so I can inflate my changes.dat
3 I extract to QRG on RW partition so I can change $BASE path
4 I can remaster the current config to custom.squashfs
5 and repetitum with build iso with custom.squashfs (deleted original)

That's all

User avatar
fredx181
Posts: 2672
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 294 times
Been thanked: 1053 times
Contact:

Re: How to change directory name from "live" to "other"? Solved !

Post by fredx181 »

bobol wrote:

in my case I manually replaced it with /mnt/live/mnt/...
job run perfect

Ah, didn't think of that, well if that works for you as expected, nice, very creative !

Btw, there's another remaster script too, "RemasterDog", if you want to try, run from terminal: remasterdog-start It has choice where to create the remaster (must be on ext filesystem, not ntfs or fat)
But note that it will remaster all, including the kernel (in /lib/modules),( quick-remaster does exclude that), so then the kernel .squashfs module isn't needed to to be included in "live" to run at boot.

User avatar
bobol
Posts: 38
Joined: Sun Apr 30, 2023 9:56 am
Has thanked: 3 times
Been thanked: 7 times

Re: How to change directory name from "live" to "other"? Solved !

Post by bobol »

Thank's very much Fredx181 for all !!! :thumbup2: :thumbup2: :thumbup2:

Pleasure to read you again !

User avatar
bobol
Posts: 38
Joined: Sun Apr 30, 2023 9:56 am
Has thanked: 3 times
Been thanked: 7 times

Re: How to change directory name from "live" to "other"? Solved !

Post by bobol »

I think this will be useful for some (I don't think I found any similar posts):
for those who want to easily launch a bunch of modules, here's a tip I found by chance (but it was what I was looking for).

in grub.cfg file comment :

load=/arcmods

(corrected)
(here arcmods eg) after change=...

in your “live” destination
and in your "optional" folder
create a folder (here arcmods)
place your customs modules squashfs

as below

Code: Select all

\---live
    \---optional
        \---arcmods
                custmod1.squashfs
                custmod2.squashfs
                custmod3.squashfs

:shock:

Last edited by bobol on Mon Nov 06, 2023 7:17 am, edited 1 time in total.
williwaw
Posts: 1676
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 149 times
Been thanked: 302 times

Re: How to change directory name from "live" to "other"? Solved !

Post by williwaw »

bobol wrote: Sun Nov 05, 2023 1:30 pm

in grub.cfg file comment :

load=arcmods

nice.
can you post an example grub.cfg stanza also?

User avatar
bobol
Posts: 38
Joined: Sun Apr 30, 2023 9:56 am
Has thanked: 3 times
Been thanked: 7 times

Re: How to change directory name from "live" to "other"? Solved !

Post by bobol »

so in grub.cfg (rename in txt for upload) update corrected
2 configs with iso and without

and the exemple customs modules in zip
:roll:

Correction (haste of my part)
not load=arcmods but

Code: Select all

load=/arcmods

you can test with multipe folder in optional and load one by one, with differents squashs, you will see they will be loaded by select folder in your grub...

Attachments
grub.txt
corrected
(479 Bytes) Downloaded 20 times
live.zip
(708 Bytes) Downloaded 22 times
User avatar
fredx181
Posts: 2672
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 294 times
Been thanked: 1053 times
Contact:

Re: How to change directory name from "live" to "other"? Solved !

Post by fredx181 »

bobol wrote:

In grub.cfg file comment :

load=/arcmods

Thanks, I knew of the load=... from optional folder but frankly didn't know it could point to a directory containing .squashfs files.
Btw, any reason that you load these "custmod" .squashfs modules from optional ? (rather than from "live" folder).
(I guess it's because you boot from ISO but perhaps still can load extra modules? Not sure though)

User avatar
bobol
Posts: 38
Joined: Sun Apr 30, 2023 9:56 am
Has thanked: 3 times
Been thanked: 7 times

Re: How to change directory name from "live" to "other"? Solved !

Post by bobol »

Hi @fredx181
In my case I wanted to be able to launch each successful module. I explain to myself every time I evolve I want to be able to go back if I make a mistake later. Each module overlaps, I think they also need to be numbered so that they are read in the right order.

now the reason for the optional and not live folder: because live necessarily reads all squashfs without distinction. In my case the sub-folders in optional correspond to another section and therefore a different configuration depending on the sub-folders.

for example if I want to launch the arcmods modules I comment load=/arcmods,
if I want to launch the custmods modules I comment the same way load=/custmods

Code: Select all

\---live
    \---optional
        +---custmods
        |       custmod1.squashfs
        |       custmod2.squashfs
        |       custmod3.squashfs
        |       
        \---arcmods
                arcmod1.squashfs
                arcmod2.squashfs
                

I tried several methods to launch several modules with load=name1.squashfs;name2.squashfs... impossible even with a space and from the second module added. porteus cheatcode not working :!:

if I put the custmods and arcmods modules at the "live" destination, all the modules are read of course

is that clearer :?:

User avatar
fredx181
Posts: 2672
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 294 times
Been thanked: 1053 times
Contact:

Re: How to change directory name from "live" to "other"? Solved !

Post by fredx181 »

bobol wrote: Wed Nov 08, 2023 6:21 am

....
is that clearer :?:

Yes, I see, so you can have choice which modules to load at boot, good stuff !

I tried several methods to launch several modules with load=name1.squashfs;name2.squashfs... impossible even with a space and from the second module added. porteus cheatcode not working :!:

Indeed, doesn't work as expected, only first module is loaded from what I tested.
This is probably because GRUB2 doesn't like the semicolon ; , I think it sees it as end of command (in the past when I used grub4dos I didn't have that problem).
Solution: add quotes around it (single or double) like this: load="name1;name2" (no need for .squashfs extension, btw).

EDIT: Also I tested adding load=name1;name2 (without quotes) positioned at the middle of the commandline (rather than at the end), and boot failed !!
(which proves for me that GRUB2 ignores anything that follows after a semicolon) :!:

User avatar
bobol
Posts: 38
Joined: Sun Apr 30, 2023 9:56 am
Has thanked: 3 times
Been thanked: 7 times

Re: How to change directory name from "live" to "other"? Solved !

Post by bobol »

That's exactly it, the cheatcode sees it as an end of command.
And I confirm it works with the quotes,
and even better I can add the arcmods and custmods modules via this comment :

Code: Select all

load="arcmods;custmods"

thank you very much again @fredx181, :thumbup2: :thumbup: :thumbup2:
I'm sticking with my load=/folder command formula which is really simpler and I would use your advice depending on the case...

Post Reply

Return to “DebianDogs”