exFAT, NTFS, Mount Windows Shares

Pi 64-bit

  • The system already has ntfs-3g installed, but I’ve failed to get mounted and working NTFS formatted USB drive
  • For exFat is still the same
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo apt install exfat-fuse
sudo apt install exfatprogs
sudo apt install exfat-fuse sudo apt install exfatprogs
sudo apt install exfat-fuse
sudo apt install exfatprogs

To mount Windows shared directory:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo mount -t cifs //ip_address/share_name /home/$USER/local_directory -o username=win_user,password=win_pswd,uid=local_user,gid=local_group
sudo mount -t cifs //ip_address/share_name /home/$USER/local_directory -o username=win_user,password=win_pswd,uid=local_user,gid=local_group
sudo mount -t cifs //ip_address/share_name /home/$USER/local_directory -o username=win_user,password=win_pswd,uid=local_user,gid=local_group

Without UID & GID, the directory has been mounted as read-only. To get UID and GID just run the command:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
id
id
id

Resourse: Raspberry Pi exFAT: Adding Support for exFAT File System – Pi My Life Up

Raspberry Pi: MongoDB

Installing MongoDB 7.0 on the Raspberry Pi 5 (Woodworm)

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
curl -fsSL https://pgp.mongodb.com/server-7.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor
curl -fsSL https://pgp.mongodb.com/server-7.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor
curl -fsSL https://pgp.mongodb.com/server-7.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
echo "deb [ arch=arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
sudo apt-get update
echo "deb [ arch=arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list sudo apt-get update
echo "deb [ arch=arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
sudo apt-get update
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo apt-get install -y mongodb-org
sudo apt-get install -y mongodb-org
sudo apt-get install -y mongodb-org
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo chown mongodb:mongodb /var/log/mongodb/
sudo chown mongodb:mongodb /var/lib/mongodb/
sudo chown mongodb:mongodb /var/log/mongodb/ sudo chown mongodb:mongodb /var/lib/mongodb/
sudo chown mongodb:mongodb /var/log/mongodb/
sudo chown mongodb:mongodb /var/lib/mongodb/
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo systemctl enable mongod
sudo systemctl start mongod
sudo systemctl status mongod
sudo systemctl enable mongod sudo systemctl start mongod sudo systemctl status mongod
sudo systemctl enable mongod
sudo systemctl start mongod
sudo systemctl status mongod

Source: Installing MongoDB 7.0 on the Raspberry Pi 5

Install Node.js and NPM on Raspberry Pi

[1: Recommended] for 64-bit only. Raspberry OS 32-bit is already coming with Node-Red pre-installed

you will get:

  1. node.js and npm installed (LTS version)
  2. pigpio module
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

source: Running on Raspberry Pi : Node-RED

(more…)

Install/Upgrade Composer on Raspberry OS

To install/upgrade the Composer:

  • make sure you are in the home directory (cd ~)
  • download the installer
  • [optional] verify the installer (the line is commented, check the current hash from the Composer website)
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
# php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" # php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
# php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

(more…)

Change default Python version (Obsolete)

Change to default python3 version on Raspberry Pi OS:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2
# check the list
sudo update-alternatives --list python
/usr/bin/python2.7
/usr/bin/python3.7
# Change the default version
sudo update-alternatives --config python
There are 2 choices for the alternative python (providing /usr/bin/python).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/python3.7 2 auto mode
1 /usr/bin/python2.7 1 manual mode
2 /usr/bin/python3.7 2 manual mode
Press <enter> to keep the current choice[*], or type selection number:
# now Python 3 is default
python
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2 # check the list sudo update-alternatives --list python /usr/bin/python2.7 /usr/bin/python3.7 # Change the default version sudo update-alternatives --config python There are 2 choices for the alternative python (providing /usr/bin/python). Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/bin/python3.7 2 auto mode 1 /usr/bin/python2.7 1 manual mode 2 /usr/bin/python3.7 2 manual mode Press <enter> to keep the current choice[*], or type selection number: # now Python 3 is default python Python 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>>
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2

# check the list 

sudo update-alternatives --list python
/usr/bin/python2.7
/usr/bin/python3.7

# Change the default version

sudo update-alternatives --config python
There are 2 choices for the alternative python (providing /usr/bin/python).

  Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /usr/bin/python3.7   2         auto mode
  1            /usr/bin/python2.7   1         manual mode
  2            /usr/bin/python3.7   2         manual mode

Press <enter> to keep the current choice[*], or type selection number:

# now Python 3 is default

python
Python 3.7.3 (default, Jul 25 2020, 13:03:44) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

Source: Change default python version on Raspbian GNU/Linux – LinuxConfig.org

Docker On Raspberry Pi (64-bit)

…of course:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo apt update && sudo apt upgrade
sudo apt update && sudo apt upgrade
sudo apt update && sudo apt upgrade

Install docker:

Method 1:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sudo apt install docker.io
sudo apt install docker.io
sudo apt install docker.io

(more…)

Raspberry Pi OS (64-bit Buster) Installation

They “still recommend the 32 bit operating system for all Pis at this time, although have decided it is now time to begin the move toward a 64-bit OS. For the moment this is a ‘beta’ program, the OS is in heavy flux and its functionality is likely to change significantly over the next few months…”

Disadvantages:

  • Still beta, for how long? There is Ubuntu 64-bit, but I  just like Raspbian (Raspberry OS)
  • Almost nothing included, even repository is half full, half empty

Advantages:

  • Adventure!! You do not know what to expect!!
  • 64-bit system, so you have a chance to get newer/latest version of software (some developers/companies dropped support for 32-bit systems, for ex:
    – Visual Code
    – MongoDB
    etc.
  • I think it’s running faster
  • Overstep the limit of 4GB of the memory: Raspberry Pi 4 / 8GB

The one thing I would recommend for now, do not follow the link to download image. Just go:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
https://downloads.raspberrypi.org/raspios_arm64/images/
https://downloads.raspberrypi.org/raspios_arm64/images/
https://downloads.raspberrypi.org/raspios_arm64/images/

You  should see more folders there, dig into the most recent, and download (click) .zip file with the image. Write the image on SD card, USB drive (using for ex: win32diskimager), put into the slot, since Sep 2020 Raspberry Pi 4 can boot directly from USB without SD card –  and start the system. Just install OS on ANY (small, slow, etc.) card, change the settings running

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
raspi-config
raspi-config
raspi-config

… remove card, burn image on USB drive, and get everything installed on it.

Source: Raspberry Pi OS (64 bit) beta test version – Raspberry Pi Forums

Yandex.Metrica