AntiX frugal in virtual machine

Forum Forums General Tips and Tricks AntiX frugal in virtual machine

  • This topic has 4 replies, 3 voices, and was last updated Jun 21-4:37 pm by olsztyn.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #84868
    Member
    Vincent17

      Recently, I booted a VirtualBox VM with a 2GB virtual disk from an antiX iso, ran the installer and found it requires about 4GB. That made me think about a frugal install and other ways of running antiX in a VM.

      1. Frugal install of antiX in VM
      After a lot of trial and error, I came up with these steps. Please suggest improvements.
      Create a vm with 2GB virtual hard disk. In System/Extended features, EFI should not be enabled. Boot from an antiX iso.
      In a terminal on the VM:

      su
      gparted 
      	# create a dos partition table on sda, format to ext4, set boot flag
      mkdir /mnt/sda1 ; mount /dev/sda1 /mnt/sda1
      mkdir /mnt/sda1/boot
      extlinux -i /mnt/sda1/boot
      cat /usr/lib/SYSLINUX/mbr.bin > /dev/sda
      rsync -a /live/boot-dev/boot/syslinux /mnt/sda1/boot
      rsync -a /live/boot-dev/antiX /mnt/sda1
      geany /mnt/sda1/boot/syslinux/syslinux.cfg
      	# change UI line to simple text menu: UI menu.c32 
      	# Add "from=hd" to the APPEND line of the first entry
      	# delete the other entries
      	# save
      reboot

      Persistence
      I don’t know how to preserve existing rootfs and homefs in this process, so for a customized VM, I remastered and copied the remastered linuxfs and linuxfs.md5 into /mnt/sda1/antiX instead of the ones from the iso. Persistence in the VM can be set up via the Control Centre; also add “persist_all” to APPEND line in syslinux.cfg.

      2. Clone a live flash drive in a VM
      This is not as frugal but it retains nice antiX boot menus and persistence.
      Make a VM with a large enough virtual disk and boot from iso. Mount the flash drive in the VM.
      Use gparted to
      –make msdos partition table on sda
      –unmount the flash drive ext4 partition, copy it and paste it to sda
      –set the boot flag on sda1
      cat mbr.bin to sda as above. Reboot without iso; in boot menu choose F5: persist option if desired, F8: save and add “from=hd” to the Boot options. Reboot the VM to a clone of the live flash drive, with persistence.

      3. Boot VM from a live flash drive
      https://www.howtogeek.com/187721/how-to-boot-from-a-usb-drive-in-virtualbox
      Create a sort of link to the live flash drive (sdb):
      $> VBoxManage internalcommands createrawvmdk -filename flash_drive.vmdk -rawdisk /dev/sdb
      Create a VM, use Settings to attach flash_drive.vmdk as sata storage, start the VM, add “from=all” to boot options and F8: save

      I hope some of this will be useful. Nothing worked the first time, but that’s just me :/
      This was done using antiX-21_x64 on artix host machine.

      • This topic was modified 10 months, 2 weeks ago by Vincent17.
      • This topic was modified 10 months, 2 weeks ago by Vincent17.
      #84899
      Moderator
      christophe
        Helpful
        Up
        0
        ::

        Pretty cool! 😉

        Member Xecure used to say he would use the live-usb-maker app from the live-cd within the VM, to make the virtualbox hdd into a live-usb — which automates making it a frugal instance in virtualbox – with the full live-usb menu options.

        In any event, antiX “antics” are always fun!

        • This reply was modified 10 months, 2 weeks ago by christophe.

        confirmed antiX frugaler, since 2019

        #84911
        Member
        olsztyn
          Helpful
          Up
          0
          ::

          Member Xecure used to say he would use the live-usb-maker app from the live-cd within the VM, to make the virtualbox hdd into a live-usb — which automates making it a frugal instance in virtualbox – with the full live-usb menu options.

          This is how I would do it also. Simple and easy…

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

          #84946
          Member
          Vincent17
            Helpful
            Up
            0
            ::

            Thanks for reminding me of live-usb-maker. I’m an admirer, so I tried that first and ran into “The device /dev/sda does not seem to be usb or removable”. I didn’t know how to get around that and resorted to “antics”. Now that I know a little more, live-usb-maker is easier. It appears to be necessary to use “–target=sda –force=usb” and to add “from=hd” to boot options on first boot, right?

            #84947
            Member
            olsztyn
              Helpful
              Up
              0
              ::

              It appears to be necessary to use “–target=sda –force=usb

              The easy way to do it:
              – Best run live-usb-maker from terminal – ‘sudo live-usb-maker –force=usb’. Make sure it is double dash before ‘force’.
              – Chose options you want to apply, such as creating data partition, the same you have in the gui version

              After your Live antiX installation is done, you boot it directly from hd with boot option ‘from=hd’. Just save this option via F8, so it becomes default.
              I run multiple Live antiX installations on internal hard drives, as my primary way of running antiX. Works great.

              • This reply was modified 10 months, 2 weeks ago by olsztyn.
              • This reply was modified 10 months, 2 weeks ago by olsztyn.

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

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