Device Start End Sectors Size Type /dev/sda1 2048 526335 524288 256M EFI System /dev/sda2 526336 2623487 2097152 1G Linux swap /dev/sda3 2623488 19400703 16777216 8G Linux filesystem /dev/sda4 19400704 60549086 41148383 19.6G Linux filesystem
创建一个gpt分区列表
1 2 3
Command (m forhelp):g
Created a new GPT disklabel (GUID: 87EA4497-2722-DF43-A954-368E46AE5C5F).
如果当前存在其他的分区,可以选择将分区删除
1 2 3
Command (m forhelp):d
Partition number (1-4): 1
创建一个efi分区,大小建议256MB
1 2 3 4 5 6 7
Command (m forhelp):n
Partition number (1-128, default 1): 1 First sector (2048-60549086, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-60549086, default 60549086): +256M
Created a new partition 1 of type'Linux filesystem' and of size 256 MiB.
1 2 3 4 5
Command (m forhelp):t
Selected partition 1 Partition type (type L to list all types): 1 Changed type of partition 'Linux filesystem' to 'EFI System'.
创建一个swap分区
1 2 3 4 5 6 7
Command (m forhelp):n
Partition number (2-128, default 2): First sector (526336-60549086, default 526336): Last sector, +/-sectors or +/-size{K,M,G,T,P} (526336-60549086, default 60549086): +4G
Created a new partition 2 of type'Linux filesystem' and of size 4 GiB.
1 2 3 4 5 6
Command (m forhelp):t
Partition number (1,2, default 2): 2 Partition type (type L to list all types): 19
Changed type of partition 'Linux filesystem' to 'Linux swap'.
# These settings were set by the catalyst build script that automatically # built this stage. # Please consult /usr/share/portage/config/make.conf.example for a more # detailed example. COMMON_FLAGS="-march=native -O3 -pipe -fstack-protector-strong"#设置编译参数(-march=native可以根据cpu指令集进行优化,-O3优化级别) CFLAGS="${COMMON_FLAGS}"#C编译参数 CXXFLAGS="${COMMON_FLAGS}"#C++编译参数 FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" ACCEPT_KEYWORDS="amd64"#可接受的软件包等级(稳定与不稳定)(这里为全局keyworkds,若想为特定软件包指定特定的Keyworkds(可以在/etc/protage/portage.accpet_keywords ACCEPT_LICENSE="*"#可接受的软件包许可证 MAKEOPTS="-j8 -l7.2"#根据cpu核心数来配置(一般配置为cpu核心数+1),如果机器配置不够尽量将线程数调低一些,方式内存爆.
PORTDIR="/var/db/repos/gentoo"#软件包的ebuild文件存储目录 DISTDIR="/var/cache/distfiles" PKGDIR="/var/cache/binpkgs"#软件包的存储目录 #设置软件包缓存目录 PORTAGE_TMPDIR="/tmp"#portage的编译目录 #设置portage构建软件包目录(如果内存较大,建议设置在内存里面) # This sets the language of build output to English. # Please keep this setting intact when reporting bugs. LC_MESSAGES=C GENTOO_MIRRORS="${USTC}"#配置Gentoo镜像源(软件镜像源) #全局USE USE="-X -qt5 "