formatting partitions - Slackware

This is a discussion on formatting partitions - Slackware ; Dear Slackware readers, I've been a Slackware user since version 7.1, but I'm still shaky on some of the fine points--like formatting partitions. Let's say I've got a new hard drive, and I make a shiny, new Linux partition (type ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 21

Thread: formatting partitions

  1. formatting partitions

    Dear Slackware readers,

    I've been a Slackware user since version 7.1, but I'm still shaky on
    some of the fine points--like formatting partitions.

    Let's say I've got a new hard drive, and I make a shiny, new Linux
    partition (type 83 in fdisk). I'll use

    mkfs -c -t ext3 /dev/sda1

    when I'm ready, but first should I use dd to format? Like this?

    dd if=/dev/zero of=/dev/sda1 bs=1024 count=11727418

    Note that 11727418 is the number of blocks in sda1 reported by fdisk.

    Should I do this? If so, then why? And while you're at it, should I
    also do a similar thing with dd to a swap partition before using

    mkswap -c /dev/sda2

    I'm wondering the reason for doing both of these. Yes, that is what I
    try to do when setting up partitions for use, but I'm wondering if I'm
    wasting my time doing so.

    Thanks in advance.

    -Joe




  2. Re: formatting partitions

    "Joseph H. Rosevear" wrote:
    > Let's say I've got a new hard drive, and I make a shiny, new Linux
    > partition (type 83 in fdisk). I'll use
    >
    > mkfs -c -t ext3 /dev/sda1


    Yes, you will have to create a file system on the partition before you can
    mount the partition.

    > when I'm ready, but first should I use dd to format? Like this?
    >
    > dd if=/dev/zero of=/dev/sda1 bs=1024 count=11727418


    No, there is no reason to do that. Doing the above will fill the entire
    partition with zeros. That will wipe out any data on the partition as well
    as any file system.

    > And while you're at it, should I also do a similar thing with dd to a
    > swap partition before using
    >
    > mkswap -c /dev/sda2


    Yes, you should do mkswap before using a swap partition. But again, there
    is no need to wipe the partition with dd.

    regards Henrik
    --
    The address in the header is only to prevent spam. My real address is:
    hc1(at)poolhem.se Examples of addresses which go to spammers:
    root@localhost postmaster@localhost


  3. Re: formatting partitions

    Henrik Carlqvist wrote:
    > "Joseph H. Rosevear" wrote:


    [snip]

    > No, there is no reason to do that. Doing the above will fill the entire
    > partition with zeros. That will wipe out any data on the partition as well
    > as any file system.


    Right. I understand about the zeros. I won't hurt anything because
    it's a new partition and I haven't even done mkfs on it yet. That's
    helpful though to get your answer. Thank you.

    I guess I should explain. Maybe I have a misunderstanding. There is a
    step in the Slackware install (for version 10.2 and before--I don't
    know about 11 or 12) where the install asks if I want to format the new
    partition. That's nice, but Patrick doesn't say what this is doing,
    and I don't remember having looked it up.

    Do you know what this formatting step in the install does?

    Likewise there is a step in the install (I think) that formats the swap
    partition.

    -Joe

  4. Re: formatting partitions

    Henrik Carlqvist wrote:
    > "Joseph H. Rosevear" wrote:
    >> Let's say I've got a new hard drive, and I make a shiny, new Linux
    >> partition (type 83 in fdisk). I'll use
    >>
    >> mkfs -c -t ext3 /dev/sda1

    >
    > Yes, you will have to create a file system on the partition before you can
    > mount the partition.
    >
    >> when I'm ready, but first should I use dd to format? Like this?
    >>
    >> dd if=/dev/zero of=/dev/sda1 bs=1024 count=11727418

    >
    > No, there is no reason to do that. Doing the above will fill the entire
    > partition with zeros. That will wipe out any data on the partition as well
    > as any file system.


    There is indeed no reason for that except if you want to make the
    previous data unretrievable. And if you are really paranoid you should
    use shred in these case; just putting zero on the hard drive can leave
    some trace of the previous data that it is possible to recover with very
    expensive hardware.

    Olive

  5. Re: formatting partitions

    On Tue, 11 Sep 2007 06:42:38 +0000, Joseph H. Rosevear wrote:

    > There is a
    > step in the Slackware install (for version 10.2 and before--I don't
    > know about 11 or 12) where the install asks if I want to format the new
    > partition. That's nice, but Patrick doesn't say what this is doing,
    > and I don't remember having looked it up.
    >
    > Do you know what this formatting step in the install does?


    It does the same "mkfs" and "mkswap" steps that you described in a prior
    message (or similar).

    Formatting the partition means placing the filesystem on it, which is not
    the same as writing to every byte.

  6. Re: formatting partitions

    Joseph H. Rosevear wrote:
    >Do you know what this formatting step in the install does?


    mkfs (or mke2fs or whatever). If you want to check for bad blocks, it's
    mkfs -c. Called from /usr/lib/setup/SeTpartitions (on the root image of
    the install disk).

    >Likewise there is a step in the install (I think) that formats the swap
    >partition.


    mkswap (or mkswap -c), called from /usr/lib/setup/SeTswap.

    I can't tell that the install scripts themselves are installed anywhere
    (someone let me know if they are), but if you want to see them, grab CD
    #1 (or download initrd.img from somewhere), and do this:

    mount /mnt/cdrom
    mkdir foo
    cd foo
    gunzip -c /mnt/cdrom/isolinux/initrd.img | cpio -ivd
    cd usr/lib/setup

    and that's where all the setup scripts are, SeTswap, SeTpartition, and
    all that.


    Modern hard disks are already low-level formatted, and can't be
    low-level formatted again. Zero-filling the disk might cause it to
    remap bad sectors that it finds, but I've never bothered with it. YMMV.

    -Beej


  7. Re: formatting partitions

    msm wrote:
    >On Tue, 11 Sep 2007 06:42:38 +0000, Joseph H. Rosevear wrote:
    >
    >> There is a
    >> step in the Slackware install (for version 10.2 and before--I don't
    >> know about 11 or 12) where the install asks if I want to format the new
    >> partition. That's nice, but Patrick doesn't say what this is doing,
    >> and I don't remember having looked it up.
    >>
    >> Do you know what this formatting step in the install does?

    >
    >It does the same "mkfs" and "mkswap" steps that you described in a prior
    >message (or similar).


    Lets go for "or similar". There is no reason to take all day and
    half the night with a block check using the -c option. Same with
    formatting swap partitions.

    >Formatting the partition means placing the filesystem on it, which is not
    >the same as writing to every byte.


    And that is what the -c option will do to.

    --
    Floyd L. Davidson
    Ukpeagvik (Barrow, Alaska) floyd@apaflo.com

  8. Details of slack package licences

    I was looking at the FSF page on free Linux distros, and got to wondering
    what parts of Slackware are not free. OK, Apache 2 used to be considered
    unfree, but that's a recent-ish addition to Slackware.

    So, in a nutshell, what components of Slackware prevent it from being
    classed by the FSF as a free distro?

    A cursory googleration did not show up anything much on this topic, so if
    it's already been discussed sometime/somewhere then useful pointers would
    be welcome.

  9. Re: formatting partitions

    On Tue, 11 Sep 2007 02:06:03 -0800, Floyd L. Davidson wrote:

    > msm wrote:
    >>On Tue, 11 Sep 2007 06:42:38 +0000, Joseph H. Rosevear wrote:
    >>
    >>> There is a
    >>> step in the Slackware install (for version 10.2 and before--I don't
    >>> know about 11 or 12) where the install asks if I want to format the new
    >>> partition. That's nice, but Patrick doesn't say what this is doing,
    >>> and I don't remember having looked it up.
    >>>
    >>> Do you know what this formatting step in the install does?

    >>
    >>It does the same "mkfs" and "mkswap" steps that you described in a prior
    >>message (or similar).

    >
    > Lets go for "or similar". There is no reason to take all day and
    > half the night with a block check using the -c option. Same with
    > formatting swap partitions.


    No, but it's one of the choices in the install. Since I can't read the
    OP's mind from here (he/she/it must be wearing their tinfoil hat) I left
    some floppiness in the answer.

    >>Formatting the partition means placing the filesystem on it, which is not
    >>the same as writing to every byte.

    >
    > And that is what the -c option will do to.


    Yeah, but the fact that the formatting process can do a write check
    doesn't mean that's what formatting is, any more than the fact that my
    ice cream cone having a cherry on top means that ice cream is made from
    cherries.

    Hmmmmm. Cherries.....!

  10. Re: formatting partitions

    "Joseph H. Rosevear" (joe@airlink9.hopto.org) writes:
    > Dear Slackware readers,
    >
    > I've been a Slackware user since version 7.1, but I'm still shaky on
    > some of the fine points--like formatting partitions.
    >
    > Let's say I've got a new hard drive, and I make a shiny, new Linux
    > partition (type 83 in fdisk). I'll use
    >
    > mkfs -c -t ext3 /dev/sda1
    >
    > when I'm ready, but first should I use dd to format? Like this?
    >
    > dd if=/dev/zero of=/dev/sda1 bs=1024 count=11727418
    >
    > Note that 11727418 is the number of blocks in sda1 reported by fdisk.
    >
    > Should I do this? If so, then why? And while you're at it, should I
    > also do a similar thing with dd to a swap partition before using
    >
    > mkswap -c /dev/sda2
    >
    > I'm wondering the reason for doing both of these. Yes, that is what I
    > try to do when setting up partitions for use, but I'm wondering if I'm
    > wasting my time doing so.
    >

    Turn it around, and state why you think this is necessary, and even
    where you came upon the idea.

    You have some reason to believe it's the thing to do, yet it sure
    isn't clear where you get the notion. And we can't debunk the notion
    unless we know where it's originating from.

    Now, I might guess the one about swap is a garbling. Because I've seen
    bits about creating swap files (file, not swap partition), and they use
    dd to create a file of the desired size. But in that case, it's not to put
    a specific set of bytes in the swap file, it's to create a file of specific
    size, and there's no real way of doing that except by filling up a file
    to the needed size.

    Michael


  11. Re: formatting partitions

    On Tue, 11 Sep 2007 02:06:03 -0800, Floyd L. Davidson wrote:

    > msm wrote:
    >>On Tue, 11 Sep 2007 06:42:38 +0000, Joseph H. Rosevear wrote:


    > There is no reason to take all day and
    > half the night with a block check using the -c option. Same with
    > formatting swap partitions.
    >


    >

    I usually do run "badblocks" (with write testing) on new hard drives
    before putting them into service. This test gives some confidence that the
    disk has survived being transported from the factory. It establishes
    that the drive was in a "known good" state when installed.

    I don't usually run tests when installing or formatting. I have started
    an inventory process, though. That way, I know how long a given
    system's disk has been in service, etc.

    Going OT: Initially filling a drive with random data is a good idea
    when using an encrypted file system. That way, your data blends in with
    the other "noise" on the disk.

    More OT: Google has a lot of hardware. They recently released results
    of statistics of their hardware failures. A surprising number of disk
    failures were not predicted by the drive's "smart" data.

    --
    Douglas Mayne

  12. Re: formatting partitions

    On Tue, 11 Sep 2007 04:54:53 +0000, Joseph H. Rosevear wrote:

    >
    > Let's say I've got a new hard drive, and I make a shiny, new Linux
    > partition (type 83 in fdisk).


    I suggest using cfdisk instead to partition and format your hard drives.
    You can pick the file system you desire from a list and this way it saves
    you all the typing.
    And it's still proper Slackway too 'cos of the simple and straightforward
    'Denial Of Service' interface.

    Regards

    --
    B.Hoffmann

  13. Re: Details of slack package licences

    msm schreef:
    > I was looking at the FSF page on free Linux distros, and got to wondering
    > what parts of Slackware are not free. OK, Apache 2 used to be considered
    > unfree, but that's a recent-ish addition to Slackware.
    >
    > So, in a nutshell, what components of Slackware prevent it from being
    > classed by the FSF as a free distro?


    If you are interested, why don't you ask those nice FSF people? They
    should have the best answer.

    Eric

  14. Re: Details of slack package licences

    msm wrote:
    > I was looking at the FSF page on free Linux distros, and got to wondering
    > what parts of Slackware are not free.


    I can come to think of at least one application, and that is xv which is
    shareware for personal use only. As long as I know (since Slackware 3.0)
    xv has been included with Slackware.

    regards Henrik
    --
    The address in the header is only to prevent spam. My real address is:
    hc1(at)poolhem.se Examples of addresses which go to spammers:
    root@localhost postmaster@localhost


  15. Re: Details of slack package licences

    Henrik Carlqvist (Henrik.Carlqvist@deadspam.com) writes:
    > msm wrote:
    >> I was looking at the FSF page on free Linux distros, and got to wondering
    >> what parts of Slackware are not free.

    >
    > I can come to think of at least one application, and that is xv which is
    > shareware for personal use only. As long as I know (since Slackware 3.0)
    > xv has been included with Slackware.
    >

    But shareware is such an obvious choice.

    Pine would be my most immediate example. I first tried Debian, and
    realized I couldn't live with it since it didn't include Pine (and
    I was too much starting out at the time to do the install myself).

    Pine is open source, and isn't shareware. But it does have a different
    license that is deemed too "restrictive" by Debian (and presumable
    the FSF).

    Ironically, like the BSD license, the "restrictions" on Pine are
    primarily due to the viewpoint.

    Michael


  16. Re: Details of slack package licences

    msm wrote:
    > I was looking at the FSF page on free Linux distros, and got to wondering
    > what parts of Slackware are not free. OK, Apache 2 used to be considered
    > unfree, but that's a recent-ish addition to Slackware.


    I imagine given some of the zealots they have, anything that isn't GPL3
    will eventually not be considered "free".

    > So, in a nutshell, what components of Slackware prevent it from being
    > classed by the FSF as a free distro?


    Java?

    Mozilla says this in the "about:" page:


    # Portions of this software are copyright 1994 The Regents of the University of California. All Rights Reserved.
    # Portions of this software are copyright 2000-2002 Japan Network Information Center. All Rights Reserved.
    # This software may contain portions that are copyright 1998-2002 SupportSoft, Inc. All Rights Reserved.


    I'm guessing some of those may not even be open source (I didn't check).

    What type of codecs does gxine come with? Some of those might not be
    "free". I seem to remember Patrick talking about codecs and other things
    in an interview some time back. I'm sure there is plenty of stuff.

    - Kurt

  17. Re: Details of slack package licences

    ~kurt (actinouranium@earthlink.net) writes:

    > Mozilla says this in the "about:" page:
    >
    >
    > # Portions of this software are copyright 1994 The Regents of the University of California. All Rights Reserved.
    > # Portions of this software are copyright 2000-2002 Japan Network Information Center. All Rights Reserved.
    > # This software may contain portions that are copyright 1998-2002 SupportSoft, Inc. All Rights Reserved.
    >

    >
    > I'm guessing some of those may not even be open source (I didn't check).
    >

    But isn't Mozilla under the Netscape license? I've not kept track. But
    the Netscape license, as I remember reading about it, is pretty "free"
    but not GPL. And not being GPL is the issue here, when it comes to FSF.

    Micahel

    > What type of codecs does gxine come with? Some of those might not be
    > "free". I seem to remember Patrick talking about codecs and other things
    > in an interview some time back. I'm sure there is plenty of stuff.
    >
    > - Kurt




  18. Re: Details of slack package licences

    Michael Black wrote:

    > But isn't Mozilla under the Netscape license? I've not kept track. But
    > the Netscape license, as I remember reading about it, is pretty "free"
    > but not GPL. And not being GPL is the issue here, when it comes to FSF.


    Mozilla is under both the Mozilla and Netscape Public Licenses. But, that
    doesn't make the other copyrighted components that are included with
    Mozilla (and therefore Slackware) any less FSF friendly (assuming they
    are not FSF friendly in the first place). I haven't bothered to keep
    up with the state of the Netscape and Mozilla licenses. I don't even
    know if Mozilla is still included with Slackware. I hope so, even if
    SeaMonkey is a stupid name - I'm not a big fan of FireFox.

    - Kurt

  19. Re: Details of slack package licences

    Michael Black says:
    >Henrik Carlqvist (Henrik.Carlqvist@deadspam.com) writes:
    >> msm wrote:


    >>> I was looking at the FSF page on free Linux distros, and got to wondering
    >>> what parts of Slackware are not free.


    >> I can come to think of at least one application, and that is xv which is
    >> shareware for personal use only. As long as I know (since Slackware 3.0)
    >> xv has been included with Slackware.


    >But shareware is such an obvious choice.


    >Pine would be my most immediate example.


    Pine, and its "editor", used to be the programs of choice for
    unix beginners. Absolute beginners.

    It's junk. If you like Pine you probably still eat baby food and
    ride tricycles and kiss mommy and daddy goodnight.

    cordially, as always,

    rm

  20. Re: formatting partitions

    I had a similar question. I just split this hard drive and created a new
    ext2 partition on it with Qparted, one with the system installed on it
    and other I wanted to use for data. Now I don't remember if I formatted
    it or not but, I don't see the new partition anywhere in the system to
    mounted. Could the it be because I didn't format it or I just don't know
    where to find it? Thanks

+ Reply to Thread
Page 1 of 2 1 2 LastLast