Help with Imagex / WinPE / bcdboot

2»

Comments

  • Hyper-MeHyper-Me Banned Posts: 2,059
    I dont know how you're images are booting properly if you are not running bootsect after using ImageX to apply the image.

    If using WDS, the bootsect is done for you by WDS, if you are using ImageX manually then the bootsect is required (at least in my experience, don't know how it wouldnt be?).
  • phoeneousphoeneous Member Posts: 2,333 ■■■■■■■□□□
    Hyper-Me wrote: »
    if you are using ImageX manually then the bootsect is required (at least in my experience, don't know how it wouldnt be?).

    I stricly use ImageX and have never had to use bootsect.

    These are the steps that I follow:

    Boot with WinPE disk and run the following diskpart commands:

    diskpart
    select disk 0
    clean
    create partition primary size=100
    select partition 1
    format fs=ntfs label=”system”
    assign letter=c
    active
    create partition primary
    select partition 2
    format fs=ntfs label=”windows”
    assign letter=d
    exit


    Then apply the image. When capturing, the OS partition is referenced with letter D: so the /apply command looks like e:\imagex /apply f:\images\sysprep_ready_to_deploy.wim 1 d:

    Then finish it up with X:\windows\system32\bcdboot d:\windows

    After a reboot, the image is there and all is well.
  • apena7apena7 Member Posts: 351
    Correct, I'm only using ImageX to apply images (haven't had the pleasure of setting up WDS yet ;)).

    I was using this tutorial for my lab. Near the bottom of the page, under the heading 'Setting up a system partition' it says how you can apply a WIM file instead of using bcdboot. I figured I'd give that method a try and have been able to successfully image a few laptops I have lying around, but whether I'm inviting some sort of impending doom to my system partitions remains to be seen. Time will tell :D. I'm sure I'll boot to nice a surprise one day...


    Edit: Just read your post phoneous. I'll add my diskpart script as well:
    select disk 0
    clean
    create partition primary size=300
    format quick fs=ntfs label="System"
    assign letter="S"
    active
    create partition primary
    format quick fs=ntfs label="Windows"
    assign letter="C"
    exit
    
    Usus magister est optimus
  • phoeneousphoeneous Member Posts: 2,333 ■■■■■■■□□□
    apena7 wrote: »


    Edit: Just read your post phoneous. I'll add my diskpart script as well:
    select disk 0
    clean
    create partition primary size=300
    format quick fs=ntfs label="System"
    assign letter="S"
    active
    create partition primary
    format quick fs=ntfs label="Windows"
    assign letter="C"
    exit
    

    Careful with your lettering though, even though I /apply the image to D: with WinPE, after the image boots up, the main OS partition is actually C:. When I open diskmgmt, it shows the System partition but without a letter assignment.
  • apena7apena7 Member Posts: 351
    phoeneous wrote: »
    Careful with your lettering though, even though I /apply the image to D: with WinPE, after the image boots up, the main OS partition is actually C:. When I open diskmgmt, it shows the System partition but without a letter assignment.

    Thanks. After I applied my images, I was sure to check out Disk Management. Disk 0 shows two partitions, "System (without a drive letter)" and "Windows (C: )" below is a screenshot.

    3-29-20102-55-15PM.png
    Usus magister est optimus
  • Hyper-MeHyper-Me Banned Posts: 2,059
    Bootsect.exe updates the master boot code for hard disk partitions to switch between BOOTMGR and NTLDR. You can use this tool to restore the boot sector on your computer. This tool replaces FixFAT and FixNTFS.


    I guess you only need to do it when switching between those types of boot loaders.

    When learning Vista imaging a long time ago I was putting XP images on a box, then Vista, then XP (doing different tests) and I had to use bootsect to make it work. Apparently, I thought I needed this for any image. Although, it obviously doesnt hurt anything to do it anyway.
  • phoeneousphoeneous Member Posts: 2,333 ■■■■■■■□□□
    apena7 wrote: »
    Thanks. After I applied my images, I was sure to check out Disk Management. Disk 0 shows two partitions, "System (without a drive letter)" and "Windows (C: )" below is a screenshot.

    Nice, thats exactly what mine looks like. icon_thumright.gif

    Im curious, did you assign letter="C" to the windows or system partition in diskpart. And did you /apply the image to c: or dicon_confused.gif
  • phoeneousphoeneous Member Posts: 2,333 ■■■■■■■□□□
    Hyper-Me wrote: »
    Bootsect.exe updates the master boot code for hard disk partitions to switch between BOOTMGR and NTLDR. You can use this tool to restore the boot sector on your computer. This tool replaces FixFAT and FixNTFS.


    I guess you only need to do it when switching between those types of boot loaders.

    When learning Vista imaging a long time ago I was putting XP images on a box, then Vista, then XP (doing different tests) and I had to use bootsect to make it work. Apparently, I thought I needed this for any image. Although, it obviously doesnt hurt anything to do it anyway.


    I hate Vista and I'm sure it hates me. But during our initial testing phase at my last job, we used vm's so I there was no need to use bootsect.
  • apena7apena7 Member Posts: 351
    phoeneous wrote: »
    Nice, thats exactly what mine looks like. icon_thumright.gif

    Im curious, did you assign letter="C" to the windows or system partition in diskpart. And did you /apply the image to c: or dicon_confused.gif

    I should have clarified my process a bit. So I captured the Windows and System partitions from my reference computer, which created two separate WIM files. Using WinPE on my target computer, I then created and labeled two partitions in diskpart - "C" for Windows partition and "S" for the System volume. Next, I applied the WIM files to their respective partitions. I exited from WinPE without entering bootsect or bcdboot commands and was able to reboot normally.
    Usus magister est optimus
  • phoeneousphoeneous Member Posts: 2,333 ■■■■■■■□□□
    apena7 wrote: »
    I should have clarified my process a bit. So I captured the Windows and System partitions from my reference computer, which created two separate WIM files. Using WinPE on my target computer, I then created and labeled two partitions in diskpart - "C" for Windows partition and "S" for the System volume. Next, I applied the WIM files to their respective partitions. I exited from WinPE without entering bootsect or bcdboot commands and was able to reboot normally.

    Interesting.

    I dont capture the system partition from my reference pc yet I create it in diskpart as C: and after the OS installs, it knows to rename the OS partition to C: as opposed to D: from diskpart and /apply.

    Good to know.
  • apena7apena7 Member Posts: 351
    phoeneous wrote: »
    Interesting.

    I dont capture the system partition from my reference pc yet I create it in diskpart as C: and after the OS installs, it knows to rename the OS partition to C: as opposed to D: from diskpart and /apply.

    Good to know.

    Likewise icon_thumright.gif
    Usus magister est optimus
  • altjxaltjx Member Posts: 194
    Nice, thank ALL of you for your input. I was very determined to get a customer's PC working without using my own CDs. I had ended up deleting an OS partition, making a Dell recovery partition inaccessible.

    After toying around and finding a Factory.wim file, I was determined to make this work.

    The bootsect /nt60 C: gave me an "Access is denied." error but after doing bcdboot C:\windows, the boot files were created successfully and I rebooted just fine with the recovery image proceeding as normal.

    The only problem I encountered was having two "Microsoft Windows Vista" and "Windows Vista" in the BOOTMGR. Simple way to get rid of it :)

    Again, thanks everyone. Oh, and I'm going take my 70-680 in about 2 weeks, so this was a great experience :)
    CompTIA: A+, Security+, Network+
    Microsoft: MCTS: Windows 7, Configuring, MCTS: Windows Server 2008 Applications Infrastructure, Configuring
    Cisco: CCENT, CCNA
  • KillermacKillermac Member Posts: 93 ■■□□□□□□□□
    This is a really excellent thread. It is a real shame that WDS does not work exactly like it should.
    Killermac :)
    A+;Net+;XP,MCP, Security+, Win 7: 70-680
Sign In or Register to comment.