Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
drives [2015/07/15 19:17]
slackermedia
drives [2021/06/03 19:48] (current)
Line 1: Line 1:
-[[{arrowp.png|border:​0;​background:​none;​width:​0;​display:​inline-block;​position:​absolute;​top:​0;​left:​0;​}dotdesktop|]] 
- 
-[[{arrown.png|border:​0;​background:​none;​width:​0;​display:​inline-block;​position:​absolute;​top:​0;​margin-left:​2.5em;​}mimetypes|]] 
- 
 ======Hard Drives and Linux====== ======Hard Drives and Linux======
  
Line 74: Line 70:
  
 <WRAP indent> <WRAP indent>
-Determine the device node of the drive you are going to format by first seeing what drives are already part of your system:+Determine the device node of the drive you are going to format by first seeing what drives are already part of your system
 + 
 +Use the ''​lsblk''​ command to view all block devices (hard drives) attached to your computer. If the ''​lsblk''​ command is not clear to you, or you want to double-check what it tells you, you can investigate further:
  
 <​code>​ <​code>​
Line 99: 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 105: 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 125: Line 125:
 <​code>​ <​code>​
 $ cd ~ $ cd ~
-$ su -c '​umount /dev/sdc*'+$ su -c '​umount /dev/sdX*'
 </​code>​ </​code>​
  
Line 132: Line 132:
 <​code>​ <​code>​
 $ su $ su
-# parted /dev/sdc mklabel gpt+# parted /dev/sdX mklabel gpt
 </​code>​ </​code>​
  
Line 142: Line 142:
  
 <​code>​ <​code>​
-# parted /dev/sdc print | grep Disk+# parted /dev/sdX print | grep Disk
 </​code>​ </​code>​
  
Line 150: Line 150:
  
 <​code>​ <​code>​
-# parted /dev/sdc mkpart primary 1 2834020+# parted /dev/sdX mkpart primary 1 2834020
 </​code>​ </​code>​
  
Line 159: 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 170: Line 170:
  
 <​code>​ <​code>​
-# mkfs.jfs -L penguindrive /dev/sdc1+# mkfs.jfs -L penguindrive /dev/sdX1
 </​code>​ </​code>​
  
Line 250: Line 250:
 Since it was primarily intended for optical media, creating a UDF volume is different from formatting a drive for any other filesystem. Since it was primarily intended for optical media, creating a UDF volume is different from formatting a drive for any other filesystem.
  
-Slackermedia recommends the UDF format for any external drive that you intend to use with more than just your own computer. It avoids file permission frustration,​ but maintains all the other UNIX features that one would expect from a drive. It works well on thumbdrives as well as tradition drives. By being a universal format, it ensures that the data that matters to you the most is always available to you, regardless of what OS you happen to have on hand.+Slackermedia recommends the UDF format for any external drive that you intend to use with more than just your own computer. It avoids ​both file permission frustration ​and file size limitations, but maintains all the other UNIX features that one would expect from a drive. It works well on thumbdrives as well as tradition drives. By being a universal format, it ensures that the data that matters to you the most is always available to you, regardless of what OS you happen to have on hand.
  
  
Line 268: Line 268:
  
 <​code>​ <​code>​
-mkudffs --blocksize=512 \+mkudffs ​--utf8 \ 
 +--blocksize=512 \
 --udfrev=0x0201 \ --udfrev=0x0201 \
 --lvid="​penguindf"​ \ --lvid="​penguindf"​ \
 --vid="​penguindf"​ \ --vid="​penguindf"​ \
---media-type=hd ​--utf8 ​\+--media-type=hd \
 /dev/sdx || echo "​failed"​ /dev/sdx || echo "​failed"​
 </​code>​ </​code>​
Line 308: Line 309:
  
 <​code>​ <​code>​
-# umount /dev/sdc*+# umount /dev/sdX*
 </​code>​ </​code>​
  
Line 386: Line 387:
  
  
-[[{arrown.png|border:​0;​background:​none;​width:​0;​display:​inline-block;​float:​right;​}mimetypes|]][[{arrowp.png|border:​0;​background:​none;​width:​0;​float:​right;​}dotdesktop|]]+<WRAP centeralign>​ 
 +<wrap fa>[[dotdesktop|R]]</​wrap>​ <wrap fa>[[start|S]]</​wrap>​ <wrap fa>​[[mimetypes|Q]]</​wrap>​ 
 +</​WRAP>​