Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Improve handling for the dracut root=live parameter #185

Open
GBA-17 opened this issue Oct 1, 2020 · 0 comments
Open

Improve handling for the dracut root=live parameter #185

GBA-17 opened this issue Oct 1, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@GBA-17
Copy link
Collaborator

GBA-17 commented Oct 1, 2020

Is your feature request related to a problem? Please describe.
Distros that use dracut require 2 parameters to boot from an ISO file:

  • iso-scan/filename=PATH_TO_ISO
  • root=live:CDLABEL=ISO_LABEL

Fedora is an example where these parameters are easy to provide. We are able to parse the syslinux config file, which provides the following line. When we append the iso-scan/filename parameter, we have everything we need to boot.

root=live:CDLABEL=Fedora-WS-Live-32-1-6  rd.live.image quiet

This becomes trickier with something like openSUSE. Our config file parser can't handle the grub config file they provide, so one way around that is to provide the configuration ourselves in a bootiso.Config object. However, that would involve hardcoding the ISO_LABEL, which might vary between the KDE and Gnome versions for example.

Describe the solution you'd like
Find a way to locate the ISO_LABEL so we can append it to the kernel parameters in the same way as PATH_TO_ISO. This might involve mounting the ISO to grab the label.

Describe alternatives you've considered
The following supportedDistros entry will boot into the openSUSE KDE Live ISO. However, we should avoid hardcoding the root=live parameter.

"OpenSUSE": Distro{
	url:          "http://download.opensuse.org/distribution/leap/15.2/live/openSUSE-Leap-15.2-KDE-Live-x86_64-Media.iso",
	isoPattern:   "^openSUSE-.+",
	kernelParams: "iso-scan/filename={{.IsoPath}}",
	customConfigs: []bootiso.Config{
		bootiso.Config{
			Label:      "Default Config",
			KernelPath: "/boot/x86_64/loader/linux",
			InitrdPath: "/boot/x86_64/loader/initrd",
			Cmdline:    "splash=silent quiet  root=live:CDLABEL=openSUSE_Leap_15.2_KDE_Live rd.live.image rd.live.overlay.persistent rd.live.overlay.cowfs=ext4",
		},
	},
}

Additional context
More info on dracut's parameters

@rjoleary rjoleary added the enhancement New feature or request label Jun 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants