当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 9 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 某些windows软件破坏Grub2的信息导致无法启动
帖子发表于 : 2010-12-23 11:35 

注册: 2009-07-16 23:09
帖子: 137
送出感谢: 0 次
接收感谢: 0 次
ubuntu的工程师Colin Watson在blog中写道
http://www.chiark.greenend.org.uk/ucgi/ ... table.html
Sat, 28 Aug 2010

Windows applications making GRUB 2 unbootable

If you find that running Windows makes a GRUB 2-based system unbootable (Debian bug, Ubuntu bug), then I'd like to hear from you. This is a bug in which some proprietary Windows-based software overwrites particular sectors in the gap between the master boot record and the first partition, sometimes called the "embedding area". GRUB Legacy and GRUB 2 both normally use this part of the disk to store one of their key components: GRUB Legacy calls this component Stage 1.5, while GRUB 2 calls it the core image (comparison). However, Stage 1.5 is less useful than the core image (for example, the latter provides a rescue shell which can be used to recover from some problems), and is therefore rather smaller: somewhere around 10KB vs. 24KB for the common case of ext[234] on plain block devices. It seems that the Windows-based software writes to a sector which is after the end of Stage 1.5, but before the end of the core image. This is why the problem appears to be new with GRUB 2.

At least some occurrences of this are with software which writes a signature to the embedding area which hangs around even after uninstallation (even with one of those tools that tracks everything the installation process did and reverses it, I gather), so that you cannot uninstall and reinstall the application to defeat a trial period. This seems like a fine example of an antifeature, especially given its destructive consequences for free software, and is in general a poor piece of engineering; what happens if multiple such programs want to use the same sector, I wonder? They clearly aren't doing much checking that the sector is unused, not that that's really possible anyway. While I do not normally think that GRUB should go to any great lengths to accommodate proprietary software, this is a case where we need to defend ourselves against the predatory practices of some companies making us look bad: a relatively small number of people do enough detective work to realise that it's the fault of a particular Windows application, but many more simply blame our operating system because it won't start any more.

I believe that it may be possible to assemble a collection of signatures of such software, and arrange to avoid the disk sectors they have stolen. Indeed, I have a first draft of the necessary code. This is not a particularly pleasant solution, but it seems to be the most practical way around the problem; I'm hoping that several of the programs at fault are using common "licence manager" code or something like that, so that we can address most of the problems with a relatively small number of signatures. In order to do this, I need to hear from as many people as possible who are affected by this problem.

If you suffer from this problem, then please do the following:

* Save the output of fdisk -lu to a file. In this output, take note of the start sector of the first partition (usually 63, but might also be 2048 on recent installations, or occasionally something else). If this is something other than 63, then replace 63 in the following items with your number.
* Save the contents of the embedding area to a file (replace /dev/sda with your disk device if it's something else): dd if=/dev/sda of=sda.1 count=63
* Do whatever you do to make GRUB unbootable (presumably starting Windows), then boot into a recovery environment. Before you reinstall GRUB, save the new contents of the embedding area to a different file: dd if=/dev/sda of=sda.2 count=63
* Follow up to either the Debian or the Ubuntu bug with these three files (the output of fdisk -lu, and the embedding area before and after making GRUB unbootable.

I hope that this will help me to assemble enough information to fix this bug at least for most people, and of course if you provide this information then I can make sure to fix your particular version of this problem. Thanks in advance!


难怪我安装windowxp和ubuntu 9.10以后的版本的双系统,反复进入ubuntu没有任何问题,而一旦进入windows之后,再重启,就发现grub2坏了 ,机器根本无法进入grub2菜单,在反复重启。当时狂骂grub2,使用grubfordos解决了问题。


最后由 tempestglen 编辑于 2010-12-23 12:11,总共编辑了 1 次

页首
 用户资料  
 
2 楼 
 文章标题 : Re: 他妈个把子,某些windows软件破坏Grub2的信息导致无法启动
帖子发表于 : 2010-12-23 11:42 
头像

注册: 2007-02-02 18:14
帖子: 30702
系统: debian sid
送出感谢: 1
接收感谢: 34
呵呵,没说是那些软件哦,一般我是以为bios写保护呢


_________________
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)


页首
 用户资料  
 
3 楼 
 文章标题 : Re: 他妈个把子,某些windows软件破坏Grub2的信息导致无法启动
帖子发表于 : 2010-12-23 11:47 

注册: 2009-07-16 23:09
帖子: 137
送出感谢: 0 次
接收感谢: 0 次
leeaman 写道:
呵呵,没说是那些软件哦,一般我是以为bios写保护呢



网上一些 资料说是如下软件:

HP Protect Tools
PC angels
Adobe flexnet


在我的机器上,就是他妈的Adobe flexnet,占据了我的第33扇区。


页首
 用户资料  
 
4 楼 
 文章标题 : Re: 他妈个把子,某些windows软件破坏Grub2的信息导致无法启动
帖子发表于 : 2010-12-23 12:04 
头像

注册: 2008-11-21 20:26
帖子: 36913
送出感谢: 1
接收感谢: 36
请文明用语


_________________
讨厌我的人可以试着点一下
浏览全部ubuntu技巧


页首
 用户资料  
 
5 楼 
 文章标题 : Re: 他妈个把子,某些windows软件破坏Grub2的信息导致无法启动
帖子发表于 : 2010-12-23 12:08 
头像

注册: 2008-03-25 15:49
帖子: 25878
地址: 谁知道?
送出感谢: 8
接收感谢: 10
引用:
占据了我的第33扇区。


这扇区 特别 ?


页首
 用户资料  
 
6 楼 
 文章标题 : Re: 某些windows软件破坏Grub2的信息导致无法启动
帖子发表于 : 2010-12-23 12:13 

注册: 2009-07-16 23:09
帖子: 137
送出感谢: 0 次
接收感谢: 0 次
我对流氓软件从来就不文明,从来就是张口就骂。这问题折腾了我好长时间。怒不可遏。


页首
 用户资料  
 
7 楼 
 文章标题 : Re: 某些windows软件破坏Grub2的信息导致无法启动
帖子发表于 : 2010-12-23 12:50 
头像

注册: 2009-09-06 5:53
帖子: 4666
送出感谢: 6
接收感谢: 110
引用:
It seems that the Windows-based software writes to a sector which is after the end of Stage 1.5, but before the end of the core image. This is why the problem appears to be new with GRUB 2.
换到grub1不就解决了么?


_________________
电子书下载:
鸟哥的Linux私房菜 基础学习篇 第三版 pdf
鸟哥的Linux私房菜 服务器架设篇 第三版 pdf


页首
 用户资料  
 
8 楼 
 文章标题 : Re: 某些windows软件破坏Grub2的信息导致无法启动
帖子发表于 : 2010-12-23 14:11 

注册: 2009-07-16 23:09
帖子: 137
送出感谢: 0 次
接收感谢: 0 次
onshoestring 写道:
引用:
It seems that the Windows-based software writes to a sector which is after the end of Stage 1.5, but before the end of the core image. This is why the problem appears to be new with GRUB 2.
换到grub1不就解决了么?


没错,已经换过来了,好了。grub2的core image太大。。。。。


页首
 用户资料  
 
9 楼 
 文章标题 : Re: 某些windows软件破坏Grub2的信息导致无法启动
帖子发表于 : 2010-12-23 14:52 

注册: 2008-05-03 23:42
帖子: 3681
送出感谢: 4
接收感谢: 7
他妈的 adobe 还会干这种偷偷摸摸,自作聪明的事情


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 9 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译