Para formatar com o Fdisk

22-11-2010 10:41

 PARA FORMATAR COM O FDISK

 

 

Para você formatar o HD, supondo que ele seja /dev/hda, utilize o seguinte comando:

 

        # fdisk /dev/hda

 

       Deverá aparecer uma saída na tela como esta:

 

         Device contains neither a valid DOS partion table, nor Sun, SGI or OSF disklabel

         Building a new disk label. Changes will remain in memory only,

         Until you decide to white them. After that, of course, the previous

         Content won’t be recoverable.

         The number of cylinders for this disk is set to 10158.

         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)

         Warning: invalid flag 0x00, 0x00 of partition table 4 will be corrected by w(rite)

         Command (m for help):

 

    Você deverá digitar “m” para ver as poções que o FDISK oferece. Você verá uma tela como esta:

 

      Command action

               a                 toggle a bootable flag

                b                 edit bsd disklabel

                c                  toggle the dos compatibility flag

                d                 delete a partition

                l                   list known partition types

                m                print this menu

                n                 add a new partition

                o                create a new empty DOS partition table

                p                print the partition table

                q                quit without saving changes

                s                 create a new empty Sun disklabel

               t                  change a partion’s system id

               u                 change display/entry units

               v                 verify the partition table

               w                white table to disk and exit

               x                 extra functionality (experts only)

 

       Se você quiser criar apenas uma partição, sendo ela primária, digite “n”.

       O sistema lhe mostrará uma mensagem dizendo se você quer criar uma partição do tipo extendida ou primária. Digite “1” para ser primária

        e depois pressione ENTER. O sistema irá mostrar uma mensagem como esta:   

 

         First cylinder (1-10158, default 1)

 

     Digite “1” para iniciar do primeiro cilindro.

      O próximo passo, o sistema perguntará o tamanho da partição. Aparecerá uma mensagem como esta

      abaixo. Escolha o tamanho.

 

        Last cylinder or +size or +sizeM or +sizeK (1-10158, default 10158):

 

    Não se esqueça de iniciar o tamanho com um “+” e de ao final do número colocar um “M” para dizer ao sistema que a capacidade está em MB.

     Após estes passos, digite “a”para ativar esta partição para boot.

     Digite “1” para escolher a partição 1, como definimos antes.

    Agora digite “t” para alterar o tipo de partição.

    Digite “L” para ver as opções e escolha uma. Se você quiser formatar com FAT32, digite “1”, se quiser formatar com FAT16, digite “6”, se  

      quiser criar um sistema para o funcionamento do Linux, digite “83”.                                                   

      Se não funcionar e no prompt ficar aparecendo a seguinte mensagem:

 

      Hex code (type L to list codes):

 

    Aperte a sequência de teclas CTRL+Z para dar um “stop” no FDISK, e digite novamente:

 

       fdisk /dev/hda

 

    Digite “w” para gravar a tabela de partição, e estará finalizada a formatação.

 

Baixar em formato PDF

 


Linux: Se é bom, pode ficar sempre melhor!