• Install from an ISO file without burning


    Hi all!

    If someone wants to install Antergos without “burning” the ISO file to a USB stick or DVD, it is possible e.g. with these instructions. So no need to use dd or Rufus or anything like them.
    This however requires that you have a working linux installation, Antergos or most other distros will do. I’ve tried these instructions and they work for me. :)

    1. Download the Antergos ISO file (hey, this is Antergos site!).

    2. Create a partition (with e.g. gparted) for the files in the ISO. Lets say the partition is /dev/sdb2 (but choose appropriate partition for your system). The size of the partition needs to be able to hold all ISO files, so (currently) 3 GB is well enough. Put a label to you partition, see also below about “set label=…”.

    3. Mount the partition normally (e.g. mount /dev/sdb2 /mnt) and copy all ISO files to that new partition.

    4. Write some lines to /boot/grub/custom.cfg:

    menuentry "Antergos ISO partition" {
        set label=isopart  # give your partition label here
        search --set --no-floppy --label $label
        linux /arch/boot/vmlinuz root=LABEL=$label archisolabel=$label rw quiet
        initrd /arch/boot/archiso.img
    }
    
    1. Reboot and see the new boot entry, and try it!

    Some notes though:

    • This may not work if the new partition is on the same disk as where you plan to install Antergos. I read about this limitation long ago and not sure if it still is valid.
    • I’ve tested this in a mixed BIOS/UEFI environment, but cannot guarantee that it works for all cases.

    All of you who want to try this please give comments and feedback! :)

    EDIT: You can remove “root=LABEL=$label” from the linux line of the menuentry.

  • I wonder… is this how companies have an OS ready to install when you buy it from the store? Because I know that having to manually insert a USB is something people only have to do with Linux. If this is how they do it, then perhaps someday we as the Linux community could produce computers/laptops with this already done so that even the least techie person can give Linux a try:grinning:.

    Keep trying, never give up. In the end, you will find that it was all worth it

    Community ISO: https://antergoscommunityeditions.wordpress.com
    Linux Basics: https://linuxbasicssite.wordpress.com

  • @Keegan

    Well, why not, but I don’t know how they do it.
    The ISO contents could probably just be copied (with dd) to a HDD or SSD of a machine, and let it boot as a USB stick would. But the problem may be how user can create partitions to install the system, since the ISO contents would be on the disk already. Maybe if all the ISO files are put to RAM in the beginning, then the boot disk could be free to any other use (i.e. install the system)?

    Maybe you could just try it if you have a spare machine? :)
    I currently don’t have such luxury.

  • @manuel thanks manuel, if you allow me to add some info here in how i booted from root partition…

    set isofile #is the full path to your image, and will be used as variable $isofile
    (hd0,5) #is sda partition 5, must change accordingly
    linux (loop)/arch/boot/vmlinuz #is the path to kernel inside the .iso
    archisolabel=antergos-17.9-x86_64 #is the iso name without .iso extension
    img_dev=/dev/sda5 #partition where the iso is
    img_loop=$isofile
    earlymodules=loop
    initrd (loop)/arch/boot/archiso.img #that’s the path to initrd inside the .iso

    Example:

    menuentry "TITLE_YOU_WANT" {
            set isofile="/home/fernando/antergos-17.9-x86_64.iso"
            loopback loop (hd0,5)$isofile
            linux (loop)/arch/boot/vmlinuz archisolabel=antergos-17.9-x86_64 img_dev=/dev/sda5 img_loop=$isofile earlymodules=loop
            initrd (loop)/arch/boot/archiso.img
    }
    

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • @manuel said in Install from an ISO file without burning:

    Maybe you could just try it if you have a spare machine?
    I currently don’t have such luxury.

    Sadly, I do not either. I was just curious if you knew!

    Keep trying, never give up. In the end, you will find that it was all worth it

    Community ISO: https://antergoscommunityeditions.wordpress.com
    Linux Basics: https://linuxbasicssite.wordpress.com

  • @fernandomaroto

    Thanks for the addition! Now we have both

    1. booting from the hard disk partition with ISO file contents
    2. booting from the ISO file

    By the way, I looked at the ISO file booting a bit and came up with the following:

    menuentry "Antergos ISO file" {
      set isofile=/path-to/antergos-17.10-x86_64.iso
      search --no-floppy --set=root --file $isofile      # get $root of the $isofile
      probe -l $root --set=label                         # get $label of the $root
      set img_dev=/dev/disk/by-label/$label
      loopback loop $isofile
      linux (loop)/arch/boot/vmlinuz img_dev=$img_dev img_loop=$isofile
      initrd (loop)/arch/boot/archiso.img
    }
    

    Now you only need to give the path to the Antergos ISO file.

  • @manuel
    Yes much cleaner, i have a lot of drafts/scratchs here, i decided to learn more about grub since before yesterday, so i’m testing a lot of stuff. Started all that because i want to lose the fear i have about grub hehehe, but now i want to add more entrys to my .iso

    And manuel, if i create a small partition, 2GB for example, and instead of copying the .iso with cp command i use dd command how can i boot? (so far i didn’t manage to boot)
    OBS: in this case i have a linux installed on another partition

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • @fernandomaroto
    Haven’t tested the dd option yet but probably tomorrow I could do that.

  • @Keegan
    I actually tried it in a VM, and as I suspected, it wasn’t possible to install to the same drive as the boot disk. Antergos partitioner did’t seem to allow it since it didn’t show the disk at all.
    But maybe some clever chroot trick could be used to accomplish it.

  • @manuel said in Install from an ISO file without burning:

    @Keegan
    I actually tried it in a VM, and as I suspected, it wasn’t possible to install to the same drive as the boot disk. Antergos partitioner did’t seem to allow it since it didn’t show the disk at all.
    But maybe some clever chroot trick could be used to accomplish it.

    you want to boot the iso and install at the same partition?
    if so maybe when you get the antergos boot screen you could add copytoram=y parameter. That way the iso will be loaded in ram, but may require a lot of ram (~ double of iso size due to xz compression), that measn around 4GB ram to antergos…

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • @fernandomaroto
    Thanks, I could try that, too.
    As you can see, this is something that @keegan was thinking about for the future.

  • @fernandomaroto
    I tried to get the dd copying option to work. I was able to boot from the dd’d partition (after reading https://wiki.archlinux.org/index.php/Syslinux and experimenting a bit).

    I did those “manual install” things and, for syslinux.cfg, copied the “LABEL start” lines from the existing …/isolinux/isolinux.cfg and set DEFAULT to start.

    But the installer seems to hide the boot disk, so it was impossible to install anything to the same disk.

    EDIT: added some stuff.

Posts 12Views 202
Log in to reply