You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-7Lines changed: 35 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -77,50 +77,77 @@ Booting with `qemu-system-x86_64` and [passing kernel options like `ip=` using t
77
77
78
78
Fun fact, qemu actually bundles/uses `iPXE` internally. But ignore that. We're going to build and pass iPXE as an ISO to demonstrate booting from `iPXE` to set dynamic kernel options, opening up the possibility to boot from anywhere. The steps in brief (explained in detail after) are:
79
79
80
-
1. Read the iPXE docs
80
+
1. Read the [iPXE docs](https://ipxe.org/docs)
81
81
2. Clone iPXE
82
82
3. Write your own `script.ipxe`
83
83
4. Build your own `iPXE` ISO which bundles that iPXE script
84
84
5. 'Start' your machine ( `qemu-system-x86_64` , in this instance simulating a bare metal server), passing qemu the `-boot d -cdrom image.iso` options
85
85
6. Observe your virtual bare metal 'machine' do whatever you tell it to do (see step 1, did you see the [section about UEFI](https://ipxe.org/download#:~:text=128kB%20in%20size.-,UEFI,-iPXE%20supports%20both)?).
86
86
87
+
Let's do the above for real!
88
+
87
89
```bash
88
-
#1. iPXE.org docs https://ipxe.org/docs
90
+
#1. Read iPXE.org docs https://ipxe.org/docs
89
91
90
92
# 2.
91
93
git clone https://github.com/ipxe/ipxe.git
92
94
cd ipxe/src
93
-
make # yes you have to do this, for all other build targets to be available. You'll probably be missing `build-essential` packages needed to build, so read the output, research and install any missing dependencies.
94
-
# Again, the docs are helpful here https://ipxe.org/download#:~:text=You%20will%20need%20to%20have%20at%20least%20the%20following%20packages%20installed%20in%20order%20to%20build%20iPXE
95
+
git checkout 2e8d45aeef813e7b25b4ac949d1407bc7ecd2ea8 # to keep docs valid. You may want to checkout a newer version by the time you read this
96
+
make -j # yes you have to make initially, for all other build targets to be available.
97
+
# When make fails, you'll probably be missing `build-essential` packages needed to build, so read the output, research and install any missing dependencies.
98
+
# Again, the docs are helpful here: https://ipxe.org/download#:~:text=You%20will%20need%20to%20have%20at%20least%20the%20following%20packages%20installed%20in%20order%20to%20build%20iPXE
99
+
```
95
100
96
-
3. For example, given a manual `qemu` boot (which we'll put iPXE
101
+
3.Now lets boot a kernel image & initramfs *without* iPXE first. For example, given a manual `qemu` boot (which we'll put iPXE
97
102
in-front of momentarily) consider first the following which
98
103
boots linux, and simulates a Network interface card (NIC) on
99
104
the host using [qemu SLIRP user networking](https://wiki.qemu.org/Documentation/Networking#:~:text=Network%20backend%20types) because its the most compatible friendly *documentation* approach for
100
105
networking (using tun/tap is 'better'/faster):
101
106
107
+
To run the below, you'll need At this point you're wishing you have ran `build-all.sh` successfully, if you haven't [here's one](https://boot.karmacomputing.co.uk/iso/alpine-netboot/boot/vmlinuz-lts) and but please don't use those, build you own ([./build-all.sh](./build-all.sh)) so you know what's in it.
108
+
109
+
```bash
110
+
# You should not use these, you should build you own! :) see build-all.sh
0 commit comments