[solved] antix-core and chroot procedure?

Forum Forums Official Releases antiX-21/22 “Grup Yorum” [solved] antix-core and chroot procedure?

Tagged: 

  • This topic has 4 replies, 3 voices, and was last updated Mar 3-9:22 pm by techore.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #78382
    Member
    techore

      What is the correct procedure to chroot after successful antix-core USB boot?

      My goal is remove GRUB and install and configure rEFInd much as I have done with Arch/Artix.

      mkdir -p /media/chroot
      mount /dev/nvme0n1p2 /media/chroot
      mount /dev/nvme0n1p1 /media/chroot/boot
      mount -t proc proc /media/chroot/proc
      chroot /media/chroot /bin/bash

      I found a reference to “mount -t devpts devpts /mnt/chroot/dev/pts” but there is no such directory so that is a bit puzzling.

      • This topic was modified 1 year, 2 months ago by techore.
      • This topic was modified 1 year, 2 months ago by techore.
      • This topic was modified 1 year, 2 months ago by techore.
      #78402
      Forum Admin
      anticapitalista
        Helpful
        Up
        0
        ::

        Try the included app – chroot-rescue

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

        antiX with runit - leaner and meaner.

        #78480
        Member
        techore
          Helpful
          Up
          0
          ::

          chroot-rescue is neat!

          For the benefit of others, the procedure that worked for me to mount root and an esp partition using chroot-rescue:

          mkdir /media/nvme01n1p2
          mount /dev/nvme0n1p2 /media/nvme01n1p2
          mount /dev/nvme0n1p1 /media/nvme01n1p2/boot
          chroot-rescue /media/nvme01n1p2

          Where nvme0n1p1 is the fat32 ESP partition and nvme0n1p2 is the ext4 (or any other supported filesystem) root partition. The above assumes you have partitioned, formatted, mounted, and installed antix-core.

          In the absence of chroot-rescue, I still want to know how to chroot using antiX. In reviewing Debian’s wiki and the chroot-rescue script, this is the procedure that I have derived.

          mkdir -p /media/nvme0n1p2
          mount /dev/nvme0n1p2 /media/nvme0n1p2
          mount /dev/nvme0n1p1 /media/nvme0n1p2/boot
          mount -t proc /proc /media/nvme0n1p2/proc
          mount -t sysfs /sys /media/nvme0n1p2/sys
          mount --rbind /dev /media/nvme0n1p2/dev
          chroot /media/nvme0n1p2 /bin/bash

          Optionally,

          mount --rbind /run /media/nvme0n1p2/run
          mount --rbind /sys/firmware/efi/efivars sys/firmware/efi/efivars

          If goofing around with efi, I found that the last is needed.

          Comments?

          • This reply was modified 1 year, 2 months ago by techore.
          • This reply was modified 1 year, 2 months ago by techore.
          • This reply was modified 1 year, 2 months ago by techore.
          #78489
          Forum Admin
          Dave
            Helpful
            Up
            0
            ::

            Looks about right to me. The way I have done it manually is

            mount /dev/root-rescue-part /mnt/rescue
            mount -o bind /dev /mnt/rescue/dev
            mount -o bind /sys /mnt/rescue/sys
            mount -o bind /proc /mnt/rescue/proc
            mount /dev/boot-partition /mnt/rescue/boot
            chroot /mnt/rescue
            

            Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown

            #78491
            Member
            techore
              Helpful
              Up
              0
              ::

              Thank you, Dave.

              Not used “-o bind.” I’ll dig deeper into mount to better understand its nuances. I do see the Arch wiki citing to use “-o bind” versus “–rbind” due to it may result in failing umounts.

              I am good. Thank you, both.

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