10 Commits

6 changed files with 23 additions and 8 deletions

View File

@@ -41,6 +41,11 @@ perl -n -i \
-e "print;" \
${ISO}/boot/grub/{grub,loopback}.cfg
# Prevent some packages from being removed after install
perl -n -i -e 'print unless /gparted/' ${ISO}/casper/filesystem.manifest-remove
sudo install -D -m 0644 files/fallback_dns.conf ${FS}/etc/systemd/resolved.conf.d/fallback_dns.conf
if ! [ "$1" == "skip" ] ; then
# Run the customize-inner.sh script inside the chroot

View File

@@ -13,8 +13,8 @@ fi
# both). Instead let's execute systemd-nspawn in a transient systemd
# unit, then enter it using machinectl.
UNIT=nilmbuntu-run-$VERSION
MACH=nilmbuntu-$VERSION
UNIT=nilmbuntu-run-$NONPRIV_UID-$VERSION
MACH=nilmbuntu-$NONPRIV_UID-$VERSION
setup_networking() {
# We use a virtual ethernet adapter -- this requires that

View File

@@ -1,6 +1,6 @@
export USERNAME="nilm"
export USERFULLNAME="NILM User"
export HOST="nilmbuntu"
export HOST="nilmbuntu-live"
export BUILD_SYSTEM="Ubuntu"
export FLAVOUR="NILMbuntu"

View File

@@ -10,10 +10,12 @@ set -x
# Move stuff to the right places
install -D -m 0644 files/nilmbuntu.png /usr/share/xfce4/backdrops/nilmbuntu.png
install -D -m 0644 files/fallback_dns.conf /etc/systemd/resolved.conf.d/fallback_dns.conf
install -D -m 0644 files/casper.conf /etc/casper.conf
install -D -m 0644 files/hosts.nilm /etc/hosts.nilm
# Disable apport crash reporting
sed -i -s -e 's/enabled=1/enabled=0/g' /etc/default/apport
# Copy hosts for now (although it will get overwritten at boot)
cat /etc/hosts.nilm >> /etc/hosts
@@ -46,6 +48,7 @@ apt -y install postfix
# Required packages
apt -y install \
python3 \
python3-venv \
python3-pip \
git \
build-essential \
@@ -67,7 +70,9 @@ apt -y install \
firefox \
flashrom \
gddrescue \
git \
gnuplot \
gparted \
help2man \
ipython3 \
libnewlib-arm-none-eabi \
@@ -112,7 +117,7 @@ xmlstarlet ed -L -u "//property[@name='image-path']/@value" -v "$BG" $XML
xmlstarlet ed -L -u "//property[@name='image-style']/@value" -v "3" $XML
# Make Firefox nicer
install -D -m 0644 files/syspref.js /etc/hosts.nilm
install -D -m 0644 files/syspref.js /etc/firefox/syspref.js
# Create NILM user. This should happen after anything that we put in
# /etc/skel, since files get copied from there. Note that this user

View File

@@ -53,3 +53,6 @@ d-i user-setup/allow-password-weak boolean true
d-i user-setup/force-encrypt-home boolean false
d-i user-setup/encrypt-home boolean false
d-i passwd/auto-login boolean true
d-i netcfg/get_hostname seen true
d-i netcfg/get_hostname string nilmbuntu

8
run.sh
View File

@@ -47,20 +47,22 @@ set -x
cfg=""
cfg+=" -nodefaults"
cfg+=" -drive file=${DISK},media=disk,format=raw,if=virtio"
cfg+=" -enable-kvm"
cfg+=" -m 2048"
cfg+=" -usb"
cfg+=" -device usb-tablet"
cfg+=" -vga vmware"
cfg+=" -nic user"
cfg+=" -vga virtio"
cfg+=" -k en-us"
#cfg+=" -vnc :0"
case $boot in
c)
echo "booting CD with empty disk"
rm -f ${DISK}
dd if=/dev/zero "of=${DISK}" bs=1M count=0 seek=30720
dd if=/dev/zero "of=${DISK}" bs=1M count=0 seek=24576
cfg+=" -drive file=${iso},media=cdrom,if=none,id=cd"
cfg+=" -device virtio-scsi-pci -device scsi-cd,drive=cd"
cfg+=" -boot d"