os:arch:arch_on_the_pi
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| os:arch:arch_on_the_pi [2026/08/22 11:51] – removed - external edit (Unknown date) 127.0.0.1 | os:arch:arch_on_the_pi [2026/09/22 14:46] (current) – [Python UnicodeEncodeError horror] Julien Deswaef | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | # Arch on a Pi | ||
| + | |||
| + | Some random notes related to [[http:// | ||
| + | |||
| + | ## Blender | ||
| + | ### Installing from packages on RPi3 | ||
| + | [[https:// | ||
| + | |||
| + | See bottom of this page for the right archive to use at installation: | ||
| + | |||
| + | Rendering a default file seems to require `xvfb`: | ||
| + | < | ||
| + | xvfb-run blender -b -noaudio untitled_e.blend -o // -f 1 | ||
| + | </ | ||
| + | |||
| + | |||
| + | ### Compiling on RPi2 | ||
| + | If it's still not in the repositories, | ||
| + | [[https:// | ||
| + | |||
| + | < | ||
| + | arch=(' | ||
| + | … | ||
| + | make -j4 # -j5 needs 48 GB of RAM while -j9 needs 64 GB | ||
| + | </ | ||
| + | into | ||
| + | < | ||
| + | arch=(' | ||
| + | … | ||
| + | make -j2 | ||
| + | </ | ||
| + | This will get it compiled on the Raspberry Pi 2 itself. It will take a while ( couple hours ). | ||
| + | |||
| + | ## Installing web server | ||
| + | As root | ||
| + | < | ||
| + | pacman -Syu nginx php-fpm | ||
| + | </ | ||
| + | |||
| + | Start and enable nginx and php-fpm | ||
| + | < | ||
| + | systemctl start nginx | ||
| + | systemctl start php-fpm | ||
| + | systemctl enable nginx | ||
| + | systemctl enable php-fpm | ||
| + | </ | ||
| + | |||
| + | Check if it is serving the default pages, but it should be. | ||
| + | |||
| + | Change / | ||
| + | |||
| + | < | ||
| + | user http; | ||
| + | |||
| + | server { | ||
| + | listen | ||
| + | | ||
| + | # watch out for the root location here, must be accessible from the user http | ||
| + | root / | ||
| + | |||
| + | location / { | ||
| + | # add index.php to this line | ||
| + | index index.html index.htm index.php; | ||
| + | } | ||
| + | |||
| + | # pass the PHP scripts to FastCGI server listening on php-fpm.sock | ||
| + | location ~ \.php$ { | ||
| + | fastcgi_pass | ||
| + | fastcgi_index | ||
| + | include | ||
| + | } | ||
| + | |||
| + | </ | ||
| + | |||
| + | ## Installing ikiwiki | ||
| + | Install git and dev tools. | ||
| + | < | ||
| + | $: sudo pacman -Syu git base-devel | ||
| + | </ | ||
| + | |||
| + | Install [[https:// | ||
| + | |||
| + | You'll need 2 extra dependencies from Aur: | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | Install those first. Compiling ikiwiki takes a while on a Raspberry Pi. Be patient. | ||
| + | |||
| + | If you want to have images handle by the wiki, you will need also Imagemagick | ||
| + | |||
| + | Although ikiwiki could be running from any server, I found it easier to run it behind Apache. So be sure to have that installed. | ||
| + | |||
| + | Create an unprivileged user (here called wiki) who will be editing the wiki: | ||
| + | < | ||
| + | sudo useradd -m wiki | ||
| + | sudo passwd wiki | ||
| + | </ | ||
| + | |||
| + | Following https:// | ||
| + | |||
| + | ## Resizing a partition | ||
| + | *Copied from [[http:// | ||
| + | |||
| + | * `sudo fdisk / | ||
| + | * Type `p` to list the partition table | ||
| + | |||
| + | < | ||
| + | | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | * Take note of the start number for partition 2 (if that's the one you want to resize) | ||
| + | * Type `d` to delete a partition. \\ You will then be prompted for the number of the partition you want to delete. In the case above you want to delete partition 2. | ||
| + | * Type `n` to create a new partition. | ||
| + | * This new partition needs to be a primary partition so type `p`. | ||
| + | * Next enter `2` when prompted for a partition number. | ||
| + | * You will now be prompted for the first sector for the new partition. Enter the start number from the partition 2 you deleted before. | ||
| + | * Next you will be prompted for the last sector you can just hit enter to accept the default which will utilize the remaining disk space. | ||
| + | * Type `w` to save the changes you have made. (There will be some error showing saying: " | ||
| + | * Reboot the Pi: `sudo reboot` | ||
| + | * Once the system has reboot and you are back at the commandline enter: '' | ||
| + | * Reboot one more time. | ||
| + | * You can now verify that the system is using the full capacity of the SD Card by entering the following command: `df -h` | ||
| + | |||
| + | #### Why This Works | ||
| + | Actually, when we delete a partition, we don't delete data, we just delete the reference to the partition in the partition table. By creating a new partition exactly from the same spot and of the same type, we keep the data but expanded the size to the full available space of the SD card. | ||
| + | |||
| + | By resizing (which is safe to run on a mounted disk), we tell the file system to use all the space in the new partition. | ||
| + | |||
| + | |||
| + | ## Python UnicodeEncodeError horror | ||
| + | So your Python script works on your machine. But when you port it to a freshly installed Arch Linux Arm on a Pi, all hell breaks loose as soon as a weird character pops up. Something like this shows up: | ||
| + | < | ||
| + | Well, don't start modifying your Python code (as you said, it does not have that problem on your machine). | ||
os/arch/arch_on_the_pi.1787392303.txt.gz · Last modified: by 127.0.0.1
