0% found this document useful (0 votes)
52 views13 pages

Bootcfg Command

The diskpart command allows users to manage hard drive partitions in Windows operating systems. It can be used to create, delete, format, resize, and modify partitions. Some key functions include adding or deleting partitions, assigning drive letters, formatting disks, expanding virtual hard disks, and taking volumes online or offline. The diskpart command is available from the Command Prompt or Recovery Console in many Windows versions.

Uploaded by

chowsaj9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views13 pages

Bootcfg Command

The diskpart command allows users to manage hard drive partitions in Windows operating systems. It can be used to create, delete, format, resize, and modify partitions. Some key functions include adding or deleting partitions, assigning drive letters, formatting disks, expanding virtual hard disks, and taking volumes online or offline. The diskpart command is available from the Command Prompt or Recovery Console in many Windows versions.

Uploaded by

chowsaj9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

https://www.lifewire.

com/more-command-4041467
Bootcfg Command
Use the 'bootcfg' command to edit the boot.ini file


The bootcfg command is a Recovery Console command used to
build or modify the boot.ini file, a hidden file that's used to identify
in what folder, on which partition, and on which hard
drive Windows is located.
Bootcfg Command Availability
The bootcfg command is available from within the Recovery
Console in Windows 2000 and Windows XP. A bootcfg command
is also available from the Command Prompt.
Bootcfg Command Syntax
This syntax is how you must structure the bootcfg command with
any of the available switches described in the table below:
bootcfg <parameter> [arguments...]
The availability of certain switches and other syntax may differ
from operating system to operating system. See How to Read
Command Syntax to learn how to interpret what you see above.
Bootcfg Command Options
Item Description
/add This option allows for the manual entry of a Windows installation in the
boot.ini boot list.
/addsw Adds operating system load options for a specified operating system entry.
/copy Makes a copy of an existing boot entry, to which you can add command-line
options.
/ Configures 1394 port debugging for a specified operating system entry.
dbg1394
/debug Adds or changes the debug settings for a specified operating system entry.
/default Specifies the operating system entry to designate as the default.
/delete Deletes an operating system entry in the [operating systems] section of the
Boot.ini file.
/ems Enables the user to add or change the settings for redirection of the
Emergency Management Services console to a remote computer.
/list This option will list every entry in the boot list in the boot.ini file.
/query Queries and displays the [boot loader] and [operating systems] section
entries from Boot.ini.
/raw Adds operating system load options specified as a string to an operating
system entry in the [operating systems] section of the Boot.ini file.
/rebuild This option will step you through the process of rebuilding the boot.ini file.
/rmsw Removes operating system load options for a specified operating system
entry.
/scan Using this option will instruct bootcfg to scan all drives for installations of
Windows and then display the results.
Bootcfg Command Options
/timeout Changes the operating system time-out value.
Bootcfg Command Examples
bootcfg /rebuild
In this example, the bootcfg command scans all drives for any
Windows installations, displays the results, and steps you through
building the boot.ini file.

Related Commands
The fixboot, fixmbr, and diskpart commands are often used with
the bootcfg command.
Fixboot Command (Recovery
Console)
Learn to use the fixboot command in the Windows XP
Recovery Console
By
Tim Fisher

Updated on September 20, 2023





IN THIS ARTICLE
JUMP TO A SECTION

Availability


Syntax


Examples


Related Commands

Trending Videos
[MUSIC PLAYING]
0 seconds of 37 secondsVolume 0%

The fixboot command is a Recovery Console command that


writes a new partition boot sector to the system partition that
you specify.
Fixboot Command Availability
This command is only available from within the Recovery
Console in Windows 2000 and Windows XP.
Fixboot Command Syntax
fixboot (drive)
drive = This is the drive that a boot sector will be written to
and will replace the system partition that you're currently
logged on to. If no drive is specified, the boot sector will be
written to the system partition that you're currently logged on
to.
Following proper syntax rules is important. See How to Read
Command Syntax for more information.
Fixboot Command Examples
Below is an example showing how to use the fixboot
command.
Write the Boot Sector to C:
fixboot c:

In this example, the boot sector is written to the partition


that's currently labeled as the C: drive—most likely the
partition you're currently logged on to. If that is the case, this
command could be run without the c: option, as
simply fixboot.
Diskpart Command
Use the 'diskpart' command to manage hard drive partitions
By
Tim Fisher

Updated on March 13, 2023





IN THIS ARTICLE
JUMP TO A SECTION

Availability


Syntax


Examples


Related Commands

Trending Videos
0 of 37 secondsVolume 0%

The diskpart Command Prompt command is used to create


or delete partitions on hard drives.
Diskpart Command Availability
The diskpart command is available from within the Command
Prompt in Windows operating systems, including Windows
11, 10, 8, etc.
You can also access this command from the Recovery
Console in Windows 2000 and Windows XP.
Managing partitions is also possible without the use of a
command from within any version of Windows using the Disk
Management tool, or free disk partition software .
Diskpart Command Syntax
diskpart <parameter>
The availability of certain diskpart command switches and
other syntax may differ from operating system to operating
system. See How to Read Command Syntax if you're not
sure how to read the syntax as it's described in this table.
Diskpart Command Parameters
Item Description
active Marks the disk's partition with focus, as active.
add Creates a new partition on the specified hard drive.
assign Assigns a drive letter or mount point to the volume with
focus.
attach vdisk Attaches (sometimes called mounts or surfaces) a virtual
hard disk (VHD) so that it appears on the host computer
as a local hard disk drive.
attributes Displays, sets, or clears the attributes of a disk or
volume.
automount Enables or disables the automount feature.
break Breaks the mirrored volume with focus into two simple
volumes.
clean Removes any and all partition or volume formatting from
the disk with focus.
compact vdiskReduces the physical size of a dynamically expanding
virtual hard disk (VHD) file.
convert Converts file allocation table (FAT) and FAT32 volumes
to the NTFS file system, leaving existing files and
directories intact.
create Creates a partition on a disk, a volume on one or more
disks, or a virtual hard disk (VHD).
delete Removes a specified partition on a specified hard drive.
detach vdisk Stops the selected virtual hard disk (VHD) from
appearing as a local hard disk drive on the host
computer.
detail Displays information about the selected disk, partition,
volume, or virtual hard disk (VHD).
exit Exits the diskpart command interpreter.
expand vdisk Expands a virtual hard disk (VHD) to the size that you
specify.
extend Extends the volume or partition with focus, along with
its file system, into free (unallocated) space on a
disk.
filesystems Displays information about the current file system of
the volume with focus and lists the file systems that
are supported for formatting the volume.
format Formats a disk to accept Windows files.
gpt Assigns the gpt attribute(s) to the partition with focus
on basic GUID partition table (gpt) disks.
help Displays a list of the available commands or detailed
help information on a specified command.
import Imports a foreign disk group into the disk group of the
local computer.
inactive Marks the system partition or boot partition with focus
as inactive on basic master boot record (MBR) disks.
list Displays a list of disks, of partitions in a disk, of
Diskpart Command Parameters
volumes in a disk, or of virtual hard disks (VHDs).
merge vdisk Merges a differencing virtual hard disk (VHD) with its
corresponding parent VHD.
offline Takes an online disk or volume to the offline state.
online Takes an offline disk or volume to the online state.
recover Refreshes the state of all disks in a disk group,
attempt to recover disks in an invalid disk group, and
resynchronizes mirrored volumes and RAID-5 volumes that
have stale data.
rem Provides a way to add comments to a script.
remove Removes a drive letter or mount point from a volume.
repair Repairs the RAID-5 volume with focus by replacing the
failed disk region with the specified dynamic disk.
rescan Locates new disks that may have been added to the
computer.
retain Prepares an existing dynamic simple volume to be used as
a boot or system volume.
san Displays or sets the storage area network (san) policy
for the operating system.
select Shifts the focus to a disk, partition, volume, or
virtual hard disk (VHD).
set id Changes the partition type field for the partition with
focus.
shrink Reduces the size of the selected volume by the amount
you specify.
uniqueid Displays or sets the GUID partition table (GPT)
identifier or master boot record (MBR) signature for the
disk with focus.
Diskpart Command Examples
Here are some examples showing how the diskpart
command can be used:
Create 5 GB Partition
diskpart /add \Device\HardDisk0 5000
In the above example, the diskpart command creates a 5,000
MB partition on the hard drive located at \Device\HardDisk0.
Delete Partition by Name
diskpart /delete \Device\HardDisk0\Partition1
For this one, the diskpart command will remove
the Partition1 partition located on the hard drive \Device\
HardDisk0.
Delete Partition by Letter
diskpart /delete G:
This command will remove the partition currently assigned
the drive letter G.
Select a Disk
diskpartlist diskselect disk 1attributes disk clear readonlyexit
Finally, in this multipart command, diskpart is being used to
select a particular disk, disk 1 in this example, so we can
remove the readonly attribute that's been set on it.
More Command
Examples, options, switches, and additional information on the 'more'
command

The more command paginates the results of other


commands—when it's used with them in the correct way.

If easy access to large command outputs is what you're after,


saving the results of a command using a redirection
operator might be a better way to go. See How to Redirect
Command Output to a File for more on this procedure.

The more command shows the contents of one or more files,


one page at a time, but it's rarely used this way.
The type command duplicates this functionality and is more
commonly used for this particular task.

More Command Availability


The more command is available from within the Command
Prompt in all Windows operating systems including Windows
11, Windows 10, Windows 8, Windows 7, Windows Vista,
and Windows XP.

It's available from Advanced Startup Options and System


Recovery Options as well. Recovery Console in Windows XP
also includes the more command.

The availability of certain more command switches and


other more command syntax may differ from operating
system to operating system.

Syntax for the More Command


This is the syntax required when using the command to
paginate the results of a different command:
command-name | more [/c] [/p] [/s] [/tn] [+n] [/?]

Here is the syntax for using the command to show the


contents of one or more files:

more [/c] [/p] [/s] [/tn] [+n] [drive:][path]filename [[drive:]


[path]filename] ...

See How to Read Command Syntax if you're confused about


how to read the command syntax or how it's explained in the
table below.
More Command Options
Option Explanation
command-name | This is the command you're executing, which could be
any command that might produce more than one page of
results. Include the vertical bar between
the command-name and the more command. Unlike
vertical bars or pipes used in the syntax for other
commands, this one should be taken literally.
/c Use this switch with the more command to
automatically clear the screen prior to execution.
This also clears the screen after each pagination,
meaning you won't be able to scroll up to see the
entire output.
/p The /p switch forces the output of whatever is
being displayed (e.g. a command output or text
file) to respect the "new page" form feed character.
/s This option compacts the output on the screen by
reducing multiple blank lines to a single blank
line.
/tn Use /t to swap out tab characters with n number
of spaces when displaying the output in the Command
Prompt window.
+n The + switch starts the display of whatever is
being outputted to the screen at line n. Specify
line n beyond the maximum lines in the output, and
you won't get an error, just an empty output.
drive:, path, This is the file (filename, optionally
filename with drive and path, if required) to display in
Command Prompt. To view the contents of several
files at once, separate additional instances
of drive:, path, filename with a space.
/? Use the help switch with the more command to
show details about the above options directly in the
Command Prompt window. Executing more /? is the
same as using the help command to execute help
more.
The /e option is also an approved switch but seems to be
implied at all times, at least in newer Windows versions. If
you have trouble getting some of the switches above to work,
try adding /e when executing.

An elevated Command Prompt is not required for full use of


the command but will, of course, be required if you
use command-name | more where the command-
name specified otherwise requires elevation.

Examples of the More Command


Here are a couple examples that show how the command
can be used:
Shorten DIR Command Results

dir | more

In this example, the more command is used with the dir


command, paginating its often lengthy results, the first page
of which would look something like this:
Volume in drive D is Backup & DownloadsVolume
Serial Number is E4XB-9064Directory of D:\
Files\File Cabinet\Manuals01/27/2007 10:42 AM
2,677,353 a89345.pdf03/19/2012 03:06 PM 9,997
,238 ppuwe3.pdf02/24/2006 02:19 PM 1,711,555
bo3522ug.pdf12/27/2005 04:08 PM 125,136 bandd
ek800eknifre.pdf05/05/2005 03:49 PM 239,624 b
anddekfp1400fp.pdf08/31/2008 06:56 PM 1,607,7
90 bdphv1800handvac.pdf05/05/2008 04:07 PM 2,
289,958 dymo1.pdf02/11/2012 04:04 PM 4,262,72
9 ercmspeakers.pdf07/27/2006 01:38 PM 192,707
hb52152blender.pdf12/27/2005 04:12 PM 363,381
hbmmexpress.pdf05/19/2005 06:18 AM 836,249 hp
dj648crefmanual.pdf05/19/2005 06:17 AM 1,678,
147 hpdj648cug.pdf01/26/2007 12:10 PM 413,427
kiddecmkncobb.pdf04/23/2005 04:54 PM 2,486,55
7 kodakdx3700dc.pdf07/27/2005 04:29 AM 77,019
kstruncfreq.pdf07/27/2006 01:38 PM 4,670,356
magmwd7006dvdplayer.pdf04/29/2005 01:00 PM 1,
233,847 msbsb5100qsg.pdf04/29/2005 01:00 PM 1
,824,555 msbsb5100ug.pdf-- More --

At the bottom of that page, all of which you see in the


Command Prompt window, you'll notice a More prompt.
Here, you have additional options, outlined in the section
below. Typically, however, you'd press the spacebar to
advance to the next page, and so on and so on.
Show Text File Contents

more list.txt

In this example, the command displays the contents of


the list.txt file in Command Prompt:
MilkCheeseYogurtAvocadoBroccoliBell peppersCa
bbageEdamameMushroomsSpaghetti squashSpinachC
herriesFrozen berriesMelonsOrangesPearsTanger
inesBrown riceOatmealPastaPita breadQuinoaGro
und beefChickenGarbanzo beans-- More (93%) --

Since the more command has full access to the file you're
displaying, it knows from the start how much it's displaying on
the screen, showing a percentage indication as to how
complete the output is.

This example could be adjusted to start at the 10th line by


slightly modifying the command:
more +10 list.txt

The printout in Command Prompt would display Spinach,


then Cherries, and so on.

Executing more without a filename or any options is allowed,


but doesn't do anything useful.

Options at the 'More' Prompt


Use one of these options when you encounter
a More prompt:
Additional More Command Options
Optio Explanation
n
Press spacebar to advance to the next page.
Press Enter to advance to the next line.
pn Press p and then, when prompted, the number of lines, n, that you'd like to see
next, followed by Enter.
sn Press s and then, when prompted, the number of lines, n, that you'd like to skip
before displaying the next page. Press Enter to proceed.
f Press f to skip to the next file in your multi-file list of files to display. If you've
only specified a single file to output, or you're using the more command with
another command, using f will exit whatever you're showing right now and
return you to the prompt.
q Press q to exit display of the file(s) or command output. This option is the
same as using CTRL+C to abort.
= Use the = sign (just once) to show the line number of the output that you're at
right now (i.e. the line you're seeing just above -- More --).
? Type a ? when you're between pages to show a brief reminder of your options
at this prompt.
If you can't make these options work, execute the command
again but add /e to the list of options you're using.

You might also like