有没有在互联网上的资源,我可以下载我需要在我的Ubuntu服务器安装单个文件?
在这种情况下,我需要Ubuntu服务器12.04的干净版本/etc/grub.d/00_header 。 还有一些时候我想要得到一个干净的文件版本,对于一个特定的linux版本。
除了在其他地方再次安装ubuntu,并从那里复制文件,我将如何去获得我需要的文件?
我做了apt-get upgrade ,希望新版本的grubreplace有问题的版本,并得到这个错误。 据我了解,更新后的grub应该replace旧的(我select使用/ etc / defualt / grub的软件包维护者版本),所以parsing后的错误是用新的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为您的软件包pipe理提供的一般文件提供了一个低级的方法,但configuration文件是一个更好的方法。 这里的关键是在这个问题的答案中解释的--force-confmiss选项。
这是一个文件/etc/dnsmasq.conf的例子。
运行例如/etc/dnsmasq.conf
# dpkg -S /etc/dnsmasq.conf dnsmasq: /etc/dnsmasq.conf
这意味着你将不得不获得dnsmasq包。
例如:
$ aptitude download dnsmasq Get:1 http://ftp.nl.debian.org/debian/ squeeze/main dnsmasq all 2.55-2 [14.2 kB] Fetched 14.2 kB in 0s (190 kB/s) $ ls dnsmasq_2.55-2_all.deb
首先删除您需要重置为默认的文件。
# rm /etc/dnsmasq.conf # dpkg -i --force-confmiss dnsmasq_2.55-2_all.deb
抓取该文件的deb文件。 这是在grub-common /s> grub-common包装。 一旦你有了它,你可以运行dpkg-deb来解压缩包。
所以,像这样的:
$ wget http://us.archive.ubuntu.com/ubuntu/pool/main/g/grub2/grub-common_1.99-22ubuntu2_i386.deb` $ mkdir tmp $ dpkg-deb -x grub-common_1.99-22ubuntu2_i386.deb ./tmp $ ls tmp/etc/grub.d/ 00_header 10_linux 30_os-prober 41_custom 05_debian_theme 20_linux_xen 40_custom README