115

I want to install Ubuntu on my laptop that doesn't have a CD-ROM drive and I have no spare USB disk. I've tried Wubi, but that doesn't seem to work (since it prompts me to have the CD in the drive, which I don't have).

How can I install Ubuntu, easily and in a fast way?

P.s: I want to dual boot it with Windows 7 (which was preinstalled).

Edit:

  1. When extracting the ISO to a folder and running Wubi it does install, but when I reboot the computer, it doesn't show GRUB, nor can I choose if I want to boot Ubuntu or Windows 7.

  2. After trying for the third time today, wubi gives me an error: Permission denied

I'm the administrator on the PC.

pomsky
  • 70,557
user294273
  • 1,161

9 Answers9

124

For BIOS devices:

To install Ubuntu without CD/DVD or USB pendrive, follow these steps:

  1. Download Unetbootin from here.

  2. Run Unetbootin.

  3. Now, from the drop-down menu under Type: select Hard Disk.

    Hard Disk

  4. Next select the Diskimage. Browse to the directory where you downloaded the iso file of Ubuntu.

    ISO

  5. Press OK.

  6. Next when you reboot, you will get a menu like this:

    Unetbootin

  7. Select Unetbootin and you will get the "Try" or "Install" option there.

  8. Finally, you can install your version of Ubuntu alongside Windows.


For UEFI devices:

  • First, download rEFInd.

  • Then, extract it.

  • Now, follow the below steps to install rEFInd[source], so that, you have a boot menu to boot to Ubuntu Live environment. Summary of the installation process given in the source is as belows:

    1. Open cmd with Administrator privileges.

    2. Then,

      mountvol S: /S
      
      • (you may change S: to any available drive letter)
    3. Type cd in cmd and then drag and drop the extracted folder to the already open cmd window. E.g.,

      cd "C:\Program Files"
      
    4. Copy refind

      xcopy /E refind S:\EFI\refind\
      
      • In this step S: will be the drive letter that you used above.
    5. Change directory to rEFInd

      cd S:\EFI\refind
      
    6. Rename config file

      rename refind.conf-sample refind.conf
      
    7. Note that {bootmgr} is entered as such; that's not a notation for a variable. Also, change refind_x64.efi to refind_ia32.efi on systems with 32-bit EFIs. Such computers are rare, and most of them are tablets. Check your Windows bit depth to determine which binary you should use.

      bcdedit /set {bootmgr} path \EFI\refind\refind_x64.efi
      
    8. Download EaseUS Partition Master Free and run it.

    9. Select your last partition.

      5

    10. Right-click on it and from the context menu select Resize/Move partition.

      6

    11. From the size shown beside Partition Size minus 4096 MB (to mimic a 4GB pendrive).

      7

    12. Press tab and the rest will be auto-completed.

      8

    13. Select the newly created partition and right-click on it. Select Create Partition from context menu.

      9

    14. In this window, select FAT32 as the File System. Click on OK. Finally, click on Apply (present at the top-left of the window).

      10

    15. Next, extract Ubuntu iso to this partition and finally reboot.

    16. You will be presented with a rEFInd menu. From here select the Ubuntu partition. It will boot into a Live environment. Continue with the installation. After the installation finishes boot to Windows.

    17. Run EaseUS Partition Master Free again.

    18. Right-click on the 4 GB partition and from the context menu select Delete Partition.

      11

    19. Right-click on the partition above the Unallocated partition and select Resize/Move Partition from the context menu.

      12

    20. Extend the bar to the extreme right by dragging the button.

      13

    21. Click on OK. Finally, click on Apply (present at the top-left of the window).

      14

    22. Open cmd with Administrator privileges.

    23. Then,

      mountvol S: /S
      
      • (you may change S: to any available drive letter)
    24. Remove rEFInd

      rmdir "S:\EFI\refind" /S /Q
      
      • In this step S: will be the drive letter that you used above.
    25. Reinstall grub as your primary boot manager

      bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
      
Raphael
  • 8,135
12

Boot Ubuntu on Windows UEFI computer without USB or DVD

  • Use Windows Disk Management to create FAT32 partition 3GB or larger.

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

  • Reboot pressing F12 and select UEFI Ubuntu.

C.S.Cameron
  • 20,530
  • 12
  • 78
  • 125
6

Instead of using WUBI, you can create an additional partition, or use an additional hard drive to write the liveCD image to, using unetbootin. Then you boot from this partition and continue the same way you would as if you'd be booting from a USB or CD.

Jakke
  • 1,108
  • 1
  • 13
  • 26
2

You can use UNetbootin to install Ubuntu 15.04 from Windows 7 into a dual boot system without the use of a cd/dvd or a USB drive. I am writing this from a fresh Ubuntu 15.04 install using the method below.

  1. Backup all your files...just in case

  2. Defrag your C:\ drive [right click C drive>click on Tools Tab>Defrag]

  3. Check for errors [right click C drive>click on Tools Tab>Error Checking] reboot and wait for the app to finish completely, the system will reboot when finished

  4. Create Unallocated Unformatted free space on the C drive [Control Panel> Administrative Tools>Computer Management>Disk Manager>right click the C drive>Shrink Volume] I believe the suggested space for a full Ubuntu install is 16 Gig, I made 41,000 MB about 40 Gig. Just type the size into the already selected box. The wording MS uses is confusing be assured typing 41000 will make 40Gig free space. click next if it asks to format DON'T Also Do Not assign a letter to the newly made volume.

  5. Reboot Windows 7 a couple times to be sure the changes in the volume have taken without errors

  6. Download the Ubuntu 15.04 ISO

  7. Run UNetbootin [choose disk image radio button and select the Ubuntu ISO image you downloaded. Make sure that Type: Hard Disk is selected in the drop down. Make sure Drive: C:\ drive is selected in the drop down. Click OK] The program will run through 4 steps and then ask to reboot now...Comply

  8. During reboot you will have a choice between Windows and UNetbootin, [Choose UNetbootin] This will boot a Live CD try before you install desktop.

  9. After you look around a bit you will notice an Install Ubuntu 15.04 shortcut on the desktop [start the install, I think the 4th step of the install shows the main volume with Windows and the free space you created using Disk Manager. [Make sure you click the free space and set it for "/", click continue install] Takes a few minutes then it will reboot automatically. If you don't press any keys it will default to the Ubuntu OS. Let it boot. setup your WiFi look around a bit then reboot when you are ready. Upon reboot arrow to Windows and it will boot Windows 7 boot loader where you will see the UNetbootin is still a choice. Windows will be the default there and allow to boot.

As I stated before I am typing this from Chromium running on Ubuntu 15.04. I wrote all this so you wouldn't be worried about using other partition software such as Gparted or Parted Magic. No need to purchase anything Windows already has a good tool> Disk Manager

I'll be honest I still need to figure how to uninstall the UNetbootin loader from the Windows boot loader but that is a small issue, I just "Frugal Installed" Ubuntu successfully. :)

galoget
  • 3,023
xtrchessreal
  • 1,081
  • 2
  • 15
  • 31
1

You need to turn of fast boot in Windows. You need to turn of TPM and Secure boot in UEFI ( what some people still but incorrectly call BIOS ) to install Ubuntu. You can install Ubuntu ( or another .iso ) if you install e.g. Grub2Win and make it your primairy bootloader. You need to add the option to boot from .iso in the bootmenu.
Then when booting choose the .iso.

Joepie Es
  • 1,570
1

This answer will explain how to use Windows CMD to boot from the Ubuntu ISO file in the C partition without needing a USB flash drive or creating another partition.

The steps:

  1. Install sudo for Windows (this step is optional)
  2. Create a grub menu
  3. Download the Ubuntu ISO file
  4. Download grub-2.12 for Windows
  5. Install grub
  6. Reboot to use Ubuntu live system

Using Windows CMD, notepad and the sudo command to boot from the Ubuntu ISO file located in the C partition (without USB or another partition)


  1. Install sudo for Windows

This step is optional. if you don't want to install sudo, you can open cmd as administrator, delete sudo word from any command in this guide, and go to step 2. To install sudo for Windows, open Windows cmd and apply this command:

winget install gerardog.gsudo

"gsudo is a sudo equivalent for Windows, with a similar user-experience as the original Unix/Linux sudo. Allows you to run a command (or re-launch your current shell) with elevated permissions, in the current console window or a new one."

When sudo is installed reopen cmd. if you don't want to install sudo, you can open cmd as administrator instead.

  1. Create a grub menu

In Windows cmd apply these commands:

echo #boot menu > grub.cfg
notepad grub.cfg

Windows Notepad will open. type or copy the following, and save the file:

menuentry "win 11 pro /sda1" --class windows11  {
    insmod part_msdos
    insmod ntfs
    set root='hd0,msdos1'
    parttool ${root} hidden-
    chainloader +1
}
menuentry "noble-desktop-amd64.iso Live system" --class ubuntu {
            insmod part_msdos
        insmod ntfs
        set root='hd0,msdos1'
     loopback loop /noble-desktop-amd64.iso
     linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/noble-desktop-amd64.iso --
     initrd (loop)/casper/initrd
}

Save and exit notepad. make sure that is C partition the first partition in your hard disk. if it is the second partition, replace set root='hd0,msdos1' by set root='hd0,msdos2' in the second menu entry.

  1. Download the Ubuntu ISO file

In Windows cmd and apply this command:

curl https://cdimage.ubuntu.com/noble/daily-live/current/noble-desktop-amd64.iso --output noble-desktop-amd64.iso

You can choose another Ubuntu ISO file but correct the link and the file name in the last command and grub menu entry.

When the ISO file is downloaded, move grub.cfg to /boot/grub and the Ubuntu ISO file to the root of the C partition In Windows cmd and apply these commands:

sudo mkdir c:\boot\grub
sudo move grub.cfg c:\boot\grub\
sudo move noble-desktop-amd64.iso c:\
  1. Download grub-2.12 for Windows

curl https://ftp.gnu.org/gnu/grub/grub-2.12-for-windows.zip --output grub-2.12-for-windows.zip

When the download is finished, extract the zip file

tar -xf grub-2.12-for-windows.zip
  1. Install grub

First, make sure that the C:\boot directory exists and is not hidden. if it exists and isn't hidden, go on

cd %UserProfile%\grub-2.12-for-windows

To install Grub2 for BIOS, type or copy the following, (replacing X with your drive letter and # your Disk number), and then press Enter.

sudo grub-install.exe --force --no-floppy --target=i386-pc --boot-directory=X:\boot //./PHYSICALDRIVE#

in my case, I used this command:

sudo grub-install.exe --force --no-floppy --target=i386-pc --boot-directory=C:\boot //./PHYSICALDRIVE0

To install Grub2 for UEFI 32-bit or 64-bit, see this guide.

If the C:\boot directory is hidden or does not exist, use this command instead of the last one:

grub-install.exe --force --no-floppy --target=i386-pc --boot-directory=X:\  //./PHYSICALDRIVE# 

(replacing X with your drive letter and # your Disk number), and then press Enter. in this case, you must move the grub.cfg to the /grub directory instead of the /boot/grub directory.

When grub is installed successfully, reboot to boot by the Ubuntu live system

shutdown /r

steps of using Windows CMD, notepad and the sudo command to boot from the Ubuntu ISO file located in the C partition (without USB or another partition)

Boot with live Ubuntu session and Ubuntu partition from Windows without a USB and without installing grub

Talaat Etman
  • 1,340
0

You can try using EasyBCD to add the ISO to the Windows Boot Manager. In some cases it may not work, but give it a try.

nastys
  • 5,427
0

I would suggest you to install Ubuntu in Virtual machine like VMPLAYER instead of dual booting. This helps to keep your boot process less messy and Ubuntu being fast works well in vmplayer.

0

Create a VM that uses a physical disk, then boot the VM with the ISO image.

I'd recommend using VMWare for this, as I've found Virtualbox harder to configure.

I'd recommend using a complete disk for this. Using only a partition is possible in theory but I've never done it.

Steps:

  1. Delete all the partitions where you'll install linux. On Windows 7 / 8 do it from "Computer Management". (some partitions are protected, and windows won't allow VMWare to access the disk if they're not removed first).

  2. Open VMWare as Administrator (secondary click, run as Admin). Create a new VM, choose custom mode, when creating the HD choose create from physical disk.

  3. Boot the VM from the ISO. If you only see a white cursor and a black screen you're booting from the empty HD.

galoget
  • 3,023
xvan
  • 172