步骤。
linux机器一台。本人用的是linux mint 13 cinnamon
now we use "dd" promote to copy files into SD card.
dd if=/home/xxx/Downloads/archlinux.img of=/dev/sdX bs=2M
According to the references on https://wiki.archlinux.org/index.php/Raspberry#Installation
The default img is of 2GB.
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 exampleGparted. At the first possible opportunity (after booting RPI or after mounting the card in the computer) need to be adjusted /etc/fstab
cfdisk /dev/sdb
Then:
Now we need to edit /etc/fstab file of /dev/mmcblkp2. /dev/mmcblkp1 is the /boot folder whose format is fat32.
sudo mount /dev/sdb2 /mnt
cd /mnt
sudo vim ./etc/fstab
![](https://img-my.csdn.net/uploads/201212/31/1356930863_3529.png)
you will get more help from :
https://wiki.archlinux.org/index.php/Raspberry#Installation
https://wiki.archlinux.org/index.php/Installation_Guide#Install_the_base_system
https://wiki.archlinux.org/index.php/HOW_TO:_Create_swap_file#Swap_file
After these settings, we need to plug the SD card into Raspberry Pi and boot.
By default, Archlinux on Raspberry Pi will automatically start a SSH daemon service.
We could use:
ssh root@192.168.1.105
password:
password is root by default
Then we get into the Archlinux system over there.
Now we can do these stuff to initiate our Archlinux.
The first operation
Summary of the 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: 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 en_US.UTF-8 UTF-8
and 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 passwd
# passwd root
Adding another user
Using adduser
to add the user.
# adduser
Sudo
Start visudo
# sudo visudo
add the line "USER ALL = (ALL) ALL" below the line root ALL = (ALL) ALL
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 11520 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
Then we get the whole new Archlinux running on Raspberry Pi as we wish :D
Enjoy!