![]() |
|
Guides All Guides and HOWTO's. |
![]() |
|
Thread Tools | Display Modes |
|
|||
![]() Quote:
Microsoft has moved boot information into Boot Configuration Data (BCD), and provides the bcdedit command-line utility to fully manage this database. There are still a few duplicated features controlling multibooting found in the Systems applet GUI (Start | Control Panel | System and Maintenance | System | Advanced system settings | Advanced tab | Startup and Recovery Settings | System startup), but adding new BCD entries can only be done from the command-line. Those familiar with earlier versions of Windows (but unfamiliar with UAC...) will undoubtedly be surprised when they try to invoke bcdedit from the command-line after logging in as an Administrator: Code:
C:\Windows\System32>bcdedit The boot configuration data store could not be opened. Access is denied. C:\Windows\System32> UAC can be disabled, but this defeats the purpose of UAC's security features. Running bcdedit with no arguments provides an overview of the BCD database: Code:
C:\Windows\system32>bcdedit Windows Boot Manager -------------------- identifier {bootmgr} device partition=C: description Windows Boot Manager locale en-US inherit {globalsettings} default {default} resumeobject {f4bad82f-d5dc-11db-b83c-fff6129dfa33} displayorder {default} {current} toolsdisplayorder {memdiag} timeout 10 customactions 0x10000ba000001 0x54000001 custom:54000001 {572bcd55-ffa7-11d9-aae0-0007e994107d} Windows Boot Loader ------------------- identifier {current} device partition=C: path \Windows\system32\winload.exe description Microsoft Windows Vista locale en-US inherit {bootloadersettings} osdevice partition=C: systemroot \Windows resumeobject {f4bad82f-d5dc-11db-b83c-fff6129dfa33} nx OptIn C:\Windows\system32> Code:
C:\Windows\system32>bcdedit /? BCDEDIT - Boot Configuration Data Store Editor The Bcdedit.exe command-line tool modifies the boot configuration data store. The boot configuration data store contains boot configuration parameters and controls how the operating system is booted. These parameters were previously in the Boot.ini file (in BIOS-based operating systems) or in the nonvolatile RAM entries (in Extensible Firmware Interface-based operating systems). You can use Bcdedit.exe to add, delete, edit, and append entries in the boot configuration data store. For detailed command and option information, type bcdedit.exe /? <command>. For example, to display detailed information about the /createstore command, type: bcdedit.exe /? /createstore For an alphabetical list of topics in this help file, run "bcdedit /? TOPICS". Commands that operate on a store ================================ /createstore Creates a new and empty boot configuration data store. /export Exports the contents of the system store to a file. This file can be used later to restore the state of the system store. /import Restores the state of the system store using a backup file created with the /export command. Commands that operate on entries in a store =========================================== /copy Makes copies of entries in the store. /create Creates new entries in the store. /delete Deletes entries from the store. Run bcdedit /? ID for information about identifiers used by these commands. Commands that operate on entry options ====================================== /deletevalue Deletes entry options from the store. /set Sets entry option values in the store. Run bcdedit /? TYPES for a list of datatypes used by these commands. Run bcdedit /? FORMATS for a list of valid data formats. Commands that control output ============================ /enum Lists entries in the store. /v Command-line option that displays entry identifiers in full, rather than using names for well-known identifiers. Use /v by itself as a command to display entry identifiers in full for the ACTIVE type. Running "bcdedit" by itself is equivalent to running "bcdedit /enum ACTIVE". Commands that control the boot manager ====================================== /bootsequence Sets the one-time boot sequence for the boot manager. /default Sets the default entry that the boot manager will use. /displayorder Sets the order in which the boot manager displays the multiboot menu. /timeout Sets the boot manager time-out value. /toolsdisplayorder Sets the order in which the boot manager displays the tools menu. Commands that control Emergency Management Services for a boot application ========================================================================== /bootems Enables or disables Emergency Management Services for a boot application. /ems Enables or disables Emergency Management Services for an operating system entry. /emssettings Sets the global Emergency Management Services parameters. Command that control debugging ============================== /bootdebug Enables or disables boot debugging for a boot application. /dbgsettings Sets the global debugger parameters. /debug Enables or disables kernel debugging for an operating system entry. C:\Windows\system32> http://technet.microsoft.com/en-us/l.../cc709667.aspx The official OpenBSD FAQ describes what is needed to copy OpenBSD's PBR to a file: http://openbsd.org/faq/faq4.html#Multibooting ...and this is no different when using Vista. Even if Microsoft has enhanced the boot manager interface, the basic process of booting through the MBR (Master Boot Record) has not fundamentally changed. It is still necessary to provide enough information to the boot manager to load OpenBSD's kernel into memory from its appropriate partition. The remainder of this document will be tagged with "MANDATORY" & "SUPPLEMENTARY" as some steps are necessary while others are provided for to show additional functionality.
Code:
C:\Windows\system32>bcdedit /create /d "OpenBSD/i386 4.5" /application bootsector The entry {05a763ce-d81b-11db-b3ec-000000000000} was successfully created. C:\Windows\System32>
Code:
C:\Windows\system32>bcdedit /? create This command creates a new entry in the boot configuration data store. If a well-known identifier is specified, then the /application, /inherit and /device options cannot be specified. If the <id> is not specified, or if <id>is not well-known, then you must specify an /application, /inherit or /device option. bcdedit /create [{<id>}] /d <description> [-application <apptype> | /inherit [<apptype>] | /inherit DEVICE | /device] <id> Specifies the identifier to be used for the new entry. For more information about identifiers, run "bcdedit /? ID". <description> Specifies the description to be applied to the new entry. /application <apptype> Specifies that the new entry must be an application entry. <apptype> specifies the application type. <apptype> can be one of the following: BOOTSECTOR OSLOADER RESUME STARTUP If you use other application types instead of one of these, you must also specify a well-known identifier. /inherit [<apptype>] Specifies that the new entry must be an inherit entry, and <apptype> specifies the application type. If <apptype> is not specified, then the entry can be inherited by any entry. If specified, <apptype> can be one of the following: BOOTMGR BOOTSECTOR FWBOOTMGR MEMDIAG NTLDR OSLOADER RESUME The modifier prevents the inherit entry from being inherited by an application entry of <apptype>. /inherit DEVICE Specifies that the new entry must be an inherit entry, and that the entry can only be inherited by a device options entry. /device Specifies that the new entry must be an additional device options entry. Examples: The following command creates a NTLDR based OS loader entry (Ntldr): bcdedit /create {ntldr} /d "Earlier Windows OS Loader" The following command creates a RAM disk additional options entry: bcdedit /create {ramdiskoptions} /d "Ramdisk options" The following command creates a new operating system boot entry: bcdedit /create /d "Windows Vista" /application osloader The following command creates a new debugger settings entry: bcdedit /create {dbgsettings} /d "Debugger Settings" C:\Windows\system32>
Code:
C:\Windows\system32>bcdedit /set {05a763ce-d81b-11db-b3ec-000000000000} device boot The operation completed successfully. C:\Windows\system32>bcdedit /set {05a763ce-d81b-11db-b3ec-000000000000} path \openbsd.pbr The operation completed successfully. C:\Windows\system32>
Code:
C:\Windows\system32>bcdedit /? set This command sets an entry option value in the boot configuration data store. bcdedit [/store <filename>] /set [{<id>}] <datatype> <value> <filename> Specifies the store to be used. If this option is not specified, the system store is used. For more information, run "bcdedit /? store". <id> Specifies the identifier of the entry to be modified. If not specified, {current} is used. For more information about identifiers, run "bcdedit /? ID". <datatype> Specifies the option data type that will be created or modified. Run "bcdedit /? TYPES" for more information about data types. <value> Specifies the value that should be assigned to the option. The format of <value> depends on the data type specified. Run "bcdedit /? FORMATS" for more information about data formats. Examples: The following command sets the application device to the partition C: for the specified operating system entry: bcdedit /set {cbd971bf-b7b8-4885-951a-fa03044f5d71} device partition=C: The following command sets the application path to \windows\system32\winload.exe for the specified operating system entry: bcdedit /set {cbd971bf-b7b8-4885-951a-fa03044f5d71} path \windows\system32\winload.exe The following command sets the NX policy to OptIn for the current operating system boot entry. bcdedit /set nx optin C:\Windows\system32>
Code:
C:\Windows\system32>bcdedit /displayorder {05a763ce-d81b-11db-b3ec-000000000000} /addfirst The operation completed successfully. C:\Windows\system32>
Code:
C:\Windows\system32>bcdedit /? displayorder This command sets the display order to be used by the boot manager. bcdedit /displayorder <id> [...] [ /addfirst | /addlast | /remove ] <id> [...] Specifies a list of identifiers that make up the display order. At least one identifier must be specified and they must be separated by spaces. For more information about identifiers, run "bcdedit /? ID". /addfirst Adds the specified entry identifier to the top of the display order. If this switch is specified, only a single entry identifier may be specified. If the specified identifier is already in the list, it will be moved to the top of the list. /addlast Adds the specified entry identifier to the end of the display order. If this switch is specified, only a single entry identifier may be specified. If the specified identifier is already in the list, it is moved to the end of the list. /remove Removes the specified entry identifier from the display order. If this switch is specified, only a single entry identifier may be specified. If the identifier is not in the list then the operation has no effect. If the last entry is being removed, then the display order value is deleted from the boot manager entry. Examples: The following command sets two OS entries and the NTLDR based OS loader in the boot manager display order: bcdedit /displayorder {802d5e32-0784-11da-bd33-000476eba25f} {cbd971bf-b7b8-4885-951a-fa03044f5d71} {ntldr} The following command adds the specified OS entry to the end of the boot manager display order: bcdedit /displayorder {802d5e32-0784-11da-bd33-000476eba25f} /addlast C:\Windows\system32>
Code:
C:\Windows\system32>bcdedit /default {05a763ce-d81b-11db-b3ec-000000000000} The operation completed successfully. C:\Windows\system32>
Code:
C:\Windows\system32>bcdedit /? default This command sets the default entry that the boot manager will use when the timeout expires. bcdedit /default <id> <id> Specifies the identifier of the boot entry to be used as the default when the time-out expires. For information about identifiers, run "bcdedit /? ID". Examples: The following command sets the specified entry as the default boot manager entry: bcdedit /default {cbd971bf-b7b8-4885-951a-fa03044f5d71} The following command sets the NTLDR based OS loader as the default entry: bcdedit /default {ntldr} C:\Windows\system32>
Code:
C:\Windows\system32>bcdedit /timeout 10 The operation completed successfully. C:\Windows\system32>
Code:
C:\Windows\system32>bcdedit /? timeout This command sets the time to wait, in seconds, before the boot manager selects a default entry. For information about setting the default entry, run "bcdedit /? default". bcdedit /timeout <timeout> <timeout> Specifies the time to wait, in seconds, before the boot manager selects a default entry. Example: The following command sets the boot manager <timeout> to 30 seconds: bcdedit /timeout 30 C:\Windows\system32> Code:
C:\Windows\system32>bcdedit Windows Boot Manager -------------------- identifier {bootmgr} device partition=C: description Windows Boot Manager locale en-US inherit {globalsettings} default {default} resumeobject {f4bad82f-d5dc-11db-b83c-fff6129dfa33} displayorder {default} {current} toolsdisplayorder {memdiag} timeout 10 customactions 0x10000ba000001 0x54000001 custom:54000001 {572bcd55-ffa7-11d9-aae0-0007e994107d} Real-mode Boot Sector --------------------- identifier {default} device boot path \openbsd.pbr description OpenBSD/i386 4.5 Windows Boot Loader ------------------- identifier {current} device partition=C: path \Windows\system32\winload.exe description Microsoft Windows Vista locale en-US inherit {bootloadersettings} osdevice partition=C: systemroot \Windows resumeobject {f4bad82f-d5dc-11db-b83c-fff6129dfa33} nx OptIn C:\Windows\system32> Questions and/or comments are welcomed. |
|
||||
![]()
bcdedit is truly a cryptic and difficult command-line tool, some time ago I needed to copy a Vista boot entry and add some debug flags -- I could not get the job done with bcdedit.
I had to resort to a GUI tool, EasyBCD ![]() As a slightly related note, I noticed that the FreeBSD bootloader can boot Vista, I used the bootloader from CURRENT, not sure if the one from 6/7 is ``Vista Ready''. Quote:
Note that does not work with Win+R, do'h! |
|
|||
![]()
let's say you have vista and you shrink your ntfs partition and install BSD. you've got Vista on 1st partition and BSD on 2nd partition.
rather than a commercial product you might use a free linux live cd with GNU parted (or the gui Gparted), i.e. the ntfsresize utility, to shrink your ntfs partition. parted has a 'set' command which is very useful for multibooting. alas, there's no parted for BSD (yet), it's linux only. but BSD's fdisk has the -a switch. how it's done: while you're in linux via the live cd, from the command line you set a boot flag (0x80) on one of the partitions. here we set it to partition 2. this way we will boot to BSD. Code: (parted)set 2 boot on when you reboot, the OS that boots is the one with the boot flag, the one marked as "Active": the 2nd partition. your BSD partition. if you set the boot flag on your Vista NTFS partition (partition 1) then the system will reboot to Vista. simple. Code: (parted)set 1 boot on or (if you are in BSD) fdisk -a and follow the instructions what do you do while you're in Vista and you want to set boot flags? to boot to BSD. are there windows equivalents of GNU parted or BSD's fdisk? not that i know of. bcdedit is a "boot manager" (as is "grub"), which is something different. these "managers" aim to boot OS's by acting as a go-between, taking control before letting the OS's native boot loader do its job. do we need a go-between? parted and fdisk aim to edit partitions which is what switching the boot flag involves- a very small hex edit. i found a small utility called plppart32 on the plop (system recovery) linux site. easier to use than bcdedit? have a look. it requires just one more line than parted to set the next reboot. while in Vista we can set the boot flag on 2nd partition (BSD) like this Code: plppart32 -d 0 -p 2 -b 0x80 # set boot flag on 2nd slice plppart32 -d 0 -p 1 -b 0 # remove boot flag from 1st slice in sum the boot flag is all that needs to be manipulated to choose an OS to boot from hence you can [just in case] save a copy of your windows MBR (tar'd or zipped) [just in case] keep a linux systemrescuecd on hand use a tool like GNU parted in linux, or fdisk in BSD, and use a tool like plpprt32 in Vista to make the simple hex edit to set the boot flag. simple and easy. let each OS use its own boot loader, with no go-betweens. Last edited by argv; 2nd April 2010 at 09:25 AM. |
|
|||
![]()
Given that Microsoft made Windows 7 Release Candidate freely available to the public last week:
http://www.microsoft.com/windows/win.../download.aspx ...I was curious to see if anything had changed with respect to multibooting OpenBSD. This time, I was interested in following up using a recent snapshot of OpenBSD-current. For more information on installing the Release Candidate, see the above link. For installing OpenBSD, see Section 4 of the FAQ: http://openbsd.org/faq/faq4.html The important thing to remember when installing OpenBSD after any version of Windows is to make sure that the question "Do you want to use the entire disk?" is answered no. Answering yes to this question overwrites the MBR which will make reclaiming Windows very difficult if not impossible. Also note that this message chronicles a new installation of both operating systems. Supposedly, the BCD database from a Vista installation can be migrated when upgrading to Windows 7, but I chose to start fresh on both fronts. User Access Control is still present in Windows 7, & running bcdedit with elevated Administrator rights is still required. What has (minimally) changed is how to invoke bcdedit correctly. Two means found are:
Code:
C:\Windows\system32>bcdedit Windows Boot Manager -------------------- identifier {bootmgr} device partition=\Device\HarddiskVolume1 description Windows Boot Manager locale en-US inherit {globalsettings} default {current} resumeobject {0154a86c-3d41-11de-bd67-a7060316bbb1} displayorder {current} toolsdisplayorder {memdiag} timeout 30 Windows Boot Loader ------------------- identifier {current} device partition=C: path \Windows\system32\winload.exe description Windows 7 locale en-US inherit {bootloadersettings} recoverysequence {0154a86e-3d41-11de-bd67-a7060316bbb1} recoveryenabled Yes osdevice partition=C: systemroot \Windows resumeobject {0154a86c-3d41-11de-bd67-a7060316bbb1} nx OptIn C:\Windows\system32> Code:
C:\Windows\system32>bcdedit /create /d "OpenBSD/i386 4.5-current" /application bootsector The entry {0154a872-3d41-11de-bd67-a7060316bbb1} was successfully created. C:\Windows\system32>bcdedit /set {0154a872-3d41-11de-bd67-a7060316bbb1} device boot The operation completed successfully. C:\Windows\system32>bcdedit /set {0154a872-3d41-11de-bd67-a7060316bbb1} path \openbsd.pbr The operation completed successfully. C:\Windows\system32> One might guess (which I did...) that something else is needed to trigger database insertion. Perhaps specifying where the entry is to appear in the boot menu is necessary: Code:
C:\Windows\system32>bcdedit /displayorder {0154a872-3d41-11de-bd67-7060316bbb1 } /addlast The operation completed successfully. C:\Windows\system32> Code:
C:\Windows\system32>bcdedit Windows Boot Manager -------------------- identifier {bootmgr} device partition=\Device\HarddiskVolume1 description Windows Boot Manager locale en-US inherit {globalsettings} default {current} resumeobject {0154a86c-3d41-11de-bd67-a7060316bbb1} displayorder {current} {0154a874-3d41-11de-bd67-a7060316bbb1} toolsdisplayorder {memdiag} timeout 30 Windows Boot Loader ------------------- identifier {current} device partition=C: path \Windows\system32\winload.exe description Windows 7 locale en-US inherit {bootloadersettings} recoverysequence {0154a86e-3d41-11de-bd67-a7060316bbb1} recoveryenabled Yes osdevice partition=C: systemroot \Windows resumeobject {0154a86c-3d41-11de-bd67-a7060316bbb1} nx OptIn Real-mode Boot Sector --------------------- identifier {0154a872-3d41-11de-bd67-a7060316bbb1} device boot path \openbsd.pbr description OpenBSD/i386 4.5-current C:\Windows\system32> Code:
Windows failed to start. A recent hardware or software change might be the cause. ... file: \openbsd.pbr status: 0xc000000f The selected entry could not be loaded because the application is missing or corrupt. Code:
C:\Windows\system32>bcdedit /set {0154a872-3d41-11de-bd67-a7060316bbb1} device partition=c: The operation completed successfully. C:\Windows\system32> Code:
C:\Windows\system32>bcdedit Windows Boot Manager -------------------- identifier {bootmgr} device partition=\Device\HarddiskVolume1 description Windows Boot Manager locale en-US inherit {globalsettings} default {current} resumeobject {0154a86c-3d41-11de-bd67-a7060316bbb1} displayorder {current} {0154a872-3d41-11de-bd67-a7060316bbb1} toolsdisplayorder {memdiag} timeout 30 Windows Boot Loader ------------------- identifier {current} device partition=C: path \Windows\system32\winload.exe description Windows 7 locale en-US inherit {bootloadersettings} recoverysequence {0154a86e-3d41-11de-bd67-a7060316bbb1} recoveryenabled Yes osdevice partition=C: systemroot \Windows resumeobject {0154a86c-3d41-11de-bd67-a7060316bbb1} nx OptIn Real-mode Boot Sector --------------------- identifier {0154a872-3d41-11de-bd67-a7060316bbb1} device partition=C: path \openbsd.pbr description OpenBSD/i386 4.5-current C:\Windows\system32> None of this is complicated, but troubleshooting required some knowledge of where to find Microsoft-specific information, & perhaps this lengthy explanation will help others successfully configure a multibooting environment of these two operating systems. FWIW. |
|
|||
![]()
AFAIK, EasyBCD have a new version which is compatible with malware v7.
|
|
|||
![]()
This is an excerpt from the OpenBSD faq4:
Setting active partitions This is probably the most overlooked, and yet, sometimes the best solution for multibooting. Simply set the active partition in whatever OS you are currently using to be the one you want to boot by default when you next boot. Virtually every OS offers a program to do this; OpenBSD's is [162]fdisk(8), similar named programs are in Windows 9x and DOS, and many other operating systems. This can be highly desirable for OSs or systems which take a long time to shut down and reboot -- you can set it and start the reboot process, then walk away, grab a cup of coffee, and come back to the system booted the way you want it -- no waiting for the Magic Moment I am 100% in agreement with this. Let each operating system boot *with its own boot loader*. Simple and easy. We do not need boot managers. We can multiboot by simply changing the boot flag. Alas, Windows does not have an equivalent to GNU Parted or BSD fdisk. To my knowledge, there is no utility in Windows that will simply change the boot flag. If one tries to change a boot flag with the Windows diskpart.exe utility (which can "set" a primary partition as "active"), it will write an entire Microsoft-style MBR. That's more than switching a boot flag, and it's not what we want for multibooting. plppart32.exe is the best Win32 utility I have found for switching the boot flag. It's just too bad Microsoft will not include one of their own with their OS. |
|
||||
![]()
For short time I thought that I came to wrong forum.
![]()
__________________
religions, worst damnation of mankind "If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”. vermaden's: links resources deviantart spreadbsd |
|
|||
![]()
I stumbled upon this forum while searching the Internet for information about using BCD to dual boot Windows 7 and Linux and have to say it is the most comprehensive set of instructions I have managed to find yet, so should like to compliment ocicat on his extremely well set out guide. I am fairly experienced in using boot.ini to dual/multi boot Windows XP and Linux on a single hard drive but have still to get my head round the new BCD, especially with the added complication of a second hard drive as I now have.
I hope I may be allowed to post here. Although I am using Linux rather than OpenBSD the principles are surely pretty much the same (identical?) and therefore my queries hopefully will be of interest and relevance to OpenBSD users. My situation is as follows. I have two separate hard drives. My main C: drive contains Windows 7 Home Premium 64 bit, which came pre-installed with the computer. The second hard drive was originally empty. The C: drive has two partitions, shown in Windows Disk Management as follows: 1. System Reserved, 100 MB NTFS, Healthy (System, Active, Primary Partition) 2. (C:), 232.79 GB (NTFS), Healthy (Boot, Page File, Crash Dump, Primary Partition) The second hard drive now has two partitions, which I created using Windows Disk Management, prior to installing Ubuntu 10.04 64 bit as follows: 1. /dev/sdb1, Linux root partition, Ext4, 230.88 GB 2. /dev/sdb2, Linux swap partition, 2.00 GB I placed Ubuntu’s Grub on its root partition. I then took a copy of the Linux bootsector, which I called linux.bin. My first problem was knowing where on Windows to place the copy of the Linux bootsector. I have read elsewhere that it needs to be in the same location as the bootmgr file. Unfortunately I am not quite sure where bootmgr is on my system. A Windows search for bootmgr shows nothing. (And, yes, I do have all the various options ticked to (i) show hidden files, folders and drives, (ii) show protected system operating files, (iii) when searching non-indexed locations include system directories.) If I use Windows Explorer to do a manual search, there is no bootmgr in the root C: drive. However in C:\Windows\Boot\EFI\en-US\ there is a file called bootmgr.efi.mui, along with bootmgfw.efi.mui and memtest.efi.mui. I am not sure whether this efi file is the bootmgr file. The only other place I can think it might be is in the 100 MB System Reserved partition but, if so, I have no idea how one would copy a file into that partition. So I simply copied the Linux bootsector to the Windows root C: drive and hoped for the best. Next I edited BCD, but first taking the precaution of doing a backup: Code:
C:\Windows\system32>bcdedit /export "C:\BCDBackup" The operation completed successfully. Code:
C:\Windows\system32>bcdedit /create /d "Ubuntu 10.04" /application bootsector The entry {66a21b2f-62f1-11df-9194-d9f24e40b78f} was successfully created. C:\Windows\system32>bcdedit /set {66a21b2f-62f1-11df-9194-d9f24e40b78f} device boot The operation completed successfully. C:\Windows\system32>bcdedit /set {66a21b2f-62f1-11df-9194-d9f24e40b78f} device partition=c: The operation completed successfully. C:\Windows\system32>bcdedit /displayorder {66a21b2f-62f1-11df-9194-d9f24e40b78f} /addlast The operation completed successfully. Code:
Windows Boot Manager -------------------- identifier {bootmgr} device partition=\Device\HarddiskVolume1 description Windows Boot Manager locale en-US inherit {globalsettings} default {current} resumeobject {66a21b2b-62f1-11df-9194-d9f24e40b78f} displayorder {current} {66a21b2f-62f1-11df-9194-d9f24e40b78f} toolsdisplayorder {memdiag} timeout 30 Windows Boot Loader ------------------- identifier {current} device partition=C: path \Windows\system32\winload.exe description Windows 7 locale en-US inherit {bootloadersettings} recoverysequence {66a21b2d-62f1-11df-9194-d9f24e40b78f} recoveryenabled Yes osdevice partition=C: systemroot \Windows resumeobject {66a21b2b-62f1-11df-9194-d9f24e40b78f} nx OptIn Real-mode Boot Sector --------------------- identifier {66a21b2f-62f1-11df-9194-d9f24e40b78f} device partition=C: path \linux.bin description Ubuntu 10.04 So my queries are: 1. Have I copied the Linux bootsector to the right location on Windows? 2. Does the black screen with the flashing cursor indicate that my bcdedit commands were correct but there is instead a problem with Ubuntu’s Grub which is preventing it booting and that is where I need to investigate? |
|
|||
![]()
An update on my previous post
I have now managed to ascertain that bootmgr is indeed in the 100 MB System Reserved partition. I hadn’t realised that, even though the Windows installation does not give this partition a drive letter, in order to view the contents in Windows Explorer and copy files to it all you have to do is go into Disk Management and assign a drive letter to it there. I therefore assigned the letter R to the partition, deleted the Ubuntu menu entry I had previously created, moved linux.bin to the root of the R partition, and ran a new set of bcdedit commands as follows: Code:
C:\Windows\system32>bcdedit /create /d "Ubuntu 10.04" /application bootsector The entry {66a21b30-62f1-11df-9194-d9f24e40b78f} was successfully created. C:\Windows\system32>bcdedit /set {66a21b30-62f1-11df-9194-d9f24e40b78f} device boot The operation completed successfully. C:\Windows\system32>bcdedit /set {66a21b30-62f1-11df-9194-d9f24e40b78f} path \linux.bin The operation completed successfully. C:\Windows\system32>bcdedit /set {66a21b30-62f1-11df-9194-d9f24e40b78f} device partition=r: The operation completed successfully. C:\Windows\system32>bcdedit /displayorder {66a21b30-62f1-11df-9194-d9f24e40b78f} /addlast The operation completed successfully. Code:
Windows Boot Manager -------------------- identifier {bootmgr} device partition=R: description Windows Boot Manager locale en-US inherit {globalsettings} default {current} resumeobject {66a21b2b-62f1-11df-9194-d9f24e40b78f} displayorder {current} {66a21b30-62f1-11df-9194-d9f24e40b78f} toolsdisplayorder {memdiag} timeout 30 Windows Boot Loader ------------------- identifier {current} device partition=C: path \Windows\system32\winload.exe description Windows 7 locale en-US inherit {bootloadersettings} recoverysequence {66a21b2d-62f1-11df-9194-d9f24e40b78f} recoveryenabled Yes osdevice partition=C: systemroot \Windows resumeobject {66a21b2b-62f1-11df-9194-d9f24e40b78f} nx OptIn Real-mode Boot Sector --------------------- identifier {66a21b30-62f1-11df-9194-d9f24e40b78f} device partition=R: path \linux.bin description Ubuntu 10.04 |
|
|||
![]()
If Linux is on a separate drive, why not just go into your BIOS and select the device? people come up with far to elaborate multiboot environments.
![]() |
|
|||
![]() Quote:
The solution I provided was specific to a single disk environment. In the NT 4.0 days, the ARC notation for drives allowed for multiple drives in a system using boot.ini. A quick look through the sources I consulted to figure out the single disk environment with bcdedit does not mention multiple disks. I suspect the information is out there, but I have not found it. I also don't have a two disk system to experiment anyways. My recommendation to you is three-fold:
|
|
|||
![]()
BSDfan666 and ocicat
Many thanks for your replies. I thought I’d just give a little background. For the last five years I have been successfully running a Windows XP/various flavours of Linux multiboot single hard drive computer. I currently have eight different Linux distros on it, and my primary bootloader is Windows boot.ini. With each new Linux installation I always put Grub on the Linux root partition, copy the bootsector across to the Windows root C: drive, add an entry in boot.ini and away I go. Nice and simple. Never any problems booting. ![]() I do not like using Grub as my primary bootloader on any machine which also runs Windows. Once you let Grub take over the MBR it can - not always I admit, but quite often in my experience - cause problems. Not drastic, there is usually a way out, but all the same it can be fiddly and take time to fix when you suddenly find you can’t get into Windows or one or more of the distros because Grub has decided to go AWOL. However, I do have a couple of laptops which only run Linux (one of them dual boots two Linuxes) and there of course naturally I use Grub which by and large behaves itself. I must confess I definitely think Linux is much better not co-existing on the same machine alongside Windows. Anyway, I was in the market for a more up-to-date desktop computer and while I was about it I thought I might as well take the opportunity to move to 64 bit. I have read frequently that in a dual boot situation it is a good idea to install Linux completely separately from Windows on a second hard drive. Unfortunately the articles have then never gone on to explain in detail how in fact you go about the procedure. Not to be dissuaded, I decided that my new computer would have two hard drives and I would have a shot at booting Linux off the second one. I also wanted to try and follow my usual practice of using the Windows bootloader to boot Linux. I did not want to use Grub, nor did I want to install a third party program such as EasyBCD, which as far as I am concerned is an unnecessary extra layer. I don’t believe that EasyBCD can do anything which can’t be done natively using the bcdedit commands, the only problem being of course finding out what those commands are!! Quote:
I always knew that it was possible to go into the BIOS and change the boot order permanently (until such time that is as you go back in and change it again) and had thought about this as an option originally but discounted it as being a slightly untidy method. However, what I hadn’t appreciated until yesterday after reading your comment and doing some further research is that some BIOSes allow you to hit a key at startup, which takes you to a screen listing your various boot devices and you can simply click on the one you want to boot into at that particular time, ie you don’t have to alter the boot order at all. I dragged out my motherboard manual last night and was delighted to see that my particular BIOS does have this facility. ![]() So what I have done today is boot into Ubuntu using the live installation CD, done a chroot and moved Grub to the MBR of the second hard drive (during installation I had placed it on the root partition). I have left the first hard drive as the first boot device so normally the computer will boot straight into Windows 7 but when I want to use Ubuntu all I have to do is hit F8 at start up, select the second hard drive and off it goes to Grub and boots. I really wish I had been aware of this feature before. We live and learn. ![]() Quote:
Yes, this has been my experience too. I cannot believe it can’t be done but so far I have had no success whatsoever. Thank you for your three recommendations. As you will see from my comments to BSDfan66 above I have managed to solve my immediate problem of not being able to get into Ubuntu. However I am still interested in pursuing the inner workings of BCD and intend doing some more digging around and will certainly explore the avenues you have suggested. Once again, thanks to both of you for your interest. ![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenBSD 4.6 i386 boot hangs with old gateway system - resolved | comet--berkeley | OpenBSD Installation and Upgrading | 6 | 22nd July 2011 08:15 AM |
openbsd hangs momentarily at boot | bogd | OpenBSD General | 11 | 9th January 2009 02:53 PM |
MultiBooting OpenBSD. | bsdnewbie999 | OpenBSD Installation and Upgrading | 13 | 26th October 2008 12:00 PM |
download manager | graudeejs | General software and network | 11 | 16th October 2008 04:23 AM |
Dual-boot laptop won't boot OpenBSD after upgrade to 4.3 | kbeaucha | OpenBSD Installation and Upgrading | 17 | 30th May 2008 02:40 PM |