Formatting an SDXC card for use with NOOBS [32-bit]

The standard formatting tools built into Windows are limited, as they only allow partitions up to 32GB to be formatted as FAT32, so to format a 64/128GB partition as FAT32 you need to use a third-party formatting tool.

A simple tool to do this is FAT32 Format which downloads as a single file named guiformat.exe – no installation is necessary.
GUI version does not work with more than one USB connected devices and SD card adapter is not the first one. I had to download command line version fat32format.exe

Run the SD Formatter tool first to ensure that any other partitions on the SD card are deleted. Then run the FAT32 Format (guiformat.exe) tool, ensure you choose the correct drive letter, leave the other options at their default settings, and click “Start”. After it has finished, you can proceed with the rest of the NOOBS instructions.

(more…)

Change default Python version

Change to default python3 version on Raspberry Pi OS:

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

Install PHP

sorry guys, listed at the bottom, but sometimes, i think, you are caring more about your seo rating than about people.
the topic is hot: ‘Buster’, but the same for Pi-32. except the fact that, for Pi-32 phpmyadmin (sudo apt install phpmyadmin [?]) will do everything for you

It’s really not ‘a rocket science’:

sudo apt install php

Unfortunately, only basic/common modules will be install: no mbstring, myswl, etc. will be supported. So

sudo apt install php-cli php-common php-curl php-gd php-mbstring php-mysql php-xml php-phpseclib php-mysqli php-pear php-gettext libapache2-mod-php php-zip

If you are planning to upload huge files, as me, go to

sudo nano /etc/php/7.3/apache2/php.ini

i did not set any specific version in ‘sudo apt install php-cli php-common php-curl php-gd php-mbstring’, so the latest will be installed. BUT, in ‘sudo nano /etc/php/7.3/apache2/php.ini’ you can see 7.3. that’s the current version installed at the time of writing.

… and search for ‘max’ and change the values. for ex:

post_max_size = 256M
upload_max_filesize = 256M

find them, put a values you want, save it, but do not forget

sudo service apache2 restart

Sources: https://computingforgeeks.com/install-php-on-debian-10-buster/

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
sudo apt install exfat-fuse

Pi 32-bit: Let’s add exFat and NTFS support to our Raspberry Pi:

sudo apt update
sudo apt upgrade
sudo apt install exfat-fuse
sudo apt install ntfs-3g

To mount Windows shared directory:

sudo mount -t cifs //ip_address/share_name /home/pi/local_dir -o username=win_user,password=win_pswd,uid=local_user,gid=local_group

Without uid & gid, the directory has been mounted as read-only

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

Unable to create directory

the title was “WordPress: Unable to create directory”, but unfortunately, error “unable to create directory” occurred with trying to add theme, plugin, media file, update WordPress or any other websites uploaded with sftp

first step is to add the current user to the group www-data (Apache)

sudo gpasswd -a "$USER" www-data

sudo chown -R “$USER”:www-data /var/www – not sure in this step

(more…)

Yandex.Metrica