Skip to main content

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.


Popular posts from this blog

Customized Online Learning Dangerous as it is Necessary

The recent uprise in Online Learning Platform like Pluralsight, Coursera has raised some important questions over traditional learning system and also on traditional examination systems.
The fact that online learning courses are derived from what users need and not what should be actually taught has also raised serious concerns about what is finally going inside the heads of professionals.

Traditional system while teaching any subject also includes major things that might never be used in real life but still is important to actual context of that particular subject. The syllabus goes through the hands of experts before finally reaching the learners. Online education / Videos have completely disrupted this system and now only what is needed is taught leaving out all the motivational factors and context of the subject that brings glamour and other related attributes to the identity of the subject.

So yes while system has to evolve to teach students more than C++ in today's world bu…

Dynaminism in .Net 4.0

few dayz ago came across THIS question.
the solution to this can easily be figured out by the new dynamic features introduced in .Net 4.0.
i have made a project to demonstrate this.
the main code in the project goes like this

publicstaticdynamic[] GetDynamicObject(DataTable dt, Dictionary<string, string> mapping)
List<dynamic> returnList = newList<dynamic>();
foreach (DataRow row in dt.Rows)
dynamic obj = newExpandoObject();
var objectDic = (IDictionary<string, object>)obj;
foreach (DataColumn column in dt.Columns)
                    objectDic.Add(mapping!=null?mapping.ContainsKey(column.ColumnName) ? mapping[column.ColumnName] : column.ColumnName:column.ColumnName,row[column]);
return returnList.ToArray();
        }The static method here named "GetDynamicObject" simply takes a data table(which can be populated by the data in the database) and a dictionary of…

Its a Dynamic(javascript) world

I thought we are living in a world which looked like this ||(or) mayb this LOL

being a web developer i was working with javascript and also at the same time i always preferred to work with something else... Silverlight, Flash mayb.. till recently.. i actually saw what JAVASCRIPT is || has become in the time i worked on ASP.Net MVC.

Javascript evolved from a dynamic sort of functional language that was differently implemented by nearly every browser(and yes that was for you IE6) and every one hated him and i thought it still is that ulgy thing. till i just stumbled upon THIS

This is an old video.. someone was just trying to bring the Javascript to server side. so now same developer /*Who a Javascript developer?*/ can work on both the sides.. client as well as web. and thought that things like these shouldn't be allowed on internet maybe because its a hour long video and now has around 233,492 views just consider the amount ot developer hours wasted her…