我阅读了Sed的手册,但是我仍然觉得它很混乱,所以我希望在这里找到一些答案:)
我需要使用bash脚本编辑一个文件。
我需要在grub.cfg中的一个特定行之后放置几行代码。为了显示一个示例,我将添加5个新添加的行。
原件:
if loadfont /boot/grub/font.pf2 ; then
set gfxmode=auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi
set menu_color_normal=white/black
set
我已经在以下方面寻求解决办法:
如何将Memtest86+选项添加回Grub菜单?
Memtest86+选项在Grub菜单中缺失
但是他们还是解决不了我的问题..。
最让我抓狂的是命令“update”,它只显示如下所示,而memtest86缺失了:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.13.0-35-generic
Found initrd image: /boot/initrd.img-3.13.0-35-generic
Found linux image: /boot/vmlin
我尝试通过今天出现的更新通知从Ubuntu15.04升级到15.10,但是在运行dpkg --configure时它被卡住了。以下是最后一条消息:
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.2.0-18-generic
Found initrd image: /boot/initr
如何移除12.x机器中不需要的内核
sudo update-grub
Generating grub.cfg ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-3.13.0-96-generic
Found initrd image: /boot/initrd.img-3.13.0-96-generic
Found linux image: /boot/vmli
我试图将我的系统从ubuntu18.04升级到20.04 (运行在HP Zbook 15U上),但升级被中断了。现在我无法正确地启动Ubuntu。你知道怎么修理坏了的装置吗?
以下是更多细节:
我使用软件更新程序从18.04升级到20.04 LTS。在“安装升级”-phase期间,系统关闭(首先屏幕冻结,然后变黑)。CRTL + ALT + F1什么也没做,所以我唯一的选择就是重新启动系统)。
我尝试在恢复模式下启动(Grub显示了三个不同的内核:
Ubuntu, with Linux 5.4.0-77-generic
Ubuntu, with Linux 4.15.0-147-generic
在我的系统中,安装了以下内核版本:
Found linux image: /boot/vmlinuz-5.4.0-107-generic
Found initrd image: /boot/initrd.img-5.4.0-107-generic
Found linux image: /boot/vmlinuz-5.4.0-105-generic
Found initrd image: /boot/initrd.img-5.4.0-105-generic
Found linux image: /boot/vmlinuz-5.4.0-104-generic
Found initrd imag
我正在努力使Burg引导加载程序正确工作。我安装了burg,但它只看到Ubuntu和恢复映像。做完sudo update-burg后,我会收到这样的警告:
Generating burg.cfg ...
Found linux image: /boot/vmlinuz-4.2.0-30-generic.efi.signed
Found linux image: /boot/vmlinuz-4.2.0-30-generic
Found initrd image: /boot/initrd.img-4.2.0-30-generic
Found linux image: /boot/vmlinuz-
我以前读过几个问题,但没有找到解决办法。在运行update-grub命令时,它给出了以下输出:
root@Agustin-Ubuntu:/home/agustin# update-grub
Generating grub.cfg ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-3.5.0-45-generic
Found initrd image: /boot
就像在askubuntu上的几个人一样,我在使用sudo dpkg --configure -a时遇到了一些问题。我正试图用apt-get install安装一个包时,终端告诉我:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
当我使用这个命令时,我能读到的最后一个信息是:
Found linux image: /boot/vmlinuz-3.19.0-59-generic
Found initrd image: /boot/in
The following packages will be REMOVED:
linux-image-3.2.0-79-generic-pae
0 upgraded, 0 newly installed, 1 to remove and 144 not upgraded.
3 not fully installed or removed.
After this operation, 114 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 525879 files and
我在Xubuntu 18.04遇到了一个很奇怪的问题.我在sudo apt update之后运行了以下命令:
sudo apt upgrade
但它会导致一个错误:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out
我在我的MacBook Pro上有一个Ubuntu14.10/MacOSX/Windows 8三引导。
但是,Windows没有出现在grub中,只有MacOS和Ubuntu出现。
我从其他类似的问题中尝试了一些东西,但是没有什么效果,比如运行update-grub或Boot Repair。以下是一些可能有用的程序输出:
fdisk
sudo fdisk -l
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU P
今天,我在我的ubuntu服务器20.04版本上运行了通常的更新程序。
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-58-generic
Found linux image: /boot/vmlinuz-5.15.0-57-generic
Found initrd image: /boot/initrd.img-5.15.0-57-generic
Found linux image: /boot/vmlinuz-5.15.0-56-generic
Found initrd imag
这是update的输出:
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.2.0-18-generic
Found initrd image: /boot/initrd.img-4.2.0-18-generic
Found linux image: /boot/vmlinuz-4
shady@shady:~$ sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.13.0-76-generic
Found initrd image: /boot/initrd.img-3.13.0-76-generic
Found linux image: /boot/vmlinuz-3.13.0-74-generic
Found initrd image: /boot/initrd.img-3.13.0-74-generic
Found linux image
我试图在系统中安装java,方法是按照页面中的说明:Java安装Instr Oracle
现在,当我输入java -version时,它给了我以下消息:
The program 'java' can be found in the following packages:
* default-jre
* gcj-5-jre-headless
* openjdk-8-jre-headless
* gcj-4.8-jre-headless
* gcj-4.9-jre-headless
* openjdk-9-jre-headless
Try: sudo apt inst
我有一个远程VPS,它安装了ubuntu服务器10.04 (出于某种原因,托管公司还没有安装12.04 )
最近,我将硬件从专用机器降级为VPS,并在将其更新到12.04之后,将已安装软件包的列表转移到新的VPS。
问题是VPS仍然在运行,旧内核也在运行,我尝试过更新它,但它似乎不想运行一个较新的内核,我认为这可能是grub的问题,所以我运行了update-grub:
Found linux image: /boot/vmlinuz-3.8.0-39-generic
Found initrd image: /boot/initrd.img-3.8.0-39-generic
/usr/sbin/
我一直在这里搜索,有一个非常类似的问题,在(如何在/中释放更多的空间?)
我遇到的问题是当我尝试解决这个问题的时候。例如: sudo apt-get purge linux-image-2.6.38-11
我得到:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'linux-image-2.6.38-11-server' for regex 'linux-image-2.6.38-11'
You mi
在我的服务器上卸载软件包(20.04LTS)有问题。
当我运行apt remove metricbeat时,收到以下消息:
root@elk:/home/elk# apt remove metricbeat
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
metricbeat
0 upgraded, 0 newly installed, 1 to remove and
我发现自己无法从我的wd中获得linux 19。
我可以用最少的问题启动windows、ubuntu、centos、debian、kali linux和linux 18,但是linux 19就是不能启动。
Curent菜单文件:
DEFAULT vesamenu.c32
PROMPT 0
MENU TITLE PXE Boot Menu
MENU INCLUDE pxelinux.cfg/graphics.conf
## Local Boot ##
LABEL local
menu label ^Boot Normally
localboot -1
Type 0x8
/usr/src/linux-3.2.1 # make install
scripts/kconfig/conf --silentoldconfig Kconfig
sh /usr/src/linux-3.2.1/arch/x86/boot/install.sh 3.2.1-12-desktop arch/x86/boot/bzImage \
System.map "/boot"
You may need to create an initial ramdisk now.
--
/boot # mkinitrd initrd-3.2.1-12-d
我想将我的内核更新到最新的稳定版本,即v5.16.1
我遵循了导游,它展示了如何安装内核5.16。一切都很顺利,直到我收到了这个错误:
dpkg: dependency problems prevent configuration of linux-headers-5.16.1-051601-generic:
linux-headers-5.16.1-851601-generic depends on libc6 (>= 2.34); however:
Version of libc6:amd64 on system is 2.31-8ubuntu9.2.
linux-head
$ sudo apt-get install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.15.0-29 linux-headers-4.15.0-29-generic
linux-image-4.15.0-29-generic linux-modul
我通过apt-get更新了我的内核,但是我的Ubuntu16.04无法引导它。uname -r给了4.8.0-36-generic。sudo update-grub给出
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.8.0-36-generic
Found initrd image: /boot/initrd.img-4.8.0-36-generic
Found linux image: /boot/vmlinuz-4.4.0-98-generic
Found initrd image: /b