streamline installer stuff a bit
This commit is contained in:
parent
b42835ef99
commit
ae2ad09ba3
11
README.md
11
README.md
|
@ -19,7 +19,7 @@ backend configuration files to /tmp/subiquity-config-* but it won't attempt to
|
||||||
run any installer commands (which would fail without root privileges). Further,
|
run any installer commands (which would fail without root privileges). Further,
|
||||||
subiquity can load other machine profiles in case you want to test out the
|
subiquity can load other machine profiles in case you want to test out the
|
||||||
installer without having access to the machine. A few sample machine
|
installer without having access to the machine. A few sample machine
|
||||||
profiles are available in the repository at /examples/ and
|
profiles are available in the repository at ./examples/ and
|
||||||
can be loaded via the MACHINE make variable:
|
can be loaded via the MACHINE make variable:
|
||||||
|
|
||||||
`make dryrun MACHINE=examples/desktop.json`
|
`make dryrun MACHINE=examples/desktop.json`
|
||||||
|
@ -27,12 +27,9 @@ can be loaded via the MACHINE make variable:
|
||||||
# Generating machine profiles
|
# Generating machine profiles
|
||||||
Machine profiles are generated from the probert tool. To collect a machine profile:
|
Machine profiles are generated from the probert tool. To collect a machine profile:
|
||||||
|
|
||||||
`probert --all > mymachine.json`
|
`PYTHONPATH=probert ./probert/bin/probert --all > mymachine.json`
|
||||||
|
|
||||||
# Making an install image.
|
# Making an install image.
|
||||||
|
|
||||||
`make installer`
|
To try out subiquity for real, it is necessary to make an image and run it in a
|
||||||
|
VM. See installer/README.md for instructions on how to do this.
|
||||||
The resulting build image is avaiable at installer/installer.img The
|
|
||||||
installer image requires approximately 2G of space at this time. See
|
|
||||||
installer/README.md for more.
|
|
||||||
|
|
|
@ -1,26 +1,22 @@
|
||||||
Getting Started
|
Getting Started
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
Install package dependencies:
|
|
||||||
|
|
||||||
PKGS="
|
|
||||||
bzr
|
|
||||||
qemu-system-x86
|
|
||||||
qemu-utils
|
|
||||||
"
|
|
||||||
apt-get install $PKGS
|
|
||||||
|
|
||||||
Grab a copy of curtin (for some conversion tools):
|
Grab a copy of curtin (for some conversion tools):
|
||||||
|
|
||||||
|
sudo apt-get install bzr
|
||||||
mkdir -p ~/download
|
mkdir -p ~/download
|
||||||
cd ~/download
|
cd ~/download
|
||||||
bzr branch lp:curtin
|
bzr branch lp:curtin
|
||||||
|
|
||||||
|
Create the image
|
||||||
|
----------------
|
||||||
|
|
||||||
Generate the install image from subiquity's root directory:
|
Generate the install image from subiquity's root directory:
|
||||||
|
|
||||||
installer/geninstaller -a amd64 -b grub2 -r zesty
|
installer/geninstaller -a amd64 -b grub2 -r zesty
|
||||||
|
|
||||||
Run the installer
|
Run the installer
|
||||||
|
-----------------
|
||||||
|
|
||||||
# generate target device
|
# generate target device
|
||||||
qemu-img create -f raw target.img 10G
|
qemu-img create -f raw target.img 10G
|
||||||
|
@ -32,6 +28,7 @@ Run the installer
|
||||||
-monitor stdio
|
-monitor stdio
|
||||||
|
|
||||||
Boot the installed image
|
Boot the installed image
|
||||||
|
------------------------
|
||||||
|
|
||||||
sudo qemu-system-x86_64 -m 1024 -enable-kvm \
|
sudo qemu-system-x86_64 -m 1024 -enable-kvm \
|
||||||
-hda target.img \
|
-hda target.img \
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
PROG=`basename $0`
|
PROG=`basename $0`
|
||||||
PREFIX="${PROG}"
|
|
||||||
INSTALLER_IMAGE_SIZE_M=2048 # 2G image
|
INSTALLER_IMAGE_SIZE_M=2048 # 2G image
|
||||||
RSYNC_OPTS="-aXHAS --one-file-system"
|
RSYNC_OPTS="-aXHAS --one-file-system"
|
||||||
MKFS_OPTS="-J size=4 -m 0 -q"
|
MKFS_OPTS="-J size=4 -m 0 -q"
|
||||||
|
@ -41,15 +40,8 @@ wget
|
||||||
rsync
|
rsync
|
||||||
ubuntu-cloudimage-keyring
|
ubuntu-cloudimage-keyring
|
||||||
cloud-image-utils
|
cloud-image-utils
|
||||||
|
qemu-system-x86
|
||||||
"
|
"
|
||||||
# "URL" "GPGKEY"
|
|
||||||
# ppa:foo/bar ""
|
|
||||||
PPAS=(
|
|
||||||
"https://raharper:Q9F9bRlSxg70BGv8m6dc@private-ppa.launchpad.net/subiquity/subiquity-dev/ubuntu" "3D2F6C3B"
|
|
||||||
)
|
|
||||||
SRC_DEPS=(
|
|
||||||
"bzr" "lp:curtin" "curtin"
|
|
||||||
)
|
|
||||||
INSTALLER_DEPS=(
|
INSTALLER_DEPS=(
|
||||||
"bcache-tools"
|
"bcache-tools"
|
||||||
"lvm2"
|
"lvm2"
|
||||||
|
@ -65,7 +57,6 @@ INSTALLER_DEPS=(
|
||||||
CACHEDIR=""
|
CACHEDIR=""
|
||||||
GRUB_MODS="configfile fat part_gpt part_msdos cat echo test search search_label search_fs_uuid boot chain linux reboot halt normal efi_gop efi_uga font gfxterm gfxterm_menu gfxterm_background gfxmenu serial"
|
GRUB_MODS="configfile fat part_gpt part_msdos cat echo test search search_label search_fs_uuid boot chain linux reboot halt normal efi_gop efi_uga font gfxterm gfxterm_menu gfxterm_background gfxmenu serial"
|
||||||
|
|
||||||
|
|
||||||
cleanup_noexit() {
|
cleanup_noexit() {
|
||||||
[ -n "${CACHEDIR}" ] && {
|
[ -n "${CACHEDIR}" ] && {
|
||||||
sync
|
sync
|
||||||
|
@ -582,14 +573,6 @@ generate_img() {
|
||||||
sudo mv ${resolvconf} ${resolvconf}.old &&
|
sudo mv ${resolvconf} ${resolvconf}.old &&
|
||||||
sudo cp /etc/resolv.conf ${resolvconf} &&
|
sudo cp /etc/resolv.conf ${resolvconf} &&
|
||||||
|
|
||||||
log "Installing ppas in rootfs"
|
|
||||||
# export existing install_ppa and run it in the chroot
|
|
||||||
install_ppas_cmds="$(install_ppas ${PPAS[@]})"
|
|
||||||
sudo chroot ${mnt} /bin/bash -c "${install_ppas_cmds}; apt-get update" || {
|
|
||||||
log "Failed to add installer ppas to chroot";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
log "Installing on rootfs: $packages"
|
log "Installing on rootfs: $packages"
|
||||||
log "WARNING: skipping preinstallation of mdadm, lvm2"
|
log "WARNING: skipping preinstallation of mdadm, lvm2"
|
||||||
log "WARNING: will install packages during runtime"
|
log "WARNING: will install packages during runtime"
|
||||||
|
|
Loading…
Reference in New Issue