Hi,
I want to get your opinion about a little patch. I'm looking at this code in koan/app.py:
def get_distro_files(self,profile_data, download_root): """ Using distro data (fetched from bootconf tree), determine what kernel and initrd to download, and save them locally. """ os.chdir(download_root) distro = self.safe_load(profile_data,'distro') kernel = self.safe_load(profile_data,'kernel') initrd = self.safe_load(profile_data,'initrd') kernel_short = os.path.basename(kernel) initrd_short = os.path.basename(initrd) kernel_save = "%s/%s" % (download_root, kernel_short) initrd_save = "%s/%s" % (download_root, initrd_short)
you can see, when the kernel+initrd is fetched, it's stored locally with the os.path.basename(kernel) and os.path.basename(initrd)
At least on a SUSE system, that leads to "linux" and "initrd". So if you want to trigger a reinstall of a machine with koan, it'll store the kernel at: /boot/linux and the initrd at: /boot/initrd
that will overwrite the existing initrd of the SUSE system which is already stored in /boot/initrd
That means, there is no way back. If you now decide to abort the reinstallation, you lost you old initrd. If you choose to boot the system, it'll load the old kernel but the initrd of the inst-sys now.
What do you guys think about something like this?
kernel_save = "%s/%s%s" % (download_root, kernel_short, "_koan") initrd_save = "%s/%s%s" % (download_root, initrd_short, "_koan")
that will keep the installed kernel/initrd intact. Do you see any bad sideeffect?
What do you guys think about something like this?
kernel_save = "%s/%s%s" % (download_root, kernel_short, "_koan") initrd_save = "%s/%s%s" % (download_root, initrd_short, "_koan")
that will keep the installed kernel/initrd intact. Do you see any bad sideeffect?
Provided the right arguments are still given to the bootloader config, this looks totally fine.
--MIchael
cobbler-devel@lists.fedorahosted.org