页次: 1
方便下次安装用的,只一堆命令序列,可直接粘贴到 shell 中。不解释。后期加工过,可能有误。
mkfs.ext4 /dev/sda1
mkfs.btrfs -f /dev/sda2
mount -o compress=lzo,space_cache /dev/sda2 /mnt
cd /mnt
mkdir -p run backup
btrfs subvolume create run/current
btrfs subvolume set-default $(btrfs subvolume list .|awk '$9 == "run/current" { print $2 }') .
cd
umount /mnt
mount -o compress=lzo /dev/sda2 /mnt
mkdir -p /mnt/boot
mount /dev/sda1 /mnt/boot
echo 'Server = http://mirrors.163.com/archlinux/$repo/os/$arch' > /etc/pacman.d/mirrorlist
pacstrap /mnt base
genfstab -p /mnt >> /mnt/etc/fstab
arch-chroot /mnt
echo lilytest > /etc/hostname
ln -s ../usr/share/zoneinfo/Asia/Shanghai /etc/localtime
sed -i '/zh_CN.UTF-8/s/^#//' /etc/locale.gen
locale-gen
echo 'LANG=en_US.UTF-8' > /etc/locale.conf
sed -i 's/^BINARIES=.*/BINARIES="btrfs"/; /COMPRESSION="xz"/s/^#//; /^HOOKS/s/ fsck//' /etc/mkinitcpio.conf
pacman -S --noconfirm --needed btrfs-progs grub openssh
mkinitcpio -p linux
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
systemctl enable sshd
systemctl enable dhcpcd
exit
reboot
离线
离线
上传到aur吧?名字就叫:
arch-vbox-autoinstall
哈哈!
还不够完整呢。
离线
页次: 1