Skip to main content
Topic: Booting from artix.iso file: how to get persistence? (Read 2689 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Booting from artix.iso file: how to get persistence?

I boot from iso file with the following grub2 instructions:
Code: [Select]
    #!/bin/sh
    exec tail -n +3 $0
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.

    # path to the partition holding ISO images (using UUID)
    probe -u $root --set=rootuuid
    set imgdevpath="/dev/disk/by-uuid/$rootuuid"

    menuentry "ARTIX  grub_iso" --class dvd {
    set root=(hd0,5)
    set isofile="/isos/artix-lxqt-20171015-x86_64.iso"
    set dri="free"
    search --no-floppy -f --set=root $isofile
    probe -u $root --set=abc
    set pqr="/dev/disk/by-uuid/$abc"
    loopback loop $isofile
    linux  (loop)/boot/vmlinuz-x86_64 ramdisk_size=8000 root=/dev/ram0 rw changes=/1_artixchanges fromhd=/mnt/sda5 img_dev=$pqr img_loop=$isofile driver=$dri  rw
    menuentry "porteus PORTEUS 64bit_v32  XFCE sda5" {
    set root=(hd0,5)
    linux /64_V32/boot/syslinux/vmlinuz from=/dev/sda5/64_V32 changes=/64_V32/xfce extramod=/64_V32/xfce login=root resume=/dev/sda7 acpi=off
    initrd /64_V32/boot/syslinux/initrd.xz
    }
    menuentry "porteus PORTEUS 1_nemesis  NEMESIS sda5" {
    set root=(hd0,5)
    linux /1_nemesis/boot/syslinux/vmlinuz from=/dev/sda5/1_nemesis changes=/changes
    initrd /1_nemesis/boot/syslinux/initrd.xz
    }

Artix will boot perfecty.

However, this is not enough to provide persistence. I know my attempt in syntax is rather naive.

Do you have some suggestion for a syntax that will provide persistence.
Thanks.

Re: Booting from artix.iso file: how to get persistence?

Reply #1
Perhaps try to mount the Artix root partition read write, and edit /etc/fstab so it mounts / as rw not ro. You can probably also use swap from an existing HDD swap partition if you were just going to use it on that one computer. The / partition may not fill the DVD-RW, it could possibly be resized with say gparted to give more working space. I think the iso probably has some artools package(s) that deal with the install and set up things in the new OS on the first boot then remove themselves. You could remove them and set up whatever else needs doing Arch style. If you hit trouble, use your existing OS to mount and if needed chroot to fix it.
That would be my plan - don't know if it works in this particular case, there may be more wrinkles.  ;D

Re: Booting from artix.iso file: how to get persistence?

Reply #2
Oh yes I forgot - but first you need to unsquashfs the fs, you could loop mount it, modify it then resquash it, or write it out to a partition on a DVD-RW or HDD and leave it as a regular fs and work on it as normal something like this:
https://forum.artixlinux.org/index.php/topic,168.msg1372.html#msg1372
I haven't needed to do that with Artix but the method does work.

Re: Booting from artix.iso file: how to get persistence?

Reply #3
Default iso are not built with persistence.

Persistence is a build time feature of buildiso, currently deactivated since it doesn't workso well with our layered overlayfs approach.

Re: Booting from artix.iso file: how to get persistence?

Reply #4
Yes, I think roughly the problem is a live CD has a small bootable OS that decompresses the squashfs image that contains what is more or less a regular Artix install. Persistence in this instance seems to be usually provided by having another partition which stores the changes and the squashfs image is not changed (I guess). If you unsquashed it, using it to create what would be almost a regular install to a DVD-RW or USB might work, but it would probably be slow to load the uncompressed files. The BTRFS compression feature might help a bit - but I've not tried it myself.
A 2.5" HDD in a USB enclosure would make a much better (faster and more space) pocket sized portable OS btw, and they can be inexpensive if you don't get high spec.
If you created a small partition on an HDD you could easily install Artix to that with all the setup done by the installer, then make a partition on the target drive. (Assuming the installer won't install directly to the drive, otherwise you could just do that.) Then use cp -a to copy the entire install over, edit /etc/fstab, update grub, redo the initrd, it should work then - possibly there could be some further details ;)
There are a few guides around for this general sort of thing:
https://wiki.archlinux.org/index.php/Remastering_the_Install_ISO
https://wiki.archlinux.de/title/Installation_umziehen

Re: Booting from artix.iso file: how to get persistence?

Reply #5
@artoo and ####:
Thanks a lot trying to help me solve the problem. It is much appreciated.  Artix is a very welcome initiative, now there is heaven for non-systemd believers.

I thought that an aufs hdd install of artix would provide almost automatically a persistence solution, as this is the case with slax, porteus, and puppy linux (including debian dog).

In fact, I find practical not to get into a full install. This way you can test any new version of the distribution. Uninstall and reinstall is done in a jiffy.

Persistence in this instance seems to be usually provided by having another partition which stores the changes
In fact, it is a simple folder and is extensible if you write on linux filesystem.

But maybe this thread could be of some help:
https://wiki.archlinux.org/index.php/Installing_Arch_Linux_on_a_USB_key

@artoo:
I know your time is precious, but if you could have a look an think it is worth a try, I will do it.

Also, for the full install, could you point to a method other than calamares, with which I did not have so much success.  OK, just found the solution:
sudo -E calamares -d

I have seen such info in a very controverted thread, but I am not able to find the info no more. Rereading it, I am sorry to have even mentioned it. : )

Some people think that all the work you put in linux deserves blaming and insults, maybe their should be told: Don't ask us what can Artix do for you, but rather ask yourself what you could do for the artix community.

Thanks, once more and,

Cheers!

Re: Booting from artix.iso file: how to get persistence?

Reply #6
Boot iso method does not seem does not work to install artix with:
sudo -E calamares -d

Message error:
Boost.Python error in job "initcpio".
<class 'subprocess.CalledProcessError'>
Command 'mkinitcpio -p linux-lts' returned non-zero exit status 1.
Traceback:
  File "/usr/lib/calamares/modules/initcpio/main.py", line 36, in run
    run_mkinitcpio()

  File "/usr/lib/calamares/modules/initcpio/main.py", line 28, in run_mkinitcpio
    check_target_env_call(['mkinitcpio', '-p', kernel])

  File "<string>", line 2, in <module>