I installed Fedora 34 about a week ago and found out that most of the apps used .deb which Fedora doesn't support, so I was thinking about switching to Ubuntu, BUT I lost my USB drive, so does anyone know how to install Ubuntu 21.04 without USB drive? My laptop uses UEFI, so unetbootin won't work.
- 25,210
- 17
- 90
- 185
- 77
- 1
- 1
- 3
-
You can alter `grub` so it boots a ISO from a drive on the system (I use it in QA-testing on a device without working USB ports). *Note: I didn't QA-test Ubuntu 21.04 on that device, and I know changes have been occurring in recent ISOs with live boots, so I can't guarantee it'll work, but I still believe it would* – guiverc May 24 '21 at 01:36
-
2How did you install Fedora? If you have an optical drive, then you could always burn the Ubuntu installation ISO to a DVD. It's much slower, but it'll give you an opportunity to relive the glorious 90s – matigo May 24 '21 at 01:36
-
Can't you just select the boot order? – Ken Sharp May 24 '21 at 15:11
2 Answers
Booting ISO from Fedora GRUB2 Menu
The method on this page should work for booting an Ubuntu ISO from the Fedora GRUB bootloader 20.04 booting .iso from GRUB menu No need for a USB here.
To reiterate:
Add the following menuentry to /etc/grub.d/40_custom:
menuentry "isoname ISO" { rmmod tpm set root=(hdX,Y) set isofile="/[path]/[isoname].iso" loopback loop $isofile linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile toram -- initrd (loop)/casper/initrd }
Where (hdX,Y) is the disk and partition the ISO is on, for example /dev/sda3 would be (hd0,3). [path] is the path to the folder the ISO file is in, and [isoname] is the name of the ISO, for example /isos/ubuntu-20.04.2-desktop-amd64.iso is used if the Ubuntu ISO is located in a folder named isos on the root partition. rmmod tpm is only needed when booting in UEFI mode.
In Terminal run:
sudo update-grubReboot and select Ubuntu from the grub menu. Install as usual.
Please let us know how this works for you.
- 18,890
- 10
- 64
- 105
-
2Could you add on `toram` after the `--` just in case you accidentally wipe out your drive and no longer have the ISO present? – Terrance May 24 '21 at 02:13
-
I am fairly new to Linux, so could you please give me an example of (hdX,Y). – Ahmed Jamal Ziyan May 24 '21 at 03:27
-
-
I am fairly new to Linux, so could you please give me an example of (hdX,Y). – Ahmed Jamal Ziyan May 24 '21 at 03:49
-
@Ahmed Jamal Ziyan: please let me know if my edit is clear enough. – C.S.Cameron May 24 '21 at 03:59
-
@C.S.Cameron Can you connect to my pc using TeamViewer because i keep getting errors – Ahmed Jamal Ziyan May 24 '21 at 04:21
-
@Ahmed Jamal Ziyan: I do not have TeamViewer and there seems to be a cyclone happening here right now. can you describe what is happening please. – C.S.Cameron May 24 '21 at 04:25
-
@C.S.Cameron i cant update my grub it give me an error: sudo: update: command not found – Ahmed Jamal Ziyan May 24 '21 at 04:28
-
1@Ahmed Jamal Ziyan: I am not as familiar with GRUB2 in Fedora as in Ubuntu. This page looks like it has good information: https://docs.fedoraproject.org/en-US/fedora/f31/system-administrators-guide/kernel-module-driver-configuration/Working_with_the_GRUB_2_Boot_Loader/. at this point I would backup grub.cfg and add the above menuentry by hand, rather than by using grub.d. – C.S.Cameron May 24 '21 at 05:21
-
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/124646/discussion-between-c-s-cameron-and-ahmed-jamal-ziyan). – C.S.Cameron May 25 '21 at 04:51
Boot Ubuntu on Windows UEFI computer without USB or CD
For a UEFI computer, this method may be simpler than my proceeding answer:
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.
Proceed to Ubuntu Installation.
- 18,890
- 10
- 64
- 105
-
+1 for a great method, so simple, yet it works (only in UEFI mode, but most current computers with Windows run in UEFI mode). – sudodus Aug 11 '21 at 13:13
-
1This method worked well for me, but note that if you are hoping to install Ubuntu on the same disk you're booting from (as I was) you might need to make sure you hit "e" to edit the boot parameters to add [`toram` on the casper line](https://manpages.ubuntu.com/manpages/jammy/man7/casper.7.html) and also manually [unmount the boot volume](https://askubuntu.com/a/1305972/172687) to make sure it can be wiped by the installer. – bjmc Jul 23 '22 at 19:01