How to clear ext4 filesystem of partition in arch

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'm installing Arch Linux by guide and misinterpreted some stuff about installing the bootloader. Therefore I went back and cleared my /dev/sdb partitions. Before that I made sdb1 as linux filesystem (8300) and sdb2 as swap partition (8200).



To delete partitions I used gdisk and the d command to remove the partitions.
Running lsblk showed be that sdb is only a disk without partitions now.



Then I created new partitions with gdisk again. After I created them I want to mount a filesystem ext4 to sdb1 by executing mkfs.ext4 -L arch /dev/sdb1



Following warning appears /dev/sdb1 contains a ext4 file system labelled 'arch'.
And telling me the date and time when I did so.



How can I actually clear the partitions without having such things still left? It seems that I did not really format the partitions










share|improve this question























  • If you are happy to use the command line, dd will do the job for you.
    – Raman Sailopal
    Oct 3 '17 at 9:02










  • I am happy with that. I kinda found out that overwriting the old fs does no harm
    – xetra11
    Oct 3 '17 at 9:06














up vote
0
down vote

favorite












I'm installing Arch Linux by guide and misinterpreted some stuff about installing the bootloader. Therefore I went back and cleared my /dev/sdb partitions. Before that I made sdb1 as linux filesystem (8300) and sdb2 as swap partition (8200).



To delete partitions I used gdisk and the d command to remove the partitions.
Running lsblk showed be that sdb is only a disk without partitions now.



Then I created new partitions with gdisk again. After I created them I want to mount a filesystem ext4 to sdb1 by executing mkfs.ext4 -L arch /dev/sdb1



Following warning appears /dev/sdb1 contains a ext4 file system labelled 'arch'.
And telling me the date and time when I did so.



How can I actually clear the partitions without having such things still left? It seems that I did not really format the partitions










share|improve this question























  • If you are happy to use the command line, dd will do the job for you.
    – Raman Sailopal
    Oct 3 '17 at 9:02










  • I am happy with that. I kinda found out that overwriting the old fs does no harm
    – xetra11
    Oct 3 '17 at 9:06












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm installing Arch Linux by guide and misinterpreted some stuff about installing the bootloader. Therefore I went back and cleared my /dev/sdb partitions. Before that I made sdb1 as linux filesystem (8300) and sdb2 as swap partition (8200).



To delete partitions I used gdisk and the d command to remove the partitions.
Running lsblk showed be that sdb is only a disk without partitions now.



Then I created new partitions with gdisk again. After I created them I want to mount a filesystem ext4 to sdb1 by executing mkfs.ext4 -L arch /dev/sdb1



Following warning appears /dev/sdb1 contains a ext4 file system labelled 'arch'.
And telling me the date and time when I did so.



How can I actually clear the partitions without having such things still left? It seems that I did not really format the partitions










share|improve this question















I'm installing Arch Linux by guide and misinterpreted some stuff about installing the bootloader. Therefore I went back and cleared my /dev/sdb partitions. Before that I made sdb1 as linux filesystem (8300) and sdb2 as swap partition (8200).



To delete partitions I used gdisk and the d command to remove the partitions.
Running lsblk showed be that sdb is only a disk without partitions now.



Then I created new partitions with gdisk again. After I created them I want to mount a filesystem ext4 to sdb1 by executing mkfs.ext4 -L arch /dev/sdb1



Following warning appears /dev/sdb1 contains a ext4 file system labelled 'arch'.
And telling me the date and time when I did so.



How can I actually clear the partitions without having such things still left? It seems that I did not really format the partitions







linux arch-linux ext4 mkfs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 3 '17 at 9:47









Jeff Schaller

32.3k849109




32.3k849109










asked Oct 3 '17 at 8:14









xetra11

161210




161210











  • If you are happy to use the command line, dd will do the job for you.
    – Raman Sailopal
    Oct 3 '17 at 9:02










  • I am happy with that. I kinda found out that overwriting the old fs does no harm
    – xetra11
    Oct 3 '17 at 9:06
















  • If you are happy to use the command line, dd will do the job for you.
    – Raman Sailopal
    Oct 3 '17 at 9:02










  • I am happy with that. I kinda found out that overwriting the old fs does no harm
    – xetra11
    Oct 3 '17 at 9:06















If you are happy to use the command line, dd will do the job for you.
– Raman Sailopal
Oct 3 '17 at 9:02




If you are happy to use the command line, dd will do the job for you.
– Raman Sailopal
Oct 3 '17 at 9:02












I am happy with that. I kinda found out that overwriting the old fs does no harm
– xetra11
Oct 3 '17 at 9:06




I am happy with that. I kinda found out that overwriting the old fs does no harm
– xetra11
Oct 3 '17 at 9:06










1 Answer
1






active

oldest

votes

















up vote
2
down vote













The command you want is wipefs -a. When deleting partitions that you have no intent of recovering data from, run this on each partition prior to deleting it. In this particular case however, you can probably just pass -f to the mkfs command you're trying to run on that partition, and it will ignore what's there and create a new filesystem (don't get in the habit of doing this though, mkfs has this check intentionally so that you don't accidentally nuke a filesystem you actually need).



What's happened here is that you created the new partition at the same starting point the old partition was at. Deleting a partition from the partition table doesn't delete any data in the region of the storage device that the partition delimited, it just means the OS stops treating that region as in use. As a result, at least the first superblock from the old filesystem is still there and being seen by the tools, which assume there's a filesystem there as a safety precaution.






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f395777%2fhow-to-clear-ext4-filesystem-of-partition-in-arch%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    The command you want is wipefs -a. When deleting partitions that you have no intent of recovering data from, run this on each partition prior to deleting it. In this particular case however, you can probably just pass -f to the mkfs command you're trying to run on that partition, and it will ignore what's there and create a new filesystem (don't get in the habit of doing this though, mkfs has this check intentionally so that you don't accidentally nuke a filesystem you actually need).



    What's happened here is that you created the new partition at the same starting point the old partition was at. Deleting a partition from the partition table doesn't delete any data in the region of the storage device that the partition delimited, it just means the OS stops treating that region as in use. As a result, at least the first superblock from the old filesystem is still there and being seen by the tools, which assume there's a filesystem there as a safety precaution.






    share|improve this answer
























      up vote
      2
      down vote













      The command you want is wipefs -a. When deleting partitions that you have no intent of recovering data from, run this on each partition prior to deleting it. In this particular case however, you can probably just pass -f to the mkfs command you're trying to run on that partition, and it will ignore what's there and create a new filesystem (don't get in the habit of doing this though, mkfs has this check intentionally so that you don't accidentally nuke a filesystem you actually need).



      What's happened here is that you created the new partition at the same starting point the old partition was at. Deleting a partition from the partition table doesn't delete any data in the region of the storage device that the partition delimited, it just means the OS stops treating that region as in use. As a result, at least the first superblock from the old filesystem is still there and being seen by the tools, which assume there's a filesystem there as a safety precaution.






      share|improve this answer






















        up vote
        2
        down vote










        up vote
        2
        down vote









        The command you want is wipefs -a. When deleting partitions that you have no intent of recovering data from, run this on each partition prior to deleting it. In this particular case however, you can probably just pass -f to the mkfs command you're trying to run on that partition, and it will ignore what's there and create a new filesystem (don't get in the habit of doing this though, mkfs has this check intentionally so that you don't accidentally nuke a filesystem you actually need).



        What's happened here is that you created the new partition at the same starting point the old partition was at. Deleting a partition from the partition table doesn't delete any data in the region of the storage device that the partition delimited, it just means the OS stops treating that region as in use. As a result, at least the first superblock from the old filesystem is still there and being seen by the tools, which assume there's a filesystem there as a safety precaution.






        share|improve this answer












        The command you want is wipefs -a. When deleting partitions that you have no intent of recovering data from, run this on each partition prior to deleting it. In this particular case however, you can probably just pass -f to the mkfs command you're trying to run on that partition, and it will ignore what's there and create a new filesystem (don't get in the habit of doing this though, mkfs has this check intentionally so that you don't accidentally nuke a filesystem you actually need).



        What's happened here is that you created the new partition at the same starting point the old partition was at. Deleting a partition from the partition table doesn't delete any data in the region of the storage device that the partition delimited, it just means the OS stops treating that region as in use. As a result, at least the first superblock from the old filesystem is still there and being seen by the tools, which assume there's a filesystem there as a safety precaution.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 3 '17 at 12:12









        Austin Hemmelgarn

        5,2041915




        5,2041915



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f395777%2fhow-to-clear-ext4-filesystem-of-partition-in-arch%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?