美文网首页
Funtoo Linux安装笔记

Funtoo Linux安装笔记

作者: 三十 | 来源:发表于2019-07-10 09:02 被阅读0次

官网安装指南

https://www.funtoo.org/Install/Introduction

1、下載LiveCD

要安裝Funtoo Linux,首先你需要一個Linux的Live CD或是隨身碟來啟動你的電腦。我們推薦Gentoo系的System Rescue CD ,因為它附有很多工具而且同時支援32和64位元的系統。你可以將它燒錄進CD/DVD或是安裝在隨身碟裡。在這裡可以下載他們:

https://build.funtoo.org/distfiles/sysresccd/sysresccd-20161103-4.9.0.iso

連接網路

1、有线网络使用DHCP,使用ping www.google.com 确认一下网络连接即可。

2、WIFI。使用nmtui命令连接无线网络。 

远程安装

1、passwd设置root密码

2、使用ifconfig或者ip addr show查看IP

3、在远程主机的终端输入ssh root@your_ip连接

2、准备磁盘

1、使用lsblk查看当前的硬盘及分区

2、确定分区表方案MBR或GPT

3、MBR Partitioning(传统的分区方案)

MBR方案

https://www.funtoo.org/Install/MBR_Partitioning/zh-tw

4、GPT Partitioning(推荐使用GPT)

gdisk /dev/sda

创建新的分区表:o

创建分区:n

Hex Code:

EF00——EFI

8200——swap

8300——ext4

(这里可以先不指定Hex Code,直接回车就可以了)

将分区表写入磁盘:w

划分后分区如下:

/dev/sda1, which will be used to hold the /boot filesystem,

/dev/sda2, which will be used for swap space, and

/dev/sda3, which will hold your root filesystem.

可以重新运行lsblk查看磁盘及分区情况

5、Create and mount filesystems 创建并挂载文件系统

# mkfs.ext2 /dev/sda1

# mkfs.vfat -F 32 /dev/sda1

# mkswap /dev/sda2

# swapon /dev/sda2

# mkfs.ext4 /dev/sda3

挂载分区

# mkdir /mnt/funtoo

# mount /dev/sda3 /mnt/funtoo

# mkdir /mnt/funtoo/boot

# mount /dev/sda1 /mnt/funtoo/boot

如果有单独的/home分区,这个时候需要挂载上去

6、Setting the Date 设定日期

# date  查看当前日期

# date 071620002011 设定日期

# hwclock --systohc 同步到硬件时钟

7、Install the Funtoo stage tarball of your choice 安装你选择的stage tarball

下载、解压Stage3;确定CPU架构、查看CPU支持的指令集;cat /proc/cpu;下载通用版Stage3;1.4是alpha版,1.3是稳定版

# cd /mnt/funtoo

# wget https://build.funtoo.org/1.3-release-std/x86-64bit/generic_64/stage3-latest.tar.xz

# tar xpf stage3-latest.tar.xz

8、Chroot into your new system 进入新系统环境

在chrooting之前,需要做一些事情来设置chroot环境。您需要挂载/proc、/sys、/dev到您的新系统中。使用以下命令执行此操作:

# cd /mnt/funtoo

# mount -t proc none proc

# mount --rbind /sys sys

# mount --rbind /dev dev

您还需要复制resolv.conf以便从chroot内部正确解析Internet主机名:

# cp /etc/resolv.conf /mnt/funtoo/etc/

现在你可以chroot到你的新系统。env之前使用chroot以确保安装介质中没有环境设置被引入新系统:

# env -i HOME=/root TERM=$TERM /bin/chroot . bash -l

# export PS1="(chroot) $PS1"

从chroot环境测试域名解析

# ping -c 5 google.com

9、Download the Portage tree 下载Portage树

(chroot) # ego sync

10、Configure your system 设置你的系统

/etc/fstab

(chroot) # nano -w /etc/fstab

An example fstab file

/dev/sda1    /boot        ext2    noauto,noatime 1 2

/dev/sda2    none          swap    sw            0 0

/dev/sda3    /            ext4    noatime        0 1

#/dev/cdrom  /mnt/cdrom    auto    noauto,ro      0 0

If you're using UEFI to boot, change the /dev/sda1 line so that it says vfat instead of ext2. Similarly, make sure that the /dev/sda3 line specifies either xfs or ext4, depending on which filesystem you chose earlier on in the installation process when you created filesystems.如果使用UEFI引导,记得用vfat替代上面的ext2.

还有一些其他文件,可根据需要修改

https://www.funtoo.org/Install/Configuration_Files

/etc/localtime ln -sf /usr/share/zoneinfo/MST7MDT /etc/localtime

/etc/portage/make.conf

USE flags define what functionality is enabled when packages are built. It is not recommended to add a lot of USE flags during installation; you should wait until you have a working, bootable system before changing your USE flags. A USE flag prefixed with a minus ("-") sign tells Portage not to use the flag when compiling. A Funtoo guide to USE flags will be available in the future. For now, you can find out more information about USE flags in the Gentoo Handbook.

在安装阶段,不推荐增加太多USB标记

/etc/conf.d/hwclock (chroot) # nano -w /etc/conf.d/hwclock

Localization

11、Introducing Portage 介绍Portage

(chroot) # emerge packagename  安装软件包

——————分割线——————

(chroot) # ego sync

(chroot) # emerge -auDN @world

This is the "official" way to update your Funtoo Linux system. Above, we first update our Portage tree using git to grab the latest ebuilds (scripts), and then run an emerge command to update the world set of packages. The options specified tell emerge to:

a show us what will be emerged, and ask us if we want to proceed

u update the packages we specify -don't emerge them again if they are already emerged.

D Consider the entire dependency tree of packages when looking for updates. In other words, do a deep update.

N Update any packages that have changed (new) USE settings.

You should also consider passing --with-bdeps=y when emerging @world, at least once in a while. This will update build dependencies as well.

在执行emerging @world命令时,你应该考虑使用--with-bdeps=y,这将升级依赖包。

Of course, sometimes we want to install a package but not add it to the world file. This is often done because you only want the package installed temporarily or because you know the package in question is a dependency of another package. If this behavior is desired, you call emerge like this:

有时候你想安装一个软件包,但并不想把它加入到world文件里。这个情况通常用于临时安装一个软件包,或者因为你知道它有一个依赖性问题。如果你想安装这样一个软件包,你可以使用以下emerge命令:

(chroot) # emerge -1 packagename

Advanced users may be interested in the Emerge wiki page.

Updating World

Certain packages in the Funtoo stage3 tarball are compiled with the bindist USE flag enabled by default. (The bindist flag controls enabling or disabling of options for proprietary and/or patented parts of code which is not allowed to be distributed in images due to licensing issues). You may notice a dependency resolution problem with bindist USE flags during updating packages after initial system setup. To avoid potential problems, update the system before first boot or any other package installation as shown below:

(chroot) # ego sync

(chroot) # emerge -auDN @world

12、Install a kernel 安装内核

Funtoo Linux Stage3包含一个预编译的debian-sources-lts内核,它使得安装变得更加简单、快速。使用以下命令查看将要安装的内核版本信息:

(chroot) # emerge -s debian-sources-lts

Firmware(安装驱动,包括无线网卡、显卡、网卡等)

# emerge -av linux-firmware

Modern Intel Chipsets 现代的英特尔芯片

If you have a modern Intel system (Skylake, Coffee Lake or newer) then you may be better served by the newer debian-sources kernel as it will have support for more modern Intel WiFi and integrated graphics chipsets. To use this kernel, you will want to perform the following steps:

如果使用较新的Intel系统(Skylake, Coffee Lake or newer),推荐安装debian-sources内核

# echo "sys-kernel/debian-sources binary" > /etc/portage/package.use

# emerge -av debian-sources

Then, when you configure /etc/boot.conf in the next section, you will want to ensure that debian-sources (not debian-sources-lts) is selected as your default kernel.

在下一节设置/etc/boot.conf时,要选择debian-sources作为默认内核

13、Install a bootloader 安装引导

(chroot) # emerge -av grub

Next, edit /etc/boot.conf using nano and specify "Funtoo Linux genkernel" as the default setting at the top of the file, replacing "Funtoo Linux". Also, if you're not using memtest86+ remove the entry in boot.conf to avoid errors. /etc/boot.conf should now look like this: boot { generate grub default "Funtoo Linux genkernel" timeout 3 }

"Funtoo Linux" {

    kernel bzImage[-v]

}

"Funtoo Linux genkernel" {

    kernel kernel[-v]

    initrd initramfs[-v]

    params += real_root=auto rootfstype=auto

}

Intel Microcode Intel处理器微代码

# emerge intel-microcode iucode_tool

New School (UEFI) Boot Entry

(chroot) # mount -o remount,rw /sys/firmware/efi/efivars

(chroot) # grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="Funtoo Linux [GRUB]" --recheck /dev/sda

(chroot) # ego boot update

上面3条命令是针对(UEFI)x86-64平台的,(UEFI)x86-32bit有所不同

First Boot, and in the future... OK -- you are almost ready to boot!

You only need to run grub-install when you first install Funtoo Linux, but you need to re-run ego boot update every time you modify your /etc/boot.conf file or add new kernels to your system. This will regenerate /boot/grub/grub.cfg so that you will have new kernels available in your GRUB boot menu, the next time you reboot.

14、Configure the Network 设置网络

Wi-Fi

(chroot) # emerge linux-firmware networkmanager

(chroot) # rc-update add NetworkManager default

# nmtui

Desktop (Wired DHCP) 桌面(有线连接自动获取IP)

(chroot) # rc-update add dhcpcd default

Server (Static IP) 服务器(静态IP)

For servers, the Funtoo Linux Networking scripts are recommended. They are optimized for static configurations and things like virtual ethernet bridging for virtualization setups. See Funtoo Linux Networking for information on how to use Funtoo Linux's template-based network configuration system.

Hostname 主机名

(chroot) # nano /etc/conf.d/hostname

15、Complete final steps 完成最后的步骤

Set your root password (chroot) 

# passwd

Restart your system (chroot) 

# exit

# cd /mnt

# umount -lR funtoo

# reboot

16、Profile Configuration 配置文件设置

Install Guide: Profiles

https://www.funtoo.org/Install/Profiles

17、All Done! Enjoy! 大功告成

https://www.funtoo.org/Install/Done

                                                                                                                                                                2019.7.10 办公室

相关文章

  • Funtoo Linux安装笔记

    官网安装指南 https://www.funtoo.org/Install/Introduction 1、下載Li...

  • Docker运维笔记四:Docker安装shipyard

    安装shipyard前提是已安装好Docker,详见【Linux安装笔记九:Linux服务器安装Docker】,本...

  • Linux 学习笔记 1

      继 Linux 学习笔记 0 安装 Linux 后开始学习 Linux 命令。首先学习的是获得命令帮助,最常用...

  • 2018-08-14

    Linux软件安装管理 笔记 rpm: 1.查询是否安装 rpm -q 包名 #查询包是否安装 ...

  • 树莓派4B安装Kali Linux操作系统

    树莓派4B安装Kali Linux操作系统 目标 在Kali Linux(笔记本) 下烧录 Kali Linux ...

  • Linux(Ubuntu)安装go语言环境

    心血来潮把笔记本换成了Linux Mint系统,于是分享一下在linux下安装golang的经验 安装 首先,可以...

  • 2020-05-13

    学习小组DAY3笔记-lyq 今天学习安装linux,以及在linux环境安装、激活、使用 今天完成在比昨天早,一...

  • Linux一键搭配php环境

    phpstudy版(笔记) 参考文章: Linux一键安装web环境全攻略phpstudy版(笔记) http:/...

  • Ubuntu_安装Wiz笔记

    前言 安装完成了Linux,有了搜狗输入法,我们还需要笔记软件,本文主要介绍如何安装为知笔记 安装步骤 找到wiz...

  • 记一次搭建生产服务器

    Linux JDK 安装 Linux Maven 安装 Linux node 安装 Linux redis安装 L...

网友评论

      本文标题:Funtoo Linux安装笔记

      本文链接:https://www.haomeiwen.com/subject/iqijcctx.html