Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
rpi_common [2019/04/13 14:44] β [Upgrade Raspbian from Jessie to Stretch] JΓΊne Park | rpi_common [2024/04/18 08:52] (current) β JΓΊne Park | ||
---|---|---|---|
Line 1: | Line 1: | ||
< | < | ||
* {{fa> | * {{fa> | ||
- | * [[:rpi_common|General Things on Raspbian]]Β | + | * [[rpi_common|β General Things on Raspbian]]Β |
- | * [[:rpi_autism|Media Ditorium β AUTiSM Rainbow]]Β | + | * [[rpi_nimbus|ππ’ππππ πππΉππππ]]Β |
- | * [[:rpi_epigen|Private Cellarium β EPiGEN Crystal]]Β | + | * [[debian_common|β General info on Debian Linux]]Β |
- | * [[:rpi_nimbus|Webius Officium β NiMBUS deBlanc]]Β | + | * [[deb_cicada|ππ’ππππ πππ©π π₯π¦π]]Β |
- | * [[: | + | * [[deb_mutism|ππππ’ππ πππππ¦π]] Β |
- | * [[:deb_mutism|Opus Imperium β MUTiSM Magnum]] | + | * [[deb_gilead|ππ’ππππ πΈπ£ππππ₯π]] Β |
+ | * [[deb_symbio|πππππ’π βπ πππ₯π¦π€]]Β | ||
+ | * [[deb_tardis|πππππ’π ππ‘ππ₯ππ¦π]] Β | ||
+ | * [[deb_debris|πππππ’π βππ£π ππ]] | ||
* {{fa> | * {{fa> | ||
- | * [[: | + | * [[: |
- | * [[: | + | * [[PC_MESONiSM|ππππππ’ππ]] Β |
- | * [[: | + | * [[PC_MESONiST|ππππππ’ππ]] |
- | * [[: | + | |
- | * [[: | + | |
* {{fa> | * {{fa> | ||
- | * [[: | + | * [[: |
- | * [[: | + | * [[CELL_EPiCON|πππ’πππ π½π]] Β |
- | * [[: | + | * [[CELL_EPiMER|πππ’πππ π‘]] Β |
- | * [[: | + | * [[CELL_EPiLUX|πππ’πππ π]] |
- | * [[: | + | * [[CELL_EPiTAP|πππ’πππ ππ]] Β |
- | * [[: | + | * [[CELL_EPiETA|πππ’πππ π]] |
</ | </ | ||
- | ===== 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 115: | ||
<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 '' | ||
* Change proper configuration with editing ''/ | * Change proper configuration with editing ''/ | ||
- | {{fa> | + | {{fa> |
<code ini> | <code ini> | ||
Line 138: | Line 226: | ||
sudo ip link set wlan0 up | sudo ip link set wlan0 up | ||
</ | </ | ||
+ | |||
+ | </ | ||
+ | </ | ||
---- | ---- | ||
- | |||
- | ==== Mount USB attached drive(s) ==== | ||
- | |||
- | '' | ||
- | |||
- | === format with ext4 === | ||
- | <code bash> | ||
- | sudo mkfs.ext4 / | ||
- | </ | ||
- | |||
- | === 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> | ||
- | sudo vi /etc/fstab | ||
- | </ | ||
- | |||
- | Add line with device' | ||
- | |||
- | UUID=" | ||
- | |||
- | ---- | ||
==== Set Google Public NTP ==== | ==== Set Google Public NTP ==== | ||
+ | |||
+ | < | ||
+ | <panel title=" | ||
Use either '' | Use either '' | ||
Line 203: | Line 262: | ||
sudo service ntp reload | sudo service ntp reload | ||
</ | </ | ||
+ | |||
+ | </ | ||
+ | </ | ||
---- | ---- | ||
+ | |||
+ | ===== Maintenance & Operation ===== | ||
+ | |||
+ | ==== Useful packages ==== | ||
+ | |||
+ | Initially install the following packages for convenience. | ||
+ | |||
+ | * '' | ||
+ | |||
+ | * '' | ||
+ | |||
+ | * '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Time stamp prompt ==== | ||
+ | |||
+ | Edit '' | ||
+ | |||
+ | <code bash> | ||
+ | if [ " | ||
+ | PS1=' | ||
+ | else | ||
+ | PS1=' | ||
+ | fi | ||
+ | </ | ||
+ | |||
+ | Save and load '' | ||
+ | |||
+ | <code bash> | ||
+ | source ~/ | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Modify login message ==== | ||
+ | |||
+ | Edit ''/ | ||
+ | |||
+ | <button type=" | ||
+ | |||
+ | Create '' | ||
+ | |||
+ | <code bash> | ||
+ | #!/bin/sh | ||
+ | printf " | ||
+ | df -h /dev/sd* --out=target, | ||
+ | printf " | ||
+ | </ | ||
+ | |||
+ | Script shows the information of the attached disks, which also reminds whether disk is mounted or not. | ||
+ | |||
+ | <code ini> | ||
+ | Mounted on | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ---- | ||
==== Move directories & files using rsync ==== | ==== Move directories & files using rsync ==== | ||
+ | |||
+ | < | ||
+ | <panel title=" | ||
'' | '' | ||
Line 218: | Line 342: | ||
After running '' | After running '' | ||
+ | </ | ||
+ | </ | ||
---- | ---- | ||
- | ==== hash sum mismatch during apt-get update ==== | ||
- | |||
- | This problem has something to do with '' | ||
- | |||
- | <code bash> | ||
- | sudo vi / | ||
- | </ | ||
- | |||
- | Change mirror address seemingly to be fast. | ||
- | [[https:// | + | ==== Upgrade |
- | This is a kind of temporary problem due to network condition. Β | + | [[https:// |
- | Β | + | |
- | ---- Β | + | |
- | ==== Upgrade Raspbian from Jessie to Stretch ==== Β | + | |
- | [[https:// | + | |
- | [[https:// | + | |
<code bash> | <code bash> | ||
- | | + | sudo apt update Β |
- | sudo apt-get upgrade Β | + | sudo apt dist-upgrade |
- | sudo apt-get | + | |
</ | </ | ||
Line 248: | Line 359: | ||
<code bash> | <code bash> | ||
- | | + | sudo dpkg -C |
</ | </ | ||
Line 254: | Line 365: | ||
<code bash> | <code bash> | ||
- | | + | sudo apt-mark showhold |
</ | </ | ||
- | Packages showing '' | + | Packages showing '' |
+ | |||
Replace '' | Replace '' | ||
<code bash> | <code bash> | ||
- | | + | sudo sed -i ' |
</ | </ | ||
Line 267: | Line 379: | ||
<code bash> | <code bash> | ||
- | | + | lsb_release -a |
</ | </ | ||
---- | ---- | ||
- | ==== Customize login messages ==== | ||
- | edit or append ''/ | + | ==== Upgrade Raspbian from Stretch |
- | For example touch ''/ | + | Preparing upgrade |
<code bash> | <code bash> | ||
- | #!/bin/shΒ | + | sudo apt update |
- | printf " | + | sudo apt dist-upgrade |
- | df -h / | + | |
- | printf " | + | |
</ | </ | ||
- | shows size of disk, used and available capacities of '' | + | Update Raspberry Pi's firmware, |
- | < | + | < |
- | Mounted on | + | sudo rpi-update |
- | / | + | |
- | / | + | |
</ | </ | ||
+ | |||
+ | After rebooting, modify source list with '' | ||
+ | |||
+ | < | ||
+ | deb http:// | ||
+ | </ | ||
+ | |||
+ | Edit ''/ | ||
+ | |||
+ | < | ||
+ | deb http:// | ||
+ | </ | ||
+ | |||
+ | To optimize upgrading process, remove '' | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt-get remove apt-listchanges | ||
+ | </ | ||
+ | |||
+ | Run update and upgrade for '' | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt update | ||
+ | sudo apt dist-upgrade | ||
+ | </ | ||
+ | |||
+ | Optional remove (or possible these are supposed to be removed) the followings | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt purge timidity lxmusic gnome-disk-utility deluge-gtk evince wicd wicd-gtk clipit usermode gucharmap gnome-system-tools pavucontrol | ||
+ | </ | ||
+ | |||
+ | Clean and purge repository for update and reboot finally. | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt autoremove -y | ||
+ | sudo apt autoclean | ||
+ | sudo reboot | ||
+ | </ | ||
+ | |||
---- | ---- | ||
+ | |||
+ |