You are not logged in.
Hi,
Is it possible to install a package / program permanently on a Live version ?
or it's only possible by creating an .iso file ( refractasnapshot and refractainstaller for example )
and if only possible trough .iso can refractasnapshot work directly on a Live session ?
Thanks.
Linux noob, plz be kind
Offline
Add your program whilst running 'live', take a snapshot, put that snapshot onto your disk - that's how I've done it.
Online
Thank you Camtaf 👍
Linux noob, plz be kind
Offline
If you run refractasnapshot in a live session, be sure to edit the config file to use some real storage space for the work directory and the snapshot directory.
If you make a live-usb with an extra partition for full persistence, you can install packages and they will still be there on the next reboot. If you run apt-upgrade and apt-update on such a system, it will install the updated packages into the persistent volume. You could keep updating such a system until you fill up your usb stick. Better to update the iso and re-image the read-only part of the stick.
Offline
Thank you fsmithred,
I've installed the version 10.4.1 of refractasnapshot
I've edited the /etc/refractasnapshot.conf to use the hard-drive for the workinf folder and .iso output.
run it, generated the .iso make a usb dongle with it.
boot the laptop the boot process completed ( passed the grub etc.. ) for 3 min the screen was black then the xfce desktop appeared, mouse cursor too but everything seem to be frozen... Any ideas ?
Last edited by SpongeBOB (2025-01-18 14:13:49)
Linux noob, plz be kind
Offline
The refractasnapshot log file would be a good place for hints, but I didn't think to tell you to save it. It can be found at /var/log/refractasnapshot.log but since you were in a live session, that file is gone. (Unless that same live system is still running and hasn't been rebooted.)
How did you make the live-usb? If you used dd or cat to image the isohybrid, I don't think you'll be able to make a second partition. That doesn't seem to work in all situations. I use refracta2usb to make a live usb and it will set up the persistent partition for either full persistence (that's what you want) or else just a persistent /home. It's not in the repo. You can get it here: https://sourceforge.net/projects/refrac … -2.4.3.deb
Other live-usb software might work, but I don't know which. First partition should be fat32 with boot flag and second should be ext2/3/4 with a persistence.conf in the root of the persistent volume. See 'man live-boot' for more details.
Offline
Is it possible to install a package / program permanently on a Live version ?
If the package is not so large or complex and doesn't call update-intramfs, you can use live-config's "live-hook" mechanism.
You can write a simple live-hook script (which could call e.g. dpkg -i /path/to/package or even another set of subscripts) and place it on any present media/disk, inside or outside the iso. It's automatically activated via the cmdline.
man live-config
is a learning curve but very well documented.
The package would of course need all it's deps sorted first. Script those in order and it should work.
Note the need to use wget-style absolute paths (file:///whatever), that's the awkward one.
Works here..
EDIT: If you use full persistence also, maybe you can then disable your hook script, since it will be already merged into the live system.. ?
Last edited by dzz (2025-01-19 02:11:03)
Offline
As fsmithred said, it greatly depends on what you used to create the liveUSB.
I would use Refracta2usb or Mintstick to get best results. Mintstick won't get you persistence, Refracta2usb will.
There is also iso-master, but i've never tried it so have no idea if that would work for your scenario.
https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded January 2025!
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate
Offline
Thank you very much to all of you !
So yes indeed, I tried to copy the .iso generated by refractasnapshot with dd and also rufus...
I've downloaded Refracta2usb , read the /usr/lib/refracta2usb/help_r2u.txt
Now I'm trying to copy/install the .iso file trough refracta2usb
So far I've done the
dd if=/dev/zero of=/dev/sdX bs=512 count=4096
Formatting the stick, but which size should have the first (vfat) partition ? and what will be inside ? the OS (devuan ? ) and if I make a second partition it will be for the persistent storage, right (I don't plan to use it right now)
I plan to boot this live stick in ( load in ram )
Then which ISO mode should I choose ? ISO_1 or ISO_2 ?
Last edited by SpongeBOB (2025-01-19 10:26:26)
Linux noob, plz be kind
Offline
Something else,
After dd if=/dev/zero of=/dev/sdX bs=512 count=4096 I run gparted
created a partition table type gpt
then when I choose ISO_2 (to try) in the GUI I got
The boot flag is not set on /dev/sdb1
Thanks.
Linux noob, plz be kind
Offline
You need to make the first partition big enough to hold the iso (packed or unpacked) plus kernel and initramfs. If you plan on adding more than one iso to the stick, then make it big enough to hold all the isos. ISO_1 or ISO_2 will work. One unpacks the iso file and the other one keeps it intact and uses the 'fromiso=' boot option. That option is useful if you think you want to have a copy of the intact iso to use it somewhere else or share it.
If you think you might want to use the stick to share files with windows computers, make the first partition big enough to hold those files, too.
Yes, you need to give the fat32 partition the boot flag. You can do that in gparted.
To boot to ram, you need to add the boot option: toram=/path-to/live/filesystem.squashfs (where path-to is the name you give the directory that holds the OS.) I'm not sure how or if that will work with persistence. You would only boot the read-only live system without any of your persistent changes. There might be a way to do it using overlays. Let me know if you figure it out.
You could boot to ram and manually mount a data partition to hold selected files, but that's not the same thing as persistence.
Look in the refracta2usb help to see what the disk layout looks like on the usb stick. Diagrams are near the bottom.
Offline
@SpongeBOB: Why not try msdos partition table?
R2u uses syslinux/isolinux, it's more complex to get that working for gpt (and you don't need gpt)..
Last edited by dzz (2025-01-19 18:22:36)
Offline
^^^What dzz said.
Kinda confused here SpongeBOB, are you trying to make a liveUSB or are you trying to do a conventional install on a stick?
What live version?
Gparted: create new ms-dos partition table. Create fat32 main partition big enough to hold iso with some room to spare. Create 2nd partition in ext2 and name it "persistence. Then add boot flag to the first partition. done.
R2USB: use 01 or 02 first, I use 02 with the "findiso" option, finish that operation. It will want to install syslinux, let it do so. When done it will take you back to menu, then choose the option to create the persistence partition, run that, when it's done you are done, exit program.
You will be able to edit the boot entries and persistence.conf during the install or you can simply do it afterwards.
https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded January 2025!
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
New Devuan-mate-mini isos too!
Please donate to support Devuan and init freedom! https://devuan.org/os/donate
Offline