Browse Source

Simplify installation scripts

pull/264/head
Xavier Petit 5 years ago
parent
commit
63e3312ab0
No known key found for this signature in database
GPG Key ID: CA3F2B17E25ABD26
  1. BIN
      docs/img/ubuntu-installation/4.png
  2. BIN
      docs/img/ubuntu-installation/6.png
  3. BIN
      docs/img/ubuntu-installation/7.png
  4. BIN
      docs/img/ubuntu-installation/8.png
  5. BIN
      docs/img/ubuntu-installation/9.png
  6. 47
      docs/ubuntu-installation.md
  7. 8
      scripts/install_client.sh
  8. 14
      scripts/kickstart.sh

BIN
docs/img/ubuntu-installation/4.png

diff.bin_not_shown

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 21 KiB

BIN
docs/img/ubuntu-installation/6.png

diff.bin_not_shown

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 16 KiB

BIN
docs/img/ubuntu-installation/7.png

diff.bin_not_shown

Before

Width:  |  Height:  |  Size: 22 KiB

BIN
docs/img/ubuntu-installation/8.png

diff.bin_not_shown

Before

Width:  |  Height:  |  Size: 25 KiB

BIN
docs/img/ubuntu-installation/9.png

diff.bin_not_shown

Before

Width:  |  Height:  |  Size: 7.5 KiB

47
docs/ubuntu-installation.md

@ -14,8 +14,6 @@ The partitioning is :
1. 256 MB : EFI partition
2. 20 GB : system partition
3. 32 GB : unused partition (will be used later)
4. rest : unused partition (will be used later)
![img4](img/ubuntu-installation/4.png)
![img5](img/ubuntu-installation/5.png)
@ -27,43 +25,34 @@ Skip the welcoming window.
Don't install updates if Ubuntu asks to. The scripts will.
Start the disk utility to name partitions so that OverlayFS can identify them.
3. 32 GB - **Partition 3** : `01-tmp-home`
4. rest - **Partition 4** : `01-tmp-system`
The same procedure is required to make USB disk usable for the students, the partition name must be : `01-home`
![img7](img/ubuntu-installation/7.png)
![img8](img/ubuntu-installation/8.png)
![img9](img/ubuntu-installation/9.png)
## OS configuration
```shell
student@tmp-hostname:~$ wget github.com/01-edu/public/archive/master.zip
student@tmp-hostname:~$ unzip master.zip
student@tmp-hostname:~$ cd public-master/scripts
student@tmp-hostname:~$ sudo ./install_client.sh
Run a terminal and type :
```console
student@ubuntu:~$ unset HISTFILE
student@ubuntu:~$ apt-get -y install curl
student@ubuntu:~$ bash <(curl -sSL raw.githubusercontent.com/01-edu/public/master/scripts/kickstart.sh)
[...]
Ask for student user password (will be removed later)
[...]
Ask to set the root password
[...]
Long installation/configuration process
[...]
student@tmp-hostname:~$ cat dconfig.txt | dconf load /
student@tmp-hostname:~$ reboot
Long installation/configuration process then reboots
```
The system is now read-only, every data is written to a temporary partition.
The session is password-less.
To gain a superuser terminal with read/write access to the filesystem, type these commands:
To gain a superuser terminal, use SSH :
```console
user@remote:~$ ssh -p521 root@IP_ADDRESS
```
To gain access with read/write access to the filesystem, use this command :
```shell
student@tmp-hostname:~$ su -
Password:
root@tmp-hostname:~# overlayroot-chroot
```console
root@ubuntu:~# overlayroot-chroot
INFO: Chrooting into [/media/root-ro]
root@ubuntu:/#
```

8
scripts/install_client.sh

@ -17,6 +17,14 @@ DISK=$(lsblk -o tran,kname,hotplug,type,fstype -pr |
sort |
head -n1)
systemctl stop unattended-upgrades.service
gsettings set org.gnome.desktop.screensaver lock-enabled false
sgdisk -n0:0:+32G "$DISK"
sgdisk -N0 "$DISK"
sgdisk -c3:01-tmp-home "$DISK"
sgdisk -c4:01-tmp-system "$DISK"
apt-get update
apt-get -y upgrade
apt-get -y autoremove --purge

14
scripts/kickstart.sh

@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Run me with:
#
# bash <(curl -Ss raw.githubusercontent.com/01-edu/public/master/scripts/kickstart.sh)
wget github.com/01-edu/public/archive/master.zip
unzip master.zip
cd public-master/scripts
sudo ./install_client.sh
cat dconfig.txt | dconf load /
cd ../..
rm -rf master.zip public-master
reboot
Loading…
Cancel
Save