Ads 468x60px

##EasyReadMore##

25 12月, 2016

在 Raspberry Pi 安裝、設定 Arch Linux

安裝 Arch Linux
先準備一張沒用的 SD card (速度不要太慢 不然執行os時會想死)
下面看不懂就照著粗體字輸入即可
 Replace sdX in the following instructions with the device name for the SD card as it appears on your computer.
當 mount 
  1. Start fdisk to partition the SD card:
    fdisk /dev/sdX
  2. At the fdisk prompt, delete old partitions and create a new one:
    1. Type o. This will clear out any partitions on the drive.
    2. Type p to list partitions. There should be no partitions left.
    3. Type n, then p for primary, 1 for the first partition on the drive, press ENTER to accept the default first sector, then type +100M for the last sector.
    4. Type t, then c to set the first partition to type W95 FAT32 (LBA).
    5. Type n, then p for primary, 2 for the second partition on the drive, and then press ENTER twice to accept the default first and last sector.
    6. Write the partition table and exit by typing w.
  3. Create and mount the FAT filesystem:
    mkfs.vfat /dev/sdX1
    mkdir boot
    mount /dev/sdX1 boot
  4. Create and mount the ext4 filesystem:
    mkfs.ext4 /dev/sdX2
    mkdir root
    mount /dev/sdX2 root
  5. Download and extract the root filesystem (as root, not via sudo):
    wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-latest.tar.gz
    bsdtar -xpf ArchLinuxARM-rpi-latest.tar.gz -C root
    sync
  6. Move boot files to the first partition:
    mv root/boot/* boot
  7. Unmount the two partitions:
    umount boot root
  8. Insert the SD card into the Raspberry Pi, connect ethernet, and apply 5V power.
  9. Use the serial console or SSH to the IP address given to the board by your router.
    • Login as the default user alarm with the password alarm.
    • The default root password is root.

設定 Arch Linux

讓ssh 可以 root 登錄:

vim /etc/ssh/sshd_config
#PermitRootLogin prohibit-password
PermitRootLogin yes
修改root密碼:
passwd
更新全系統:
pacman -Syy
pacman -Syu
reboot
因為要編輯設定檔,所以安裝習慣的Vim編輯器:
pacman -S vim
設定時區:
修改/etc/timezone裡的值為Aisa/Taipei (我在台北)
mv /etc/localtime /etc/localtime.old
ln -s /usr/share/zoneinfo/Asia/Taipei /etc/localtime
變更開機的systemd target為multi-user.target(原本是graphical.target):
mv /usr/lib/systemd/system/default.target /usr/lib/systemd/system/default.target.old
ln -s /usr/lib/systemd/system/multi-user.target /usr/lib/systemd/system/default.target
建構Raspberry Pi with Arch Linux ARM @ StarNight's Blog :: 隨意窩 Xuite日誌 -
Raspberry Pi | Arch Linux ARM - https://goo.gl/vdIZiehttps://goo.gl/sKvnsZ

0 意見:

張貼留言

 
Blogger Templates