Compare commits
3 commits
main
...
install-na
Author | SHA1 | Date | |
---|---|---|---|
a192c31de1 | |||
|
2a1f31a88b | ||
|
5749750507 |
5 changed files with 137 additions and 142 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
# !! THIS BRANCH IS JUST EXPERIMENTAL !!
|
||||||
|
# !! IT INSTALLS NANODESK TO YOUR ACTUAL MACHINE AS ADDITIONAL DESKTOP SEESION !!
|
||||||
|
# !! FILES GET OVERWRITTEN !!
|
||||||
|
|
||||||
# nanodesk - lightweight linux (live) desktop
|
# nanodesk - lightweight linux (live) desktop
|
||||||
|
|
||||||
Origin: https://git.la10cy.net/DeltaLima/nanodesk
|
Origin: https://git.la10cy.net/DeltaLima/nanodesk
|
||||||
|
@ -47,6 +51,8 @@ Here you go!
|
||||||
|
|
||||||
![nanodesk_6](screenshots/nanodesk_6.png)
|
![nanodesk_6](screenshots/nanodesk_6.png)
|
||||||
|
|
||||||
|
![nanodesk_7-n-i-gxm](screenshots/nanodesk_7-n-i-gxm.png)
|
||||||
|
|
||||||
![nanodesk_7](screenshots/nanodesk_7.png)
|
![nanodesk_7](screenshots/nanodesk_7.png)
|
||||||
|
|
||||||
![nanodesk_7](screenshots/nanodesk_8.png)
|
![nanodesk_7](screenshots/nanodesk_8.png)
|
||||||
|
|
|
@ -33,10 +33,10 @@ error ()
|
||||||
}
|
}
|
||||||
|
|
||||||
### hostname setting
|
### hostname setting
|
||||||
echo nanodesk > /etc/hostname
|
#echo nanodesk > /etc/hostname
|
||||||
|
|
||||||
message "set hostname in hosts"
|
#message "set hostname in hosts"
|
||||||
sed -i 's/localhost/localhost nanodesk/g' /etc/hosts
|
#sed -i 's/localhost/localhost nanodesk/g' /etc/hosts
|
||||||
|
|
||||||
### noninteractive
|
### noninteractive
|
||||||
DEBIAN_FRONTEND=noninteractive
|
DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -74,7 +74,6 @@ apt install -y --no-install-recommends \
|
||||||
zip \
|
zip \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
zstd \
|
zstd \
|
||||||
grub-pc \
|
|
||||||
host \
|
host \
|
||||||
wireless-tools \
|
wireless-tools \
|
||||||
unrar \
|
unrar \
|
||||||
|
@ -91,7 +90,6 @@ apt install -y --no-install-recommends \
|
||||||
xdg-utils \
|
xdg-utils \
|
||||||
xdg-user-dirs \
|
xdg-user-dirs \
|
||||||
xterm \
|
xterm \
|
||||||
xdm \
|
|
||||||
jwm \
|
jwm \
|
||||||
mc \
|
mc \
|
||||||
wget \
|
wget \
|
||||||
|
@ -132,7 +130,6 @@ apt install -y --no-install-recommends \
|
||||||
|
|
||||||
message "install nanodesk base packages with recommends"
|
message "install nanodesk base packages with recommends"
|
||||||
apt install -y \
|
apt install -y \
|
||||||
grub-pc \
|
|
||||||
network-manager \
|
network-manager \
|
||||||
network-manager-gnome \
|
network-manager-gnome \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
@ -152,14 +149,14 @@ apt install -y \
|
||||||
#dpkg-reconfigure keyboard-configuration
|
#dpkg-reconfigure keyboard-configuration
|
||||||
###https://serverfault.com/a/689947
|
###https://serverfault.com/a/689947
|
||||||
|
|
||||||
message "set locales and tzdata"
|
#message "set locales and tzdata"
|
||||||
echo "Europe/Berlin" > /etc/timezone && \
|
#echo "Europe/Berlin" > /etc/timezone && \
|
||||||
dpkg-reconfigure -f noninteractive tzdata && \
|
# dpkg-reconfigure -f noninteractive tzdata && \
|
||||||
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
# sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
||||||
echo 'LANG="en_US.UTF-8"'>/etc/default/locale && \
|
# echo 'LANG="en_US.UTF-8"'>/etc/default/locale && \
|
||||||
dpkg-reconfigure --frontend=noninteractive locales && \
|
# dpkg-reconfigure --frontend=noninteractive locales && \
|
||||||
locale-gen en_US.UTF-8 && \
|
# locale-gen en_US.UTF-8 && \
|
||||||
update-locale LANG=en_US.UTF-8
|
# update-locale LANG=en_US.UTF-8
|
||||||
|
|
||||||
######
|
######
|
||||||
####
|
####
|
||||||
|
@ -181,8 +178,8 @@ message "run custom steps from /tmp/install_base.customsteps.sh"
|
||||||
######
|
######
|
||||||
|
|
||||||
### clean cache
|
### clean cache
|
||||||
message "apt clean"
|
#message "apt clean"
|
||||||
apt clean
|
#apt clean
|
||||||
|
|
||||||
KERNEL_VER="$(ls -1 /boot/|grep "vmlinuz-"|sed 's/vmlinuz-//'|sort -g|head -n +1)"
|
KERNEL_VER="$(ls -1 /boot/|grep "vmlinuz-"|sed 's/vmlinuz-//'|sort -g|head -n +1)"
|
||||||
test -n "$KERNEL_VER" || error
|
test -n "$KERNEL_VER" || error
|
||||||
|
@ -190,11 +187,11 @@ message "KERNEL_VER=${YELLOW}${KERNEL_VER}${ENDCOLOR}"
|
||||||
|
|
||||||
### but fetch packages for grub and kernel, so we do not need to download them
|
### but fetch packages for grub and kernel, so we do not need to download them
|
||||||
### in case nanodesk get installed to diska
|
### in case nanodesk get installed to diska
|
||||||
message "apt --download linux-image and grub packages to have them in cache for nanodesk-installer.sh offline installation"
|
#message "apt --download linux-image and grub packages to have them in cache for nanodesk-installer.sh offline installation"
|
||||||
apt -d --reinstall install \
|
#apt -d --reinstall install \
|
||||||
linux-image-amd64 \
|
# linux-image-amd64 \
|
||||||
linux-image-$KERNEL_VER \
|
# linux-image-$KERNEL_VER \
|
||||||
grub-pc grub-pc-bin \
|
# grub-pc grub-pc-bin \
|
||||||
grub-common \
|
# grub-common \
|
||||||
grub2-common \
|
# grub2-common \
|
||||||
os-prober || error
|
# os-prober || error
|
||||||
|
|
228
makeanything.sh
228
makeanything.sh
|
@ -52,22 +52,12 @@ error ()
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
message "installing requirements"
|
#message "installing requirements"
|
||||||
### https://www.willhaley.com/blog/custom-debian-live-environment/
|
#### https://www.willhaley.com/blog/custom-debian-live-environment/
|
||||||
sudo apt install \
|
apt install \
|
||||||
debootstrap \
|
|
||||||
squashfs-tools \
|
|
||||||
xorriso \
|
|
||||||
isolinux \
|
|
||||||
syslinux-efi \
|
|
||||||
grub-pc-bin \
|
|
||||||
grub-efi-amd64-bin \
|
|
||||||
grub-efi-ia32-bin \
|
|
||||||
mtools \
|
|
||||||
dosfstools \
|
|
||||||
coreutils \
|
coreutils \
|
||||||
pandoc || error
|
pandoc || error
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
message "start building nanodesk ${YELLOW}${VERSION}${ENDCOLOR}"
|
message "start building nanodesk ${YELLOW}${VERSION}${ENDCOLOR}"
|
||||||
|
@ -82,20 +72,20 @@ do
|
||||||
message "$dir"
|
message "$dir"
|
||||||
test -d $dir || mkdir -p $dir
|
test -d $dir || mkdir -p $dir
|
||||||
done
|
done
|
||||||
|
#
|
||||||
message "running debootstrap $DEBOOTSTRAP_OPTS $DEBOOTSTRAP_SUITE $MIRROR"
|
#message "running debootstrap $DEBOOTSTRAP_OPTS $DEBOOTSTRAP_SUITE $MIRROR"
|
||||||
sudo debootstrap ${DEBOOTSTRAP_OPTS} ${DEBOOTSTRAP_SUITE} build/chroot/ $MIRROR || message warn "debootstrap exited with code $?"
|
#sudo debootstrap ${DEBOOTSTRAP_OPTS} ${DEBOOTSTRAP_SUITE} build/chroot/ $MIRROR || message warn "debootstrap exited with code $?"
|
||||||
|
|
||||||
message "copy xdgmenumaker deb file into chroot"
|
message "copy xdgmenumaker deb file into chroot"
|
||||||
sudo cp deb/xdgmenumaker* build/chroot/tmp || error
|
cp deb/xdgmenumaker* /tmp || error
|
||||||
|
|
||||||
message "copy install_base scripts to build/chroot/tmp/"
|
message "copy install_base scripts to build/chroot/tmp/"
|
||||||
sudo cp install_base/* build/chroot/tmp/ || error
|
cp install_base/* /tmp/ || error
|
||||||
|
|
||||||
|
|
||||||
#### install_base
|
#### install_base
|
||||||
message "run install_base.sh"
|
message "run install_base.sh"
|
||||||
$CHROOTCMD /bin/bash /tmp/install_base.sh || error
|
/bin/bash /tmp/install_base.sh || error
|
||||||
####
|
####
|
||||||
|
|
||||||
### copy nanodesk files in nanodesk-files/ to build/nanodesk-files/ so we can make changes there,
|
### copy nanodesk files in nanodesk-files/ to build/nanodesk-files/ so we can make changes there,
|
||||||
|
@ -112,122 +102,124 @@ for md in $(find build/nanodesk-files/usr/share/doc/nanodesk/ -name "*.md")
|
||||||
done
|
done
|
||||||
|
|
||||||
message "copy build/nanodesk-files/ to build/chroot/"
|
message "copy build/nanodesk-files/ to build/chroot/"
|
||||||
sudo cp -r build/nanodesk-files/* build/chroot/
|
cp -r build/nanodesk-files/* /
|
||||||
|
|
||||||
message "generate icon path list for jwm config"
|
message "generate icon path list for jwm config"
|
||||||
find build/chroot/usr/share/icons/ -type d | sed 's/build\/chroot//g' > build/tmp/jwm.iconlist
|
find /usr/share/icons/ -type d | sed 's/build\/chroot//g' > build/tmp/jwm.iconlist
|
||||||
sed -i -e 's/^/\ \ \ \ <IconPath>/g' -e 's/$/<\/IconPath>/g' build/tmp/jwm.iconlist
|
sed -i -e 's/^/\ \ \ \ <IconPath>/g' -e 's/$/<\/IconPath>/g' build/tmp/jwm.iconlist
|
||||||
sudo cp build/tmp/jwm.iconlist build/chroot/tmp/ || error
|
cp build/tmp/jwm.iconlist /tmp/ || error
|
||||||
|
|
||||||
message "putting generated icon path list to /etc/jwm/system.nanodesk.jwmrc"
|
message "putting generated icon path list to /etc/jwm/system.nanodesk.jwmrc"
|
||||||
$CHROOTCMD sed -i '/<\!-- GENERATED ICONLIST -->/r /tmp/jwm.iconlist' /etc/jwm/system.nanodesk.jwmrc || error
|
sed -i '/<\!-- GENERATED ICONLIST -->/r /tmp/jwm.iconlist' /etc/jwm/system.nanodesk.jwmrc || error
|
||||||
|
|
||||||
message "correct file permissions"
|
message "correct file permissions"
|
||||||
#$CHROOTCMD /usr/bin/chmod 440 /etc/sudoers || error
|
#$CHROOTCMD /usr/bin/chmod 440 /etc/sudoers || error
|
||||||
$CHROOTCMD /usr/bin/chmod 755 /usr/sbin/nanodesk-installer || error
|
/usr/bin/chmod 755 /usr/sbin/nanodesk-installer || error
|
||||||
$CHROOTCMD /usr/bin/chmod 755 /usr/bin/nanodesk-installer-gxm || error
|
/usr/bin/chmod 755 /usr/bin/nanodesk-installer-gxm || error
|
||||||
$CHROOTCMD /usr/bin/chmod 755 /usr/bin/nanodesk || error
|
/usr/bin/chmod 755 /usr/bin/nanodesk || error
|
||||||
$CHROOTCMD /usr/bin/chmod 755 /usr/bin/nanodesk-first-start || error
|
/usr/bin/chmod 755 /usr/bin/nanodesk-first-start || error
|
||||||
|
|
||||||
message "set x-terminal-emulator to lxterminal"
|
message "set x-terminal-emulator to lxterminal"
|
||||||
$CHROOTCMD /usr/bin/update-alternatives --set x-terminal-emulator /usr/bin/lxterminal
|
/usr/bin/update-alternatives --set x-terminal-emulator /usr/bin/lxterminal
|
||||||
|
|
||||||
message "set x-window-manager to jwm-nanodesk"
|
#message "set x-window-manager to jwm-nanodesk"
|
||||||
$CHROOTCMD /usr/bin/update-alternatives --install /usr/bin/x-window-manager x-window-manager /usr/bin/nanodesk 25
|
#/usr/bin/update-alternatives --install /usr/bin/x-window-manager x-window-manager /usr/bin/nanodesk 25
|
||||||
$CHROOTCMD /usr/bin/update-alternatives --set x-window-manager /usr/bin/nanodesk
|
#/usr/bin/update-alternatives --set x-window-manager /usr/bin/nanodesk
|
||||||
|
|
||||||
### set root password
|
### set root password
|
||||||
#message "set root password to 'debian'"
|
#message "set root password to 'debian'"
|
||||||
#echo -e "debian\ndebian" | $CHROOTCMD /usr/bin/passwd root
|
#echo -e "debian\ndebian" | $CHROOTCMD /usr/bin/passwd root
|
||||||
|
|
||||||
### add debian user
|
### add debian user
|
||||||
message "create user debian, password 'debian'"
|
#message "create user debian, password 'debian'"
|
||||||
echo -e "debian\ndebian\nDebian\n\n\n\n\y\n" | $CHROOTCMD /usr/sbin/adduser debian
|
#echo -e "debian\ndebian\nDebian\n\n\n\n\y\n" | $CHROOTCMD /usr/sbin/adduser debian
|
||||||
|
|
||||||
message "add user debian to group sudo"
|
#message "add user debian to group sudo"
|
||||||
$CHROOTCMD /usr/sbin/usermod -a -G sudo debian
|
#$CHROOTCMD /usr/sbin/usermod -a -G sudo debian
|
||||||
|
|
||||||
message "clear /tmp"
|
#message "clear /tmp"
|
||||||
$CHROOTCMD /usr/bin/rm -Rf /tmp/* || error
|
#$CHROOTCMD /usr/bin/rm -Rf /tmp/* || error
|
||||||
|
|
||||||
### liveboot part, https://www.willhaley.com/blog/custom-debian-live-environment/
|
### liveboot part, https://www.willhaley.com/blog/custom-debian-live-environment/
|
||||||
message "make squashfs"
|
#message "make squashfs"
|
||||||
test -f build/staging/live/filesystem.squashfs && sudo rm build/staging/live/filesystem.squashfs
|
#test -f build/staging/live/filesystem.squashfs && sudo rm build/staging/live/filesystem.squashfs
|
||||||
sudo mksquashfs \
|
#sudo mksquashfs \
|
||||||
build/chroot \
|
# build/chroot \
|
||||||
build/staging/live/filesystem.squashfs \
|
# build/staging/live/filesystem.squashfs \
|
||||||
-comp xz \
|
# -comp xz \
|
||||||
-e boot || error
|
# -e boot || error
|
||||||
|
#
|
||||||
|
#
|
||||||
message "copy kernel and initrd images"
|
#message "copy kernel and initrd images"
|
||||||
cp build/chroot/boot/vmlinuz-* build/staging/live/vmlinuz || error
|
#cp build/chroot/boot/vmlinuz-* build/staging/live/vmlinuz || error
|
||||||
cp build/chroot/boot/initrd.img-* build/staging/live/initrd || error
|
#cp build/chroot/boot/initrd.img-* build/staging/live/initrd || error
|
||||||
|
#
|
||||||
message "generate isolinux.cfg"
|
#message "generate isolinux.cfg"
|
||||||
sed "s/%VERSION%/${VERSION}/g" templates/isolinux.tpl.cfg > build/staging/isolinux/isolinux.cfg
|
#sed "s/%VERSION%/${VERSION}/g" templates/isolinux.tpl.cfg > build/staging/isolinux/isolinux.cfg
|
||||||
|
#
|
||||||
message "generate grub.cfg"
|
#message "generate grub.cfg"
|
||||||
sed "s/%VERSION%/${VERSION}/g" templates/grub.tpl.cfg > build/staging/boot/grub/grub.cfg
|
#sed "s/%VERSION%/${VERSION}/g" templates/grub.tpl.cfg > build/staging/boot/grub/grub.cfg
|
||||||
sed "s/%VERSION%/${VERSION}/g" templates/grub.tpl.cfg > build/staging/EFI/BOOT/grub.cfg
|
#sed "s/%VERSION%/${VERSION}/g" templates/grub.tpl.cfg > build/staging/EFI/BOOT/grub.cfg
|
||||||
|
#
|
||||||
message "copy grub-embed.cfg"
|
#message "copy grub-embed.cfg"
|
||||||
cp templates/grub-embed.tpl.cfg build/tmp/grub-embed.cfg
|
#cp templates/grub-embed.tpl.cfg build/tmp/grub-embed.cfg
|
||||||
|
#
|
||||||
message "copy isolinux"
|
#message "copy isolinux"
|
||||||
cp /usr/lib/ISOLINUX/isolinux.bin "build/staging/isolinux/" || error
|
#cp /usr/lib/ISOLINUX/isolinux.bin "build/staging/isolinux/" || error
|
||||||
cp /usr/lib/syslinux/modules/bios/* "build/staging/isolinux/" || error
|
#cp /usr/lib/syslinux/modules/bios/* "build/staging/isolinux/" || error
|
||||||
|
#
|
||||||
message "copy grub-efi"
|
#message "copy grub-efi"
|
||||||
cp -r /usr/lib/grub/x86_64-efi/* "build/staging/boot/grub/x86_64-efi/" || error
|
#cp -r /usr/lib/grub/x86_64-efi/* "build/staging/boot/grub/x86_64-efi/" || error
|
||||||
|
#
|
||||||
message "make efi images"
|
#message "make efi images"
|
||||||
grub-mkstandalone -O i386-efi \
|
#grub-mkstandalone -O i386-efi \
|
||||||
--modules="part_gpt part_msdos fat iso9660" \
|
# --modules="part_gpt part_msdos fat iso9660" \
|
||||||
--locales="" \
|
# --locales="" \
|
||||||
--themes="" \
|
# --themes="" \
|
||||||
--fonts="" \
|
# --fonts="" \
|
||||||
--output="build/staging/EFI/BOOT/BOOTIA32.EFI" \
|
# --output="build/staging/EFI/BOOT/BOOTIA32.EFI" \
|
||||||
"boot/grub/grub.cfg=build/tmp/grub-embed.cfg" || error
|
# "boot/grub/grub.cfg=build/tmp/grub-embed.cfg" || error
|
||||||
|
#
|
||||||
grub-mkstandalone -O x86_64-efi \
|
#grub-mkstandalone -O x86_64-efi \
|
||||||
--modules="part_gpt part_msdos fat iso9660" \
|
# --modules="part_gpt part_msdos fat iso9660" \
|
||||||
--locales="" \
|
# --locales="" \
|
||||||
--themes="" \
|
# --themes="" \
|
||||||
--fonts="" \
|
# --fonts="" \
|
||||||
--output="build/staging/EFI/BOOT/BOOTx64.EFI" \
|
# --output="build/staging/EFI/BOOT/BOOTx64.EFI" \
|
||||||
"boot/grub/grub.cfg=build/tmp/grub-embed.cfg" || error
|
# "boot/grub/grub.cfg=build/tmp/grub-embed.cfg" || error
|
||||||
|
#
|
||||||
(cd build/staging && \
|
#(cd build/staging && \
|
||||||
dd if=/dev/zero of=efiboot.img bs=1M count=20 && \
|
# dd if=/dev/zero of=efiboot.img bs=1M count=20 && \
|
||||||
/usr/sbin/mkfs.vfat efiboot.img && \
|
# /usr/sbin/mkfs.vfat efiboot.img && \
|
||||||
mmd -i efiboot.img ::/EFI ::/EFI/BOOT && \
|
# mmd -i efiboot.img ::/EFI ::/EFI/BOOT && \
|
||||||
mcopy -vi efiboot.img \
|
# mcopy -vi efiboot.img \
|
||||||
../../build/staging/EFI/BOOT/BOOTIA32.EFI \
|
# ../../build/staging/EFI/BOOT/BOOTIA32.EFI \
|
||||||
../../build/staging/EFI/BOOT/BOOTx64.EFI \
|
# ../../build/staging/EFI/BOOT/BOOTx64.EFI \
|
||||||
../../build/staging/boot/grub/grub.cfg \
|
# ../../build/staging/boot/grub/grub.cfg \
|
||||||
::/EFI/BOOT/
|
# ::/EFI/BOOT/
|
||||||
) || error
|
#) || error
|
||||||
|
#
|
||||||
message "generate .iso"
|
#message "generate .iso"
|
||||||
xorriso \
|
#xorriso \
|
||||||
-as mkisofs \
|
# -as mkisofs \
|
||||||
-iso-level 3 \
|
# -iso-level 3 \
|
||||||
-o "build/nanodesk_$VERSION.iso" \
|
# -o "build/nanodesk_$VERSION.iso" \
|
||||||
-full-iso9660-filenames \
|
# -full-iso9660-filenames \
|
||||||
-volid "NANODESK" \
|
# -volid "NANODESK" \
|
||||||
--mbr-force-bootable -partition_offset 16 \
|
# --mbr-force-bootable -partition_offset 16 \
|
||||||
-joliet -joliet-long -rational-rock \
|
# -joliet -joliet-long -rational-rock \
|
||||||
-isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
|
# -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
|
||||||
-eltorito-boot \
|
# -eltorito-boot \
|
||||||
isolinux/isolinux.bin \
|
# isolinux/isolinux.bin \
|
||||||
-no-emul-boot \
|
# -no-emul-boot \
|
||||||
-boot-load-size 4 \
|
# -boot-load-size 4 \
|
||||||
-boot-info-table \
|
# -boot-info-table \
|
||||||
--eltorito-catalog isolinux/isolinux.cat \
|
# --eltorito-catalog isolinux/isolinux.cat \
|
||||||
-eltorito-alt-boot \
|
# -eltorito-alt-boot \
|
||||||
-e --interval:appended_partition_2:all:: \
|
# -e --interval:appended_partition_2:all:: \
|
||||||
-no-emul-boot \
|
# -no-emul-boot \
|
||||||
-isohybrid-gpt-basdat \
|
# -isohybrid-gpt-basdat \
|
||||||
-append_partition 2 C12A7328-F81F-11D2-BA4B-00A0C93EC93B build/staging/efiboot.img \
|
# -append_partition 2 C12A7328-F81F-11D2-BA4B-00A0C93EC93B build/staging/efiboot.img \
|
||||||
"build/staging"
|
# "build/staging"
|
||||||
|
#
|
||||||
|
message "Your system is now nanodeskized :)"
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 44 KiB |
BIN
screenshots/nanodesk_7-n-i-gxm.png
Normal file
BIN
screenshots/nanodesk_7-n-i-gxm.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
Loading…
Reference in a new issue