move instructions from script to README
This commit is contained in:
parent
6b97bdcb61
commit
64b420111e
40
README.md
40
README.md
|
@ -31,5 +31,41 @@ Machine profiles are generated from the probert tool. To collect a machine prof
|
||||||
|
|
||||||
# Testing changes in KVM
|
# Testing changes in KVM
|
||||||
|
|
||||||
To try out your changes for real, it is necessary to install them into an
|
To try out your changes for real, it is necessary to install them into
|
||||||
image. See the comments in scripts/inject-subiquity-snap.sh for how to do this.
|
an ISO. Rather than building one from scratch, it's much easier to
|
||||||
|
install your version of subiquity into the daily image. Here's how to
|
||||||
|
do this:
|
||||||
|
|
||||||
|
1. Build your change into a snap:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ snapcraft snap --output subiquity_test.snap
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Grab the current version of the installer:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ urlbase=http://cdimage.ubuntu.com/ubuntu-server/daily-live/current
|
||||||
|
$ isoname=$(distro-info -d)-live-$(dpkg --print-architecture).iso
|
||||||
|
$ zsync ${urlbase}/${isoname}.zsync
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Run the provided script to make a copy of the downloaded installer
|
||||||
|
that has your version of subiquity:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo ./scripts/inject-subquity-snap.sh ${isoname} subquity_test.snap custom.iso
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Boot the new iso in KVM:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ qemu-img create -f raw target.img 10G
|
||||||
|
$ kvm -m 1024 -cdrom custom.iso -hda target.img -serial stdio
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Finally, boot the installed image:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ kvm -m 1024 -hda target.img -serial stdio
|
||||||
|
```
|
||||||
|
|
|
@ -2,25 +2,7 @@
|
||||||
|
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
# So you want to test a change you're making to subiquity in a real
|
# inject-subquity-snap.sh $old_iso $subiquity_snap $new_iso
|
||||||
# ISO rather than dry-run mode. Easy!
|
|
||||||
#
|
|
||||||
# 1. Build your change into a snap:
|
|
||||||
#
|
|
||||||
# $ snapcraft snap
|
|
||||||
#
|
|
||||||
# 2. Grab the current version of the installer:
|
|
||||||
#
|
|
||||||
# $ urlbase=http://cdimage.ubuntu.com/ubuntu-server/daily-live/current
|
|
||||||
# $ isoname=$(distro-info -d)-live-$(dpkg --print-architecture).iso
|
|
||||||
# $ zsync ${urlbase}/${isoname}.zsync
|
|
||||||
#
|
|
||||||
# 3. Run this script to replace the subiquity in the downloaded image with your
|
|
||||||
# fresh one:
|
|
||||||
#
|
|
||||||
# $ sudo ./scripts/inject-subquity-snap.sh ${isoname} subquity_*.snap custom.iso
|
|
||||||
#
|
|
||||||
# 4. Profit!! (Or, more likely, boot custom.iso in kvm)
|
|
||||||
|
|
||||||
OLD_ISO=$(readlink -f $1)
|
OLD_ISO=$(readlink -f $1)
|
||||||
SUBIQUITY_SNAP_PATH=$(readlink -f $2)
|
SUBIQUITY_SNAP_PATH=$(readlink -f $2)
|
||||||
|
|
Loading…
Reference in New Issue