chroot安装grub

分别介绍Arch和Ubuntu系统下chroot安装grub的方法。 Arch 下载一张Arch系统的光盘镜像,烧录到优盘或者光盘,从优盘或光盘启动系统。将待修复的系统挂载到当前live系统下,这里以挂载到/mnt为例,待修复系统所在分区假设为/dev/sda1。假如待修复系统挂载了多个分区,则需要分别挂载到live系统下,也就是说,在live系统的挂载点上有一个完整的文件系统,这是为了保证grub软件正常工作。下面以上面提到的例子来说明修复过程。 挂载分区: #mount /dev/sda1 /mnt chroot到待修复系统挂载点 #arch-chroot /mnt 安装grub工具包 #pacman -S grub-pc #BIOS模式启动的系统 #pacman -S grub-efi-amd64 #UEFI模式启动的系统(64位) 更新grub配置文件 #grub-mkconfig -o /boot/grub/grub.cfg 退出chroot #exit 重启 #reboot Ubuntu 下载Ubuntu Server或者Desktop镜像,烧录到U盘或光盘,从U盘或光盘启动。Server版在启动安装选择语言的界面的帮助按钮下能够找到shell的入口,桌面版则打开一个Terminal,当然也可以在虚拟终端下进行。 先挂载分区,仍然假设待修复系统根分区为/dev/sda1 #mount /dev/sda1 /mnt 此外,为保证grub程序运行,仍需要挂载另外几个几个分区,需要加上–bind选项,挂载的是目录内容 #mount –bind /dev /mnt/dev #mount –bind /dev/pts /mnt/dev/pts #mount –bind /proc /mnt/proc #mount –bind /sys …

Arch User Repository

Arch User Repository Jump to: navigation, search Contents 1 Overview 2 Accessing the AUR 2.1 Using GUI Pamac 2.2 Using commandline Pamac 2.3 Using GUI Octopi 3 Installing from the AUR by hand 3.1 Manual 4 Upgrading the packages installed from the AUR 5 See Also Overview Warning: Use the …

getenforce 报错-bash:getenforce:command not found

getenforce是查看selinux状态的指令 # rpm -qf `which getenforce` libselinux-utils-2.0.94-5.3.el6.x86_64 //getenforce这个命令是由libselinux-utils-2.0.94-5.3.el6.x86_64这个软件包提供的 你确认一下系统是否安装了selinux 追问 我输入# rpm -qa selinux 后没有反应是不是意味着没有安装 追答 # rpm -qa|grep selinux libselinux-utils-2.0.94-5.2.el6.x86_64 selinux-policy-3.7.19-54.el6.noarch selinux-policy-targeted-3.7.19-54.el6.noarch libselinux-python-2.0.94-5.2.el6.x86_64 libselinux-devel-2.0.94-5.2.el6.x86_64 libselinux-2.0.94-5.2.el6.x86_64 这是有安装的反应。没反应说明没安装。

解决- CAN’T EXEC “LOCALE”- NO SUCH FILE OR DIRECTORY AT -USR-SHARE-PERL5-DEBCONF-ENCODING.PM

问题: apt-get时出现问题: Can’t exec “locale”: No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16. Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17. dpkg: warning: ‘ldconfig’ not found in PATH or not executable dpkg: error: 1 expected program not found in PATH or not executable Note: root’s …

Fix AppStream cache update completed, but some metadata was ignored due to errors

The bug has been fixed in appstream package version 0.10.1, but the version that gets installed in Ubuntu 16.04 is 0.9.4 by default. Ubuntu 16.10 automatically receives the update as it’s provided in its standard repositories.   The updated package version with the bugfix for Ubuntu 16.04 however is only …