互联网上是否有资源,我可以在其中下载 ubuntu 服务器安装所需的单个文件?
/etc/grub.d/00_header
在这种情况下,我需要Ubuntu 服务器 12.04的干净版本。有时我想为特定的 linux 版本获取文件的干净版本。
除了在其他地方再次安装 ubuntu 并从那里复制文件之外,我将如何获取我需要的文件?
我做了apt-get upgrade
一个新版本的 grub 替换有问题的版本的希望,并得到了这个错误。据我了解,更新后的 grub 应该替换旧的(我选择使用 /etc/defualt/grub 的包维护者版本),因此解析后出现的错误与新的 grub 版本有关,而不是我的本地版本版本。那是对的吗?
Replacing config file /etc/default/grub with new version
/usr/sbin/grub-setup: warn: Sector 32 is already in use by FlexNet; avoiding it. This software may cause boot or other problems in future. Please ask its authors not to store data in the boot track.
/usr/sbin/grub-setup: warn: Sector 33 is already in use by FlexNet; avoiding it. This software may cause boot or other problems in future. Please ask its authors not to store data in the boot track.
Installation finished. No error reported.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-29-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-29-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-25-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-25-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-23-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-23-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
error: syntax error.
error: Incorrect command.
error: syntax error.
error: line no: 32
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
done
虽然 @cjc 为包管理提供的一般文件提供了一种低级方法,但配置文件有一种更简洁的方法。这里的关键是这个问题
--force-confmiss
的答案中解释的选项。这是文件的示例
/etc/dnsmasq.conf
。判断所属二进制包
例如运行
/etc/dnsmasq.conf
这意味着你必须获得
dnsmasq
包裹。下载正确的 .deb 包
例如:
让dpkg替换你想要的文件
首先删除您需要重置为默认值的文件。
获取该文件的 deb 文件。它在
grub-common
包裹里。一旦你有了它,你就可以运行dpkg-deb
来提取包。所以,像这样: