streamline installer stuff a bit

This commit is contained in:
Michael Hudson-Doyle 2017-01-26 11:37:34 +13:00
parent b42835ef99
commit ae2ad09ba3
3 changed files with 11 additions and 34 deletions

View File

@ -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,
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
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:
`make dryrun MACHINE=examples/desktop.json`
@ -27,12 +27,9 @@ can be loaded via the MACHINE make variable:
# Generating machine profiles
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.
`make installer`
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.
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.

View File

@ -1,26 +1,22 @@
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):
sudo apt-get install bzr
mkdir -p ~/download
cd ~/download
bzr branch lp:curtin
Create the image
----------------
Generate the install image from subiquity's root directory:
installer/geninstaller -a amd64 -b grub2 -r zesty
Run the installer
-----------------
# generate target device
qemu-img create -f raw target.img 10G
@ -32,6 +28,7 @@ Run the installer
-monitor stdio
Boot the installed image
------------------------
sudo qemu-system-x86_64 -m 1024 -enable-kvm \
-hda target.img \

View File

@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
PROG=`basename $0`
PREFIX="${PROG}"
INSTALLER_IMAGE_SIZE_M=2048 # 2G image
RSYNC_OPTS="-aXHAS --one-file-system"
MKFS_OPTS="-J size=4 -m 0 -q"
@ -41,15 +40,8 @@ wget
rsync
ubuntu-cloudimage-keyring
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=(
"bcache-tools"
"lvm2"
@ -65,7 +57,6 @@ INSTALLER_DEPS=(
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"
cleanup_noexit() {
[ -n "${CACHEDIR}" ] && {
sync
@ -582,14 +573,6 @@ generate_img() {
sudo mv ${resolvconf} ${resolvconf}.old &&
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 "WARNING: skipping preinstallation of mdadm, lvm2"
log "WARNING: will install packages during runtime"