How to do encrypted frugal install ?

Forum Forums General Tips and Tricks How to do encrypted frugal install ?

  • This topic has 14 replies, 4 voices, and was last updated May 8-8:33 am by olsztyn.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #31114
    Member
    Vincent17

      BitJam wrote here

      You could also create an encrypted “frugal” install on your hard drive using live-usb-maker with the –force=usb option and the –size=XX% option so it does not gobble up the entire drive. It will want to re-partition the entire drive but there are simple ways around this. When it is time to do a big upgrade, you could clone the frugal install to a usb, do the upgrade and remaster on another system and then manually copy back the linuxfs file.

      BitJam, could you please reveal how to avoid repartitioning the entire drive? This won’t be a tip/trick until you do! šŸ˜‰ Thanks!

      P.S.
      The live-usb-maker has great –help and man files, but I don’t find (or recognize) the option for this. On an expendable fat32 drive with files on it, I tried:
      sudo live-usb-maker --from=/path/antiX-19_386-base.iso --force=usb --size=50 --target=sdd -E
      The frugal install went perfectly but left half the drive unallocated; original files were lost.
      I’m doing this from MX 17.3, live-usb-maker version 2.23.04

      • This topic was modified 3 years, 4 months ago by Vincent17. Reason: clarity
      #31128
      Member
      olsztyn
        Helpful
        Up
        0
        ::

        From my experience with Frugal I never needed to re-partition. It puts Frugal instance on any existing partition as subset. This was done with Frugal option on boot rather than using Live USB Maker though…
        I think the above would be to allocate the entire partition as Frugal instance, but looking at the topic title I am also curious if it is possible to create an encrypted Frugal instance…

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

        #31130
        Member
        fatmac
          Helpful
          Up
          0
          ::

          If I’m not mistaken, live-usb-maker will normally use the whole drive, with what isn’t used by the system as file storage space for your usage.
          So if you limit the amount of space used, you should be able to create a new partition in the rest of the drive, (I think).

          If you want a frugal install, I think you just copy the necessary files to the drive, then use something to boot it from there, (but it has been a long time since I’ve done it).

          Linux (& BSD) since 1999

          #31175
          Member
          Vincent17
            Helpful
            Up
            0
            ::

            duplicate post removed

            • This reply was modified 3 years, 4 months ago by anticapitalista.
            • This reply was modified 3 years, 4 months ago by Vincent17.
            #31179
            Member
            Vincent17
              Helpful
              Up
              0
              ::

              duplicate post removed

              • This reply was modified 3 years, 4 months ago by Vincent17.
              • This reply was modified 3 years, 4 months ago by Vincent17.
              #31181
              Member
              Vincent17
                Helpful
                Up
                0
                ::

                Encrypted home using ecryptfs-utils works in a frugal install, but at startup, there is a 30 sec pause at a black screen, then brief “failed to execute login command” message. Normal login screen appears and login + decryption are successful. homefs has encrypted files in /home/.ecryptfs/demo/.Private. They get mounted to ram as /home/demo at login.
                ———

                If you want a frugal install, I think you just copy the necessary files to the drive, then use something to boot it from there

                I have been able to do this in an ordinary frugal install. For encrypted frugal install to flash drive,
                sdc 7.5G
                ā”œā”€sdc1 antiX-Live-usb 149M ext4
                ā”œā”€sdc2 3.5G crypto_LUKS —–linuxfs, rootfs, homefs are here
                └─sdc3 antiX-uefi 50M vfat
                I don’t think it’s possible to copy to a folder without losing encryption.
                ———
                sudo live-usb-maker --from=/path/antix.iso --force=usb --size=50 --target=sdb3 -E
                where sdb is an empty partition on SSD, failed with “Error: Device /dev/sdb3 is not a disk device”

                • This reply was modified 3 years, 4 months ago by Vincent17. Reason: clarity
                #31229
                Member
                Vincent17
                  Helpful
                  Up
                  0
                  ::

                  Some progress to report. I made a new frugal install of antiX-17.4 and used ecryptfs-utils to encrypt /home/demo. The delay mentioned above is now only 8 seconds and the ā€œfailed to execute login commandā€ message is absent. User demo is set to require password to log in; I don’t remember how it was on my first try but it seems likely I had it set to auto-login.

                  This is a good solution for me: demo’s personal files, configs, browser histories etc. are encrypted, rootfs is not. šŸ™‚

                  #33171
                  Member
                  Vincent17
                    Helpful
                    Up
                    0
                    ::

                    Hello,
                    I still tinker with encrypted frugal install methods. I placed a copy of an existing frugal install on an encrypted flash drive and booted as shown in the screenshot. AntiX seems to think it’s booting a live device. The message is “Fatal Error Could not find file antiX/linuxfs…Please contact BitJam… ”
                    I have tried many grub menu entries, such as pdir=/ pdev=(crypto0) puuid= etc, but antiX does not get the message.
                    I’ll appreciate ideas and explanations. Thanks

                    • This reply was modified 3 years, 2 months ago by Vincent17. Reason: wrong image uploaded :(
                    Attachments:
                    #33178
                    Member
                    armando
                      Helpful
                      Up
                      0
                      ::

                      Hello,
                      I still tinker with encrypted frugal install methods. I placed a copy of an existing frugal install on an encrypted flash drive and booted as shown in the screenshot. AntiX seems to think it’s booting a live device. The message is ā€œFatal Error Could not find file antiX/linuxfs…Please contact BitJam… ā€
                      I have tried many grub menu entries, such as pdir=/ pdev=(crypto0) puuid= etc, but antiX does not get the message.
                      I’ll appreciate ideas and explanations. Thanks

                      have you tried with chainloader +1 instead ‘linux /vm…..’ ‘initrd /init….’ ?

                      ...
                      ...
                      > set root=(crypto0)
                      > chainloader +1
                      > boot

                      that’s the way I boot USB flash drives in the grub when there’s no bios usb boot available. I’ve never tried encrypted things, and I don’t even know how chainloader works, but maybe it works.

                      #33195
                      Member
                      Vincent17
                        Helpful
                        Up
                        0
                        ::

                        @armando Thanks, I tried chainloader. It reports “you need to load the kernel first” I suspect if I copied a live usb into the crypto file, grub would chainload grub and boot the live usb: a backup plan.

                        Writing `set root=(crypto0)
                        linux /vmlinuz pdir=/ bdir=/ persist_all` stops antiX from looking for the antiX folder, but it still reports
                        Could not find file /linuxfs
                        Searched devices: /dev/sdc /dev/sdb
                        Searched types: usb,cd

                        bdev=(crypto0) results in “Could not find device (crypto0)”

                        @moderators, thanks for fixing my botched attachment in prior post šŸ™‚

                        • This reply was modified 3 years, 2 months ago by Vincent17.
                        • This reply was modified 3 years, 2 months ago by Vincent17.
                        #33198
                        Member
                        armando
                          Helpful
                          Up
                          0
                          ::

                          @Vincent17

                          you can try:

                          ...
                          ...
                          > set root=(crypto0)
                          > configfile (crypto0)/boot/grub/grub.cfg

                          booting from here is not likely. but you can edit (E), and copy the ‘linux’ and ‘initrd’ and try those values in another restart like

                          ...
                          ...
                          > set root=(crypto0)
                          > linux (crypto0)/boot/vmlinuz-###orwhatheveryoufindinyourentrymenu
                          > initrd (crypto0)/boot/initrd.img-###orwhateveryoudindinyourentrymenu
                          > boot
                          • This reply was modified 3 years, 2 months ago by armando.
                          • This reply was modified 3 years, 2 months ago by armando.
                          • This reply was modified 3 years, 2 months ago by armando.
                          #33205
                          Member
                          Vincent17
                            Helpful
                            Up
                            0
                            ::

                            I conclude that the approach I was trying won’t work. šŸ™ Someone please correct or confirm.

                            Grub can decrypt a partition to a virtual device (crypto0) and load vmlinuz and initrd from it, but I think once grub hands control over to linux, (crypto0) is gone and forgotten.

                            If some initrds are set up to ask for a password when presented with a luks-encrypted drive, it would explain the statement “I’d be prompted twice for the LUKS passphrase (once by GRUB, then again by the initramfs).”

                            Apparently, Antix’s initrd is not designed this way. With bdev=sdb pdev=sdb (sdb=hd1=crypto-luks flash drive), it does not prompt for a password, it just fails to find linuxfs.

                            @armando, thanks for your suggestions. I’ll try them.

                            EDIT: @armando, those commands also fail with “could not find linuxfs” as soon as grub hands over to initrd.
                            To get past this, I guess it will be necessary to add cryptsetup to the initrd.
                            Doing a frugal install in its own partition probably sounds strange; I want the option not to save a session.

                            • This reply was modified 3 years, 2 months ago by Vincent17.
                            • This reply was modified 3 years, 2 months ago by Vincent17.
                            #35737
                            Member
                            olsztyn
                              Helpful
                              Up
                              0
                              ::

                              I apologize for being pain and revisiting this somewhat exhaustively discussed thread…
                              Since about four months passed I am curious and very interested if anything changed in missing antiX capability of encrypted frugal install in a straightforward way, as such capability exists for Live and plain installed antiX.
                              If no such capability has been developed I understand, unfortunate as it is, but it significantly reduces usefulness of frugal in comparison to Live…

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

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