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 [2019/04/13 14:44] โ [Upgrade Raspbian from Jessie to Stretch] Jรบne Park | rpi_common [2024/04/18 08:47] โ 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> | ||
- | * [[: | + | * [[: |
* [[: | * [[: | ||
- | * [[: | ||
* [[: | * [[: | ||
- | * [[: | ||
* {{fa> | * {{fa> | ||
- | * [[: | + | * [[: |
- | * [[: | + | |
- | * [[: | + | |
- | * [[: | + | |
- | * [[: | + | |
- | * [[: | + | |
</ | </ | ||
- | ===== 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 111: | ||
<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 222: | ||
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> ย | + | |
- | sudo vi / | + | |
- | </ | + | |
- | ย | + | |
- | Add line with device' | + | |
- | ย | + | |
- | UUID=" | + | |
- | ----ย | + | < |
- | ย | + | <panel title="Under review"> |
- | ==== Set Google Public NTP ==== | + | |
Use either '' | Use either '' | ||
Line 203: | Line 258: | ||
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 338: | ||
After running '' | After running '' | ||
+ | </ | ||
+ | </ | ||
---- | ---- | ||
- | ==== hash sum mismatch during apt-get update ==== | ||
- | This problem has something | + | ==== Upgrade Raspbian from Jessie |
- | ย | + | |
- | <code bash> ย | + | |
- | sudo vi / | + | |
- | </ | + | |
- | Change mirror address seemingly to be fast. ย | + | [[https:// |
- | ย | + | |
- | [[https:// | + | |
- | ย | + | |
- | This is a kind of temporary problem due to network condition. ย | + | |
- | ย | + | |
- | ---- ย | + | |
- | ==== 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 355: | ||
<code bash> | <code bash> | ||
- | | + | sudo dpkg -C |
</ | </ | ||
Line 254: | Line 361: | ||
<code bash> | <code bash> | ||
- | | + | sudo apt-mark showhold |
</ | </ | ||
- | Packages showing '' | + | Packages showing '' |
+ | |||
Replace '' | Replace '' | ||
<code bash> | <code bash> | ||
- | | + | sudo sed -i ' |
</ | </ | ||
Line 267: | Line 375: | ||
<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 | ||
+ | </ | ||
+ | |||
---- | ---- | ||
+ | |||
+ |