Skip to content

Commit e6dc0b7

Browse files
authored
Merge pull request #35 from gardenlinux/pxe
Add pxe feature from GL
2 parents 15974dc + 01f1c3c commit e6dc0b7

File tree

20 files changed

+539
-0
lines changed

20 files changed

+539
-0
lines changed

features/_pxe/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Feature: _pxe
2+
### Description
3+
<website-feature>
4+
This flag feature creates an artifact for supporting PXE network boot of Garden Linux.
5+
</website-feature>
6+
7+
### Features
8+
This feature creates files meant to be booted via PXE network boot: `.squashfs`, `.vmlinuz` and `.initrd`.
9+
10+
#### Hint
11+
Ignition Files can be used with PXE to inject information into the system at the first boot of Garden Linux. This includes creating users, groups, ssh keys, files, permissions and network configuration. This way machines can be defined in a declarative way.
12+
13+
See also:
14+
- [iPXE Documentation @ ipxe.org](https://ipxe.org/docs)
15+
- [iPXE Script Examples @ ipxe.org](https://ipxe.org/scripting)
16+
- [Ignition Documentation @ fedoraproject.org](https://docs.fedoraproject.org/en-US/fedora-coreos/producing-ign/#_ignition_overview)
17+
18+
19+
### Unit testing
20+
This feature does not support unit tests.
21+
22+
### Meta
23+
|||
24+
|---|---|
25+
|type|flag|
26+
|artifact|`.squashfs`, `.vmlinuz`, `.initrd`|
27+
|included_features|`_ignite`|
28+
|excluded_features|None|

features/_pxe/exec.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#!/usr/bin/env bash

features/_pxe/file.exclude

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/etc/repart.d/root.conf
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
add_dracutmodules+=" gardenlinux-live "
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
omit_drivers+=" cdc_ether "
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/dev/null
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[Service]
2+
ExecStart=
3+
ExecStart=/lib/systemd/systemd-networkd-wait-online --any
4+
[Unit]
5+
ConditionPathExists=
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
rm /run/systemd/network/91-default.network
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[Unit]
2+
Description=GardenLinux End Service
3+
4+
Before=initrd-switch-root.service
5+
Wants=initrd-switch-root.target
6+
7+
OnFailure=emergency.target
8+
OnFailureJobMode=isolate
9+
DefaultDependencies=no
10+
11+
ConditionPathExists=/sysroot/gardenlinux.dracut.end
12+
13+
[Service]
14+
Type=oneshot
15+
TimeoutStartSec=600
16+
RemainAfterExit=yes
17+
ExecStart=/bin/bash -Eeuo pipefail -c 'mv /sysroot/gardenlinux.dracut.end /run/dracut.end || cp /sysroot/gardenlinux.dracut.end /run/dracut.end; ./run/dracut.end; rm -f /run/dracut.end'
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env sh
2+
3+
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
4+
5+
live=$(getarg gl.live=)
6+
live="${live#gl.live=}"
7+
8+
case "$live" in
9+
no,false,0,disabled,disable)
10+
exit 1
11+
;;
12+
*)
13+
exit 0
14+
;;
15+
esac

0 commit comments

Comments
 (0)