Compare commits
10 Commits
054e91006e
...
nilmbuntu-
| Author | SHA1 | Date | |
|---|---|---|---|
| f1c7ee2323 | |||
| c26c5ec86b | |||
| 9be08467e5 | |||
| 97044d59f4 | |||
| bc8807ae7d | |||
| 1c82f6ad0a | |||
| bbce49bb1c | |||
| 2fe3f2f092 | |||
| 442c0efa10 | |||
| da37396f65 |
@@ -41,6 +41,11 @@ perl -n -i \
|
|||||||
-e "print;" \
|
-e "print;" \
|
||||||
${ISO}/boot/grub/{grub,loopback}.cfg
|
${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
|
if ! [ "$1" == "skip" ] ; then
|
||||||
|
|
||||||
# Run the customize-inner.sh script inside the chroot
|
# Run the customize-inner.sh script inside the chroot
|
||||||
|
|||||||
4
enter.sh
4
enter.sh
@@ -13,8 +13,8 @@ fi
|
|||||||
# both). Instead let's execute systemd-nspawn in a transient systemd
|
# both). Instead let's execute systemd-nspawn in a transient systemd
|
||||||
# unit, then enter it using machinectl.
|
# unit, then enter it using machinectl.
|
||||||
|
|
||||||
UNIT=nilmbuntu-run-$VERSION
|
UNIT=nilmbuntu-run-$NONPRIV_UID-$VERSION
|
||||||
MACH=nilmbuntu-$VERSION
|
MACH=nilmbuntu-$NONPRIV_UID-$VERSION
|
||||||
|
|
||||||
setup_networking() {
|
setup_networking() {
|
||||||
# We use a virtual ethernet adapter -- this requires that
|
# We use a virtual ethernet adapter -- this requires that
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
export USERNAME="nilm"
|
export USERNAME="nilm"
|
||||||
export USERFULLNAME="NILM User"
|
export USERFULLNAME="NILM User"
|
||||||
export HOST="nilmbuntu"
|
export HOST="nilmbuntu-live"
|
||||||
export BUILD_SYSTEM="Ubuntu"
|
export BUILD_SYSTEM="Ubuntu"
|
||||||
export FLAVOUR="NILMbuntu"
|
export FLAVOUR="NILMbuntu"
|
||||||
|
|
||||||
|
|||||||
@@ -10,10 +10,12 @@ set -x
|
|||||||
|
|
||||||
# Move stuff to the right places
|
# Move stuff to the right places
|
||||||
install -D -m 0644 files/nilmbuntu.png /usr/share/xfce4/backdrops/nilmbuntu.png
|
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/casper.conf /etc/casper.conf
|
||||||
install -D -m 0644 files/hosts.nilm /etc/hosts.nilm
|
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)
|
# Copy hosts for now (although it will get overwritten at boot)
|
||||||
cat /etc/hosts.nilm >> /etc/hosts
|
cat /etc/hosts.nilm >> /etc/hosts
|
||||||
|
|
||||||
@@ -46,6 +48,7 @@ apt -y install postfix
|
|||||||
# Required packages
|
# Required packages
|
||||||
apt -y install \
|
apt -y install \
|
||||||
python3 \
|
python3 \
|
||||||
|
python3-venv \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
git \
|
git \
|
||||||
build-essential \
|
build-essential \
|
||||||
@@ -67,7 +70,9 @@ apt -y install \
|
|||||||
firefox \
|
firefox \
|
||||||
flashrom \
|
flashrom \
|
||||||
gddrescue \
|
gddrescue \
|
||||||
|
git \
|
||||||
gnuplot \
|
gnuplot \
|
||||||
|
gparted \
|
||||||
help2man \
|
help2man \
|
||||||
ipython3 \
|
ipython3 \
|
||||||
libnewlib-arm-none-eabi \
|
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
|
xmlstarlet ed -L -u "//property[@name='image-style']/@value" -v "3" $XML
|
||||||
|
|
||||||
# Make Firefox nicer
|
# 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
|
# Create NILM user. This should happen after anything that we put in
|
||||||
# /etc/skel, since files get copied from there. Note that this user
|
# /etc/skel, since files get copied from there. Note that this user
|
||||||
|
|||||||
@@ -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/force-encrypt-home boolean false
|
||||||
d-i user-setup/encrypt-home boolean false
|
d-i user-setup/encrypt-home boolean false
|
||||||
d-i passwd/auto-login boolean true
|
d-i passwd/auto-login boolean true
|
||||||
|
|
||||||
|
d-i netcfg/get_hostname seen true
|
||||||
|
d-i netcfg/get_hostname string nilmbuntu
|
||||||
|
|||||||
8
run.sh
8
run.sh
@@ -47,20 +47,22 @@ set -x
|
|||||||
|
|
||||||
cfg=""
|
cfg=""
|
||||||
|
|
||||||
|
cfg+=" -nodefaults"
|
||||||
cfg+=" -drive file=${DISK},media=disk,format=raw,if=virtio"
|
cfg+=" -drive file=${DISK},media=disk,format=raw,if=virtio"
|
||||||
cfg+=" -enable-kvm"
|
cfg+=" -enable-kvm"
|
||||||
cfg+=" -m 2048"
|
cfg+=" -m 2048"
|
||||||
cfg+=" -usb"
|
cfg+=" -usb"
|
||||||
cfg+=" -device usb-tablet"
|
cfg+=" -device usb-tablet"
|
||||||
|
cfg+=" -nic user"
|
||||||
cfg+=" -vga vmware"
|
cfg+=" -vga virtio"
|
||||||
|
cfg+=" -k en-us"
|
||||||
#cfg+=" -vnc :0"
|
#cfg+=" -vnc :0"
|
||||||
|
|
||||||
case $boot in
|
case $boot in
|
||||||
c)
|
c)
|
||||||
echo "booting CD with empty disk"
|
echo "booting CD with empty disk"
|
||||||
rm -f ${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+=" -drive file=${iso},media=cdrom,if=none,id=cd"
|
||||||
cfg+=" -device virtio-scsi-pci -device scsi-cd,drive=cd"
|
cfg+=" -device virtio-scsi-pci -device scsi-cd,drive=cd"
|
||||||
cfg+=" -boot d"
|
cfg+=" -boot d"
|
||||||
|
|||||||
Reference in New Issue
Block a user