Iḿ always installing a new fedora release as new installation (ie grub allows me currently to boot into Fedora 29., 32 and 34). So far I have always burned the image to iso or usb and then installed the new distro overthe oldest one by booting from cd/USB interactively. I have the gut feel i should be able to install the new distro onto the target partition using Kickstart /anaconda 9using the config file from the last time.
ie whilst Fedora 34 is up and running (say on sda1) issue a command to tell kickstart/anaconda to install fedora 35 on (not mounted) drive sda2… But can figure out how to do this and kickstart configurator is seemingly depreciated (dnf does not find it). Can anyone help ?
PS have seen the ćumbersome’ instruction for how to do this on Windows/Mac OS but I’m loking for a hopefully simpler version direclty form an existing linux…
Anaconda itself generates a kickstart file, and saves it for you. You can find it as
/root/anaconda-ks.cfg on a newly-installed system, and it’s probably still there if you haven’t removed it.
A little bit of history: originally, kickstart functionality was hacked into the installer. Pretty much every function in the the installer code base looked like this (pseudocode):
if kickstart is true:
[read and exec kickstart directives]
[totally different interactive code]
But when Anaconda was rewritten for Fedora Linux 19, a better architecture was put in place. The first part of the installer is actually a kickstart file generator. That’s skipped if the kickstart file you give it is already complete. Then, the second part just follows the kickstart file — either one you gave, or the one it just generated.
Of course, you’ll want to edit that generated file to give it your intended target partitions and boot configuration, and adjust for any changes between Fedora Linux releases.
Also of course, this just gives you what you selected at install, and nothing after. You may want to consider using an Ansible Playbook to capture that.
Already found that kickstart file. but that of course is looking at a an iso on CDrom/USB stick for the new OS.
And obviously would have to change the disk target in there (as otherwise would install the new version on the same partition as the curtrent one)
So I would need to edit that file (and some help pointers as to which bits would be apreciated, as looking in my file I actually nowhere see a reference to the where the iso image is, nor the actuall partition the new OS will go to (but maybe Iḿ misreading some commands).
but more importantly,
How do then start anaconda, and what do i have to do to tell anaconda on the new iso (or is that also somewhere in the kickstart file…
PS maybe to explain my self better, was wondering whether there a method to install a new linux in a fashion like this (virtual?) linux command
Install-linux -root =/partition - os=/path/isofile -config =/path/kickstartfile
where eventually the new root and the path to the iso file are maybe also in the config file…
Here is a collection of some really helpful links:
thanks for very good list of references (certainly helps to build the kickstart file.
However, still a bit puzzled how I would start it.
Best I can see/understand it at thismoment is that I would need add a line (similar to the lines on the iso image/dvd that is booting to my own grub.
(ie I effectively add the install menu to my own grub menu)
and then reboot the system and choose install (rather than one of my existing linux options).
Is that correct and indeed the only way to do this or can start the install just as a command from an existing linux session.
And if so how…
Apologies, for keeping on asking but figured if I can avoid to keep burning iso images to disk every 6-12 months (for just a single install) then that is good for the environment.
Trying to descibe it onece mor from in different words
Can I whilst at the command prompt of fedora 34, with its root partion on /dev/sda3 (and the boot recorsd in the MBR, instuct linux to install fedora 35 on /dev/sdfa2 (either mounted or not mounted, I don care)
and point it that the iso image for fedora35 sit in /user/Downloads.
and further configuration can be found in file xxx
Or can the installer only be started at boot time.?
The latter would surprise me as installing a system is in the end nothing more than copying the files that make it onto the partition and adding the entry to the boot loader; all of which could be done from a nomral live system…
Anaconda does not generally expect to be running from a configured system. It expects to be running from a special boot environment, and everything is kind of designed around that.
There is a bunch of stuff about hardware detection, and just a lot of other assumptions. You’re right, this doesn’t seem like it should be fundamental, but it’s the way things are at the moment.
But, this doesn’t mean you need to burn an actual CD image. The ISO can also go on a USB stick — in fact, that’s almost always how people do it these days. (Fedora Media Writer will create one for you.) You can also use PXE boot over the network— Setting Up an Installation Server :: Fedora Docs covers that — which is super-convenient if you do this a lot. (One-time setup of the server is a little esoteric, but you can use it to serve a selection of install media for different systems.)
Thanks for clarifyning. And indeed, last time round I used a usb stick…
I figured that if running this from a kickstart file i could further make sure that the system install always followed the same parameters and automate it.
But hacking thatinto the grub file seems to be just spending the time in a different place instead so for now will stick with the interactive installations from USB.
Or could you actually point the USB (interactive ) startup as well to an existing Kickstart file on the harddrive? If that is possible, would appreciate the pointer how to and at which moment in the installer this is possible, as so far, Iǘe not noticed that option…