Quick Format to NTFS with FOG for Noobs


  • Developer

    By using this guide you agree that you as the user have taken full responsibility for lost data, corrupted partition tables, or the like. I can not, and will not be held responsible for your actions or any damage that comes to you or your equipment by use of this guide.
    You also agree not to replicate or reproduce this information without giving proper credit to the FOG project and it’s forums.
    This information is subject to change without notice.
    [U]Preface[/U]

    I have been experiencing some issues with my noobishness, I began trying to image old hardware without checking the disk specifications and the image that I was trying to place on the drive was larger than the hard drive capacity. This lead to demise of the drives partition tables.

    I had been using a Windows XP disk to boot into the windows set up to quick format the drives back to an ntfs format so that I could image them. I got to thinking and I wanted to put in a tool that would help to do this with ease, but it turns out we already have a tool that can be used!

    [U]The Procedure[/U]

    If you are not familiar with booting into a Debug mode while imaging, this will also benefit you.

    [CENTER][U]REGISTER HOST TO FOG AND BOOT INTO DEBUG[/U][/CENTER]
    First start by registering the host to the FOG server if you have not done so already.
    Assign an image to the host as well.
    After the host is registered, use the web gui to find the newly registered host, I will call him Test.
    Select “test” from the list of hosts.
    On the left hand side of the page, click on “Basic Task” and select Advanced in the center.
    Here you can see the debug, debug deploy, etc. You can choose one of the Debug options. I have used the Debug, and Debug Deploy, I have not tested further, but they use the same system, as long as it is a debug mode, the commands should be supported.
    Reboot your host and let it boot to the debug menu.

    [CENTER][U]REMOVING PARTITIONS[/U][/CENTER]
    From the debug menu issue the following command
    **please note that this is an l as in ell not the numeral 1 **

    fdisk -l
    

    Your output will look similar to this

    Disk /dev/sda: 82.3 GB, 82348277760 bytes
    255 heads, 63 sectors/track, 10011 cylinders
    units = cylinders of 16065 * 512 = 8225280 bytes
    

    Note the /dev/sda after Disk, this is the hard drive we wish to work with, if you have multiple drives, please be sure to select the correct one!
    Issue the following command where /dev/sda is the name of your disk

    fdisk /dev/sda
    

    output:

    The number of cylinders for this disk is set to 9733.
    There is nothing wrong with that, but this is larger than 1024,
    and could in certain setups cause problems with:
    1) software that runs at boot time (e.g., old versions of LILO)
    2) booting and partitioning software from other OSs
      (e.g., DOS FDISK, OS/2 FDISK)
    

    Command (m for help):
    To list partitions type

    p
    

    Output will be similar to this:

    Disk /dev/sda: 82.3 GB, 82348277760 bytes
    255 heads, 63 sectors/track, 10011 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
      Device Boot      Start        End      Blocks  Id  System
    /dev/sda1  *          1        13      102400    7  HPFS/NTFS
    /dev/sda2              13        7129    57157632  7  HPFS/NTFS
    

    [CENTER]NOTE:

    IF YOU HAVE ONLY ONE PARTITION AND YOU TYPE d IT WILL DELETE YOUR ONLY PARTITION!!! BE SURE YOU WANT TO DELETE THE PARTITION BEFORE ISSUING THE d COMMAND![/CENTER]

    Issue the following command for delete,

    d
    

    the console then wants to know which partition to delete, use the number at the end of the /dev/sda to determine the partition number to be removed In this case it will be 2.

    [CENTER]IF YOU DELETE THE LAST PARTITION ON THE DRIVE YOU NEED TO CREATE A PARTITION TO FORMAT![/CENTER]

    Issue the number of the partition to be deleted

    2
    

    Verify that the partition has been deleted by issuing the following command

    p
    

    To save and write changes:

    w
    

    fdisk will save and exit.

    [CENTER][U]TO FORMAT THE PARTITION[/U][/CENTER]
    Type the following command to list your disk and partitions.
    please note that this is an l as in ell not the numeral 1

    fdisk -l
    

    My disk is /dev/sda, my partition is /dev/sda1.
    Now format the drive with the following command where /dev/sda1 is your disk and partition number

    mkntfs -Q /dev/sa1
    

    This command tells the drive to be formatted in a NTFS Format with a Quick format. You can use mkntfs to display the options and help commands.

    [CENTER]IF YOU DELETED YOUR PARTITIONS AND YOU WANT TO ADD THEM BACK AND YOU ARE TOO LAZY TO SEARCH[/CENTER]
    I will assume you are still using the fdisk command
    Display contents:
    ** please note that this is an l as in ell not the numeral 1 **

    fdisk -l
    

    Select Disk:

    fdisk /dev/sda
    

    Create New Partition:

    n
    

    Select a Primary partition:

    p
    

    Set the partition number:

    just press enter and accept default, you may supply a number if you wish
    

    Last cylinder:

    10011
    

    Print out partition tables:

    p
    

    Write changes to disk:

    w
    

    Now supply your mkntfs command.

    Hope this helps, good luck!


Log in to reply
 

423
Online

39.3k
Users

11.0k
Topics

104.4k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.