Difference between revisions of "Raspberry Pi"

From ArchWiki
Jump to: navigation, search
(Adding another user)
(Serial Console)
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{delete|Archlinuxarm is a seperate project.  The lead dev for alarm does not support this page.}}
 
 
[[Category:Getting and installing Arch]]
 
[[Category:Getting and installing Arch]]
 
{{Note|Support for the ARM architecture is provided on http://archlinuxarm.org/ }}
 
{{Note|Support for the ARM architecture is provided on http://archlinuxarm.org/ }}
Line 11: Line 10:
 
== Installing Arch Linux ARM ==
 
== Installing Arch Linux ARM ==
  
In this manual will describe only essential moments for different RPI. Other procedures are the same instructions for ArchLinux. The only exception is the basic initialization and installation of equipment. It is further assumed that the configuration is performed on a machine running Archlinux.
+
See the [http://archlinuxarm.org/platforms/armv6/raspberry-pi#qt-platform_tabs-ui-tabs2 archlinuxarm documentation].
 
+
=== Backup Cards ===
+
If you own an official card provided with your RPI ([http://uk.farnell.com/samsung/raspberry-pi-prog-4gb-sdcard/memory-sdcard-raspberry-pi-4gb/dp/2113756 for example]) recommend before installing Arch ARM Linux to backup using {{ic|dd}}. The path must be specified to the device {{ic|/dev/sdX}} not for another partition {{ic|/dev/sdc1}}
+
 
+
# dd if=/dev/sdX of=$HOME/backup_RPi.img
+
 
+
{{Note | There is a bit copy of the card. The resulting file is the same size as your card.}}
+
{{Note | card may not be installed.}}
+
{{Warning | Bad parameters can damage your data.}}
+
 
+
=== Installation ===
+
 
+
Installation is similar to backing card. Download the image file from [http://archlinuxarm.org/platforms/armv6/raspberry-pi Arch Linux ARM]
+
 
+
# dd bs=1M if=/path/to/archlinux.img of=/dev/sdX
+
 
+
After inserting the card into the slot on the PPi should boot the base system Arch Linux ARM.
+
 
+
=== Home ===
+
 
+
The downloaded image file is approximately 2 gigabytes of which is /boot 94 megabytes and / 1.8 gigabytes. If you used a larger card to 2GB, so I recommend the rest of the card to connect as /home (or /usr). Clearance must be formatted using the example [[Gparted]]. At the first possible opportunity (after booting RPI or after mounting the card in the computer) need to be adjusted {{ic | /etc/fstab}}
+
 
+
# sudo vim /etc/fstab
+
 
+
For example, add
+
 
+
/dev/mmcblk0p3 /home ext4 defaults 0 0
+
 
+
== The first operation ==
+
 
+
Summary of the [http://archlinuxarm.org/support/guides/system/first-steps official procedure]:
+
 
+
=== Remote SSH access ===
+
 
+
If you do not use the HDMI output RPI and you will access the device using SSH, the following applies.
+
Root pasword is: {{ic | root}}. I recommend to perform key exchange [[SSH_Keys]].
+
 
+
$ ssh root@192.168.1.123 (Use your Ip RPI)
+
 
+
=== Localization ===
+
 
+
# vim /etc/locale.gen
+
 
+
uncomment {{ic | en_US.UTF-8 UTF-8}} and {{ic | en_US ISO-8859-2}}
+
 
+
generate localization files
+
 
+
# locale-gen
+
 
+
=== Setting the time and date using OpenNTP ===
+
 
+
dopnit
+
 
+
=== Setting the time and date manually ===
+
 
+
complete
+
 
+
=== Changing the root password ===
+
After the first start RPI is native root password to root. It is therefore necessary to change it. Executed after power command {{ic | passwd}}
+
 
+
# passwd root
+
 
+
=== Adding another user ===
+
Using {{ic|useradd}} to add the user.
+
 
+
# useradd username
+
 
+
=== Sudo ===
+
Start {{ic|visudo}}
+
 
+
# su -
+
# visudo
+
 
+
add the line "USER ALL=(ALL) ALL" below the line root ALL=(ALL) ALL, where "USER" is your username
+
  
 
== Video ==
 
== Video ==
Line 97: Line 22:
 
  # loglevel=5
 
  # loglevel=5
  
Change speed from 11520 to 38400
+
Change speed from 115200 to 38400
 
  # console=ttyAMA0,38400 kgdboc=ttyAMA0,38400
 
  # console=ttyAMA0,38400 kgdboc=ttyAMA0,38400
  
Line 104: Line 29:
  
 
Enable on boot
 
Enable on boot
  #systemctl enable getty@ttyAMA0.service
+
  # systemctl enable getty@ttyAMA0.service
  
 
Creating the proper service link:
 
Creating the proper service link:

Revision as of 14:03, 27 February 2013

Note: Support for the ARM architecture is provided on http://archlinuxarm.org/

How mature is Raspberry Pi (RPI). A brief overview.

What is Raspberry Pi

It is a minimalist computer built for ARMv6 architecture. More information about this project and technical specification.

Installing Arch Linux ARM

See the archlinuxarm documentation.

Video

The generic xf86-video-fbdev driver can be used.

Serial Console

Edit the default /boot/cmdline.txt

Change loglevel to 5 to see boot messages

# loglevel=5

Change speed from 115200 to 38400

# console=ttyAMA0,38400 kgdboc=ttyAMA0,38400

Start getty service

# systemctl start getty@ttyAMA0

Enable on boot

# systemctl enable getty@ttyAMA0.service

Creating the proper service link:

# ln -s /usr/lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@ttyAMA0.service

Then connect :)

# screen /dev/ttyUSB0 38400
Referenced from these [1] posts [2]