#3 3 Ways to Install Fedora from Fedora
Opened 2 years ago by glb. Modified 2 years ago

By: Gregory Bartholomew

The recommended way to install Fedora is using a secondary boot medium such as a USB or DVD drive. Many users have multiple hard drives in their PCs and would like to skip the step of writing the installation software to an external device. This article will show 3 methods of installing a fresh copy of Fedora directly to a secondary hard drive without having to create an installation disk.

Demonstrate using QEMU
Demonstrate using kexec
Demonstrate using dnf -installroot


Metadata Update from @glb:
- Issue tagged with: article

2 years ago

Comments from Taiga #61

Ryan W Walter 02 Dec 2019 11:29
I am placing this back Into the spec category. Right now I have not been able to place aside the time to research into this.

Gregory Lee Bartholomew 12 Nov 2019 11:28
I think the kexec option probably has the most flexibility in that regard. You should be able to do something like (untested):

$ MIRROR=https://dl.fedoraproject.org/pub/fedora/linux/releases/30/Workstation/x86_64/os
$ wget $MIRROR/isolinux/vmlinuz
$ wget $MIRROR/isolinux/initrd.img
$ sudo kexec -f vmlinuz --initrd=initrd.img --append="ip=dhcp inst.repo=$MIRROR"

The above should work from any version of Linux that has an available internet connection and the kexec command. If you don't have a console available (e.g. you are running it on a cloud-based VM), you might also need to provide the Anaconda options to set up a VNC connection. The Anaconda options (which are passed on the kernel command line as shown above) are documented here:

https://anaconda-installer.readthedocs.io/en/latest/boot-options.html

Good Luck! 😄

Ryan W Walter 12 Nov 2019 10:14
What I originally had in mind was to run dnf from an existing Fedora installation (i.e. the original title was "3 Ways to Install Fedora from Fedora"). That said, I seem to recall someone asking if the guide could be generalized to installing Fedora from ANY version of Linux (which makes a lot of since if you want to pick up potential new Fedora users). I believe you could run dnf --installroot from within Anaconda if you first created a minimal /etc/yum.repos.d/fedora.repo file. I think I did that once, but its been a while.

You are correct. I was just investigating if it would be possible, It would be odd to say "To install Fedora first you need Fedora!" So I was looking at an Arch-esk approach.

To install fedora from anything you would need a container probably. Not entirely sure how one could do that from docker directly to a disk.

Gregory Lee Bartholomew 12 Nov 2019 09:53
What I originally had in mind was to run dnf from an existing Fedora installation (i.e. the original title was "3 Ways to Install Fedora from Fedora"). That said, I seem to recall someone asking if the guide could be generalized to installing Fedora from ANY version of Linux (which makes a lot of since if you want to pick up potential new Fedora users). I believe you could run dnf --installroot from within Anaconda if you first created a minimal /etc/yum.repos.d/fedora.repo file. I think I did that once, but its been a while.

Ryan W Walter 12 Nov 2019 09:19
Spoke with Gregory B. over the mailing list last week about any potential resources.

https://fedoramagazine.org/how-to-build-a-netboot-server-part-1/ and https://fedoramagazine.org/netboot-a-fedora-live-cd/ are two Fedmag posts that glance over this topic.

During testing with DNF --install-root I was having difficulty using the Fedora installer CD directly, Anaconda seems to have reference to external repositories but the default dnf locations do not seem to have them.

Ryan W Walter 08 Nov 2019 10:27
To elaborate, "Install using QEMU" could either mean using virt-install or just a raw QEMU command to load a disk. I would like to demonstrate both,

DNF --installroot and kexec would work hand in hand. Kexec allows us to boot a new kernel without Bios, We would still need to load the new kernel with a package manager.

Ryan W Walter 08 Nov 2019 10:21
I'm currently looking at this and it seems like it may be a bit much for just one post, Perhaps a 3 part series would be better for this.

Currently researching the methods described, since I wasn't aware of them either.

this is a test of the zinebot 'ping' command

Login to comment on this ticket.

Metadata
Boards 1
articles Status: stalled