base-gentoo部分安装配置

1.无线网连接 WPA/WPA2
ifconfig命令
ifconfig命令应该会列出一个或多个网络接口(围绕着lo)。
# wpa_supplicant -i interface -c <(wpa_passphrase your_SSID your_key)
假设设备使用 wext 驱动。如果无法工作,可能需要调整选项
如果连接成功,在新终端中执行后续命令或(或者通过 Ctrl+c 退出并使用 -B 参数在后台再次执行上述命令
2.编译配置范例文件
  /usr/share/portage/config/make.conf.example
3.fdisk /dev/sda 磁盘工具,按p查看sda的分区
4.mkfs.ext4 /dev/sda4 设置sda4分区格式为ext4
5.mount /dev/sda4 /mnt/gentoo 挂载sda4为root分区
6.命令行网页浏览器
  links https://mirrors.tuna.tsinghua.edu.cn/gentoo/
7.挂载必要的文件系统
    /proc/ 一个pseudo文件系统(看起来像是常规文件,事实上却是实时生成的),由Linux内核暴露的一些环境信息
    /sys/ 一个pseudo文件系统,像要被取代的/proc/一样,比/proc/更加有结构
    /dev/ 是一个包含全部设备文件的常规文件系统,一部分由Linux设备管理器(通常是udev)管理

/proc/位置将要挂载到/mnt/gentoo/proc/,而其它的两个都是绑定挂载。字面上的意思是,例如/mnt/gentoo/sys/事实上就是/sys/(它只是同一个文件系统的第二个条目点),而/mnt/gentoo/proc/是(可以说是)文件系统的一个新的挂载。

mount --types  proc  /proc  /mnt/gentoo/proc
mount --rbind  /sys  /mnt/gentoo/sys
mount --rbind  /dev  /mnt/gentoo/dev

8.进入新环境chroot
现在所有的分区已经初始化,并且基础环境已经安装,是时候进入到新的安装环境了。这意思着会话将把根(所能访问到的最顶层位置)从当前的安装环境(安装CD或其他安装媒介)变为安装系统(叫做初始化分区)。因此叫作change root或chroot。
完成chroot有三个步骤:

    使用chroot将根位置从/(在安装媒介里)更改成/mnt/gentoo/(在分区里)
    使用source命令将一些设置(那些在/etc/profile中的)重新载入到内存中
    更改主提示符来帮助我们记住当前会话在一个chroot环境里面。

chroot  /mnt/gentoo  /bin/bash
source  /etc/profile
export  PS1="(chroot)  ${PS1}"

9.编译内核
(root #make
root #make modules
root #make install
root #make modules_install)
或:
make && make modules_install

When the kernel has finished compiling, copy the kernel image to /boot/. This is handled by the make install command:

make install

This will copy the kernel image into /boot/ together with the System.map file and the kernel configuration file.


10.startxfce4.
无显示管理器要启动Xfce4桌面,只需在命令行键入startxfce4.

11.grub2
etc/grub.d/下的一些列配置文件
在40_customer这个文件,写入以下内容
    menuentry 'Windows7'{
    set root=(hd0,1)
    chainloader +1
    }

12.nano
(1.复制:alt+6. (2.剪切:ctrl+k. (3.粘贴:ctrl+u
(4.自由剪切: ctrl+6指定起始剪切位置,按上下左右键来选中内容,然后按下ctrl+k即可自由剪切
(5.撤销: alt+u

13.命令行满屏翻页
Shift + PageUp 和 Shift + PageDown

14.查看设备
eth:  dmesg | grep eth  带"eth"的设备
sit:   dmesg | grep sit

15.删除
rm -rf

16.USE标志

查看当前正在使用的USE标志(全部),请使用 emerge --info:
emerge --info | grep ^USE

运行 emerge --info可以看到Portage识别的最终的USE设定。它会列出Portage使用的所有相关变量(包括 USE 变量)。

在整个系统上应用新的USE标志
emerge --update --deep --newuse @world

17.free
内存使用情况

18.仓库增加
Gentoo 的 Overlay 是 Gentoo 用户把自己书写的 ebuild 提交给官方的项目,现在我们一般都在使用layman 来管理。它可以让你在同一台机器上轻松地使用与同步多个 Portage Overlay。

19.android
Install ADB & Fastboot
emerge --ask dev-util/android-tools

20.源
mirrorselect -i -o >> /mnt/gentoo/etc/portage/make.conf 选定更新源
mirrorselect -i -r -o >> /mnt/gentoo/etc/portage/make.conf 选定同步源(仅能选一个)

 

gentoo Linux AMD64 20190728

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

mklpo147

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值