Ask Your Question

How to perform a stage 3 (or 2/1) install, without Anaconda?

asked 2017-05-14 22:11:48 -0500

Rongcui Dong gravatar image

General Question

For "stage 3 install", I mean installing like in Archlinux or Gentoo/Funtoo (or LFS). I partition the drive, mount them, unpack a stage 3 system onto the new sysroot, perform required configurations (maybe chroot), install bootloader, reboot. Given that I see the console logs telling a chain of complex rpm commands when using Anaconda, I guess this information might be littered around developer wiki, but I can't find it.

So, the main question: How, if possible, should I perform a stage 3 install from a Fedora Live media? If not possible, how "crazy" can I go in terms of customizing with anaconda?

Of course, most of the time Anaconda is more than enough, and I don't really need the flexibility of a stage 3 install. Until...


First I should make it clear: my current computer is running Arch, after many, many unsuccessful attempts of installing Fedora. So, I can't really re-test the config, as I don't have another identical computer, nor can I afford making another full-system backup plus days (weeks) of downtime. Then, I am also writing it from memory, of my attempts about two weeks prior.

So, this is not a question about "how to install Fedora under this situation", as this example is just to illustrate how hard Anaconda is to use when hitting some corner cases.

When I tried to install Fedora on a very specially configured workstation, I found that neither text mode nor graphical mode can successfully install, without major headache. In comparason, installing Arch linux in this configuration is significantly easier. Here is what I was trying to achieve:

  • A workstation with two SSD's and one HDD, with /boot and EFI on the first SSD (/dev/sda)
  • BCache is used to cache the HDD, with a partition on SSD2 (/dev/sdbx)
  • A BtrFS volume spans across remaining space of the two SSDs, and the cached HDD (/dev/bcache0)

First, of course, setting up bcache requires command line operations, which is pretty much unavoidable. Then, firing up Anaconda, selecting two SSD's and /dev/bcache0 and proceed. That should be the end, right?

Nope. First, Fedora cannot reformat an existing BtrFS. This is not a big problem, wipefs -a works wonders. Then, Anaconda apparently crashes multiple times initializing, partitioning, or installing. Which means, every time I need to manually wipe the partitions and redo installation. It also doesn't recognize that /dev/sdb1 is the cache of /dev/bcache0, giving wrong amount of "free space".

I am sure there were more problems, but these should be enough for an example.

edit retag flag offensive close merge delete


Maybe it would help if you defined just what "stage 3" means in this context, as Fedora doesn't use it, nor does any RedHat based distro that I'm aware of.

sideburns gravatar imagesideburns ( 2017-05-15 12:40:51 -0500 )edit

I don't really know how to find it under Fedora context. If you have used Gentoo or Arch or built LFS before, it would be something like a tarball containing the minimal system that is sufficient for further customization. In Fedora, it would be a base system with text mode, rpm, and dnf. This tarball would be extracted onto the root partition, and further operations are performed manually in chroot. After it is bootable, I would reboot it and continue installation under console.

Rongcui Dong gravatar imageRongcui Dong ( 2017-05-15 14:20:33 -0500 )edit

BTW, technically Arch is still somewhat automated, but I consider it close to a stage 3 because its installer does not require me to repartition anything. Basically, what I view as a "stage 3" is the kind of "copy a complete system into a folder" type of installation.

Rongcui Dong gravatar imageRongcui Dong ( 2017-05-15 14:27:12 -0500 )edit

I see. RedHat based distros don't work that way. There used to be a minimal install that didn't provide a GUI, and there may still be, but it still goes through a console-based version of Anaconda rather than giving you a system in a tarball.

sideburns gravatar imagesideburns ( 2017-05-15 14:27:54 -0500 )edit

I do observe from log files that Anaconda calls a fairly complex rpm command to install the base system onto the specified root directory. But I guess manually running that would be dangerous. I am not sure about Kickstart, though. Maybe there is a way to use that instead.

Rongcui Dong gravatar imageRongcui Dong ( 2017-05-15 15:08:57 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2017-05-16 13:10:00 -0500

cmurf gravatar image

Fedora can install on an existing Btrfs volume in custom partitioning but there are three requirements. 1. The first step must be changing the partition scheme popup from LVM to Btrfs, if you don't do that, it won't use an existing Btrfs volume. 2. It's best to define all the non-Btrfs required partitions first: swap, /boot, /home, etc. whether making new ones or using existing partitions. 3. To use an existing Btrfs volume, click on the + button on the lower left hand side UI to create a new mount point, and in the create mount point dialog, choose / for the location, but do not specify a size. Anaconda will now create a new subvolume on an existing Btrfs volume, assigned to mountpoint /.

The main gotcha is whether or not blivet understands bcache logical devices, and can even see the Btrfs volume.

edit flag offensive delete link more

answered 2017-05-15 03:42:54 -0500

sideburns gravatar image

I'm not an expert on this, but I have had to do clean installs of Fedora on systems that were already partitioned without redoing any of the partitioning, and in most cases, without reformatting everything. My suggestion is to start off with a LiveUSB system, do any required partitioning and/or formatting and then start your installation. Select a custom partitioning scheme, put the right partitions at the proper mount points, and tell Anaconda not to format any partitions with BtrFS. (You may want to make sure that / is ext4, because I don't know if Anaconda will accept not formatting it.) In theory, that should work, but of course, you live and work in Reality, not Theory. Good luck, and if you take my advice, please remember to come back and let us know if it works.

edit flag offensive delete link more


Well, Fedora cannot install on existing BtrFS. Neither does RHEL or its derivatives. And, as I said, the problem about installing a system is just an example, but what I really like to know is a way to perform a stage 3 install. Maybe it is a different term in Fedora world, I am not sure.

Rongcui Dong gravatar imageRongcui Dong ( 2017-05-15 11:07:54 -0500 )edit

Question Tools



Asked: 2017-05-14 22:11:48 -0500

Seen: 352 times

Last updated: May 16 '17