Booting antiX Frugal-only From HDD – on UEFI firmware – with Grub

Forum Forums General Tips and Tricks Booting antiX Frugal-only From HDD – on UEFI firmware – with Grub

  • This topic has 5 replies, 5 voices, and was last updated Oct 11-12:44 am by Brian Masinick.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #40528
    Moderator
    christophe

      Booting antiX Frugal-only From HDD – on UEFI firmware – with Grub2

      Syslinux/Extlinux can’t boot antiX frugal installs on UEFI computers. So, since all new computers are UEFI, here’s one way to set it up if you want only to run frugal installs (and don’t want to have to use a “regular” installation or live-USB to boot them).

      I only have experience with my one UEFI computer. I have read that UEFI firmware varies, and some are buggy. But this works for me. And, if the live-USB works on your computer, I suspect this setup would work from your hard drive, too.

      HARD DISK SETUP:
      1. Set computer to boot in UEFI-mode (Not legacy bios mode). Boot up from a live-USB.
      2. Using gparted, select device -> create partition table -> gpt
      3. Create first partition – I’ve read many sizes being recommended from 50 to 500 MB. My hdd is 250 GB, so I just went 500 MB (I could afford it). This has to be FAT32.
      4. Second partition – big. all the rest of the drive, unless you want swap. (I told it to leave 4 GB free at the end for swap.)
      5. Swap partition – partition type = linux-swap
      6. Have gparted complete these operations
      7. After it’s done, right-click on sda1 & select “manage flags” -> check “esp” & “boot”. Close & reboot.

      FILE COPY:
      1. Booting back up
      2. run in a terminal
      sudo rox && sudo rox
      3. This opens two root rox-filer instances. Navigate to /media/demo & open LIVE-UEFI with one rox window, and go to /media/sda1 with the other. sda1 is your EFI boot partition. Drag & drop everything from /media/demo/ to /media/sda1. (It is just 2 folders — “boot” & “EFI”.)
      4. In the terminal, run sudo blkid
      5. In your root rox-filer window, go to /media/sda1/boot/grub. Click on grub.cfg. This opens it for editing, as root.
      6. In your terminal, find the UUID for sda2 & copy it. It looks something like
      /dev/sda2: LABEL="frugals" UUID="6d44c859-e1c4-42d0-b3ea-147b028fc93c" TYPE="ext4" PARTUUID="e1218fb5-3998-4c0e-a85c-32b3a68f1d29"
      7. Copy just the part after UUID= (without quotes) — 6d44c859-e1c4-42d0-b3ea-147b028fc93c — & paste it into the grub.conf like this:
      main_uuid="6d44c859-e1c4-42d0-b3ea-147b028fc93c"
      This HAD the UUID of your live-USB. You paste your sda2 UUID over it. Save the file.
      8. Now open your 2 rox windows to /live/boot-dev and /media/sda2 (NOTE: if you gave your partitions labels with gparted, then the labels show up instead. For example, I named my sda2 partition “frugals” — and so my sda2 shows up as “/media/frugals”). Drag & drop these folders from /live/boot-dev to /media/sda2: antiX, boot, EFI, Live-usb-storage.
      9. Rename the antiX folder to something else. Mine is antiX19.

      CONFIGURING:
      1. go to your root geany editor again. Open /media/sda2/boot/grub/grub.cfg
      This file has the boot stanzas. Leave everything as-is until you get to the boot stanzas (see below). Edit these stanzas to boot as you like. Mine looks like this:

      menuentry " antiX-19.2_x64 Fluxbox" {
      linux /antiX19/vmlinuz quiet splash=v bdir=antiX19 buuid=6d44c859-e1c4-42d0-b3ea-147b028fc93c p_static_root tz=America/Chicago 
      initrd /antiX19/initrd.gz
      }

      You need to make sure the bdir & buuid parameters are there. I wanted static root persistence & the timezone set. You can, of course, be more creative with the menuentry (in quotes).

      2. You can repeat the copying over of other frugal installs, then make a boot stanza for it, following the same template.
      3. Place a # in front of any lines in the grub.conf that you don’t want to see in your boot menu. For example, I “commented-out” (i.e., put a “#” in front of) all the lines except the reboot & power-off options, after my boot stanzas.
      4. Save the file & close all your windows.

      REGISTERING WITH UEFI:
      1. We have to tell the UEFI that we have this great new boot loader.
      Run this in the terminal
      sudo apt install efibootmgr
      2. After this installs, run this in the terminal
      sudo efibootmgr -c -d /dev/sda -p 1 -l \\EFI\\BOOT\\grubx64.efi -L BootFrugal
      This sets the details into the NVRAM that is like the “MBR”-type mechanism with UEFI. It also labels your “OS” as “BootFrugal” — but you could name it something else, instead. The other parameters are set according to the directions in this thread.

      THE END:
      1. Power off & remove the live-USB. Power back on. Enter into your bios/firmware to verify and set this BootFrugal (or your better name) as the default boot. It should be the only hard drive option.
      2. Reboot and enjoy! — You can add or edit frugals at any time. (No need to ever run “update-grub” ever again.)

      If anything is at all unclear (or wrong!), let me know. I know this worked for me.

      Special thanks to antiX devs for the OS & frugal/live capabilities. And to BitJam for getting me out of a “jam” when I hit a wall when I was attempting to set it up. And also to olsztyn for giving me the idea to “borrow” the live-USB files, to place them on the hard drive.

      EDIT: Now about a year on from the first posting, I have followed this recipe 2 additional times. Both were successful.

      • This topic was modified 2 years, 6 months ago by christophe. Reason: fixed a missing "sudo" that Xecure mentioned in a subsequent post

      confirmed antiX frugaler, since 2019

      #40529
      Member
      seaken64
        Helpful
        Up
        0
        ::

        Thanks christophe, that is a nice tutorial.

        Seaken64

        #40530
        Member
        olsztyn
          Helpful
          Up
          0
          ::

          Thank you christophe! Another great accomplishment. For UEFI this time…
          I created several antiX Frugal instances on my UEFI laptops but I did not go to the extent of planting Grub on the UEFI Boot partition since it was created by Intel’s Clear Linux, which does not use Grub at all, so I did not want to mess it up.
          Instead, I created Grub entries (Grub cfg) on the Root partition pointing to antiX Frugals on that partition, without actually installing Grub. I am starting these Frugals from antiX Live, and using Live’s function to show Grub Menu Entries list and select one to boot.
          Your way does not need Live to boot Frugals, of course…
          Thanks and Regards…

          • This reply was modified 2 years, 8 months ago by olsztyn.

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

          #42765
          Member
          Xecure
            Helpful
            Up
            0
            ::

            More info:

            sda1 (first partition) is the EFI partition. It needs to be at least 20 MBs (what boot and EFI folders take). I set it to about 100MB, for future extra EFI files.
            sda2 (main partition) will host your frugal installs. It is recommended to leave it as a ext4 format, but you can change it to something else (for example ntfs for windows access).

            About installing EFI when NOT using live USB (from live ISO). The folder /media/demo/LIVE-UEFI (or ANTIX-UEFI) will NOT exist.
            The grub.cfg file that Christophe talks about in step 3 is, in fact, the /live/boot-dev/boot/grub/config/efi-grub.cfg file.
            So, steps for me were:
            1. I boot to my antiX live ISO session.
            2. If you don’t like Rox filer, launch SpaceFM as root (open normal SpaceFM, then go to top menu File > Root Window; or terminal gksu spacefm).
            3. Copy the EFI folder from the iso (/live/boot-dev/) to your EFI partition (sda1).
            3.1. In your EFI (sda1) partition, create a new boot folder and inside it a grub folder
            3.2. Go back to the /live/boot-dev/ folder, enter /boot/grub/config/ folder and copy efi-grub.cfg to the grub folder you created in your sda1 efi partition(…/boot/grub/). Rename it to grub.cfg
            4. Continue Christophe’s tutorial (in the new grub.cfg file, replace main_uuid=”%UUID%” with the corresponding uuid for sda2, like main_uuid=”6d44c859-e1c4-42d0-b3ea-147b028fc93c”, you can also replace file_id with “/boot/grub/grub.cfg” or create a file in /boot/grub/config/ with a special name and use it instead, or leave as is).

            About REGISTERING WITH UEFI, the second step is with sudo:
            sudo efibootmgr -c -d /dev/sda -p 1 -l \\EFI\\BOOT\\grubx64.efi -L BootFrugal

            I wanted to test this on a virtual machine and all steps worked except for actually booting to the frugal installation. It stops at “cannot find the uuid drive”. I blame the VM as I rechecked everything a thousand times. These kind of errors drain me.

            Anyway, good work Christophe. This is a very interesting way of getting things to work without any installation, only with frugals.

            antiX Live system enthusiast.
            General Live Boot Parameters for antiX.

            #42778
            Member
            olsztyn
              Helpful
              Up
              0
              ::

              Anyway, good work Christophe. This is a very interesting way of getting things to work without any installation, only with frugals.

              Thank you Xecure for this additional procedure…
              I found Frugal antiX, along with Live USB sibling, the best instantiation of antiX. I found Frugal antiX performing better and more reliable than traditionally installed.
              I understand my above statement may not be popular with antiX leaders as I think traditionally installed antiX is still mainstream and main focus. Nevertheless I hope antiX leadership will recognize Frugal implementation as great asset to antiX and support these great enhancements developed by Christophe and Xecure…
              In any case both procedures have prominent record in my personal how-to….
              Thanks and Regards.

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

              #42780
              Moderator
              Brian Masinick
                Helpful
                Up
                0
                ::

                Anyway, good work Christophe. This is a very interesting way of getting things to work without any installation, only with frugals.

                Thank you Xecure for this additional procedure…
                I found Frugal antiX, along with Live USB sibling, the best instantiation of antiX. I found Frugal antiX performing better and more reliable than traditionally installed.
                I understand my above statement may not be popular with antiX leaders as I think traditionally installed antiX is still mainstream and main focus. Nevertheless I hope antiX leadership will recognize Frugal implementation as great asset to antiX and support these great enhancements developed by Christophe and Xecure…
                In any case both procedures have prominent record in my personal how-to….
                Thanks and Regards.

                Anyway, good work Christophe. This is a very interesting way of getting things to work without any installation, only with frugals.

                Thank you Xecure for this additional procedure…
                I found Frugal antiX, along with Live USB sibling, the best instantiation of antiX. I found Frugal antiX performing better and more reliable than traditionally installed.
                I understand my above statement may not be popular with antiX leaders as I think traditionally installed antiX is still mainstream and main focus. Nevertheless I hope antiX leadership will recognize Frugal implementation as great asset to antiX and support these great enhancements developed by Christophe and Xecure…
                In any case both procedures have prominent record in my personal how-to….
                Thanks and Regards.

                Anyway, good work Christophe. This is a very interesting way of getting things to work without any installation, only with frugals.

                Thank you Xecure for this additional procedure…
                I found Frugal antiX, along with Live USB sibling, the best instantiation of antiX. I found Frugal antiX performing better and more reliable than traditionally installed.
                I understand my above statement may not be popular with antiX leaders as I think traditionally installed antiX is still mainstream and main focus. Nevertheless I hope antiX leadership will recognize Frugal implementation as great asset to antiX and support these great enhancements developed by Christophe and Xecure…
                In any case both procedures have prominent record in my personal how-to….
                Thanks and Regards.

                You may be surprised and interested to know that the development team adds different features to appeal and apply to different ways to use antiX and I believe that they are happy to have people actually using the various features; otherwise what is the purpose for implementation of different features, so I am glad that you and others are using the various features.

                --
                Brian Masinick

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