Article Title: Use Bcdedit to create a Linux system boot. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Bcdedit is a command line tool in Windows Vista used to create and reconfigure bootloader without the need to use the boot. ini file. Next we will talk about how to use bcdedit to guide Linux.
1. Overview
In the xp era, you can modify the hidden System File boot. ini in the system partition (c: \) to guide other systems.
In the vista era, a new guiding method is used, so the configuration is different.
First, open the command window in win R, execute cmd, and open the command prompt.
Input bcdedit /? View related help information
2. Use bcdedit to configure the new boot item
> Bcdedit/create/d "Linux"/application osloader
# Create a new item, that is, create a new boot item. A guid value is returned after the new boot item is created.
Format: {xxxxxxxx-xxxx-xxxxxxxxxxxx}
> Bcdedit/set {xxxxxxxx-xxxx-xxxxxxxxxxxx} drive partition = C:
# Set the partition where the new boot item file is located
> Bcdedit/set {xxxxxxxx-xxxx-xxxxxxxxxxxx} path \ linux. bin # Set the relative path of the startup Item file in the partition. Note that "\" is required before the file, indicating that it is under the root directory of the partition. If the file is in c: \ windows \, it should be changed to \ windows \ linux. In addition, there is a space behind the path.
> Bcdedit/displayorder {xxxxxxxx-xxxx-xxxxxxxxxxxx}/addlast
# Set the boot item sequence. addlast can also be changed to addfirst to add it to the beginning of the boot item list. So far, the operation to add a new boot item has been successful, but it cannot be started yet. Why ??
> Bcdedit/default {xxxxxxxx-xxxx-xxxxxxxxxxxx}
# This command is optional. If you want to set this item as the default boot item, run it.
Run bcdedit to check the configuration.
3. The Boot item has been configured, but cannot be guided. Why?
Because the boot item file does not exist.
4. boot to the linux rescue mode with a CD
For Fedora, the system will be mounted under/mnt/sysimage/, and then execute the command
# Dd if =/mnt/sysimage/dev/sda5 of =/mnt/sysimage/dev/sdb/linux. bin bs = 512 count = 1
In the command, assume that grub is installed in the first 512 bytes of the sda5 partition, and output linux. bin to the device sdb.
Restart windows vista and copy linux. bin to c: \. for insurance purposes, it is best to change its attribute to "s h r", that is, "system, read-only, hidden"
> Attrib s r h c: \ linux. bin
Complete.