Partitioning hdd


Published on

  • Be the first to comment

Partitioning hdd

  1. 1. Partitioning hard disk <br />
  2. 2. Storage basics<br /><ul><li>Tracks are concentric circles
  3. 3. Sectors are pie-shaped wedges on a track
  4. 4. A typical track is shown in yellow
  5. 5. A typical sector is shown in blue</li></li></ul><li>Storing the Data<br />Data is stored on the surface of a platter in sectors and tracks. <br />A sector contains a fixed number of bytes -- for example, 256 or 512. <br />Either at the drive or the operating system level, sectors are often grouped together into clusters. <br />The process of low-level formatting a drive establishes the tracks and sectors on the platter. <br />The starting and ending points of each sector are written onto the platter. <br />This process prepares the drive to hold blocks of bytes. <br />High-level formatting then writes the file-storage structures, like the file-allocation table, into the sectors. <br />This process prepares the drive to hold files.<br />
  6. 6. Separation of the operating system files from user files <br />Having an area for operating system virtual memory swapping/paging <br />Keeping frequently used programs and data near each other. <br />Having cache and log files separate from other files. These can change size dynamically and rapidly, potentially making a file system full. <br />Use of multi-booting setups, which allow users to have more than one operating system on a single computer. <br />For example, one could install Linux, Mac OS X, Microsoft Windows or others on different partitions of the same hard disk and have a choice of booting into any operating system (supported by the hardware) at power-up. <br />Protecting or isolating files, to make it easier to recover a corrupted file system or operating system installation. If one partition is corrupted, none of the other file systems are affected, and the drive's data may still be salvageable.<br /> Having a separate partition for read-only data also reduces the chances of the file system on this partition becoming corrupted. <br />Purpose of partitioning <br />
  7. 7. A PC hard disk can contain either as many as four primary partitions, or 1-3 primaries and a single extended partition. Each of these partitions are described by a 16-byte entry in the Partition Table which is located in the Master Boot Record.<br />The "type" of a partition is identified by a 1-byte code found in its partition table entry. Some of these codes (such as 0x05 and 0x0F) may be used to indicate the presence of an extended partition, but most are used by operating systems that examine partition tables to decide if a partition contains a file system they can mount/access for reading or writing data.<br />Once a specific partition's type has been identified, additional information about its purpose and probable contents may be found.<br />For example, some type codes are used to hide a partition's contents from various operating systems. <br />However, if an OS or some partitioning tool has been programmed to also examine the boot sectors of any partition, then its file system may no longer remain hidden. (Note: There are no officially assigned partition types; thus, more than one kind of file system may lay claim to the same code value.)<br />
  8. 8. CHS<br />Cylinder-Head-Sector, CHS is the access mode used by computers to assign addresses to data on computer hard disk drives. This access mode was used with early hard disk drives (hard disk drives below 550MB before 1990). Today, this mode has been replaced with ECHS and LBA.<br />Large mode, ECHS<br />Extended CHS and is an access mode used by computers to assign addresses to data on computer hard disk drives that are larger than 504MB. Although this mode does allow for computers to have larger hard disk drives, today this mode has been replaced with other modes such as LBA.<br />LBA<br />Large Block Addressing, LBA allows a PC computer to access hard disk drives larger than 528MB.<br />ZBR<br />Zone Bit Recording (ZBR), zoned recording is a method hard disk drive manufacturers use to increase the available hard disk drive space by increasing the amount of sectors per track. This enables outer tracks to have more sectors than inner tracks. In the past, a hard disk drive had the same amount of sectors on each of its tracks. <br />Access to hard disks <br />
  9. 9. Master Boot Record, MBR is also sometimes referred to as the master boot block and is the first sector of the computer hard disk drive used to determine what partition a computer will boot. <br />The MBR tells the computer where to find and how to load the operating system. <br />It also tells the computer how the hard drive is organized and provides information about the drive's partitions.  <br />The master boot record is located on the first sector of the hard drive; <br />It's the first program the computer runs after performing a memory check and looking for a bootable disk (if set in CMOS). <br />The MBR is also susceptible to boot sector viruses that can corrupt or delete the MBR, which can leave the hard drive unusable and prevent the computer from booting up. <br />A well-known MBR virus is the Stone Empire Monkey Virus. <br />MBR<br />
  10. 10. Virtual structure of partition <br />
  11. 11. One may have an arbitrary number of partitions on a disk.<br />However, the Master Boot Record (MBR, sector 0 of the disk) only holds descriptors for 4 partitions, called the primary partitions.<br />Usually the BIOS can boot only from a primary partition. (Of course it can boot a boot loader that itself is able to access nonprimary partitions or other disks.) <br />The descriptors for the remaining partitions, called logical partitions, are scattered along the disk in a linked list of partition table sectors, starting with the MBR.<br />Each partition table sector contains 4 partition descriptors.<br />A partition descriptor may be of type <br />05 (DOS extended partition), <br />0f (W95 extended partition), <br />85 (Linux extended partition), or c5 (DRDOS/secured extended partition), in which case it points to another partition table sector. <br />In this way, we obtain a quaternary tree of partitions. <br />Linux accepts 85 as a synonym for 05 - this is useful if one wants to have extended partitions past the 1024 cylinder limit (to prevent DOS fdisk from crashing or hanging). <br />Windows 95 uses 0f for LBA mapped extended partitions. <br />Thus, an extended partition is not a partition containing data, but is a box containing other partitions. <br />Nevertheless, the partition table sector that starts an extended partition has enough room left to contain a boot loader like LILO, so that it is possible to boot an extended partition.<br />Most operating systems severely restrict the accepted trees. <br />Usually branching is not allowed, and one gets a linear chain of partition table sectors. <br />Linux will accept several extended primary partitions.<br />Partition Table<br />
  12. 12. Also known as boot up, booting is the process of powering on a computer causing it to load the Operating System or other platform. <br />During the boot process the computer will perform a self diagnostics also known as a POST as well as load important data or programs to help in the operation of the computer. <br />Booting <br />
  13. 13. Also known as bootstrapping or boot loader, a bootstrap loader is a program that resides in the computers EPROM, ROM, or other non-volatile memory  that automatically executed by the processor when the computer is turned on.<br /> The bootstrap loader reads the hard disk drives boot sector to continue the process of loading the computers Operating System. <br />The boot loader has been replaced in computers that have an Extensible Firmware Interface (EFI). The boot loader is now part of the EFI BIOS.<br />Bootstrap loader<br />
  14. 14. While creating a partition,<br />Primary partition<br />Extended partition<br />Logical partition <br />While deleting a partition,<br />Logical partition <br />Extended partition <br />Primary partition <br />Order of process <br />
  15. 15. A: - B:<br />Floppy disk drives<br />C:<br />Windows <br />D: - Z:<br />Logical disk drives<br />Naming convention <br />
  16. 16. Drive Letters<br />
  17. 17. Log on as Administrator or as a member of the Administrators group. <br />Click Start, click Control Panel, and then click Performance and Maintenance. <br />Click Administrative Tools, double-click Computer Management, and then click Disk Management in the left pane.<br />Right-click the drive, the partition, the logical drive, or the volume that you want to assign a drive letter to, and then click Change Drive Letter and Paths. <br />Click Add. <br />Click Assign the following drive letter if it is not already selected, and then either accept the default drive letter or click the drive letter that you want to use. <br />Click OK.<br />Assigning a drive Letter<br />
  18. 18. Log on as Administrator or as a member of the Administrators group. <br />Click Start, click Control Panel, and then click Performance and Maintenance. <br />Click Administrative Tools, double-click Computer Management, and then click Disk Management in the left pane.<br />Right-click the drive, the partition, the logical drive, or the volume that you want to assign a drive letter to, and then click Change Drive Letter and Paths. <br />Click Change. <br />Click Assign the following drive letter if it is not already selected, click the drive letter that you want to use, and then click OK. <br />Click Yes when you are prompted to confirm the drive letter change.<br />Changing a drive Letter<br />
  19. 19. Log on as Administrator or as a member of the Administrators group. <br />Click Start, click Control Panel, and then click Performance and Maintenance.<br />Click Administrative Tools, double-click Computer Management, and then click Disk Management in the left pane. <br />Right-click the drive, the partition, the logical drive, or the volume that you want to assign a drive letter to, and then click Change Drive Letter and Paths. <br />Click Remove. <br />Click Yes when you are prompted to confirm the removal<br />Removing a drive Letter <br />
  20. 20. Boot.ini<br />
  21. 21. 1. Right-click My Computer, and then click Properties. or <br /> Click Start, click Run, type sysdm.cpl, and then click OK. <br />2. On the Advanced tab, click Settings under Startup and Recovery. <br />3. Under System Startup, click Edit. This opens the file in Notepad ready for editing. <br />4. In Notepad, click File on the Menu bar, and then click Save As. <br />5. Right click in an empty area of the Save As dialog box, point to New in the context menu, and then click Folder. <br />6. Type a name for the new folder, for example temp, and then press the ENTER key to create the folder named temp. <br />7. Double-click the new folder named temp, and then click the Save button to save a backup copy of the Boot.ini file.<br />Backing up a boot.ini<br />
  22. 22. To view and edit the Boot.ini file: <br />1. Right-click My Computer, and then click Properties. <br /> or <br /> Click Start, click Run, type sysdm.cpl, and then click OK. <br />2. On the Advanced tab, click Settings under Startup and Recovery. <br />3. Under System Startup, click Edit.<br />Editing the Boot.ini File<br />
  23. 23. This is a sample of a default Boot.ini file from a Windows XP Professional computer. <br />[boot loader]timeout=30default=multi(0)disk(0)rdisk(0)partition(1)WINDOWS[operating systems]multi(0)disk(0)rdisk(0)partition(1)WINDOWS="Microsoft Windows XP Professional" /fastdetect<br />This is a sample of the above Boot.ini file with a previous installation of Windows 2000 on a separate partition. <br />[boot loader]timeout=30default=multi(0)disk(0)rdisk(0)partition(1)WINDOWS[operating systems]multi(0)disk(0)rdisk(0)partition(1)WINDOWS="Windows XP Professional" /fastdetectmulti(0)disk(0)rdisk(0)partition(2)WINNT="Windows 2000 Professional" /fastdetect<br />Sample Boot.ini File<br />
  24. 24. Click Start, and then click Run. <br />In the Open text box, type cmd. <br />At the command prompt, type bootcfg /?. <br />The help and parameters for BOOTCFG.exe will display.<br />Modifying the Boot.ini<br />
  25. 25. Adding an Operating System<br />At the command prompt, <br />type: bootcfg /copy /d Operating System Description /ID#<br />Where Operating System Description is a text description (e.g. Windows XP Home Edition), and where # specifies the boot entry ID in the operating systems section of the BOOT.INI file from which the copy has to be made.<br />Removing an Operating System<br />At the command prompt, <br />type: bootcfg /delete /ID#<br />Where # specifies the boot entry ID that you want to be deleted from the operating systems section of the BOOT.INI file (e.g. 2 for the second Operating system that is listed.<br />Setting the Default Operating System<br />At the command prompt, <br />type: bootcfg /default /ID#<br />Where # specifies the boot entry id in the operating systems section of the BOOT.INI file to be made the default operating system.<br />Setting the Time Out<br />At the command prompt, <br />type: bootcfg /timeout#<br />Where # specifies the time in seconds after which default operating system will be loaded.<br />Configuring a OS to boot manually <br />
  26. 26. Installation <br />Attended installation <br />Unattended installation <br />
  27. 27. Things needed<br />At least one computer - One that has a Windows XP Operating System already in place. <br />You’re Windows XP CD - To retrieve the tools you are going to need.<br /> One formatted floppy disk - This is where we will put the finished answer file.<br />Unattended installation <br />
  28. 28. Put in your Windows XP CD<br />Open “My Computer”<br />Explore Windows XP CD <br />Open the “Support” folder and then the “Tools” folder<br />The file we are looking for is a compressed file called “DEPLOY.CAB”. Before you go any further make a new folder on your desktop and extract the contents of this CAB file to that folder.<br />Now open the folder that you just created. You should see a few different files here. The one we want is “setupmgr.exe”. For now just disregard all the other files except for the Windows XP Preinstallation Reference.(ref.chm) This is a help file that goes more into creating an answer file and explains more about the other files that are included in the folder that we just made. If you run into problems it might come in handy.<br />Step 1<br />
  29. 29.
  30. 30.
  31. 31.
  32. 32. Welcome to the Windows Setup Manager - This Wizard is going to take us through the options of creating the answer file. Just click next here.<br />Step 2<br />
  33. 33. Create or Modify the Answer File - Since this is going to be your first answer file, select “Create a new answer file” and click next. Once you have created an answer file successfully, you can edit it with the Setup Manager by selecting “Modify an existing answer file” and providing a path to it.<br />
  34. 34. Type of answer file to be used:<br /> <br />Windows Unattended Installation - Unattended installations use setup scripts to answer installation questions and to automate the Setup process. This simplifies the installation of the operating system.<br /> <br />Sysprep Install (System Preparation Tool) - Disk imaging, which is also known as cloning. This is a timesaving way to install Windows XP on multiple computers that use identical or similar hardware configurations. <br /> <br />Remote Installation Services (RIS) - Enables you to perform a clean installation of Windows XP Professional on multiple computers throughout a network. You can simultaneously deploy the operating system on multiple clients from one or more remote locations.<br /> <br />For now, we are going to choose the “Windows Unattended Installation” option. <br />
  35. 35.
  36. 36. Windows Platform - Which Version of Windows XP are you going to install? For me that would be “Windows XP Professional”.<br />
  37. 37. User Interaction during Windows Setup:<br /> <br />Fully automated - This option will not prompt you for any information. <br /> <br />Provide defaults - This option will fill in the info you supply but you will be able to change it if you choose to. <br /> <br />Hide pages - This option does pretty much the same thing as the fully automated with the exception of letting you see the Setup Wizard.<br /> <br />Read only - This option does pretty much the same thing as the “Provide defaults” option with the exception that you would not be able to change any of the settings.<br /> <br />GUI attended - This option only allows the text portion of the Setup to be automated.<br /> <br />
  38. 38. “Fully automated” option.<br />
  39. 39. Distribution Folder - Select “No” because we will be installing from a CD. Once again, after you have got this down you can play with the other options. If you wanted to install from a network share, you would choose to create a distribution folder. The distribution folder option gives you the flexibility to add other files as well, such as drivers not found on the Windows XP CD.<br />
  40. 40. License Agreement - We obviously can not forget about the License Agreement. We have to check this now because we will not be seeing it during the install.<br />
  41. 41. Customize Software - Now it’s time to input your personal information. I’m sure most of you recognize this from all the previous Windows installs that you have done before.<br />
  42. 42. Display Settings - Everyone is different when choosing display settings. Put in what you most commonly use here. If you’re not sure what your video card and monitor supports, just choose Windows default. If you try to over do it you may run into problems later.  Remember that running a monitor at a refresh frequency that it does not support can damage the monitor. Once again, if you’re not sure just set it to Default.<br />
  43. 43. Time Zone - This one is simple enough. What time zone do you live in?<br />
  44. 44.  Product Key - This is a handy one. Put your Product Key here. Have you ever lost your Product Key? You can't install without one. Saving it to the answer file will automatically put it in for you. Just don’t lose the floppy that you are putting it on. I’m not showing mine here for obvious reasons.<br />
  45. 45. Computer Names - If you plan to use your name as a user on this computer it can’t be the same as the name here. You can also have the setup automatically generate the name by ticking the box at the bottom. If you plan to use the exact same setup on multiple computers then you would add their names here as well.<br />If you’re willing to accept computer names that follow no pattern, you can allow Setup to create each computer’s name on the fly by appending seemingly random letters and numbers to the first few letters of your organization’s name. <br />When you enter multiple names during the setup process, Setup Manager automatically generates the Uniqueness Database File (UDF) that is required to add those unique names to each computer during setup. If the administrator imports names from a text file, Setup Manager converts each name to a Uniqueness Database File. The administrator can also set an option to generate unique computer names.<br />Step 3<br />
  46. 46.
  47. 47. Administrator Password - If you don’t want someone to look at your answer file to figure out what it is tic the Encrypt password box. You can also specify the number of times it allows the computer to auto logon as the Administrator. I choose “1” because there are certain settings I change that can only be done by being logged on as “Administrator”. Let me stress that a user with administrative rights is not the same.<br />
  48. 48. Networking Components - By default the Setup Manager includes the Microsoft Networks Client, File and Printer Sharing, and TCP/IP. If you rather set this up later, leave it at the typical settings. <br />I like to have my network up and going when it boots the first time, so I made some changes here. For one, I added the QoS Packet Scheduler. This way I can control the Bandwidth that the other computers on my network tie up.<br />Also notice that I have TCP/IP highlighted. Now click on the “Properties” button.<br />
  49. 49. TCP/IP Settings - This is not necessary but like I said before, I like my network to be ready to go when the computer boots for the first time. Since I am on Dial-up and have to use ICS (Internet Connection Sharing), this is an example of the TCP/IP settings I could use on a computer that has to connect to the internet through another computer. <br /> <br />*Note - If you choose to configure TCP/IP properties in your answer file, you must create a unique answer file for each computer you are setting up on your network.<br />
  50. 50. Workgroups and Domains - Here you just need to add the name of the workgroup or server domain your computer is going to be on if any.<br />
  51. 51. Dial-Up Settings - I don’t feel I need to explain this to much. If you need to set up dialing options, do so here. Since I am going to be connecting over a LAN, I will not need to set this option up. <br />
  52. 52. Regional Settings - By default this is set to English (United States). Well at least my version of XP is this way. Again, I don’t think this is too painful of a decision. So make a choice and let’s move on.<br />
  53. 53. Language Support - If you need Language support, do so here and click next.<br />
  54. 54. Browser and Shell Settings - Here we have three choices. For the method we are using now, we really only have one choice. Default Internet Explorer settings is the only one we can use because the other two require a distribution folder to be made. We chose to install from the CD instead. Even though you can set the others up here, it will not work without creating a distribution folder.  <br />
  55. 55. Installation Folder - I usually like to stick with the Windows folder but you can do what ever you like.<br />
  56. 56. Install Printers - Here’s an example of how you would install a network printer if it was not hooked directly to the machine you are going to install the OS on. If the computer that my printer was on was named “Jeramie”, I would use JeramiePrinter as my “Network printer name”. In order for it work you would have to make sure that Printer sharing is enabled on that computer. To do this, go to that computer and go to Start/Control Panel. Then open Printers and Faxes. Right Click on Printer and select sharing from the menu. In the Sharing Tab make sure you have Share this Printer ticked and make sure the “Share Name” is the same as in the answer file. For example I used “Printer” which is what Windows uses by default. Name it what ever you want but make sure the names match. You could do the same for a fax machine. In the answer file it would look like this JeramieFax.<br />
  57. 57. Run Once - As you can see in the Run Once section it has all ready set up the command to add the printer. There are other commands you could use here also. In the answer file I am creating here I would be setting up the disk partitions manually. If you wanted to have the answer file do it for you, you would add the command for it here also. This would require you to create a new batch file. Once again, you can make this as simple or advanced as you like.<br />
  58. 58. Additional Commands - This is somewhat more of an advanced feature. It allows you to have setup install things that you would normally want to install right after Windows XP. If you desire to venture into it and what it can do for you, Creating a Combination Installation is an example of one way to use this. This would require you to choose different options in the setup manager than we did here. For this article we are going to leave it blank. Now click Finish.<br />
  59. 59. Save the Answer File - Now put in your formatted floppy disk into your A drive. Where it says “Location and file name”, type in A:winnt.sif. It should look just like the image below. Since we are using the CD Boot method, we must name the answer file winnt.sif. Click OK.<br /> <br />If you do not have a Floppy driveor just want to put it on your Windows XP CD - You will need to save the answer file to your hard drive as winnt.sif. You will be required to make a backup of your Windows XP CD. First of all, you will need to extract the contents of your Windows XP CD to your hard drive. Then you must add winnt.sif to the I386 folder. You will not need to use the batch file (winnt.bat).  Don’t forget to add winnt.sif first. After extracting Windows XP from the hard drive you can not just burn it to a CD (it won't be bootable). Follow the instructions at Binks site on How to make your XP bootable.I would also recommend using a CD-RW the first time you try doing this. If you mess something up you will not be wasting your CD-Rs.<br />
  60. 60. Setup Manager Complete - Congratulations! You have now created your first answer file. Here it is telling you that it has created two files for you.<br />winnt.sif - This is the answer file<br />winnt.bat - You will also need this batch file on the floppy. It tells the answer file where to find the files needed for Windows Setup.<br />
  61. 61. Now Right click on your winnt.bat file and in the menu click edit. This is a batch file. A batch file is a file containing instructions that are executed one after the other. Notice that in the batch file it tells you that it may need to be modified. You may need to edit the path for setup to find the files it needs. The batch file here says:<br /> <br />1.The answer file is winnt.sif<br />2. Setup files are located on E:  (My CD-ROM Drive) in the I386 folder. <br />3. Tells Setup to begin using winnt32 with a script to tell it to use the unattended method.<br /> <br />If you’re going to be using this on another computer you may have to change the drive letter to whatever the CD-ROM is set at.<br /> <br />@remSetupMgrTag<br />@echo off<br />rem<br />rem This is a SAMPLE batch script generated by the Setup Manager Wizard.<br />rem If this script is moved from the location where it was generated, it may have to be modified.<br />rem<br />set AnswerFile=.winnt.sif<br />set SetupFiles=E:i386<br /> <br />E:i386winnt32 /s:%SetupFiles% /unattend:%AnswerFile%<br />
  62. 62. Now it’s time to start the installation.<br />First, you're going to need to change your boot order in the BIOS to boot from CD-ROM. Once you do this you'll then be able to boot your computer from the Installation CD and perform the installation of Windows XP.<br />After changing the boot order in BIOS, save your changes and reboot the computer. Make sure your Installation CD is in your CD-ROM. If it is you'll be prompted to press any key to boot from CD-ROM. Press any key on your keyboard as soon as you see this message. Wait a few minutes while the installation begins to copy the preliminary setup files to your computer.<br />If you decided to make create your own partitions, you need to decide which partition of your hard drive you will install Windows XP on. Once you have figured out which partition XP will be installed on it's time to format it.<br />Choose to format the partition to either FAT32 or NTFS. After you have select one of the options hit enter and Setup will begin to format the partition. You will have to format the other partitions after you are finished with your installation of XP. You can do this with Administrative Tools in the Control Panel.<br />Now just sit back and wait or go do something else. The next things you will be asked to do are register or activate Windows XP and setup user accounts. Everything else is done for you.<br />
  63. 63. “Gopee the universal hacker”<br />