【已解决】想知道windows的系统分区第一扇区到底是什么
-
- 帖子: 97
- 注册时间: 2009-09-19 17:31
【已解决】想知道windows的系统分区第一扇区到底是什么
就我所知,windows的引导方式是BIOS-> MBR中的引导代码,
下一步是MBR->主、激活的引导分区的第一扇区(引导扇区),然后主、激活的引导分区的第一扇区里面也写有代码,表示启动ntldr&bootmgr,
还是MBR->ntldr 或 bootmgr文件?
或者分区的第一扇区就是ntldr&bootmgr?
如果把grub4dos的代码写进主、激活的引导分区的第一扇区,ntldr会不会消失?
精彩的回答在5,7,11,13,14,15,17楼,很清晰很丰富。
根据回答的帖子:
我的问题解答如下:
下一步是MBR->主、激活的引导分区的第一扇区(引导扇区),然后主、激活的引导分区的第一扇区里面也写有代码,表示启动ntldr&bootmgr。
如果把grub4dos的代码写进主、激活的引导分区的第一扇区,ntldr不会消失,它只是个文件。但是主、激活的引导分区会变的不可被linux和win识别,分区表中这个分区的部分出现错误,windows引导不进去。
下一步是MBR->主、激活的引导分区的第一扇区(引导扇区),然后主、激活的引导分区的第一扇区里面也写有代码,表示启动ntldr&bootmgr,
还是MBR->ntldr 或 bootmgr文件?
或者分区的第一扇区就是ntldr&bootmgr?
如果把grub4dos的代码写进主、激活的引导分区的第一扇区,ntldr会不会消失?
精彩的回答在5,7,11,13,14,15,17楼,很清晰很丰富。
根据回答的帖子:
我的问题解答如下:
下一步是MBR->主、激活的引导分区的第一扇区(引导扇区),然后主、激活的引导分区的第一扇区里面也写有代码,表示启动ntldr&bootmgr。
如果把grub4dos的代码写进主、激活的引导分区的第一扇区,ntldr不会消失,它只是个文件。但是主、激活的引导分区会变的不可被linux和win识别,分区表中这个分区的部分出现错误,windows引导不进去。
上次由 liu999 在 2009-11-17 0:38,总共编辑 1 次。
问问题之前要先站内google搜索,时间多了就看置顶帖子,再不行就发问。
有关Windows启动,GNU GRUB和GRUB4DOS的一些启动流程与细节汇总
有关Windows启动,GNU GRUB和GRUB4DOS的一些启动流程与细节汇总
- wzssyqa
- 帖子: 4010
- 注册时间: 2008-04-07 17:36
- 来自: 泰安人在阜新
Re: 想知道windows的系统分区第一扇区到底是什么
ntldr就是一个文件,还会在那呆着,win写到mbr里的信息就是去哪找这个ntldrliu999 写了:就我所知,windows的引导方式是BIOS-> MBR中的引导代码,
下一步是MBR->主、激活的引导分区的第一扇区(引导扇区),然后主、激活的引导分区的第一扇区里面也写有代码,表示启动ntldr&bootmgr,
还是MBR->ntldr 或 bootmgr文件?
或者分区的第一扇区就是ntldr&bootmgr?
如果把grub4dos的代码写进主、激活的引导分区的第一扇区,ntldr会不会消失?
grub4dos 写入的是去哪找grldr
宇宙=数学 *物理 sssssssss Ubuntu 桌面培训 sssssssss 问打包的问题之前先看
和我一样的新手请看,我看过了,腰不酸了,腿不疼了,上楼也有劲了
想去IRC的点这里——一个比QQ群好N多的东西
和我一样的新手请看,我看过了,腰不酸了,腿不疼了,上楼也有劲了
想去IRC的点这里——一个比QQ群好N多的东西
- smallapple
- 论坛版主
- 帖子: 7868
- 注册时间: 2009-03-28 15:12
Re: 想知道windows的系统分区第一扇区到底是什么
第一扇区有引导代码,指定引导文件是 ntldr, bootmgr 或 grub 等等。。。
会搜索 grldr 文件来引导。如果主、激活的引导分区是ntfs格式,还会导致该分区分区表错误,不能正确识别。如果把grub4dos的代码写进主、激活的引导分区的第一扇区,ntldr会不会消失?
-
- 帖子: 97
- 注册时间: 2009-09-19 17:31
Re: 想知道windows的系统分区第一扇区到底是什么
哦,那这时候实际上是微软的mbr读取主激活引导分区的第一扇区了?上面的帖子讲的是直接寻找ntldr,哪个是正确的?smallapple 写了:第一扇区有引导代码,指定引导文件是 ntldr, bootmgr 或 grub 等等。。。
会搜索 grldr 文件来引导。如果主、激活的引导分区是ntfs格式,还会导致该分区分区表错误,不能正确识别。如果把grub4dos的代码写进主、激活的引导分区的第一扇区,ntldr会不会消失?
分区就不叫mbr了,m是main嘛,是整块硬盘的引导扇区qkbeyond 写了:那一扇区记录(mbr)的512字节的引导代码 可以是ntldr ? 或是grub 的
每个分区也可以有分区的 mbr
这个问题的想法是源于 chainloader +1这条命令,它的意思难道不是说找分区的第一个扇区里的代码?还是它只是个写法,实际上还是去寻找ntldr和bootmgr?
问问题之前要先站内google搜索,时间多了就看置顶帖子,再不行就发问。
有关Windows启动,GNU GRUB和GRUB4DOS的一些启动流程与细节汇总
有关Windows启动,GNU GRUB和GRUB4DOS的一些启动流程与细节汇总
- smallapple
- 论坛版主
- 帖子: 7868
- 注册时间: 2009-03-28 15:12
Re: 想知道windows的系统分区第一扇区到底是什么
微软的mbr不会直接找ntldr,先找第一活动主分区的引导代码,再由引导代码决定找哪个文件引导。
比如用 bootsect /nt60 C: 写引导代码,就会找 bootmgr,如果 bootsect /nt52 C: 或xp 的fixboot C:写引导代码,就找 ntldr。
chainloader +1这条命令,就是找分区的第一个扇区里的代码,可以支持 微软的、grub或mac 。。。的引导代码。
比如用 bootsect /nt60 C: 写引导代码,就会找 bootmgr,如果 bootsect /nt52 C: 或xp 的fixboot C:写引导代码,就找 ntldr。
chainloader +1这条命令,就是找分区的第一个扇区里的代码,可以支持 微软的、grub或mac 。。。的引导代码。
-
- 帖子: 743
- 注册时间: 2007-09-18 8:45
Re: 想知道windows的系统分区第一扇区到底是什么
由mbr指定访问windows的系统分区的第一扇区,再由这个扇区指定是去访问ntldr,还是bootmgr,或者是9x的io.sys
- onshoestring
- 论坛版主
- 帖子: 4666
- 注册时间: 2009-09-06 5:53
- onshoestring
- 论坛版主
- 帖子: 4666
- 注册时间: 2009-09-06 5:53
Re: 想知道windows的系统分区第一扇区到底是什么
明白M$的引导了,小苹果再讲一下grub1,grub4dos,grub2的引导。smallapple 写了:微软的mbr不会直接找ntldr,先找第一活动主分区的引导代码,再由引导代码决定找哪个文件引导。
比如用 bootsect /nt60 C: 写引导代码,就会找 bootmgr,如果 bootsect /nt52 C: 或xp 的fixboot C:写引导代码,就找 ntldr。
chainloader +1这条命令,就是找分区的第一个扇区里的代码,可以支持 微软的、grub或mac 。。。的引导代码。
- smallapple
- 论坛版主
- 帖子: 7868
- 注册时间: 2009-03-28 15:12
Re: 想知道windows的系统分区第一扇区到底是什么
grub1和grub2的mbr相似,包含文件加载程序和启动分区记录,启动顺序
mbr->根据分区表记录找到启动分区->加载相应文件->加载配置文件->进入界面
grub1加载 stage1.5和stage2,再加载menu.lst、
grub2加载 core.img和相关模块,再grub.cfg
grub4dos的grldr.mbr就是直接查找grldr文件并加载,再查找menu.lst
mbr->根据分区表记录找到启动分区->加载相应文件->加载配置文件->进入界面
grub1加载 stage1.5和stage2,再加载menu.lst、
grub2加载 core.img和相关模块,再grub.cfg
grub4dos的grldr.mbr就是直接查找grldr文件并加载,再查找menu.lst
-
- 帖子: 97
- 注册时间: 2009-09-19 17:31
Re: 想知道windows的系统分区第一扇区到底是什么
嗯,十分清晰,谢谢!smallapple 写了:微软的mbr不会直接找ntldr,先找第一活动主分区的引导代码,再由引导代码决定找哪个文件引导。
比如用 bootsect /nt60 C: 写引导代码,就会找 bootmgr,如果 bootsect /nt52 C: 或xp 的fixboot C:写引导代码,就找 ntldr。
chainloader +1这条命令,就是找分区的第一个扇区里的代码,可以支持 微软的、grub或mac 。。。的引导代码。
这个怎么讲,我的C是ntfs的,如果安装grub进入C,直接的后果是什么?smallapple 写了:第一扇区有引导代码,指定引导文件是 ntldr, bootmgr 或 grub 等等。。。
如果主、激活的引导分区是ntfs格式,还会导致该分区分区表错误,不能正确识别。
还有接下来的几个问题:
1、MS的MBR好修复,主激活的启动分区第一扇区的代码怎么修复?只能linux手动dd?
2、删除分区、格式化分区、ghost恢复分区都可以把第一扇区覆盖吗?
3、硬盘的分区都删光后,MBR里的代码应该继续存在吧,如果也要删除该怎么办?或者说是否任何一个新的硬盘mbr已经写成MS格式的了?
问问题之前要先站内google搜索,时间多了就看置顶帖子,再不行就发问。
有关Windows启动,GNU GRUB和GRUB4DOS的一些启动流程与细节汇总
有关Windows启动,GNU GRUB和GRUB4DOS的一些启动流程与细节汇总
- smallapple
- 论坛版主
- 帖子: 7868
- 注册时间: 2009-03-28 15:12
Re: 想知道windows的系统分区第一扇区到底是什么
直接后果就是C盘在Win或Linux下都不能正确识别。这个怎么讲,我的C是ntfs的,如果安装grub进入C,直接的后果是什么?
root (hd0,0)
chainloader +1
boot
后直接返回grub菜单
DOS和98win下的 sys C: (fat32格式)1、MS的MBR好修复,主激活的启动分区第一扇区的代码怎么修复?只能linux手动dd?
xp下用xp光盘启动,修复模式下 fixboot C:
Vista和win7用光盘启动,修复模式下 bootsect /nt60 C:
没xp,vista,win7启动盘的,可以在WinPE下,提取Vista/Win7镜像内的 bootsect.exe文件
bootsect /nt52 C: 或 bootsect /nt60 C:
可以2、删除分区、格式化分区、ghost恢复分区都可以把第一扇区覆盖吗?
完全删除mbr(不含任何代码)可用 0 写入mbr。3、硬盘的分区都删光后,MBR里的代码应该继续存在吧,如果也要删除该怎么办?或者说是否任何一个新的硬盘mbr已经写成MS格式的了?
全新硬盘不含任何代码,分区时用工具写入。
-
- 帖子: 743
- 注册时间: 2007-09-18 8:45
Re: 想知道windows的系统分区第一扇区到底是什么
这个小苹果已经说过了.比如用 bootsect /nt60 C: 写引导代码,就会找 bootmgr,如果 bootsect /nt52 C: 或xp 的fixboot C:写引导代码,就找 ntldr。 这个就是修复啊?1、MS的MBR好修复,主激活的启动分区第一扇区的代码怎么修复?只能linux手动dd?
都可以.2、删除分区、格式化分区、ghost恢复分区都可以把第一扇区覆盖吗?
前一个问题不确定,或许在删除活动主分区之后,也是没有掉的.3、硬盘的分区都删光后,MBR里的代码应该继续存在吧,如果也要删除该怎么办?或者说是否任何一个新的硬盘mbr已经写成MS格式的了?
至于新硬盘的mbr肯定是空的,不然的话,就不会有虚拟机里不分区直接上ghost-xp后operator system ont found的了. 新硬盘的mbr在激活主分区后才产生的.
- onshoestring
- 论坛版主
- 帖子: 4666
- 注册时间: 2009-09-06 5:53
Re: 想知道windows的系统分区第一扇区到底是什么
Uninstalling GRUB 2
Reverting to GRUB Legacy
If a user chooses to return to GRUB legacy (0.97), these steps will remove GRUB 2 and install GRUB.
The command line produces a cleaner uninstall and reinstallation. While adding and removing the packages can be accomplished with Synaptic, certain steps must be accomplished in a terminal.
1. Open a terminal: Applications, Accessories, Terminal.
2.
Make backup copies of the main GRUB 2 folders & files. (Optional)
*
sudo cp /etc/default/grub /etc/default/grub.old
*
sudo cp -R /etc/grub.d /etc/grub.d.old
*
sudo cp -R /boot/grub /boot/grub.old
3. Remove GRUB 2
*
sudo apt-get purge grub2 grub-pc
*
important.png The system will be unbootable until another bootloader is installed.
* Once the packages are removed, many files will still remain in '/boot/grub'
4. Install GRUB 0.97
*
sudo apt-get install grub
5.
With grub installed, the user must still create the menu.lst and stage1/stage2 files by running the following two commands.
1.
sudo update-grub
*
Generates menu.lst
o Tab to "Yes" when prompted.
2.
sudo grub-install /dev/sdX
* Choose the correct device (sda, sdb, etc), normally the one on which Ubuntu is installed.
*
Creates the stage1 & stage2 files in /boot/grub and writes to the MBR.
6. Reboot
Reverting to GRUB Legacy
If a user chooses to return to GRUB legacy (0.97), these steps will remove GRUB 2 and install GRUB.
The command line produces a cleaner uninstall and reinstallation. While adding and removing the packages can be accomplished with Synaptic, certain steps must be accomplished in a terminal.
1. Open a terminal: Applications, Accessories, Terminal.
2.
Make backup copies of the main GRUB 2 folders & files. (Optional)
*
sudo cp /etc/default/grub /etc/default/grub.old
*
sudo cp -R /etc/grub.d /etc/grub.d.old
*
sudo cp -R /boot/grub /boot/grub.old
3. Remove GRUB 2
*
sudo apt-get purge grub2 grub-pc
*
important.png The system will be unbootable until another bootloader is installed.
* Once the packages are removed, many files will still remain in '/boot/grub'
4. Install GRUB 0.97
*
sudo apt-get install grub
5.
With grub installed, the user must still create the menu.lst and stage1/stage2 files by running the following two commands.
1.
sudo update-grub
*
Generates menu.lst
o Tab to "Yes" when prompted.
2.
sudo grub-install /dev/sdX
* Choose the correct device (sda, sdb, etc), normally the one on which Ubuntu is installed.
*
Creates the stage1 & stage2 files in /boot/grub and writes to the MBR.
6. Reboot
- gbcwbz
- 帖子: 297
- 注册时间: 2009-05-09 14:58
- 来自: 江苏
Re: 想知道windows的系统分区第一扇区到底是什么
mbr是寻找激活分区的引导文件吗?
我用GHOST把XP还原到一个逻辑分区然后激活安装,
原来主分区的Vista引导记录是不是就被破坏啦?(我装XP后不能启动Vista了)
我从网上下载了bootsect.exe然后bootsect.exe /nt60 all,
然后把vista分区激活,结果只能显示选择系统的菜单,那么vista分区的引导记录应该是修复了
结果vista和xp都不能进入,不知道为什么
我用GHOST把XP还原到一个逻辑分区然后激活安装,
原来主分区的Vista引导记录是不是就被破坏啦?(我装XP后不能启动Vista了)
我从网上下载了bootsect.exe然后bootsect.exe /nt60 all,
然后把vista分区激活,结果只能显示选择系统的菜单,那么vista分区的引导记录应该是修复了
结果vista和xp都不能进入,不知道为什么

- onshoestring
- 论坛版主
- 帖子: 4666
- 注册时间: 2009-09-06 5:53
Re: 想知道windows的系统分区第一扇区到底是什么
Reinstalling GRUB 2
CHROOT
This method of installation uses the chroot command to gain access to the broken system's files. Once the chroot command is issued, the LiveCD treats the broken system's / as its own. Commands run in a chroot environment will affect the broken systems filesystems and not those of the LiveCD.
1. Boot to the LiveCD Desktop (Ubuntu 9.10 or later).
2.
Open a terminal - Applications, Accessories, Terminal.
3. Determine your normal system partition - (the switch is a lowercase "L")
sudo fdisk -l
* If you aren't sure, run
df -Th. Look for the correct disk size and ext3 or ext4 format.
4. Mount your normal system partition:
* Substitute the correct partition: sda1, sdb5, etc.
* GRUB 2 counts the first drive as "0", but the first partition as "1"
sudo mount /dev/sdXX /mnt # Example: sudo mount /dev/sda1 /mnt
5.
Note: If the user has any other separate system partitions, such as /usr, these should be mounted in a similar manner.
6.
Only if you have a separate boot partition:
* sdYY is the /boot partition designation (examply sdb3)
*
sudo mount /dev/sdYY /mnt/boot
7. Mount devices:
sudo mount --bind /dev/ /mnt/dev
8. Chroot into your normal system device:
sudo chroot /mnt
9. Reinstall GRUB 2:
*
Substitute the correct device - sda, sdb, etc. Do not specify a partition number.
sudo grub-install /dev/sdX
10.
Verify the install (use the correct device, for example sda. Do not specify a partition): sudo grub-install --recheck /dev/sdX
11.
Exit chroot: CTRL-D on keyboard
12. Unmount devices:
sudo umount /mnt/dev
* If you mounted a separate /boot partition:
sudo umount /mnt/boot
13. Unmount last device:
sudo umount /mnt
14. Reboot.
reboot
CHROOT
This method of installation uses the chroot command to gain access to the broken system's files. Once the chroot command is issued, the LiveCD treats the broken system's / as its own. Commands run in a chroot environment will affect the broken systems filesystems and not those of the LiveCD.
1. Boot to the LiveCD Desktop (Ubuntu 9.10 or later).
2.
Open a terminal - Applications, Accessories, Terminal.
3. Determine your normal system partition - (the switch is a lowercase "L")
sudo fdisk -l
* If you aren't sure, run
df -Th. Look for the correct disk size and ext3 or ext4 format.
4. Mount your normal system partition:
* Substitute the correct partition: sda1, sdb5, etc.
* GRUB 2 counts the first drive as "0", but the first partition as "1"
sudo mount /dev/sdXX /mnt # Example: sudo mount /dev/sda1 /mnt
5.
Note: If the user has any other separate system partitions, such as /usr, these should be mounted in a similar manner.
6.
Only if you have a separate boot partition:
* sdYY is the /boot partition designation (examply sdb3)
*
sudo mount /dev/sdYY /mnt/boot
7. Mount devices:
sudo mount --bind /dev/ /mnt/dev
8. Chroot into your normal system device:
sudo chroot /mnt
9. Reinstall GRUB 2:
*
Substitute the correct device - sda, sdb, etc. Do not specify a partition number.
sudo grub-install /dev/sdX
10.
Verify the install (use the correct device, for example sda. Do not specify a partition): sudo grub-install --recheck /dev/sdX
11.
Exit chroot: CTRL-D on keyboard
12. Unmount devices:
sudo umount /mnt/dev
* If you mounted a separate /boot partition:
sudo umount /mnt/boot
13. Unmount last device:
sudo umount /mnt
14. Reboot.
reboot