please leave a comment so that i know what not to write about


Monday, July 5, 2010

bootable USB drive

What makes a USB drive bootable?

When I was searching for the process of making my pendrive bootable. I came across many processes and software’s that could do it but none of the sources told me what is the science behind this. Why my pen drive is bootable after the process and was not before. So I decided to write an article of my own for this.
This is also my first post. So please do comment what you dislike and also like about the post and also if you need any help.
The process of making a pendrive bootable and to use it with window 7 and other window operating systems the process that was described by the sources was
1. Open command prompt(cmd) with administrator privileges
4. Then assuming your USB disk is DISK1. Type SELECT DISK 1
5. Type CLEAN
8. Type ACTIVE
10. Type ASSIGN
11. Type EXIT
12. Insert window installation disk
13. In the command prompt window type D: CD BOOT(assuming your cd/dvd drive is labelled D)
14. Type BOOTSECT.EXE /NT60 H: (assuming your USB drive is labelled H)
15. Copy all the contents of the windows installation disk into the USB drive
Let’s start with

DISKPART enables a superset of the actions that are supported by the Disk Management snap-in. The Disk Management snap-in prohibits you from inadvertently performing actions that may result in data loss. It is recommended that you use the DISKPART utility cautiously because DISKPART enables explicit control of partitions and volumes.
DISKPART can perform various functions like
1. converting a basic disk to dynamic disk
2. converting a dynamic disk to basic disk
3. DISKPART can create a partition at an explicit disk offset
4. DISKPART can be used to delete missing dynamic disks
DISKPART commands operate on a specific target disk, partition, or volume. The targeted object has "focus." Focus simplifies the common configuration task in which you create multiple partitions on the same disk. An object is put into focus by the select command. All Commands except for list, help, rem, exit, or help require focus.

LIST DISK is a command in the bigger DISKPART utility. LIST DISK is used to retrieve a summary of information about each disk in the computer. Only fixed disks (for example, integrated device electronics [IDE] or small computer system interface [SCSI]) or removable disk (for example, 1394 or USB) are listed. The removable drives are not displayed. The disk with the * asterisk has current focus.

Select disk command is used to select a particular disk out of the list that was presented by the LIST DISK command.

CLEAN command is used to delete all the partitions from the current in focus disk. Now because the partition information in the most used partition resides in the first sector of the disk clean command deletes that information by zeroing it and thereby deletes all the partition information from the drive.
CLEAN ALL command zeroes all the sectors on the drive in focus thereby deleting all the data.

This command creates a primary partition in the disk in focus.
A primary partition contains one file system. In MS-DOS and earlier versions of Microsoft Windows systems, the first partition (C:) must be a primary partition. Some operating systems are not limited in this way; however, this can depend on other factors, such as a PC's BIOS.
The partition type code for a primary partition can either correspond to a file system contained within (e.g. 0x07 means either an NTFS or an OS/2 HPFS file system) or indicate the partition has a special use (e.g. code 0x82 usually indicates a Linux swap partition). The FAT16 and FAT32 file systems have made use of quite a number of partition type codes over time due to the limits of various DOS and Windows OS versions. Though a Linux operating system may recognize a number of different file systems (ext2, ext3, ReiserFS, etc.), they have all consistently used the same partition type code: 0x83 (Linux native file system).

This command selects the first partition from the drive in focus. Because earlier we deleted all the partition and then we made a brand new partition on the drive this partition will be the one that we created recently.

This command tell the firmware that this particular partition of the drive is ‘active’ or bootable

As the name suggests this command formats the drive in focus and deletes all the data in the drive plus changes the file system to NTFS. This is needed to make the drive bootable. NTFS as it is has many advantages over fat formats like quota and security.

This command is used to assign a drive letter or the mount point to the partition in focus. If no drive letter is mentioned as in our case the next free drive letter is assigned to the partition.

This obviously exits the Diskpart utility.

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.
Bootmgr is used in window vista and window 7 only and NTLDR was used in window xp and earlier versions to load the operating system while booting.
Bootsect can also solve your problem of dual boot when 2 operating systems are used one that uses NTLDR and other that uses BOOTMGR.

No comments:

Post a Comment

There was an error in this gadget