Issues following apt updates/installations
I have been attempting to build a standard environment which uses Ubuntu 14.04 along with some additional packages and have made up a quick script to update apt and install the packages I require.
If I just copy my update script into chroot (under folder /share), not change anything else and then use unetbootin to put the iso onto a flash drive, once I install onto the laptop everything works as intended. If I run my script which modifies the sources.list file, updates apt and installs a number of packages, then I start having issues.
My first issue using Ubuntu 16.04.3 was on installation I would get an error saying that grub-efi-
I updated my original iso to Ubuntu 16.04.4 and again if I didn't make any changes it would work as intended, if I updated apt and installed the additional packages it would appear to install properly but on reboot I am taken to GNU GRUB version2.
As my systems will be offline, I cannot connect to the internet to download during installation and being able to use CUBIC to preinstall the additional packages is a godsend.
I am not sure if there is something I am doing wrong or if the updates being applied are breaking something in the chroot environment which is being transferred to the installed environment.
My script contains the following:
/code
#!/bin/bash
set -eu -o pipefail # fail on error, debug all lines
# update the sources.list file
cat <<EOF > /etc/apt/
# deb cdrom:[Ubuntu 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801)]/ xenial main restricted
# See http://
# newer versions of the distribution.
deb http://
# deb-src http://
## Major bug fix updates produced after the final release of the
## distribution.
deb http://
# deb-src http://
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://
# deb-src http://
deb http://
# deb-src http://
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://
# deb-src http://
deb http://
# deb-src http://
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://
# deb-src http://
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://
# deb-src http://
deb http://
# deb-src http://
deb http://
# deb-src http://
deb http://
# deb-src http://
EOF
# Update APT and upgrade all packages
apt update && apt upgrade -y
# Install pre-determined software
apt install aptitude k3b dc3dd dcfldd minicom samba virt-manager virtualbox p7zip-full p7zip-rar filezilla bless gcp tree pv grub-efi-amd64 grub-efi-amd64-bin grub-efi-
# Remove guest login
cat <<EOF > /etc/lightdm/
[SeatDefaults]
user-session=ubuntu
greeter-
allow-guest=false
EOF
# Change user libvirt-qemu (virt-manager user) show it doesn't show in greeter
usermod -u 499 libvirt-qemu
# Download aptitude packages to enable operation on generic hardware profiles
aptitude install --download-only initramfs-tools initramfs-
/code
The aptitude packages are there to support various hardware profiles that this iso might be installed on.
Hoping this is something simple that I have missed or need to remove to make this work.
Thanks for all your help.
John
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Cubic Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- John Walker
- Solved:
- Last query:
- Last reply: