Skip to content

Commit 85a9324

Browse files
author
sairuk
committed
update builds, make default user retronas
1 parent ba167f0 commit 85a9324

7 files changed

Lines changed: 35 additions & 24 deletions

File tree

.github/workflows/rpios_arm64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ jobs:
3434
with:
3535
name: retronas-rpios-arm64-${{ github.sha }}
3636
path: |
37-
rpios/tmp/*img
37+
rpios/tmp/*arm64-lite.img
3838
if-no-files-found: error

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.iso
22
*.img
33
*.zip
4+
*.xz
45
debian/isofiles/
56
debian/mbr_template.bin
67
output-arm-image

Makefile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
.DEFAULT_GOAL := help
22

3-
make-dists: ## Make the directory where the preseeded distribution images will end up
4-
mkdir -p dists
3+
DEBIAN_VERSION=12.11.0
4+
RPIOS_VERSION=2025-05-13
5+
export # export all vars
56

67
download-debian-i386: ## Download the 32 bit debian netinst image
7-
cd debian && ./download-iso.sh i386
8-
9-
build-debian-i386: download-debian-i386 make-dists ## Build the 32 bit debian image in the docker container
10-
cd debian && ./make-preseed-iso.sh iso-cache/$(notdir $(shell ls debian/iso-cache/debian-*-i386-netinst.iso | head -1)) 386
8+
cd debian && ./download-iso.sh i386 $(DEBIAN_VERSION)
119

1210
download-debian-amd64: ## Download the 32 bit debian netinst image
13-
cd debian && ./download-iso.sh amd64
11+
cd debian && ./download-iso.sh amd64 $(DEBIAN_VERSION)
12+
13+
build-debian-i386: download-debian-i386 ## Build the 32 bit debian image in the docker container
14+
cd debian && ./make-preseed-iso.sh iso-cache/$(notdir $(shell ls debian/iso-cache/debian-*-i386-netinst.iso | head -1)) 386
1415

15-
build-debian-amd64: download-debian-amd64 make-dists ## Build the 64 bit debian image in the docker container
16+
build-debian-amd64: download-debian-amd64 ## Build the 64 bit debian image in the docker container
1617
cd debian && ./make-preseed-iso.sh iso-cache/$(notdir $(shell ls debian/iso-cache/debian-*-amd64-netinst.iso | head -1)) amd
1718

1819
build-debian: build-debian-i386 build-debian-amd64 ## build for all debian architectures
1920

2021
build-rpios-armhf: ## Build rpios image
21-
cd rpios && ./build_armhf.sh
22+
cd rpios && ./build_armhf.sh $(RPIOS_VERSION)
2223

2324
build-rpios-arm64: ## Build rpios image
24-
cd rpios && ./build_arm64.sh
25+
cd rpios && ./build_arm64.sh $(RPIOS_VERSION)
2526

2627
build-rpios: build-rpios-armhf build-rpios-amd64
2728

debian/download-iso.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
function check_for_iso {
3+
function check {
44
local EXPECTED_FILENAME="debian-*-$1-netinst.iso"
55
OUTPUT=$(ls iso-cache/$EXPECTED_FILENAME)
66
echo $OUTPUT
@@ -9,18 +9,18 @@ function check_for_iso {
99
fi
1010
}
1111

12-
function download_iso {
12+
function download {
1313
mkdir -p iso-cache
14-
BASE_URL="https://cdimage.debian.org/debian-cd/current/$1/iso-cd/"
14+
BASE_URL="https://cdimage.debian.org/debian-cd/${DEBIAN_VERSION}/$1/iso-cd"
1515
ISO_FILENAME=$(curl -L $BASE_URL | grep -Eo "debian-([0-9]+(\.[0-9]+)+)-$1-netinst\.iso" | head -1)
1616
echo $ISO_FILENAME
17-
URL="https://cdimage.debian.org/debian-cd/current/$1/iso-cd/$ISO_FILENAME"
17+
URL="${BASE_URL}/$ISO_FILENAME"
1818
echo "Downloading from: $URL"
1919
curl -L $URL --output iso-cache/$ISO_FILENAME
20-
check_for_iso $1
20+
check $1
2121
echo "Downloaded $ISO_FILENAME"
2222
}
2323

2424
unset EXISTING_ISO
25-
check_for_iso $1
26-
if [ -z ${EXISTING_ISO+x} ]; then echo "No existing '$1' iso found. Downloading..." && download_iso $1; else echo "Existing iso will be used: '$EXISTING_ISO' Remove it first if you wish to download another."; fi
25+
check $1
26+
if [ -z ${EXISTING_ISO+x} ]; then echo "No existing '$1' iso found. Downloading..." && download $1; else echo "Existing iso will be used: '$EXISTING_ISO' Remove it first if you wish to download another."; fi

debian/preseed.cfg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#_preseed_V1
22

33
#
4-
# Preseed configuration for debian 11/bullseye
4+
# Preseed configuration for debian
55
#
66
# ATTENTION: This preseed configuration ERASES the target disks
77
# without any confirmation whatsoever.
@@ -39,7 +39,7 @@ d-i passwd/make-user boolean true
3939
d-i passwd/root-password password retronas
4040
d-i passwd/root-password-again password retronas
4141
d-i passwd/user-fullname string retronas
42-
d-i passwd/username string pi
42+
d-i passwd/username string retronas
4343
d-i passwd/user-password password retronas
4444
d-i passwd/user-password-again password retronas
4545

@@ -108,8 +108,8 @@ d-i grub-installer/bootdev string default
108108
# Custom late commands
109109
d-i preseed/late_command string \
110110
apt install -y curl sudo; \
111-
echo "pi ALL=(ALL) NOPASSWD:ALL" > /target/etc/sudoers.d/pi; \
112-
in-target chmod 440 /etc/sudoers.d/pi; \
111+
echo "retronas ALL=(ALL) NOPASSWD:ALL" > /target/etc/sudoers.d/retronas; \
112+
in-target chmod 440 /etc/sudoers.d/retronas; \
113113
in-target curl "https://raw.githubusercontent.com/danmons/retronas/main/install_retronas.sh" --output /tmp/install_retronas.sh; \
114114
in-target chmod a+x /tmp/install_retronas.sh; \
115115
in-target /tmp/install_retronas.sh; \
@@ -125,7 +125,7 @@ d-i preseed/late_command string \
125125
echo "echo ' Your hostname: $(hostname)'" >> /target/etc/update-motd.d/99-footer; \
126126
echo "echo ''" >> /target/etc/update-motd.d/99-footer; \
127127
echo "echo ' SSH is enabled by default'" >> /target/etc/update-motd.d/99-footer; \
128-
echo "echo ' Default SSH username: pi'" >> /target/etc/update-motd.d/99-footer; \
128+
echo "echo ' Default SSH username: retronas'" >> /target/etc/update-motd.d/99-footer; \
129129
echo "echo ' Default SSH password: retronas'" >> /target/etc/update-motd.d/99-footer; \
130130
echo "echo ''" >> /target/etc/update-motd.d/99-footer; \
131131
echo "echo '*************************************************'" >> /target/etc/update-motd.d/99-footer; \

rpios/build_armhf.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
. image.sh
44

55
check armhf
6-
download "https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2025-05-13/2025-05-13-raspios-bookworm-armhf-lite.img.xz" armhf
6+
download "https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-${RPIOS_VERSION}/${RPIOS_VERSION}-raspios-bookworm-armhf-lite.img.xz" armhf
77
uncompress armhf
88
./repack.sh

rpios/repack.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ then
3737
sudo chroot ${DMNT} /tmp/install.sh
3838
#sudo sed -i 's/^#//g' /mnt/etc/ld.so.preload
3939

40+
# add our retronas user
41+
export OLDRNUSER=retronas
42+
export RNPASSWD=retronas
43+
sudo chroot ${DMNT} useradd -m -s /bin/bash $OLDRNUSER
44+
echo "$OLDRNUSER ALL=(ALL) NOPASSWD:ALL" | sudo chroot ${DMNT} tee /etc/sudoers.d/${OLDRNUSER}
45+
sudo chroot ${DMNT} chmod 440 /etc/sudoers.d/${OLDRNUSER}
46+
echo -e "${RNPASSWD}\n${RNPASSWD}" | sudo chroot ${DMNT} passwd $OLDNUSER
47+
48+
4049
sudo rm -f ${DMNT}/usr/bin/qemu-*
4150
sudo umount ${DMNT}
4251
sudo losetup -d $LOOP_DEVICE

0 commit comments

Comments
 (0)