User Tools

Site Tools


utils:bootfromusb

Create USB Disk Boot

Basic about boot disk

Master Boot Record

The MBR, the most important data structure on the disk:

  • is created when the disk is partitioned.
  • The MBR contains a small amount of executable code called the master boot code, the disk signature, and the partition table for the disk. At the end of the MBR is a 2-byte structure called a signature word or end of sector marker, which is always set to 0x55AA. A signature word also marks the end of an extended boot record (EBR) and the boot sector.

Note: There is no MBR on a floppy disk. The first sector on a floppy disk is the boot sector. Although every hard disk contains an MBR, the master boot code is used only if the disk contains the active, primary partition.

Master Boot Code

The master boot code performs the following activities:

  • Scans the partition table for the active partition.
  • Finds the starting sector of the active partition.
  • Loads a copy of the boot sector from the active partition into memory.
  • Transfers control to the executable code in the boot sector.

Partition Table

The partition table, a 64-byte data structure used to identify the type and location of partitions on a hard disk, conforms to a standard layout independent of the operating system. Each partition table entry is 16 bytes long, with a maximum of four entries. Each entry starts at a predetermined offset from the beginning of the sector, as follows:

  • Partition 1\ 0x01BE(446)
  • Partition 2\ 0x01CE(462)
  • Partition 3\ 0x01DE(478)
  • Partition 4\ 0x01EE(494)

Figure 1.1 shows the MBR, partition table, and boot sectors on a disk with four partitions. The definitions of the fields in the partition table and the extended partition tables are the same.

Create USB boot disk

Prepare tools

Create boot disk

Using BootIce to write MBR(Master Boot Record) and PBR(Partition Boot Record)

  • MBR: Grub4dos
  • PBR: Grub4dos or BOOTMGR
  • BootIce read menu.lst to display bootable iso

Create Disk Boot Install for windows

Using WinSetupfromUsb to convert ISO windows(XP, windows7, Windows 8) for installing on USB

update menu.lst for menu boot

menu.lst

title Active Boot Disk
find --set-root /Active_BootDisk.iso
map /Active_BootDisk.iso (hd32)
map --hook
chainloader (hd32)

title Windows XP/2000/2003 Setup
map --unmap=0:0xff
map --unhook && map --rehook
savedefault
ls /usbdrive.tag > nul || find --set-root --devices=hf /usbdrive.tag
configfile /winsetup.lst

Install WinXP

Check computer hard drive for SATA, If in BIOS enable SATA, we need to disable it

Create boot disk for iso

Using WinSetupfromUsb and function Linux ISO/Other Grub4dos compatible ISO to convert file ISO to USB for boot. Below are some ISOs created follow this method:

  • hiren Boot ISOnew GUI is Windows 10
  • Vsphere server ISO

Create USB boot backtrack

Preparation

Make a BackTrack(v2 and v3) USB Stick

step by step on linux

  1. Step1: Open the backtrack.iso file:
    mount -o loop -t iso9660 backtrack.iso /mnt/iso
  2. Step2: mount usb drive:
    mount /dev/sda1 /mnt/usbflash
  3. Step3: copy backtrack to usb flash
    cp -R /mnt/iso/boot /mnt/usbflash
    cp -R /mnt/iso/BT /mnt/usbflash
  4. Step1: Make the usb bootable
    cd /mnt/usbflash/boot
    ./bootinst.sh

step by step on windows

  1. Step1: Open the backtrack.iso file
    use isobuster
  2. Step2: copy /boot and /BT to usb drive J
  3. Step3: Make the usb bootable
    cd J:\boot
    bootinst.bat

Configure

  • Network(DHCP)
    ifconfig eth0 down
    dhclient
  • DNS server
    edit /etc/resolv.conf

Experiences about installing

Install windows 7: Using windows 7 to format before install windows → windows 7 will automatic create system partition to load windows 7 partition

utils/bootfromusb.txt · Last modified: 2022/10/29 16:15 by 127.0.0.1