Jump to content











Photo
- - - - -

Help understanding XP SP3 Install boot process


  • Please log in to reply
5 replies to this topic

#1 coldswitch

coldswitch
  • Deactivated
  • 2 posts
  •  
    Finland

Posted 20 August 2008 - 07:11 AM

Hello, this is my first post here and I would like to say that this website is a great source of information! Allso, thanks Jaclaz for all your work towards the better future!

My project:
8GB Sandisk MicroSDHC chip inside very small USB-Reader making a fast and small keychain USB-stick (about 15MB/s read/write speeds)

including:
XP SP3 Setup [achieved]
Ubuntu 8.04 Live [achieved]
Ubuntu 8.04 Persistent [not started yet]
DOS [not started yet]

boot process:
NTLDR with boot.ini menu that has option to load GRUB4DOS (which loads Ubuntu)

Problem:
I have noticed that if I change the partitioning on the disk, I need to get new bootsector for xp-setup. The old XPSTP.bs wont do anymore. This is not needed for Ubuntu however as it seems to load whatever the partitioning might be. I need partitions for USB-stick so that I have some place to save info when working with live Ubuntu.

1. Any chance to load XP SP3 Setup from GRUB4DOS menu so that the setup starts, no matter what the partitioning on the usb-stick might be?

2. (A bit like question 1) Is it possible to use GRUB4DOS as the main bootloader and even start XP setup from there?

Goal:
I want a simple batch command to rebuild my stick with one-(double)click.


Thank you for your help :whistling:

#2 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 20 August 2008 - 09:37 AM

1) Sure, instead of using XPSTP.bs directly chainload the setup loader.
Something like this:
title XPSTP

find --set-root /setupldr.bin

chainloader setupldr.bin
will do. (if you have renamed SETUPLDR.BIN to NTLDR, change it back)

2) Sure, simply use my Makebs batch to change the name of the invoked loader to GRLDR:
http://www.boot-land...?showtopic=2362

Allso, thanks Jaclaz for all your work towards the better future!

Am I contributing ANYTHING "for a better future"? :whistling:

;)

;)

jaclaz

#3 coldswitch

coldswitch
  • Deactivated
  • 2 posts
  •  
    Finland

Posted 20 August 2008 - 11:03 AM

Thanks for your quick reply! And about the future part, just imagine how much time you can save when people finally find your tools/instructions and solutions for their problems so THEY can spend more time doing than thinking.

One more thing tho, whats the thing about XPSETUP.bs being so specific? Why does it have to contain information about partition size where it seems that GRUB doesn't?

#4 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 20 August 2008 - 03:22 PM

One more thing tho, whats the thing about XPSETUP.bs being so specific? Why does it have to contain information about partition size where it seems that GRUB doesn't?


XPSETUP.bs is a copy of a bootsector.

The traditional way booting is done on PC is basically the following:
BIOS->MBR->bootsector->System file or loader

BOTH the MBR and the bootsector are composed of two main parts:
1) CODE
2) DATA

The CODE is the SAME for ANY hard disk (or stick) fdisked/formatted under the SAME Operating System, with SAME filesystem.

The DATA is SPECIFIC for EACH single drive or volume/partition.

Main parts of MBR:
1) CODE that looks for Active Partition in Partition Table and chainloads it's bootsector
2) DATA, Partition table, containing four entries, SPECIFIC to the drive
3) DATA, MBR signature (win2K/XP/2003/VISTA), SPECIFIC to the drive

Main parts of bootsector:
1) CODE that chainloads the default OS bootloader, specific to each OS, INDEPENDENT from volume/partition
2) DATA, partition and filesystem data, SPECIFIC to each volume/partition
3) DATA, voòume label and serial, SPECIFIC to each volume/partition

What basically grub4dos does is to use it's own code, while using existing, SPECIFIC data taken from the MBR or bootsector. :whistling: Thus it works on every volume, as long as the DATA in the MBR/bootsector is valid.

jaclaz

#5 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 22 August 2008 - 06:05 AM

Thanks to jaclaz for this excellent interesting summary.
I would add this (jaclaz please corrects me if something is wrong):

grub4dos MBR code (when grub4dos installed in MBR using grubinst.exe, grubinst_gui.exe or bootlace.com)
does NOT search for active primary partition but it looks for presence of grldr file in the root of each partition
(grub4dos support FAT, FAT32, NTFS, ext2, ext3... file system). This feature is very interesting since it is
open for multiboot (otherwise with the classic/standard MBR code it would only boot the single/unique existing active
primary partition). Once the grldr file (called MBR-helper I believe) is found, grldr continues the boot by searching
for file menu.lst in specific location on the partition (root, /grub, /boot/grub). If menu.lst cannot be found, grldr
presents a default menu or drops to grub4dos command prompt.

#6 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 22 August 2008 - 09:38 AM

(jaclaz please corrects me if something is wrong):


Nothing wrong :whistling:.

But the usual warning is needed:
the grldr.mbr (the file that is installed on the MBR) occupies not only the MBR - i.e. first 512 bytes - but also a few more of the following hidden sectors
thus:
1) conflicts may arise when using some Commercial apps that manage partitions/disks (or other bootloaders) that have been reported to write data to the hidden sectors
2) when imaging/backing up disks, it is necessary to image not only the bootsector but also ALL the hidden sectors.

Some reference:
http://www.boot-land...?showtopic=3501
http://www.boot-land...opic=3226&st=15

jaclaz




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users