Update documentation

This commit is contained in:
Marcos Vallim 2019-06-27 01:42:44 -03:00
parent c880a2be19
commit e1b168166a
1 changed files with 128 additions and 123 deletions

251
README.md
View File

@ -39,148 +39,151 @@ sudo chroot $HOME/live-ubuntu-from-scratch/chroot
``` ```
1. **Configure mount points** 1. **Configure mount points**
``` ```
mount none -t proc /proc mount none -t proc /proc
mount none -t sysfs /sys mount none -t sysfs /sys
mount none -t devpts /dev/pts mount none -t devpts /dev/pts
export HOME=/root export HOME=/root
export LC_ALL=C export LC_ALL=C
``` ```
2. **Set a custom hostname** 2. **Set a custom hostname**
``` ```
echo "ubuntu-live" > /etc/hostname echo "ubuntu-live" > /etc/hostname
``` ```
3. **Configure apt sources.list** 3. **Configure apt sources.list**
```
cat <<EOF > /etc/apt/sources.list
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
Edit /etc/apt/source.list deb http://us.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
``` deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
cat <<EOF > /etc/apt/sources.list EOF
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse ```
deb http://us.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse 4. **Update indexes packages**
```
apt-get update
```
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse 5. **Install systemd**
EOF ```
``` apt-get install -y systemd-sysv
```
4. **Upgrade packages if you want** 5. **Configure machine-id and divert**
``` ```
apt-get update dbus-uuidgen > /var/lib/dbus/machine-id
apt-get -y upgrade dpkg-divert --local --rename --add /sbin/initctl
```
ln -s /bin/true /sbin/initctl
5. **Install and configure dbus** ```
```
apt-get install -y systemd-sysv
apt-get install -y dbus
```
```
dbus-uuidgen > /var/lib/dbus/machine-id
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl
```
6. **Install packages needed for Live System** 6. **Install packages needed for Live System**
``` ```
apt-get install -y \ apt-get install -y \
ubuntu-standard \ ubuntu-standard \
casper \ casper \
lupin-casper \ lupin-casper \
discover \ discover \
laptop-detect \ laptop-detect \
os-prober \ os-prober \
network-manager \ network-manager \
linux-generic net-tools \
``` wireless-tools \
wpagui \
locales \
linux-generic
```
7. **Graphical installer** 7. **Generate locales**
``` ```
apt-get install -y \ dpkg-reconfigure locales
ubiquity \ ```
ubiquity-casper \
ubiquity-frontend-gtk \ 8. **Graphical installer**
ubiquity-slideshow-ubuntu \ ```
ubiquity-ubuntu-artwork apt-get install -y \
``` ubiquity \
ubiquity-casper \
ubiquity-frontend-gtk \
ubiquity-slideshow-ubuntu \
ubiquity-ubuntu-artwork
```
8. **Install window manager** 9. **Install window manager**
``` ```
apt-get install -y \ apt-get install -y \
plymouth-theme-ubuntu-gnome-logo \ plymouth-theme-ubuntu-gnome-logo \
ubuntu-gnome-desktop \ ubuntu-gnome-desktop \
ubuntu-gnome-wallpapers ubuntu-gnome-wallpapers
``` ```
9. **Install usefull applications** 10. **Install usefull applications**
``` ```
apt-get install -y \ apt-get install -y \
clamav-daemon \ clamav-daemon \
terminator \ terminator \
apt-transport-https \ apt-transport-https \
curl \ curl \
vim \ vim \
nano nano
``` ```
10. **Install Visual Studio Code** 11. **Install Visual Studio Code**
1. Download and install the key 1. Download and install the key
``` ```
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/ install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list
rm microsoft.gpg rm microsoft.gpg
``` ```
2. Then update the package cache and install the package using: 2. Then update the package cache and install the package using:
``` ```
apt-get update apt-get update
apt-get install -y code apt-get install -y code
``` ```
11. **Install Google Chrome** 12. **Install Google Chrome**
1. Download and install the key 1. Download and install the key
``` ```
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
``` ```
2. Add the key to the repository 2. Add the key to the repository
``` ```
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list
``` ```
3. Finally, Update repository and install Google Chrome. 3. Finally, Update repository and install Google Chrome.
``` ```
apt-get update apt-get update
apt-get install google-chrome-stable apt-get install google-chrome-stable
``` ```
12. **Install Java JDK 8** 13. **Install Java JDK 8**
``` ```
apt-get install -y \ apt-get install -y \
openjdk-8-jdk \ openjdk-8-jdk \
openjdk-8-jre openjdk-8-jre
``` ```
13. **Remove unused applications** 14. **Remove unused applications**
``` ```
apt-get purge -y \ apt-get purge -y \
transmission-gtk \ transmission-gtk \
@ -192,41 +195,43 @@ sudo chroot $HOME/live-ubuntu-from-scratch/chroot
hitori hitori
``` ```
14. **Remove unused packages** 15. **Remove unused packages**
``` ```
apt-get autoremove -y apt-get autoremove -y
``` ```
15. **Cleanup the chroot environment** 16. **Cleanup the chroot environment**
1. If you installed software, be sure to run 1. If you installed software, be sure to run
``` ```
rm /var/lib/dbus/machine-id rm /var/lib/dbus/machine-id
``` ```
2. Remove the diversion 2. Remove the diversion
``` ```
rm /sbin/initctl rm /sbin/initctl
dpkg-divert --rename --remove /sbin/initctl dpkg-divert --rename --remove /sbin/initctl
``` ```
3. Clean up 3. Clean up
``` ```
apt-get clean apt-get clean
rm -rf /tmp/* rm -rf /tmp/* ~/.bash_history
rm /etc/resolv.conf rm /etc/resolv.conf
umount /proc umount /proc
umount /sys umount /sys
umount /dev/pts umount /dev/pts
exit export HISTSIZE=0
```
exit
```
## Unbind mount points ## Unbind mount points
``` ```
@ -280,7 +285,7 @@ sudo umount $HOME/live-ubuntu-from-scratch/chroot/run
3. Move image 3. Move image
``` ```
sudo mv splash.png image/ sudo mv splash.png image/isolinux/
``` ```
2. **Boot-loader configuration** 2. **Boot-loader configuration**