Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Modifying MBR to boot to second partition

- - - - -

  • Please log in to reply
4 replies to this topic

#1
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,695 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

I am, once again, trying to find an alternate solution to running a system recovery than using the software we currently use. This time, instead of duplicating their recovery partition in order to redeploy with Imagex, I am making one of my own. To do this, I built a custom Win PE that launches a Flash Projector app that the user can use to recover the C drive. I have not been able to see if this portion is working yet as I am having a problem getting it to attempt to boot to the second partition, or even the main partition.

Jaclaz has mentioned a MBR app here: http://www.msfn.org/...o...st&p=769544
Which I must not be using properly. Let me run down the steps I've gone through so far, and how the system behaves after the reboot.

1. Boot into our normal PE and run the following in diskpart:

select disk 0
clean
create part pri size=62220
active
assign letter=c
format fs=ntfs quick
create part pri
select part 2
assign letter=d
format fs=fat32 quick
exit

2. Deploy the image to C, which is a Windows XP Pro SP2 x86 image.
3. Deploy the recovery image onto drive D
4. open up diskpart again

select disk 0
select vol 1
att vol set hidden
att vol set nodefaultdriveletter

5. Run mbr program (its in the recovery partition)

mbr 0 /install selm 5 11 "Press F11 for recovery" 0xC 0x52

6. Restart the PC.

If I let the computer boot normally, it reboots by itself and loops this way. This is fine atm because I don't care if it can boot into Windows.

If I press F11 when the prompt comes up, it reports that it cannot find boot media, or if LAN boot is enabled, it tries to boot of the IBA (Intel Boot Agent).

So I am thinking I am missing a step. Any ideas? The method of installing the MBR or the bootloader needs to be a 32bit app so that I can run it from the PE after imaging.
MSFN RULES | GimageX HTA for PE 3.x | lol probloms
msfn2_zpsc37c7153.jpg


How to remove advertisement from MSFN

#2
DigeratiPrime

DigeratiPrime

    MSFN Junkie

  • Patrons
  • 3,550 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Since you're using a hidden FAT32 volume anyway, maybe try the simpler SEL function instead of SELM?
mbr 0 /install sel 5 11 "Press F11 to boot the recovery partition"

Recommended Software: KeePass | Microsoft ICE | VisualWget | Vitamin D Video |

#3
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,695 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

OK I found out why the C drive wouldn't boot. Diskpart showed both Vol 0 and Vol 1 to be HIDDEN NODEFAULTDRIVELETTER. So I clear those attributes on Vol 0 (Drive C) and it cleared it on both volumes. I assigned a letter to Vol 0 (C:) and Vol 1 (D:) but for some reason if I mark Vol 1 as HIDDEN, both volumes get marked HIDDEN. And yes, I am using sel vol 0 and sel vol 1.

So at this point, neither of the above MBR commands allow it to find the second partition.
MSFN RULES | GimageX HTA for PE 3.x | lol probloms
msfn2_zpsc37c7153.jpg

#4
submix8c

submix8c

    Inconceivable!

  • Patrons
  • 4,186 posts
  • OS:none specified
  • Country: Country Flag
Some (small sketchy) info here - http://support.microsoft.com/kb/300415
XP TechNet - http://technet.micro...y/bb490893.aspx
Another more organized reference here - http://www.geocities.../D/DISKPART.HTM

So is this a difference between using VOLume as apposed to PARTITION? I see that using VOL when using basic disks assumes "partition". In addition, it seems that somehow you may need to set the Recovery Partition to Active (has to be one active, you know). I have noted in the past (AFAIKR) that if only one partition exists then that partition will boot. Could be because on Compaq/HP (past experience), the BIOS "sees" only one and "decides" to boot to it; could have been because the Disk Boot Code (MBR)(before the Partition Boot) was "special code" by the OEM to set the only to active or just "go there" (kind of like Grub4Dos, also kindly provided by Jaclaz).

Any help here?

Edited by submix8c, 03 March 2009 - 11:51 AM.

Someday the tyrants will be unthroned... Jason "Jay" Chasteen; RIP, bro!

Posted Image


#5
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,695 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

I got it to work, and also know why the attributes were being assigned to both volumes. This happened because the partition table is set up as MBR and not the GUID method.

Terrabyte Unlimited has a tutorial (of sorts) to set up a recovery partition. They also have a second revision.

http://www.terabyteu...icle.php?id=277

I had to do some additional commands with MBR.EXE also. These in the image phase:

mbr 0 /install selm 5 11 "Press F11 for recovery" 0xC 0x1C
mbr 0 1 /h

The second, sets the second partition to hidden, so it does not appear in Windows. It still appears in DISKPART but it does not display the HIDDEN attribute, but it is still hidden anyways. Also have to add this to the boot process of the OS on the recovery partition:

mbr 0 /reset

This makes it so after you reboot from the recovery partition, it sets it back to being hidden and makes the first partition active, to allow you to boot into Windows again.

For now I am working on getting my custom software to work off the recovery partition, and for that I will make a post in the Windows PE forum.
MSFN RULES | GimageX HTA for PE 3.x | lol probloms
msfn2_zpsc37c7153.jpg




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users



How to remove advertisement from MSFN