{"id":1345,"date":"2024-12-26T15:54:45","date_gmt":"2024-12-27T00:54:45","guid":{"rendered":"https:\/\/accretiondisc.com\/blog\/?p=1345"},"modified":"2024-12-26T15:54:45","modified_gmt":"2024-12-27T00:54:45","slug":"adding-a-usb-drive","status":"publish","type":"post","link":"https:\/\/accretiondisc.com\/blog\/2024\/12\/26\/adding-a-usb-drive\/","title":{"rendered":"Adding a USB drive"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Start by creating a mountpoint somewhere&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo mkdir \/some\/random\/mountpoint<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then figure out where your USB drive is now:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ lsblk\nNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS\nsda 8:0 0 476.9G 0 disk\n\u251c\u2500sda1 8:1 0 300M 0 part \/boot\/efi\n\u2514\u2500sda2 8:2 0 476.6G 0 part \/\n<strong>sdb 8:16 0 953.9G 0 disk<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I recognize the 1TB drive is the one I added.  If you&#8217;re not sure, unplug it and do a <strong>lsblk<\/strong>, then plug it back in and see what changed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Make a partition using <strong>GPartEd<\/strong>.  (I&#8217;m too lazy to learn <strong>parted<\/strong> and <strong>mkfs<\/strong>.)  When you&#8217;re done, check lsblk again and it should be there.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ lsblk\nNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS\nsda 8:0 0 476.9G 0 disk\n\u251c\u2500sda1 8:1 0 300M 0 part \/boot\/efi\n\u2514\u2500sda2 8:2 0 476.6G 0 part \/\n<strong>\u2514\u2500sdb1 8:17 0 953.9G 0 part \/home\/exthd\/pd1t<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">(Except you won&#8217;t have a mount point yet. Let&#8217;s fix that.)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ blkid\n\/dev\/sda1: UUID=\"2802-FB42\" BLOCK_SIZE=\"512\" TYPE=\"vfat\" PARTUUID=\"d46\u2026bda8\"\n\/dev\/sda2: UUID=\"789\u20263d1\" BLOCK_SIZE=\"4096\" TYPE=\"ext4\" PARTLABEL=\"root\" PARTUUID=\"ada\u202600\"\n<strong>\/dev\/sdb1: UUID=\"5f0\u2026d98\" BLOCK_SIZE=\"4096\" TYPE=\"ext4\" PARTUUID=\"04fdf764-01\"<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now copy that UUID into a new \/etc\/fstab entry like so:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ vim \/etc\/fstab<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>UUID=5f0\u2026d98 \/some\/mount\/point ext4 defaults,noatime,nofail,x-systemd.device-timeout=10 0 0<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo vim \/etc\/fstab<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">More complete instructions <a href=\"https:\/\/linuxconfig.org\/howto-mount-usb-drive-in-linux\">here<\/a> and <a href=\"https:\/\/linuxconfig.org\/how-to-partition-usb-drive-in-linux\">here<\/a> and <a href=\"https:\/\/linuxconfig.org\/how-fstab-works-introduction-to-the-etc-fstab-file-on-linux\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Start by creating a mountpoint somewhere&#8230; Then figure out where your USB drive is now: I recognize the 1TB drive is the one I added. If you&#8217;re not sure, unplug it and do a lsblk, then plug it back in and see what changed. Make a partition using GPartEd. (I&#8217;m too lazy to learn parted [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[23],"tags":[],"class_list":["post-1345","post","type-post","status-publish","format-standard","hentry","category-life"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paRqpr-lH","_links":{"self":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts\/1345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/comments?post=1345"}],"version-history":[{"count":0,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/posts\/1345\/revisions"}],"wp:attachment":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/media?parent=1345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/categories?post=1345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/tags?post=1345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}