Tech Support Guy
saikee's Avatar
saikee saikee is offline
Member with 3,748 posts.
 
Join Date: Jun 2004
Location: Newcastle
Experience: A Linux user gone nuts on multi-boot
18-Jun-2010, 05:12 PM #18
There is nothing complicated in putting a Win7 installer in a pen drive.

You just copy the contents from a Win7 installation DVD to a preformatted partition in the pen drive. Say make it simple the only partition there.

The pen drive will not boot immediately after copying because no boot loader has been installed.

The bootsect.exe is a program insde the \boot directory of the installation DVD. It is used to write a boot sector code inside the pen drive partition. The command is
Code:
bootsect /nt60 D:
where D: is the drive letter of the pen partition.

When this is done the pen drive partition is "chainloadable" and can booted up by Grub.

The sequence is Grub loads this boot sector code when "chainloader +1" is instructed by the user after the pen drive partition has been identified by the "root" statement. The boot sector code loads the bootmgr which is part of the contents of the installation DVD.

I list the contents of a 32-bit version of Win7 here which I have mounted in /mnt/sdc6

Code:
root@saikee-desktop:/home/saikee# ls /mnt/sdc6
autorun.inf  boot  bootmgr  efi  $RECYCLE.BIN  setup.exe  sources  support  System Volume Information  upgrade
root@saikee-desktop:/home/saikee# ls /mnt/sdc6/boot
bcd  bootfix.bin  boot.sdi  bootsect.exe  en-us  etfsboot.com  fonts  memtest.exe
root@saikee-desktop:/home/saikee# e
You can take the pen drive to a computer with Win7 to execute the bootsect.exe. Alternatively booting up a Win7 installation DVD (in a computer that has a DVD drive), opt for "repair", then "command prompt" will give you a terminal to execute this command.