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

distros: add MicroOS #195

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions cmds/webboot/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,24 @@ type Distro struct {
}

var supportedDistros = map[string]Distro{
"MicroOS": Distro{
url: "https://download.opensuse.org/tumbleweed/iso/openSUSE-MicroOS-DVD-x86_64-Current.iso",
isoPattern: "^openSUSE-.+",
bootConfig: "grub",
kernelParams: "isofrom=/dev/disk/by-uuid/{{.UUID}}:{{.IsoPath}} isofrom_device=/dev/disk/by-uuid/{{.UUID}} isofrom_system={{.IsoPath}} install=hd:/ loader=syslinux",
},
"MicroOS Leap": Distro{
url: "https://download.opensuse.org/distribution/leap/15.2/microos/iso/openSUSE-MicroOS-15.2-DVD-x86_64-Media.iso",
isoPattern: "^openSUSE-.+",
bootConfig: "grub",
kernelParams: "isofrom=/dev/disk/by-uuid/{{.UUID}}:{{.IsoPath}} isofrom_device=/dev/disk/by-uuid/{{.UUID}} isofrom_system={{.IsoPath}} install=hd:/ loader=syslinux",
},
"openSUSE Leap": Distro{
url: "https://download.opensuse.org/distribution/leap/15.2/iso/openSUSE-Leap-15.2-NET-x86_64.iso",
isoPattern: "^openSUSE-.+",
bootConfig: "grub",
kernelParams: "isofrom=/dev/disk/by-uuid/{{.UUID}}:{{.IsoPath}} isofrom_device=/dev/disk/by-uuid/{{.UUID}} isofrom_system={{.IsoPath}} install=hd:/ loader=syslinux",
},
"Arch": Distro{
url: "https://mirrors.edge.kernel.org/archlinux/iso/2020.09.01/archlinux-2020.09.01-x86_64.iso",
isoPattern: "^archlinux-.+",
Expand Down
1 change: 1 addition & 0 deletions cmds/webboot/webboot.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func (i *ISO) exec(uiEvents <-chan ui.Event, boot bool) error {
}

var kernelParams bytes.Buffer
cacheDev.UUID = strings.ToUpper(cacheDev.UUID)
if err = paramTemplate.Execute(&kernelParams, cacheDev); err != nil {
return err
}
Expand Down