|
willsion
高级用户
   
积分 793
发帖 312
注册 2004-9-2
状态 离线
|
『楼 主』:
(已解决)请教一下:如何检测一个分区是否属于激活分区
使用 LLM 解释/回答一下
如题,如何用批处理检测到一个分区是否激活(active)分区,
即系统启动的分区(一般情况下是C盘,但也有可能是D盘)。
请各位大侠指教。
谢谢。
Last edited by willsion on 2008-9-22 at 01:25 PM ]
As the title says, how to use batch processing to detect whether a partition is an active (active) partition, that is, the partition from which the system starts (usually the C drive, but it may also be the D drive).
Please give your advice, great experts.
Thanks.
Last edited by willsion on 2008-9-22 at 01:25 PM ]
|
|
2007-3-10 12:32 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
|
2007-3-10 12:36 |
|
|
willsion
高级用户
   
积分 793
发帖 312
注册 2004-9-2
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
楼上的朋友可能误会我的意思了,我是指启动分区,不是安装系统的分区。
楼上的命令是显示当前操作系统所在分区。
The friend upstairs may have misunderstood my meaning. I mean the boot partition, not the partition where the system is installed. The command upstairs is to display the partition where the current operating system is located.
|
|
2007-3-10 21:50 |
|
|
zhxy9804
中级用户
  
积分 208
发帖 97
注册 2006-12-28
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
现在大家都把cmd当成灵药了,就差cmd怎么做饭了◎!!
Now everyone treats cmd as a panacea, just short of how to cook with cmd◎!
|
|
2007-3-11 19:29 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
请教一下,什么是 启动分区 ?
Ask for advice, what is the boot partition?
|
|
2007-3-11 22:21 |
|
|
willsion
高级用户
   
积分 793
发帖 312
注册 2004-9-2
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
Originally posted by lxmxn at 2007-3-11 10:21 PM:
请教一下,什么是 启动分区 ?
对不起,我可能没有说明白。
我指的启动分区是,在对硬盘进行分区操作时,设为“active”(激活)的分区。
Originally posted by lxmxn at 2007-3-11 10:21 PM:
I would like to ask, what is a boot partition?
I'm sorry, I might not have made it clear.
The boot partition I'm referring to is the partition set as "active" (activated) during the hard disk partitioning operation.
|
|
2007-3-12 10:12 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
哦,这个不知道啊,看论坛其它的高手有没什么办法。
Oh, I don't know about this. Let's see if other experts in the forum have any solutions.
|
|
2007-3-12 10:19 |
|
|
willsion
高级用户
   
积分 793
发帖 312
注册 2004-9-2
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
Originally posted by lxmxn at 2007-3-12 10:19 AM:
哦,这个不知道啊,看论坛其它的高手有没什么办法。
多谢!
Originally posted by lxmxn at 2007-3-12 10:19 AM:
Oh, I don't know about this. Let's see if other experts in the forum have any solutions.
Thanks!
|
|
2007-3-13 00:28 |
|
|
oilio
高级用户
    前进者
积分 641
发帖 303
注册 2007-1-10
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
wmic partition get name,bootpartition,bootable
wmic partition get name,bootpartition,bootable
|

我相信总有一天,总会遇到一个人可以相濡以沫、相吻以湿! |
|
2007-3-13 01:31 |
|
|
willsion
高级用户
   
积分 793
发帖 312
注册 2004-9-2
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
Originally posted by oilio at 2007-3-13 01:31 AM:
wmic partition get name,bootpartition,bootable
有没有办法将检测出来的分区(如0,1)转换为当前系统识别的磁盘号(如C:,D:)
Originally posted by oilio at 2007-3-13 01:31 AM:
wmic partition get name,bootpartition,bootable
Is there a way to convert the detected partitions (such as 0, 1) into the disk numbers (such as C:, D:) recognized by the current system?
|
|
2007-3-13 01:52 |
|
|
lianjiang2004
金牌会员
     
积分 3946
发帖 1884
注册 2006-1-20
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
可用第三方软件。
如:dpitw.exe,ghost32等。
------------------------
No. Type PartitionType Active StartSector Sectors MBytes
0:1 Primary HPFS/NTFS Yes 63 15438402 7538
0:2 Primary Hide HPFS/NTFS 15438465 15293880 7467
0:3 Extended LBA 30732345 203704200 99464
0:4 Logic HPFS/NTFS 30732408 20482812 10001
0:5 Logic HPFS/NTFS 51215283 30732282 15005
0:6 Logic Win95 FAT32 81947628 61448562 30004
0:7 Logic HPFS/NTFS 143396253 90831447 44351
0:8 Logic Hide FAT16 234227763 208782 101
Available third-party software.
Such as: dpitw.exe, ghost32, etc.
------------------------
No. Type PartitionType Active StartSector Sectors MBytes
0:1 Primary HPFS/NTFS Yes 63 15438402 7538
0:2 Primary Hide HPFS/NTFS 15438465 15293880 7467
0:3 Extended LBA 30732345 203704200 99464
0:4 Logic HPFS/NTFS 30732408 20482812 10001
0:5 Logic HPFS/NTFS 51215283 30732282 15005
0:6 Logic Win95 FAT32 81947628 61448562 30004
0:7 Logic HPFS/NTFS 143396253 90831447 44351
0:8 Logic Hide FAT16 234227763 208782 101
|

Windows 一键还原
http://www.yjhy.com |
|
2007-3-13 02:30 |
|
|
willsion
高级用户
   
积分 793
发帖 312
注册 2004-9-2
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
Originally posted by lianjiang2004 at 2007-3-13 02:30 AM:
可用第三方软件。
如:dpitw.exe,ghost32等。
------------------------
No. Type PartitionType Active StartSector Sectors MBytes
0:1 Primary HPFS/NTFS ...
试试看,谢谢。
Originally posted by lianjiang2004 at 2007-3-13 02:30 AM:
Available third-party software.
Such as: dpitw.exe, ghost32, etc.
------------------------
No. Type PartitionType Active StartSector Sectors MBytes
0:1 Primary HPFS/NTFS ...
Give it a try, thanks.
|
|
2007-3-13 03:42 |
|
|
happygogo
新手上路

积分 10
发帖 5
注册 2006-10-18
状态 离线
|
『第 13 楼』:
er
使用 LLM 解释/回答一下
我要是能有某些人那么强多好
How nice it would be if I could be as good as some people
|
|
2007-3-13 05:27 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
Originally posted by lxmxn at 2007-3-11 09:21 AM:
请教一下,什么是 启动分区 ?
活动分区是指可以引导的分区,也就是说有引导标识的分区80
在ntfs里,活动分区除了可引导外更标志着是否能安装操作系统
Originally posted by lxmxn at 2007-3-11 09:21 AM:
Please ask, what is a boot partition?
An active partition refers to a partition that can be booted, that is, a partition with a boot mark 80. In NTFS, an active partition not only can be booted but also marks whether an operating system can be installed.
|
|
2007-3-13 06:50 |
|
|
leacry
新手上路

积分 12
发帖 7
注册 2006-3-11
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
试试这个:(例如检测C:)
*:\detect.bat c:
以下是“detect.bat”内容:
@echo off
if exist %1\ntldr goto y
echo 该分区不是激活的引导分区!
pause
goto exit
:y
echo %1是激活的引导分区!
pause
goto exit
:exit
exit
---------------------------------------------------
前提:有安装系统是2000、XP、2003
如果是98、me的话可以将“ntldr”换掉
原理一样。要是纯DOS,就麻烦点了~
主分区可以有最多4个,而激活的分区
必须是主分区,系统的引导分区又必须
是激活的主分区。
Try this: (for example, detecting drive C:)
*:\detect.bat c:
The following is the content of "detect.bat":
@echo off
if exist %1\ntldr goto y
echo This partition is not an active boot partition!
pause
goto exit
:y
echo %1 is an active boot partition!
pause
goto exit
:exit
exit
---------------------------------------------------
Prerequisite: There are installed systems of 2000, XP, 2003
If it is 98, me, you can replace "ntldr"
The principle is the same. If it is pure DOS, it is more troublesome~
A primary partition can have a maximum of 4, and the active partition
must be a primary partition, and the system's boot partition must also
be an active primary partition.
|
|
2007-12-24 10:39 |
|