0

Is there a feasible way to essentially just download a .img file of an already working Ubuntu distribution that I can write directly to my hard drive?

Pretty much any default would work fine for me but i spend most of my time every couple months burning it to a thumb drive and then waiting for the installation to work/finish.

William
  • 896

2 Answers2

1

As Videonauth pointed out, a custom installer would be a better solution. You can even make an unattended one so that it just installs without asking a bunch of questions.


With that said, according to some instructions, you can create a custom .img file fairly easily, though it won't be geared toward the hardware on your machine and the partition and so on will be pretty small:

  1. Download an official Ubuntu .iso file that works on the machines you'll be using
  2. Install VirtualBox to your current operating system
  3. Create a virtual machine with an acceptable hard drive size (keep in mind that this should be small enough so that the resulting .img file fits on your installation medium).
  4. Insert the Ubuntu installer .iso file into the virtual DVD drive
  5. Boot the virtual machine
  6. Install Ubuntu onto the virtual machine
  7. Start the virtual Ubuntu machine
  8. Update virtual Ubuntu's Ubuntu packages with:

    sudo apt update
    sudo apt dist-upgrade
    
  9. Install packages you want

  10. Configure non-hardware-related things
  11. Get things set up the way you want
  12. Restart the virtual Ubuntu
  13. Shut down the virtual Ubuntu
  14. In the File menu of VirtualBox, select Virtual Media Manager…
  15. Right click on the appropriate hard drive image and select Properties…
  16. Copy down the Location information
  17. Open a command prompt
  18. Create the .img file; in a command prompt on your nonvirtual operating system, run:

    cd Desktop
    VBoxManage clonehd --format RAW "[hard drive image location]" "[img filename].img"
    
  19. The .img file should be on your desktop

Chai T. Rex
  • 5,193
  • I'm trying to avoid the process of writing the ISO to a thumb drive and then installing(writing) the software to a hard drive. Because I am not on Linux these guides aren't particularly helpful for me specifically. – William Sep 23 '18 at 14:45
  • If you mean that writing the ISO doesn't work because the guides are for Linux, you can attach your real thumb drive to an Ubuntu virtual machine if you use VirtualBox. Then you can follow the instructions since you're in Linux with your USB drive. – Chai T. Rex Sep 23 '18 at 14:50
  • I'm confused how does the virtual machine help my issue? Virtual machines are generally slower with the boot process. I have Ubuntu boxes but they tend to be outdated. – William Sep 23 '18 at 14:58
  • They're slower, but you only use them to create the custom installer ISO (maybe an unattended one) and write it to the USB drive. After that, you shut down the virtual machine and disconnect the USB drive. Now you have a custom USB Ubuntu installer that works on non-virtual, fast machines. – Chai T. Rex Sep 23 '18 at 15:00
  • thank you but I think you are misunderstanding my issue and question. I'm trying to minimize waiting time and maximize speed. Tiny core Linux has .img files you can write directly to the hard drive assumed Ubuntu doesn't also. – William Sep 23 '18 at 15:04
  • Ahh, I see. You can use the numbered instructions above to create an .img file. It won't create an installer, but a real hard drive image. – Chai T. Rex Sep 23 '18 at 15:40
0

There are full working IMG available on the net, but if I where you I would refrain from using those, they are third party in almost all cases and you never know if and what kind of back-doors you install with them.

There are ways to create your own custom installers and you should definitively look into this.

Videonauth
  • 33,355
  • 17
  • 105
  • 120