Skip to content

Commit

Permalink
Update create-rootfs.sh
Browse files Browse the repository at this point in the history
comment china mirror
  • Loading branch information
rayae authored Sep 4, 2024
1 parent d17aa2d commit 4e4d551
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions create-rootfs.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# 默认镜像
default_mirror="https://mirror.leaseweb.net"
#default_mirror="https://mirror.leaseweb.net"

rootfs=/mnt/rootfs
root_password="arch1234"
Expand Down Expand Up @@ -35,13 +35,13 @@ set -e
# set -x

# 初始化 Pacman
echo "Server = $default_mirror/archlinux/\$repo/os/\$arch" >| /etc/pacman.d/mirrorlist
#echo "Server = $default_mirror/archlinux/\$repo/os/\$arch" >| /etc/pacman.d/mirrorlist
pacman-key --init && pacman-key --populate && pacman -Sy --noconfirm archlinux-keyring && pacman -Syy --noconfirm

# 安装环境需要的基础软件
pacman -S --noconfirm base-devel arch-install-scripts wget curl zip unzip vim sed pacman-contrib openssl
# 选取最快的 6 个软件镜像
curl -s "https://archlinux.org/mirrorlist/?country=CN&protocol=https&use_mirror_status=on)" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 6 - | sudo tee /etc/pacman.d/mirrorlist
## 选取最快的 6 个软件镜像
#curl -s "https://archlinux.org/mirrorlist/?country=CN&protocol=https&use_mirror_status=on)" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 6 - | sudo tee /etc/pacman.d/mirrorlist
pacman -Syy --noconfirm

# 创建 rootfs
Expand Down

0 comments on commit 4e4d551

Please sign in to comment.