Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
rpi_common [2020/02/10 18:47] – [Upgrade Raspbian from Stretch to Buster] Júne Park | rpi_common [2020/07/28 11:28] – [Modify login message] Júne Park | ||
---|---|---|---|
Line 1: | Line 1: | ||
< | < | ||
* {{fa> | * {{fa> | ||
- | * [[: | + | * [[: |
* [[: | * [[: | ||
* [[: | * [[: | ||
* [[: | * [[: | ||
- | * [[: | + | * [[: |
* [[: | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
* {{fa> | * {{fa> | ||
- | * [[: | + | * [[: |
* [[: | * [[: | ||
* [[: | * [[: | ||
Line 14: | Line 16: | ||
* [[: | * [[: | ||
* {{fa> | * {{fa> | ||
- | * [[: | + | * [[: |
* [[: | * [[: | ||
* [[: | * [[: | ||
Line 22: | Line 24: | ||
</ | </ | ||
- | ===== General Things on Raspbian ===== | + | ====== General Things on Raspbian |
- | {{: | + | {{: |
---- | ---- | ||
- | ==== Initial steps for Raspbian | + | ===== First step for Raspberry OS ===== |
- | * Write [[https:// | + | |
- | * Boot with fresh Raspbian | + | |
- | * Login with '' | + | |
- | * Run '' | + | |
- | {{:manual:raspbi-config.png?650|}} | + | {{mdi> |
+ | |||
+ | {{mdi> | ||
- | Set configuration with following menu. | + | {{mdi> |
- | * 1. Change User Password - Change password for user '' | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | * **T2 Change Timezone** - Where Raspberry Pi lives. | + | |
- | * **T3 Change Wi-fi Country** - What you want. Frequency ranges are different depending on country. | + | |
- | * 5. Interfacing Options | + | |
- | * **P2 SSH** - **MUST CHECK with ENABLE** | + | |
- | * Others - Check ENABLE/ | + | |
- | * 7. Advanced Options | + | |
- | * **A1 Expand Filesystem** - **MUST DO** to extend your memory capacity to utilize | + | |
- | * **A3 Memory Split** - Memory size for GPU. If you are console user, '' | + | |
- | | + | {{: |
- | * Add user for yourself | + | |
- | * Add '' | + | ==== Setup raspbi-config ==== |
+ | |||
+ | 1. '' | ||
+ | 2. '' | ||
+ | | ||
+ | * **'' | ||
+ | * **'' | ||
+ | * '' | ||
+ | |||
+ | 3. '' | ||
+ | * **'' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | 4. Localisation Options | ||
+ | * **'' | ||
+ | * **'' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | 5. Interfacing Options | ||
+ | * Disable: '' | ||
+ | * Enable: **'' | ||
+ | |||
+ | 6. < | ||
+ | |||
+ | 7. Advance Options | ||
+ | * **'' | ||
+ | * **'' | ||
+ | |||
+ | ==== Manage accounts ==== | ||
+ | |||
+ | === Change password | ||
+ | |||
+ | <code bash> | ||
+ | sudo passwd root | ||
+ | </ | ||
+ | |||
+ | === Create active userid === | ||
+ | |||
+ | '' | ||
+ | |||
+ | <code bash> | ||
+ | sudo adduser //userid// | ||
+ | </ | ||
+ | |||
+ | Append | ||
+ | |||
+ | Edit '' | ||
<code autoconf> | <code autoconf> | ||
- | | + | # User privilege specification |
- | root ALL=(ALL: | + | root ALL=(ALL: |
- | userid | + | userid |
</ | </ | ||
- | * copy all files from ''/ | + | Copy all files from ''/ |
- | * Logout '' | + | |
- | | + | Reboot system |
- | | + | |
+ | Delete '' | ||
+ | |||
+ | <code bash> | ||
+ | sudo deluser pi | ||
+ | sudo rm -rf /home/pi | ||
+ | </ | ||
+ | |||
+ | === Update | ||
<code bash> | <code bash> | ||
- | | + | sudo apt update && sudo apt dist-upgrade -y && sudo apt autoremove |
</ | </ | ||
Line 73: | Line 116: | ||
<code bash> | <code bash> | ||
- | | + | sudo apt update |
- | sudo apt-get dist-upgrade -y | + | sudo apt dist-upgrade -y |
- | sudo apt-get autoremove | + | sudo apt autoremove |
</ | </ | ||
- | Update '' | + | Update |
+ | |||
<code bash> | <code bash> | ||
- | | + | sudo rpi-update |
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Mount external disk(s) ==== | ||
+ | |||
+ | Check attached or plugin devices using | ||
+ | |||
+ | <code bash> | ||
+ | sudo blkid | ||
+ | </ | ||
+ | |||
+ | === Format the disk with ext4 === | ||
+ | |||
+ | <code bash> | ||
+ | sudo mkfs.ext4 / | ||
+ | </ | ||
+ | |||
+ | === Mount NTFS formatted disk === | ||
+ | |||
+ | NTFS format has little advantage under Linux system but could mount it as well | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt-get install ntfs-3g | ||
+ | </ | ||
+ | |||
+ | Formatting disk with NTFS | ||
+ | |||
+ | <code bash> | ||
+ | mkfs.ntfs -Q -L diskLabel /dev/sdXY | ||
+ | </ | ||
+ | |||
+ | === Disk mount at booting === | ||
+ | |||
+ | Edit ''/ | ||
+ | |||
+ | Append line(s) with device' | ||
+ | |||
+ | <code ini> | ||
+ | UUID=" | ||
+ | </ | ||
+ | |||
+ | Reboot the system and check the disk mounted. | ||
---- | ---- | ||
==== Configure wireless connection ==== | ==== Configure wireless connection ==== | ||
+ | |||
+ | < | ||
+ | <panel title=" | ||
* Check wireless & configuration '' | * Check wireless & configuration '' | ||
Line 138: | Line 227: | ||
sudo ip link set wlan0 up | sudo ip link set wlan0 up | ||
</ | </ | ||
+ | |||
+ | </ | ||
+ | </ | ||
---- | ---- | ||
- | ==== Mount USB attached drive(s) | + | ==== Set Google Public NTP ==== |
- | + | ||
- | '' | + | |
- | + | ||
- | === format with ext4 === | + | |
- | <code bash> | + | |
- | sudo mkfs.ext4 /dev/sdXY | + | |
- | </ | + | |
- | + | ||
- | === mount ntfs === | + | |
- | + | ||
- | Even thought '' | + | |
- | + | ||
- | <code bash> | + | |
- | sudo apt-get install ntfs-3g | + | |
- | </ | + | |
- | + | ||
- | formatting with NTFS | + | |
- | + | ||
- | <code bash> | + | |
- | mkfs.ntfs -Q -L diskLabel /dev/sdXY | + | |
- | </ | + | |
- | + | ||
- | === mount and booting option | + | |
- | <code bash> | + | <accordion> |
- | sudo vi /etc/fstab | + | <panel title="Under review"> |
- | </code> | + | |
- | + | ||
- | Add line with device' | + | |
- | + | ||
- | UUID="dd7c1879-68c5-e9b9-bad6-789d3b8db984" | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | ==== Set Google Public NTP ==== | + | |
Use either '' | Use either '' | ||
Line 203: | Line 263: | ||
sudo service ntp reload | sudo service ntp reload | ||
</ | </ | ||
+ | |||
+ | </ | ||
+ | </ | ||
---- | ---- | ||
- | ==== Move directories | + | |
- | '' | + | ===== Maintenance |
+ | |||
+ | ==== Useful packages ==== | ||
+ | |||
+ | Initially install the following packages for convenience. | ||
+ | |||
+ | * '' | ||
+ | |||
+ | * '' | ||
+ | |||
+ | * '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Time stamp prompt ==== | ||
+ | |||
+ | Edit '' | ||
<code bash> | <code bash> | ||
- | rsync -av --ignore-existing --remove-source-files /.. / | + | if [ " |
- | find / | + | PS1=' |
+ | else | ||
+ | PS1=' | ||
+ | fi | ||
</ | </ | ||
- | '' | + | Save and load '' |
- | '' | + | <code bash> |
- | + | source ~/.bashrc | |
- | After running '' | + | </ |
---- | ---- | ||
- | ==== hash sum mismatch during apt-get update ==== | ||
- | This problem has something to do with '' | + | ==== Modify login message ==== |
+ | |||
+ | Edit '' | ||
+ | |||
+ | <button type=" | ||
+ | |||
+ | Create | ||
<code bash> | <code bash> | ||
- | sudo vi /etc/apt/source.lists | + | #!/bin/sh |
+ | printf " | ||
+ | df -h /dev/sd* --out=target, | ||
+ | printf " | ||
</ | </ | ||
- | Remove downloaded repository | + | Script shows the information |
- | < | + | < |
- | sudo rm -rf /var/lib/apt/lists/* | + | Mounted on |
- | </ | + | /home/userid/ |
+ | /home/userid/disk2 | ||
+ | </ | ||
- | Change mirror address seemingly to be fast. | + | ---- |
+ | ==== Move directories & files using rsync ==== | ||
- | [[https:// | + | < |
+ | <panel title=" | ||
+ | '' | ||
- | This is a kind of temporary problem due to network condition. | + | <code bash> |
+ | rsync -av --ignore-existing --remove-source-files /.. / | ||
+ | find / | ||
+ | </ | ||
+ | |||
+ | '' | ||
+ | |||
+ | '' | ||
+ | |||
+ | After running '' | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ---- | ||
- | ---- | ||
==== Upgrade Raspbian from Jessie to Stretch ==== | ==== Upgrade Raspbian from Jessie to Stretch ==== | ||
- | [[https:// | + | |
- | [[https:// | + | [[https:// |
<code bash> | <code bash> | ||
- | | + | sudo apt update |
- | sudo apt-get upgrade | + | sudo apt dist-upgrade |
- | sudo apt-get | + | |
</ | </ | ||
Line 254: | Line 360: | ||
<code bash> | <code bash> | ||
- | | + | sudo dpkg -C |
</ | </ | ||
Line 260: | Line 366: | ||
<code bash> | <code bash> | ||
- | | + | sudo apt-mark showhold |
</ | </ | ||
- | Packages showing '' | + | Packages showing '' |
+ | |||
Replace '' | Replace '' | ||
<code bash> | <code bash> | ||
- | | + | sudo sed -i ' |
</ | </ | ||
Line 273: | Line 380: | ||
<code bash> | <code bash> | ||
- | | + | lsb_release -a |
</ | </ | ||
Line 293: | Line 400: | ||
</ | </ | ||
- | After rebooting, modify source list with '' | + | After rebooting, modify source list with '' |
< | < | ||
Line 301: | Line 408: | ||
Edit ''/ | Edit ''/ | ||
- | < | + | < |
deb http:// | deb http:// | ||
</ | </ | ||
Line 311: | Line 418: | ||
</ | </ | ||
+ | Run update and upgrade for '' | ||
- | ---- | + | <code bash> |
+ | sudo apt update | ||
+ | sudo apt dist-upgrade | ||
+ | </ | ||
- | ==== Customize login messages ==== | + | Optional remove (or possible these are supposed to be removed) the followings |
- | edit or append ''/ | + | <code bash> |
+ | sudo apt purge timidity lxmusic gnome-disk-utility deluge-gtk evince wicd wicd-gtk clipit usermode gucharmap gnome-system-tools pavucontrol | ||
+ | </ | ||
- | For example touch ''/ | + | Clean and purge repository for update |
<code bash> | <code bash> | ||
- | #!/bin/sh | + | sudo apt autoremove -y |
- | printf " | + | sudo apt autoclean |
- | df -h /dev/sd* --out=target, | + | sudo reboot |
- | printf " | + | |
</ | </ | ||
- | shows size of disk, used and available capacities of '' | ||
- | <code ini> | + | ---- |
- | Mounted on | + | |
- | / | + | |
- | / | + | |
- | </ | + | |
- | ---- |