Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
drives [2017/05/15 10:48] slackermedia updated command for new udftools version |
drives [2021/06/03 19:48] (current) |
||
---|---|---|---|
Line 97: | Line 97: | ||
In this example, there is a third drive not in use by the system, labelled ''sdc''. This is the new drive that needs formatting. Notice that it does have a partition on it already, but that's only because most all drives purchased from a modern computer store are pre-formatted, presumably so that users do not have to learn about formatting themselves. | In this example, there is a third drive not in use by the system, labelled ''sdc''. This is the new drive that needs formatting. Notice that it does have a partition on it already, but that's only because most all drives purchased from a modern computer store are pre-formatted, presumably so that users do not have to learn about formatting themselves. | ||
+ | |||
+ | To prevent copy-paste errors, this article uses the ''/dev/sdX'' designation. | ||
Keep in mind that your drive in real life could be anything from ''sdb'' to ''sdz'', depending on how many actual drives you have plugged in. Usually, the first drive you plug in is going to come up as ''sdb'' because ''sda'' is the drive running your computer, but be aware of your actual setup and use your head. //You do not want to format the wrong drive.// | Keep in mind that your drive in real life could be anything from ''sdb'' to ''sdz'', depending on how many actual drives you have plugged in. Usually, the first drive you plug in is going to come up as ''sdb'' because ''sda'' is the drive running your computer, but be aware of your actual setup and use your head. //You do not want to format the wrong drive.// | ||
Line 103: | Line 105: | ||
<code> | <code> | ||
- | $ su -c 'mount /dev/sdc1 /mnt/hd' | + | $ su -c 'mount /dev/sdX1 /mnt/hd' |
$ cd /mnt/hd | $ cd /mnt/hd | ||
$ ls | $ ls | ||
Line 123: | Line 125: | ||
<code> | <code> | ||
$ cd ~ | $ cd ~ | ||
- | $ su -c 'umount /dev/sdc*' | + | $ su -c 'umount /dev/sdX*' |
</code> | </code> | ||
Line 130: | Line 132: | ||
<code> | <code> | ||
$ su | $ su | ||
- | # parted /dev/sdc mklabel gpt | + | # parted /dev/sdX mklabel gpt |
</code> | </code> | ||
Line 140: | Line 142: | ||
<code> | <code> | ||
- | # parted /dev/sdc print | grep Disk | + | # parted /dev/sdX print | grep Disk |
</code> | </code> | ||
Line 148: | Line 150: | ||
<code> | <code> | ||
- | # parted /dev/sdc mkpart primary 1 2834020 | + | # parted /dev/sdX mkpart primary 1 2834020 |
</code> | </code> | ||
Line 157: | Line 159: | ||
</WRAP> | </WRAP> | ||
- | Now the drive has a partition; all it needs now is a file system. Remember, a partition is indicated by a number trailing the device node. In this example, the location of your new partition is ''/dev/sdc1''. | + | Now the drive has a partition; all it needs now is a file system. Remember, a partition is indicated by a number trailing the device node. In this example, the location of your new partition is ''/dev/sdX1''. |
For a Linux native drive, use ''ext4'': | For a Linux native drive, use ''ext4'': | ||
<code> | <code> | ||
- | # mkfs.ext4 -L penguindrive /dev/sdc1 | + | # mkfs.ext4 -L penguindrive /dev/sdX1 |
</code> | </code> | ||
Line 168: | Line 170: | ||
<code> | <code> | ||
- | # mkfs.jfs -L penguindrive /dev/sdc1 | + | # mkfs.jfs -L penguindrive /dev/sdX1 |
</code> | </code> | ||
Line 307: | Line 309: | ||
<code> | <code> | ||
- | # umount /dev/sdc* | + | # umount /dev/sdX* |
</code> | </code> | ||