0

Why has nobody for so many decades thought of a way to install ubuntu when in windows without a USB needed?

Like now I dont have any usb sticks available I want to install ubuntu to a hard drive and I can not, the closest I got is using a program called HDD raw copy tool but this just burns a live disk image to the hard drive (so its not persistent e.g if I install something and reboot it is lost ) and it has the "install ubuntu" icon on the desktop...

John
  • 11
  • 1
    Do you actually need to run Ubuntu on bare metal? Or would running the OS in a VM or via WSL meet your needs? There are ways to install Ubuntu without a USB (or DVD), but you need to be ready for some effort to make it work. Unless a bare metal installation is an absolute requirement, virtualisation may give you everything needed (I also challenge you to find a means to install Windows or any other OS on a computer without a USB stick or dual-layer DVD if you think this is a problem limited to just Ubuntu ) – matigo Jul 09 '22 at 10:21
  • 1
    I've used laptops without any working or bootable USB ports in QA (Quality Assurance) testing of Ubuntu, so you can use any media that is bootable, including HDD/SSD or anything else. Either way your question as written is off-topic as I read it. This is a Q&A site & not a forum, so please read https://askubuntu.com/help/dont-ask and https://askubuntu.com/help/on-topic – guiverc Jul 09 '22 at 10:22
  • @guiverc No you can not, otherwise prove me wrong. – John Jul 09 '22 at 10:24
  • @matigo yes it has to e on bare metal – John Jul 09 '22 at 10:25
  • 1
    There are many answers on this site about it; I actually wrote on of them (though my answer got deleted as it was deemed a duplicate of other older answers... I wrote my answer as I saw an opportunity of writing up what I did with one old laptop that I used in QA that didn't have a bootable USB drives but allowed me to boot a daily ISO each day & perform an install test to another portion of the drive). Go look - any bootloader can be made to do it, inc. grub, windows bootloader of w2k, xp, ... – guiverc Jul 09 '22 at 10:26

3 Answers3

1

Boot Ubuntu on Windows UEFI computer without USB or DVD

  • Use Windows Disk Management to create 4GB FAT32 partition.

  • Copy/Paste contents of ISO file to new partition.

  • Reboot pressing F12 and select UEFI Ubuntu.

C.S.Cameron
  • 19,519
  • 1
    Yes, if the OP, @John, wants a live system (which could be expanded to a persistent live system), then this is a very good solution. I thought that he wanted an installed system, but I might be wrong. Let us wait for John's answer to your suggested method. Along with your method, the following is also possible: grub-n-iso according to this link, if there is already a grub boot system. – sudodus Jul 09 '22 at 15:20
  • 1
    @sudodus: Yes, I think the OP wants to do a Full install to hard disk, once booted Live he can Full install Ubuntu, (similar to an UNetbootin Frugal install). – C.S.Cameron Jul 09 '22 at 15:31
0
  • Maybe you can borrow a USB pendrive (the easy solution).

  • Maybe you can connect your internal drive to another computer (for example via an external box or adapter). In that case you can install an installed Ubuntu Server directly from a compressed image file. This is the same method as used to install an operating system into Raspberry Pi and similar computers.

    This link describes the method, not only how to install the server, but also how to make it into a desktop system (in that example Lubuntu).

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • or maybe a ubuntu dev spends 15 minutes to make the iso being burnable directly to a hard drive without the need of a usb or dvd – John Jul 09 '22 at 13:12
  • @John, I have heard from some of the Ubuntu developers, that they use mainly virtual machines. VirtualBox is wellknown and available in most operating systems. Linux has KVM + VirtManager, and also other virtual environments, that make it very easy to test experimental versions of Ubuntu and Ubuntu community flavours (Kubuntu, Lubuntu ... Xubuntu). If your computer is powerful enough it might be the best alternative (but I know that wrote that you want to run on bare metal). – sudodus Jul 09 '22 at 13:21
  • I often test new systems on bare metal, but not in the internal drive. I run SSDs via a USB3 adapter. This way I can test that booting and other hardware depending things work in real computers. This is also an alternative for you: Get some SATA-SSDs and a USB 3 adapter. (2.5 inch SATA-SSDs are very cheap nowadays). – sudodus Jul 09 '22 at 13:26
  • this misses step 1 which is to install ubuntu in said ssd (which is what I try to do ) before putting said ssd into a usb 3 case and boot from it @sudodus – John Jul 09 '22 at 13:37
  • @John, you can do that, (when you have another working computer) from that computer, which need not have Ubuntu. It could be running some other Linux or Windows or MacOS. (It is straight-forward to extract and clone from a compressed image file.) But you make things complicated, when there is an easy solution (use a USB pendrive). – sudodus Jul 09 '22 at 13:44
0

You can install Grub2Win on your Windows installation. Put the required .iso ( example Kubuntu 22.04.iso ) you want to install in the root of the drive ( C:\Kubuntu 22.04.iso ). Add booting from .iso in Grub2Win, and make it your default bootloader.

Your Grub.cfg should have the following entries :

    #
    #  Menu Entry 1       Windows EFI Boot Manager
    #
    menuentry   'Windows EFI Boot Manager                         Hotkey=w'  --hotkey=w    --class windows   --class icon-windows  {
         set efibootmgr=/efi/Microsoft/Boot/bootmgfw.efi
         getpartition  file  $efibootmgr  root
         if [ ! -z $reviewpause ] ; then
         echo GNU Grub will load the Windows EFI Boot Manager at disk address $root
             g2wsleep  
         fi
         echo GNU Grub is now loading the Windows EFI Boot Manager
         chainloader $efibootmgr
         savelast 1 'Windows EFI Boot Manager'
    }
#
#  Menu Entry For Custom Code 2       Boot Kubuntu ISO file
#
# Menu Comment 'Boot Kubuntu ISO file                          Hotkey=x'   --hotkey=x    --class isoboot   --class icon-isoboot
#
     source $prefix/windata/customconfigs/BootKubuntuISOfile.cfg

Save changes and on reboot choose the .iso.

Or see How can I install Ubuntu without CD and USB? for another approach, using UNetbootin.

Joepie Es
  • 1,460