vbox下安装archlinux

来源:互联网 发布:大数据关键技术是什么 编辑:程序博客网 时间:2024/06/06 07:04

从(http://mirrors.ustc.edu.cn/archlinux/iso/)下载archlinux
在vbox中启动安装介质,默认关闭uefi
一路默认,一直到磁盘分配
输入

# lsblk

确认要安装系统的磁盘,接下来选择磁盘分区的类型,这里选择了MBR,分区工具选择了PARTED
这里选择对sda进行分区

# parted /dev/sda

创建MBR分区表

(parted) mklabel msdos

下面实行最简单的分区方法

(parted) mkpart primary ext4 1MiB 100%(parted) set 1 boot on# lsblk /dev/sda# mkfs.ext4 /dev/sda1

把根目录挂载到/mnt目录下

# mount /dev/sda1 /mnt

选择镜像源,/etc/pacman.d/mirrorlist,把需要选择的源开头的注释去掉即可,这里选着163和ustc的源
安装基础包

# pacstrap -i /mnt base base-devel

生成fstab文件

# genfstab -U /mnt > /mnt/etc/fstab

Change root

# arch-chroot /mnt /bin/bash

Locale
The Locale defines which language the system uses, and other regional considerations such as currency denomination, numerology, and character sets.Possible values are listed in /etc/locale.gen. Uncomment en_US.UTF-8 UTF-8, as well as other needed localisations. Save the file, and generate the new locales:

# locale-gen

Create /etc/locale.conf, where LANG refers to the first column of an uncommented entry in /etc/locale.gen:

/etc/locale.confLANG=en_US.UTF-8

剩下的按照教程走
安装后重启发现不能联网,在命令行输入dhcpcd eth0即可
参见这边文章安装xfce
在linux下配置python-scrapy的环境
需要注意python3与scrapy不兼容,安装scrapy前需要把系统默认的python版本换成2.7,否则需要把pip和scrapy全部卸载,重新在2.7的版本下安装

0 0