Install Archlinux on Raspberry Pi as you wish!
来源:互联网 发布:qq群地址优化 编辑:程序博客网 时间:2024/06/06 06:47
The easiest way to install archlinux on raspberry PI.
now you need to input these command promotes.
dd if=/home/xx/Downloads/archlinux.img of=/dev/sdX bs=2M
then
you need to plug the SD card into raspberry Pi
Then boot
By default, the user name and password are both "root"
After logging in, you need to check out all your devices with command promotes :
fdisk -l /dev/mmcblk0
then you will find there are two partitions down there by default for archlinux installation.
The first one is /dev/mmcblk0p1 which is the "/boot" folder whose format is fat32.
The second partition is /dev/mmcblk0p2 which is the "/" folder whose format is ext4.
Now we need to use the rest free space of the SD card disk.
So, we input those commands :
cfdisk /dev/mmcblk0Using cfdisk to mange the partition label of the SD card.
Also we could use fdisk. But fdisk needs us to give the specific bytes to make the partition room, which is too precise.
Anyway both cfdisk and fdisk make sense.
now we make a 1GB room for swap, and the rest for folder "/home"
TIPS:
Now if we use
fdisk -l /dev/mmcblk0we will only see two partitions those which are /dev/mmcblk0p1 and /dev/mmcblk0p2.
We can't see the other two partitions /dev/mmcblk0p3, /dev/mmcblk0p4 those which we have divided from the rest free space of the SD card.
All we need is to reboot the raspberry pi.
reboot
then
fdisk -l /dev/mmcblk0
[root@alarmpi ~]# fdisk -l /dev/mmcblk0Disk /dev/mmcblk0: 15.9 GB, 15931539456 bytes4 heads, 16 sectors/track, 486192 cylinders, total 31116288 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x000c21e5 Device Boot Start End Blocks Id System/dev/mmcblk0p1 * 2048 194559 96256 c W95 FAT32 (LBA)/dev/mmcblk0p2 194560 3862527 1833984 83 Linux/dev/mmcblk0p3 3862528 5862527 1000000 82 Linux swap / Solaris/dev/mmcblk0p4 5862528 31116287 12626880 83 Linux
now we can get all those partitions.
Now we need to have swap and format the partition /dev/mmcblk0p4
mkswap /dev/mmcblk0p3swapon /dev/mmcblk0p3mkfs.ext4 /dev/mmcblk0p4
now we need to edit the /etc/fstab
make it like this:
# # /etc/fstab: static file system information## <file system> <dir> <type> <options> <dump> <pass>devpts /dev/pts devpts defaults 0 0shm /dev/shm tmpfs nodev,nosuid 0 0/dev/mmcblk0p1 /boot vfat defaults 0 0/dev/mmcblk0p2 / ext4 defaults 0 0/dev/mmcblk0p3 none swap defaults 0 0/dev/mmcblk0p4 /home ext4 defaults 0 0
Alright.
Now we make it.
We need to upgrade the archlinux syntactically.
So we need to edit the file
vi /etc/pacman.d/mirrorlist
then, uncomment the links below if the place is supposed near your location.
then
pacman -Sy
so we need to uncomment /etc/locale.gen if there is a locale you want to have. :)
And
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
(because i am in China, so it's Shanghai. It depends on where you are.)
Also, you could change /etc/hostname, or never mind.
Now you need to add a new user
you could use :
adduser
and you could install sudo
pacman -S sudo
Then edit the file sudoers by commands
sudo visudo
then,
add the line "USER ALL = (ALL) ALL" below the line root ALL = (ALL) ALL
Now reboot your computer. It is a clean and fast one.
Or you want to install video driver or get into serial console.
https://wiki.archlinux.org/index.php/Raspberry#Installation
At the bottom of the page, those reference maybe help.
Cheers!
- Install Archlinux on Raspberry Pi as you wish!
- raspberry Pi on Archlinux, Install wiringPi , GPIO
- [raspberry pi] install logitech media server on raspberry pi
- Raspberry Pi 定制Archlinux
- On Raspberry Pi , Using Raspbian to install LNMP
- Install MongoDB and Node.js on a Raspberry Pi
- 在Raspberry Pi上安装ArchLinux
- on raspberry Pi, build Quake3
- enable airplay on raspberry pi
- Run TeamViewer on Raspberry Pi
- How to install or upgrade UV4L on Raspbian (for the Raspberry Pi)
- 树莓派(raspberry pi) Installing ROS Indigo on Raspberry Pi
- raspberry pi 2 install Ubuntu 14.04 LTS
- Install Android Studio On Archlinux
- raspberry pi 用 Archlinux 搭建 LNMP Nginx, MySQL, PHP
- Sound configuration on Raspberry Pi with ALSA
- Raspberry Pi -- Cross Compiling on Mac OSX
- GStreamer 1.2 on the Raspberry Pi
- 小空间大智慧 小户型装修地板选择
- 一个线程函数模板
- Android HAL实例解析
- Linux系统使用命令
- 模板的全特化与偏特化
- Install Archlinux on Raspberry Pi as you wish!
- [Spring3.x源码]AOP(一)例子
- 代码生成利器-NCodeGenerate 教程(4) CodeSmith模板转换
- 全志A10的uboot启动不了," not definedot_normal
- 2440lcd
- APK更新时,发生<签名冲突>报错
- UVA 644 Immediate Decodability
- Linux那些事儿之我是Sysfs(2)linux设备底层模型
- Floyd(最短路径问题)