Insights and questions about frugal mode

Forum Forums General Tips and Tricks Insights and questions about frugal mode

  • This topic has 7 replies, 4 voices, and was last updated Apr 6-1:38 am by olsztyn.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #69509
    Member
    Girafenaine

      I have used frugal install with success for two years. I met some issues when dealing with several frugal installs, or when I changed kernel on a frugal install. Here are a few insights and questions about the antiX live system and frugal installs. I use UEFI only and following points are with UEFI mode.

      1. Several “secret” frugal installs – some insights on how frugal mode works

      As I use antiX at work on normally Windows PC, I am very interested in frugal installs : I can have them in a folder on the main (Windows NTFS) partition, and no one will pay attention to it. For antiX to be really “secret”, I boot through a live USB stick. If I plug the stick before booting, I run antiX. Without the stick, the PC boots on Windows. That’s quite a simple and useful option for me.

      But I met two issues :
      – first when using several frugal installs : one live USB stick can only boot in the corresponding frugal install. So you could end up with 2 or 3 different sticks to boot 2 or 3 different frugal install (say, antiX 19 and antiX 21 and antiX runit).
      – then when trying to update a kernel. If you use antiX live-kernel-updater, you can install a new kernel on your frugal install… but your stick will still boot into the former kernel. You won’t be able to boot on the new kernel without some manual tweak.

      Why does it work this way ? Here are my guesses, and I expect other antiXers and devs could correct or confirm that. When you boot a frugal install with a live USB stick, the boot process seems to be the following :
      1- grub is started from the live USB/UEFI partition. The ANTIX-UEFI/boot/grub/grub.conf file reads the …/antiX_version_name/boot/grub/grub.cfg on the main antiX partition (still on the live USB).
      2- the kernel (vmlinuz file) and the init process (initrd.gz file) are read from the same partition, the main antiX partition still on the live USB.
      3- if you used the “frugal” boot option, the linuxfs file will be read from the frugal partition, in my case that is the NTFS Windows partition. Then rootfs and homefs are read in the same partition and same folder. And here you get your full working “frugal” antiX installation.

      The point is : when you launch vmlinuz on the live USB stick, it can then only boot a linuxfs file with the same kernel. So you cannot boot in another kernel, and if you try another frugal install or an updated kernel on your unique frugal install, it won’t work. Strangely enough, I had no success with all boot options : buuid, bdev, blab or bdir (options described here), I never could boot from a vmlinuz and initrd files on my HDD. The live USB seems to boot only on its “own” vmlinuz and initrd. My grub entry looks in antiX 19 like :

      menuentry "Custom frugal boot" {
      linux /antiX/vmlinuz quiet splasht frugal_persist hwclock=local
      initrd /antiX/initrd.gz
      }

      Or in antiX 21 :

      menuentry " "$"Custom"" x64 (12 October 2021)" "$kernel" "$initrd" "$kopts" --id=custom {
      kernel="$2"
      initrd="$3"
      shift 3
      linux /antiX/${kernel} quiet splasht disable=xF kbd=fr splasht tz=Europe/London hwclock=local frugal_persist $@
      initrd /antiX/${initrd}.gz
      }

      I you udpate the kernel on your frugal install with “antiX-kernel-updater”, you can then copy the vmlinux and initrd from the antiX folder on your frugal partition to the live USB stick. With this method suggested by anticapitalista you can boot your newly updated kernel. See this thread.

      2. Questions : is the UEFI live system to be improved for frugal installs ?

      I found strange that buuid, bdev, blab and bdir boot options seems not to work on a UEFI live USB. These options gave me hope to boot anything I wanted from my live USB, but it seems that only the main antiX partition on the live USB stick and its own vmlinuz and initrd.gz can be used. Is that the intended way to work ? Or is it a kind of bug on the UEFI mode ?

      It will be nice not to need what follows !

      3. A workaround to freely boot in anything you want from a live USB stick

      The solution I ended up with is to use the “grub.entry” given by antiX and intended to add in a grub menu when you boot frugal installs from grub installed on you internal HDD. Actually, it works well when you boot from your live USB stick. You add on your live USB stick main partition, in /antiX/boot/grub/grub.cfg, a grub menu entry like this one :

      menuentry "antiX 21-b2-runit (Grup Yorum) Frugal Install" --id=bureau {
          insmod part_msdos
          insmod part_gpt
          insmod ntfs
          search --no-floppy --set=root --fs-uuid 1262F3279C5B5625
          linux /antiX-Frugal-5.10.57-antix.1-amd64-smp/vmlinuz1 bdir=antiX-Frugal-5.10.57-antix.1-amd64-smp buuid=1262F3279C5B5625 disable=xF tz=Europe/London persist_all
          initrd /antiX-Frugal-5.10.57-antix.1-amd64-smp/initrd.gz
      }

      The “insmod” and “search” lines let grub launch kernel and initrd.gz from another partition as the one containing grub. That is exactly the point I cannot do with the antiX boot options. But with such a grub entry, it’s OK ! and you can now boot several frugal installs from the same live USB stick, or update your kernels and boot into them without any issues. Actually, the live USB stick is used only for two steps : catching attention of the PC BIOS thanks ot its UEFI partition at boot time, and then launch grub. The following steps will go on on the HDD, antiX partition (buuid option) and boot directory (bdir option).

      You can see in this grub entry there is no more “frugal” option. Actually, “frugal mode” is to search linuxfs in another partition as vmlinuz and initrd.gz. Here, they are all together. You just use persist options if needed.

      I hope this can help some other “frugalers” and catch attention of some more skilled antiX users or devs.

      • This topic was modified 1 year, 6 months ago by Girafenaine.

      Girafenaine
      ----
      Antix 19 - Fluxbox - Live USB stick and frugal / MX 19 - Fluxbox - Dell XPS 7590

      #69519
      Member
      olsztyn
        Helpful
        Up
        0
        ::

        But I met two issues :
        – first when using several frugal installs : one live USB stick can only boot in the corresponding frugal install. So you could end up with 2 or 3 different sticks to boot 2 or 3 different frugal install

        First of all, I want to thank you for this elaborate writeup on Frugals.
        Just in relation to the quoted statement, I am able to boot two (or more) Frugal installs from the same USB Live. For UEFI boot I just point to partitions where Frugals are installed. I do not change partition labels to ‘antiX-Frugal’. When it fails finding a partition with ‘antiX-Frugal’ it provides a menu of eligible partitions and I chose which to boot. Kernel version selected from 4.9 and 5.10 ahead of time for both Frugal installations from boot advanced menu.

        However, as I made such note in another post, the boot menus are not consistent and not streamlined to be easy to use. Also I do not think certain options work correctly. The most annoying:
        Being one of the most useful functions on boot menu – Find Frugal Menus – does not seem to allow selecting which kernel version to chose. It always boots to kernel 4.9, no matter what kernel option I chose.
        Also as another annoyance, this listing of Frugals where to select which to boot is unfortunately buried under ‘Rescue’ submenu, although nothing needs to be rescued, but rather just to boot available installations.

        My above comments are regarding available in Live kernels 4.9 and 5.10. Now, if you install a different (such as newer) kernel for a Frugal, it will not boot such different kernel and the workarounds you described are the only way I know. Hopefully antiX experts will come up with some solutions…
        Again – Thanks and Regards…

        Live antiX Boot Options (Previously posted by Xecure):
        https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

        #69535
        Member
        Girafenaine
          Helpful
          Up
          0
          ::

          Thanks olsztyn for your message.

          I understand you are able to boot different frugal installs… only when you have the corresponding kernel on your live USB stick. You can boot several frugal installs, but only when they use all the same kernel that the live USB (quite logical if we suppose that live USB is able to boot only the kernels that are on its own main partition). Your frugal folder is used from the step when linuxfs, rootfs and homefs are loaded.

          In antiX21, your have two kernels onboard, called vmlinuz (4.9) and vmlinuz1 (5.10.57). That let you boot live or frugal install on both these kernels from a live USB. That’s better than with antiX 19 ! As you say, if you update your kernel on your frugal install, the live USB stick won’t boot the frugal install anymore. The “antiX live-USB kernel updater” will change the kernel in the rootfs file (then pushed in the linuxfs when you remaster), and in the vmlinuz and initrd files… but only for the files in the frugal folder on your HDD. These files are never used when you boot from a live USB in my experience. The used vmlinuz and initrd files on your USB key won’t be updated automatically. You can manually copy vmlinuz and initrd.gz from the frugal folder on the HDD to the live USB main antiX partition. Or : use the tweak above with special grub menu entry on the live USB main antiX partition, to be able to boot directly from the vmlinuz and initrd.gz files on the HDD frugal partition and frugal folder.

          In my experience “Find Frugal Menus” does not work well, I agree with you. It finds some frugal installs, but is not able to boot from them. I tried only with 5.10 kernels. I suspect it is for the same root cause that for bdev and buuid boot options not working, eg. live USB not able to find linuzvm and iniitrd.gz on another device. As you saw that only 4.9 kernels were booted, perhaps it’s because these “Find Frugal Menus” use a hard-written “vmlinuz” file as kernel (and it would need “vmlinuz1” to boot 5.10 kernel). Just a guess.

          It would be great to have “bdev” and “buuid” boot options to work without “insmod” and “search” lines in a grub menu entry. Perhaps it’s just the way to use these options that needs some special attention, or perhaps a useful improvement can be done to the live system.

          Girafenaine
          ----
          Antix 19 - Fluxbox - Live USB stick and frugal / MX 19 - Fluxbox - Dell XPS 7590

          #69556
          Member
          olsztyn
            Helpful
            Up
            0
            ::

            In antiX21, your have two kernels onboard, called vmlinuz (4.9) and vmlinuz1 (5.10.57). That let you boot live or frugal install on both these kernels from a live USB. That’s better than with antiX 19 !

            Yes, precisely. I am using antiX 21 and boot menus are improved significantly over antiX 19. Also two kernels 4.9 and 5.10. This is a lot more flexible and lets me boot multiple Frugals from the same stick as long as they have one of these kernels.
            Find Frugals menu item is a great idea. What I mentioned is a bug making them boot with 4.9 kernel no mater what.
            Otherwise Find Frugals is much more flexible than setting up custom Grub entries for those Frugals.
            Thanks and Regards.

            Live antiX Boot Options (Previously posted by Xecure):
            https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

            #69557
            Forum Admin
            anticapitalista
              Helpful
              Up
              0
              ::

              The find frugals grub menu on antiX-21 is the work of fehlix and is in its early stage of development,
              so expect improvements down the line.

              Philosophers have interpreted the world in many ways; the point is to change it.

              antiX with runit - leaner and meaner.

              #69558
              Member
              olsztyn
                Helpful
                Up
                0
                ::

                The find frugals grub menu on antiX-21 is the work of fehlix and is in its early stage of development,
                so expect improvements down the line.

                Great news… Looking forward to perfected these important functions… Thank you fehlix! Greatly appreciated…

                • This reply was modified 1 year, 6 months ago by olsztyn.

                Live antiX Boot Options (Previously posted by Xecure):
                https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

                #80677
                Member
                Robin
                  Helpful
                  Up
                  0
                  ::

                  Should have read this very thread before. But after both, the USB live stick for use and the Backup stick failed to work with I/O errors, I had to set it up as a frugal install now on a small (8GiB) spare partition on my hard drive.

                  [90215.481321] sd 4:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
                  [90215.481330] sd 4:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 01 6a 7e d0 00 00 10 00
                  [90215.481334] print_req_error: I/O error, dev sdd, sector 23756496
                  [90216.966501] sd 4:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
                  [90216.966510] sd 4:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 01 6a a3 d0 00 00 10 00
                  [90216.966515] print_req_error: I/O error, dev sdd, sector 23765968
                  [90230.426638] sd 4:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
                  [90230.426677] sd 4:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 01 71 89 d0 00 00 10 00
                  [90230.426680] print_req_error: I/O error, dev sdd, sector 24218064
                  [90231.873070] sd 4:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
                  [90231.873080] sd 4:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 01 71 ad d0 00 00 10 00
                  [90231.873084] print_req_error: I/O error, dev sdd, sector 24227280
                  [90236.054068] sd 4:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
                  [90236.054075] sd 4:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 01 71 e3 d0 00 00 10 00
                  [90236.054078] print_req_error: I/O error, dev sdd, sector 24241104
                  [90253.146071] sd 4:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
                  [90253.146080] sd 4:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 01 72 5e d0 00 00 10 00
                  [90253.146084] print_req_error: I/O error, dev sdd, sector 24272592
                  [90254.509897] sd 4:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
                  [90254.509905] sd 4:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 01 72 67 d0 00 00 10 00
                  [90254.509909] print_req_error: I/O error, dev sdd, sector 24274896

                  Luckily one of the sticks allowed me to set up the frugal install, but it wouldn’t boot to the correct (originally updated) kernel after frugal install was done. Since Network refused to work on this damaged system, I had to dig on myself in the frugal and live files, which led me to the very same diagnosis like Girafenaine, anticapitalista and others, and coming to an equivalent solution independently. Knowing this thread before and the other one would have saved me some time. But I did it slightly different, so I’ll pin the info here for other frugal users.

                  The steps are valid in case you have to originally boot to frugal from the USB stick instead of having set up grub on the hdd.
                  To kernel update a frugal install in this case, first follow the default way of updating the live kernel, which means:

                  $ sudo apt-get update
                  $ sudo apt-get install linux-headers-4.19.0-222-antix.1-686-smp-pae linux-image-4.19.0-222-antix.1-686-smp-pae

                  For sure, install the kernel version you need on your system, not my example…

                  Then, in Control Center:

                  Live Remaster
                  Reboot to the frugal install.

                  Then again in Control Center:

                  Live Kernel updater
                  Reboot to the frugal install.

                  You will notice, as Girafenaine has described above already: the stick will boot your frugal to the old kernel, ignoring the existing new one completely.

                  The path I found to overcome this (unfortunately without knowing about this was discussed here already long ago) was:

                  On the live USB stick create an additional folder, named frugal.
                  from the frugal install folder on your hdd copy the following files to this freshly created frugal folder on your Live USB stick:

                  initrd.gz
                  initrd.gz.md5
                  vmlinuz

                  These are small files, they are some MB of size only. You need root privileges (sudo) to copy them, and also for creating the frugal folder on your Live USB stick.

                  Using leafpad or geany with root privileges open and edit the file
                  /media/antiX-Live-usb/boot/syslinux/syslinux.cfg
                  Add a new section to the configuration, e.g. beneath the existing section “Custom (5. April 2021)” or whatever date you find here. The new section should look like:

                  LABEL frugal
                      MENU LABEL Custom-Frugal ( 4. April 2022)
                      KERNEL /frugal/vmlinuz
                      APPEND quiet frugal_static splash=v disable=lxF mount=all
                      INITRD /frugal/initrd.gz

                  (adjust the date according to your needs)

                  Finally change the line default=custom in this file to
                  default=frugal
                  Also you might want to modify the timeout value to e.g. 300 instead of the 3000 found there, but this is something up to what you like best.

                  Save the file and close it.

                  Now a final step is necessary to make it work:
                  Rename the frugal folder on the hdd named like the old kernel according to the new kernel you have installed:
                  e.g. the folder antiX-Frugal-4.19.180-antix.1-686-smp-pae will have to be renamed to
                  antiX-Frugal-4.19.0-222-antix.1-686-smp-pae
                  in my example.

                  Reboot
                  Et voilà ! antiX will boot frugal from the Live USB stick into the new kernel now.

                  To the devs: It should not be that difficult to modify the live kernel updater the way it executes these easy steps additionally to its default tasks, only in case a frugal install is detected. Maybe you find even a way to present the additional boot menu entry only in case a specific frugal install is found on the hdd.

                  What needs to be checked still is: What will a fresh Live USB stick do, in case it comes across a kernel updated frugal install on a hdd? Will it be able to boot it, regardless of the folder name containing the new kernel name now? Probably not, since it will not have the correct version of initrd and vmlinuz files on board… So I believe we’d need an additional frugal boot menu entry to allow user to choose: get them copied from frugal hdd to the stick, add the Frugal-Custom Entry to the boot menu and reboot.

                  As said before, having known these threads before the accident happened to both of my Live USB sticks (working and backup) would have saved me some hours original researching, since here were all the files involved mentioned already. Thank you very much, since now I do definitely know I was on the right path and did the correct modification. System is up now and runs stable and fine again, allowing me to post this summary.

                  Windows is like a submarine. Open a window and serious problems will start.

                  #80719
                  Member
                  olsztyn
                    Helpful
                    Up
                    1
                    ::

                    Hi Robin…
                    I want to thank you for sharing your experience. Live and Frugal antiX architecture is my special interest as I am using both, usually in multiple instances and booting them via antiX boot parameters, rather than Grub entries.
                    Two my laptops are running exclusively antiX Live directly from internal SATA drives, multiple Live and Frugal instances. The real power of antiX is Live/Frugal architecture, unparalleled by any other distro, which in case of antiX is much superior to traditional install IMO.
                    I trust antiX owner will continue perfecting this Live/Frugal architecture, as part of overall excellent antiX strategy…
                    Thanks and Regards…

                    Live antiX Boot Options (Previously posted by Xecure):
                    https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

                  Viewing 8 posts - 1 through 8 (of 8 total)
                  • You must be logged in to reply to this topic.