UEFI启动管理
# 修复启动引导,--efi-directory指定efi安装目录,--boot-directory指定efi分区目录
sudo grub-install /dev/sda --efi-directory=/mnt/boot/efi --boot-directory=/mnt/boot
# 查看启动项
efibootmgr
# 添加启动项:-c创建,-L名称,-d磁盘,-p分区号,-l有效的efi启动文件
efibootmgr -c -w -L "BootOptionName" -d /dev/sda -p 1 -l /EFI/Boot/bootx64.efi
# 删除启动项
efibootmgr -B -b 编号
# 禁用启动项
efibootmgr -A -b 编号
# 启用启动项
efibootmgr -a -b 编号
# 修改顺序编号x在y前
efibootmgr -o x,y
UEFI引导修复
ubuntu efi引导修复
,ubuntu uefi安装指定位置
,ubuntu 重新挂载uefi
# --efi-directory 硬盘efi分区, --boot-directory 系统分区boot目录,--bootloader-id 启动名称
sudo grub-install /dev/sda --efi-directory '/media/wittyneko/C14D-581B' --boot-directory '/media/wittyneko/deepin/boot' --bootloader-id=deepin
Windows的Linux子系统
GRUB安装ubuntu
title Install Ubuntu
root (hd0,4)
kernel (hd0,4)/linux/ubuntu/vmlinuz.efi boot=casper iso-scan/filename=/linux/ubuntu/ubuntu-16.04-desktop-amd64.iso ro quiet splash
initrd (hd0,4)/linux/ubuntu/initrd.lz
boot
GRUB安装deepin
title install deepin-15
find --set-root /deepin.iso
kernel /vmlinuz findiso=/deepin.iso noprompt quiet splash boot=live ro deepin-installer/locale=zh_CN.UTF-8 keyboard-configuration/layoutcode=us keyboard-configuration/variantcode= -- rootflags=sync auto-deepin-installer
initrd /initrd.lz
boot
GRUB2
if search --file /bootiso/deepin-15-alpha2-amd64.iso; then
menuentry "install deepin-15-alpha2-amd64.iso" {
set isofile="/bootiso/deepin-15-alpha2-amd64.iso"
search --set -f $isofile
loopback loop $isofile
linux (loop)/live/vmlinuz.efi boot=live union=overlay username=user quiet live-config noprompt noeject findiso=$isofile locales=zh_CN.UTF-8
initrd (loop)/live/initrd.lz
}
fi
----------
set root=(hd0,msdos6) #按自己的情况改
set isofile="/deepin-15-alpha2-amd64.iso"
search --set -f $isofile
loopback loop $isofile
linux (loop)/live/vmlinuz.efi boot=live union=overlay username=user quiet live-config findiso=$isofile locales=zh_CN.UTF-8
initrd (loop)/live/initrd.lz
boot
ubuntu更新grub2
软件源修改
更改 /etc/apt/sources.list
文件; 命令sudo sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
;
Ubuntu
Deepin
配置文件位置
用户文件
~/.profile
~/.bash_profile 或者 ~./bash_login
~/.bashrc
系统文件
/etc/environment
/etc/profile
/etc/bash.bashrc
/etc/environment
不需要使用export设置环境变量,其它文件需要。 source /etc/profile
使配置文件立即生效
中文文件夹转英文
$ export LANG=en_US #改变支持的语言为英语
$ xdg-user-dirs-gtk-update #更新系统语言,按照中文对应的英语进行翻译3
$ export LANG=zh_CN.UTF-8 #重新支持中文
查看系统信息
# 内核版本
uname -a
uname -r
cat /proc/version
# 版本类型
lsb_release -a
cat /etc/issue
# 系统位数
getconf LONG_BIT
file /bin/ls
# CPU型号
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
# CPU颗数
cat /proc/cpuinfo | grep physical | uniq -c
修改DNS
vim /etc/network/interfaces
/etc/init.d/networking restart
dns-nameservers 8.8.8.8
vim /etc/resolv.conf
, vim /etc/resolvconf/resolv.conf.d/base
, resolvconf -u
nameserver 8.8.8.8
nameserver 8.8.4.4