How to format a new disk using command? [duplicate]





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







-1
















This question already has an answer here:




  • Terminal method of formatting storage drive

    2 answers




I am new to Ubuntu and have a quesion:



I have Ubuntu 16.04 running on VMware. My initial setup had one disk.
I added another 2 disk (one 2GB and one 1GB). Now I want to add them to the Ubuntu, how can I do that? First I know I should format them but when I want run fdisk command I get this error:



Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xd5a1dff9.

Command (m for help):


And here is my disk info:



  *-disk:0                
description: SCSI Disk
physical id: 0.0.0
bus info: scsi@32:0.0.0
logical name: /dev/sda
size: 10GiB (10GB)
capabilities: partitioned partitioned:dos
configuration: logicalsectorsize=512 sectorsize=512 signature=bcc12dac
*-disk:1
description: SCSI Disk
physical id: 0.1.0
bus info: scsi@32:0.1.0
logical name: /dev/sdb
size: 1GiB (1073MB)
configuration: logicalsectorsize=512 sectorsize=512
*-disk:2
description: SCSI Disk
physical id: 0.2.0
bus info: scsi@32:0.2.0
logical name: /dev/sdc
size: 2GiB (2147MB)
configuration: logicalsectorsize=512 sectorsize=512
*-cdrom
description: DVD-RAM writer
physical id: 0.0.0
bus info: scsi@3:0.0.0
logical name: /dev/cdrom
logical name: /dev/cdrw
logical name: /dev/dvd
logical name: /dev/sr0
capabilities: audio cd-r cd-rw dvd dvd-r dvd-ram
configuration: status=open


My question is how to solve this issue using command only?










share|improve this question













marked as duplicate by mikewhatever, karel, guiverc, Pilot6, Charles Green Feb 24 at 14:20


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

























    -1
















    This question already has an answer here:




    • Terminal method of formatting storage drive

      2 answers




    I am new to Ubuntu and have a quesion:



    I have Ubuntu 16.04 running on VMware. My initial setup had one disk.
    I added another 2 disk (one 2GB and one 1GB). Now I want to add them to the Ubuntu, how can I do that? First I know I should format them but when I want run fdisk command I get this error:



    Device does not contain a recognized partition table.
    Created a new DOS disklabel with disk identifier 0xd5a1dff9.

    Command (m for help):


    And here is my disk info:



      *-disk:0                
    description: SCSI Disk
    physical id: 0.0.0
    bus info: scsi@32:0.0.0
    logical name: /dev/sda
    size: 10GiB (10GB)
    capabilities: partitioned partitioned:dos
    configuration: logicalsectorsize=512 sectorsize=512 signature=bcc12dac
    *-disk:1
    description: SCSI Disk
    physical id: 0.1.0
    bus info: scsi@32:0.1.0
    logical name: /dev/sdb
    size: 1GiB (1073MB)
    configuration: logicalsectorsize=512 sectorsize=512
    *-disk:2
    description: SCSI Disk
    physical id: 0.2.0
    bus info: scsi@32:0.2.0
    logical name: /dev/sdc
    size: 2GiB (2147MB)
    configuration: logicalsectorsize=512 sectorsize=512
    *-cdrom
    description: DVD-RAM writer
    physical id: 0.0.0
    bus info: scsi@3:0.0.0
    logical name: /dev/cdrom
    logical name: /dev/cdrw
    logical name: /dev/dvd
    logical name: /dev/sr0
    capabilities: audio cd-r cd-rw dvd dvd-r dvd-ram
    configuration: status=open


    My question is how to solve this issue using command only?










    share|improve this question













    marked as duplicate by mikewhatever, karel, guiverc, Pilot6, Charles Green Feb 24 at 14:20


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





















      -1












      -1








      -1









      This question already has an answer here:




      • Terminal method of formatting storage drive

        2 answers




      I am new to Ubuntu and have a quesion:



      I have Ubuntu 16.04 running on VMware. My initial setup had one disk.
      I added another 2 disk (one 2GB and one 1GB). Now I want to add them to the Ubuntu, how can I do that? First I know I should format them but when I want run fdisk command I get this error:



      Device does not contain a recognized partition table.
      Created a new DOS disklabel with disk identifier 0xd5a1dff9.

      Command (m for help):


      And here is my disk info:



        *-disk:0                
      description: SCSI Disk
      physical id: 0.0.0
      bus info: scsi@32:0.0.0
      logical name: /dev/sda
      size: 10GiB (10GB)
      capabilities: partitioned partitioned:dos
      configuration: logicalsectorsize=512 sectorsize=512 signature=bcc12dac
      *-disk:1
      description: SCSI Disk
      physical id: 0.1.0
      bus info: scsi@32:0.1.0
      logical name: /dev/sdb
      size: 1GiB (1073MB)
      configuration: logicalsectorsize=512 sectorsize=512
      *-disk:2
      description: SCSI Disk
      physical id: 0.2.0
      bus info: scsi@32:0.2.0
      logical name: /dev/sdc
      size: 2GiB (2147MB)
      configuration: logicalsectorsize=512 sectorsize=512
      *-cdrom
      description: DVD-RAM writer
      physical id: 0.0.0
      bus info: scsi@3:0.0.0
      logical name: /dev/cdrom
      logical name: /dev/cdrw
      logical name: /dev/dvd
      logical name: /dev/sr0
      capabilities: audio cd-r cd-rw dvd dvd-r dvd-ram
      configuration: status=open


      My question is how to solve this issue using command only?










      share|improve this question















      This question already has an answer here:




      • Terminal method of formatting storage drive

        2 answers




      I am new to Ubuntu and have a quesion:



      I have Ubuntu 16.04 running on VMware. My initial setup had one disk.
      I added another 2 disk (one 2GB and one 1GB). Now I want to add them to the Ubuntu, how can I do that? First I know I should format them but when I want run fdisk command I get this error:



      Device does not contain a recognized partition table.
      Created a new DOS disklabel with disk identifier 0xd5a1dff9.

      Command (m for help):


      And here is my disk info:



        *-disk:0                
      description: SCSI Disk
      physical id: 0.0.0
      bus info: scsi@32:0.0.0
      logical name: /dev/sda
      size: 10GiB (10GB)
      capabilities: partitioned partitioned:dos
      configuration: logicalsectorsize=512 sectorsize=512 signature=bcc12dac
      *-disk:1
      description: SCSI Disk
      physical id: 0.1.0
      bus info: scsi@32:0.1.0
      logical name: /dev/sdb
      size: 1GiB (1073MB)
      configuration: logicalsectorsize=512 sectorsize=512
      *-disk:2
      description: SCSI Disk
      physical id: 0.2.0
      bus info: scsi@32:0.2.0
      logical name: /dev/sdc
      size: 2GiB (2147MB)
      configuration: logicalsectorsize=512 sectorsize=512
      *-cdrom
      description: DVD-RAM writer
      physical id: 0.0.0
      bus info: scsi@3:0.0.0
      logical name: /dev/cdrom
      logical name: /dev/cdrw
      logical name: /dev/dvd
      logical name: /dev/sr0
      capabilities: audio cd-r cd-rw dvd dvd-r dvd-ram
      configuration: status=open


      My question is how to solve this issue using command only?





      This question already has an answer here:




      • Terminal method of formatting storage drive

        2 answers








      partitioning format fdisk






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 23 at 18:01









      AminAmin

      83




      83




      marked as duplicate by mikewhatever, karel, guiverc, Pilot6, Charles Green Feb 24 at 14:20


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









      marked as duplicate by mikewhatever, karel, guiverc, Pilot6, Charles Green Feb 24 at 14:20


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
























          1 Answer
          1






          active

          oldest

          votes


















          1














          1.format /dev/sdb



          fdisk /dev/sdb
          enter: n
          enter: p ( primary )
          enter: default -> press enter
          enter: default-> press enter

          enter:w ( write ) to save the changes

          if you type fdisk -l : you should see a /dev/sdb1


          Now make a ext4 filesystem on it with: mkfs.ext4 /dev/sdb1
          Create the domain you wish to mount it like /db with mkdir /db
          Mount it: mount /dev/sbd1 /db
          To mount after reboot you need to add this in the fstab similar to /
          You need to get the UID of the partition with: blkid
          These UID you need to add in the new line you have added in /etc/fstab.



          For the second disk you do it in the same way






          share|improve this answer
























          • Older versions of fdisk, do not support the newer gpt partitioning. Often better to use gpt if system is UEFI or less than 5 years old. You do not partition drive like sdb, but partition drive first then format partition(s). If you want gpt, you can use gdisk or parted. Or fdisk from 18.04. rodsbooks.com/gdisk

            – oldfred
            Feb 23 at 18:17


















          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          1.format /dev/sdb



          fdisk /dev/sdb
          enter: n
          enter: p ( primary )
          enter: default -> press enter
          enter: default-> press enter

          enter:w ( write ) to save the changes

          if you type fdisk -l : you should see a /dev/sdb1


          Now make a ext4 filesystem on it with: mkfs.ext4 /dev/sdb1
          Create the domain you wish to mount it like /db with mkdir /db
          Mount it: mount /dev/sbd1 /db
          To mount after reboot you need to add this in the fstab similar to /
          You need to get the UID of the partition with: blkid
          These UID you need to add in the new line you have added in /etc/fstab.



          For the second disk you do it in the same way






          share|improve this answer
























          • Older versions of fdisk, do not support the newer gpt partitioning. Often better to use gpt if system is UEFI or less than 5 years old. You do not partition drive like sdb, but partition drive first then format partition(s). If you want gpt, you can use gdisk or parted. Or fdisk from 18.04. rodsbooks.com/gdisk

            – oldfred
            Feb 23 at 18:17
















          1














          1.format /dev/sdb



          fdisk /dev/sdb
          enter: n
          enter: p ( primary )
          enter: default -> press enter
          enter: default-> press enter

          enter:w ( write ) to save the changes

          if you type fdisk -l : you should see a /dev/sdb1


          Now make a ext4 filesystem on it with: mkfs.ext4 /dev/sdb1
          Create the domain you wish to mount it like /db with mkdir /db
          Mount it: mount /dev/sbd1 /db
          To mount after reboot you need to add this in the fstab similar to /
          You need to get the UID of the partition with: blkid
          These UID you need to add in the new line you have added in /etc/fstab.



          For the second disk you do it in the same way






          share|improve this answer
























          • Older versions of fdisk, do not support the newer gpt partitioning. Often better to use gpt if system is UEFI or less than 5 years old. You do not partition drive like sdb, but partition drive first then format partition(s). If you want gpt, you can use gdisk or parted. Or fdisk from 18.04. rodsbooks.com/gdisk

            – oldfred
            Feb 23 at 18:17














          1












          1








          1







          1.format /dev/sdb



          fdisk /dev/sdb
          enter: n
          enter: p ( primary )
          enter: default -> press enter
          enter: default-> press enter

          enter:w ( write ) to save the changes

          if you type fdisk -l : you should see a /dev/sdb1


          Now make a ext4 filesystem on it with: mkfs.ext4 /dev/sdb1
          Create the domain you wish to mount it like /db with mkdir /db
          Mount it: mount /dev/sbd1 /db
          To mount after reboot you need to add this in the fstab similar to /
          You need to get the UID of the partition with: blkid
          These UID you need to add in the new line you have added in /etc/fstab.



          For the second disk you do it in the same way






          share|improve this answer













          1.format /dev/sdb



          fdisk /dev/sdb
          enter: n
          enter: p ( primary )
          enter: default -> press enter
          enter: default-> press enter

          enter:w ( write ) to save the changes

          if you type fdisk -l : you should see a /dev/sdb1


          Now make a ext4 filesystem on it with: mkfs.ext4 /dev/sdb1
          Create the domain you wish to mount it like /db with mkdir /db
          Mount it: mount /dev/sbd1 /db
          To mount after reboot you need to add this in the fstab similar to /
          You need to get the UID of the partition with: blkid
          These UID you need to add in the new line you have added in /etc/fstab.



          For the second disk you do it in the same way







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 23 at 18:10









          AlpyAlpy

          37516




          37516













          • Older versions of fdisk, do not support the newer gpt partitioning. Often better to use gpt if system is UEFI or less than 5 years old. You do not partition drive like sdb, but partition drive first then format partition(s). If you want gpt, you can use gdisk or parted. Or fdisk from 18.04. rodsbooks.com/gdisk

            – oldfred
            Feb 23 at 18:17



















          • Older versions of fdisk, do not support the newer gpt partitioning. Often better to use gpt if system is UEFI or less than 5 years old. You do not partition drive like sdb, but partition drive first then format partition(s). If you want gpt, you can use gdisk or parted. Or fdisk from 18.04. rodsbooks.com/gdisk

            – oldfred
            Feb 23 at 18:17

















          Older versions of fdisk, do not support the newer gpt partitioning. Often better to use gpt if system is UEFI or less than 5 years old. You do not partition drive like sdb, but partition drive first then format partition(s). If you want gpt, you can use gdisk or parted. Or fdisk from 18.04. rodsbooks.com/gdisk

          – oldfred
          Feb 23 at 18:17





          Older versions of fdisk, do not support the newer gpt partitioning. Often better to use gpt if system is UEFI or less than 5 years old. You do not partition drive like sdb, but partition drive first then format partition(s). If you want gpt, you can use gdisk or parted. Or fdisk from 18.04. rodsbooks.com/gdisk

          – oldfred
          Feb 23 at 18:17



          Popular posts from this blog

          How to change which sound is reproduced for terminal bell?

          Can I use Tabulator js library in my java Spring + Thymeleaf project?

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents