2021-12-05 CommentsArch123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475# vim /etc/pacman.d/mirrorlist## 163 mirrorServer = http://mirrors.163.com/archlinux/$repo/os/$arch## aliyun mirrorServer = http://mirrors.aliyun.com/archlinux/$repo/os/$arch# timedatectl set-ntp true# fdisk -l# mkfs.ext2 /dev/sda1# mkswap /dev/sda2# swapon /dev/sda2//try mkfs.xfs, but failed to boot after installation# mkfs.ext4 /dev/mapper/vg_root-lv_root# mkdir /mnt/boot# mount /dev/mapper/vg_root-lv_root /mnt# mount /dev/sda1 /mnt/boot# pacstrap /mnt base linux linux-firmware# genfstab -U /mnt >> /mnt/etc/fstab# arch-chroot /mnt# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime# hwclock --systohc# vim /etc/locale.confLANG=en_US.UTF-8# locale-gen# vim /etc/hostnamearch-tmux# 修改mkinitcpio.conf的动作仅需在启用LVM的时候操作,如果根目录ext4,则无需- [虚拟机中archlinux尝试LVM分区](https://www.cnblogs.com/Z-X-L/archive/2013/01/26/2878091.html)# vim /etc/mkinitcpio.confmkinitcpio 的 lvm 设定HOOKS=“...”那一行中加入 lvm2注意这个 HOOKS 里边模块的顺序就是加载顺序lvm2 必须在filesystems 前边MODULES=(dm_mod)HOOKS=(base udev ... lvm2 filesystems)# mkinitcpio -P# pacman -S grub# vim /etc/default/grubGRUB_PRELOAD_MODULES="part_gpt part_msdos lvm"# grub-install --target=i386-pc /dev/sda# grub-mkconfig -o /boot/grub/grub.cfg# passwd# exit# rebootReferenceArch Installation guideLVM虚拟机中archlinux尝试LVM分区安装 archlinux 之使用 lvmxorg1234567pacman -S xorg/usr/bin/Xorg -configureX -config ./xorg.conf.newX -config ./xorg.conf.new -retro