<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>sudo Sergeant 05: Partitions &amp; File Systems</title><link>https://community.element14.com/challenges-projects/element14-presents/sudosergeant/w/documents/3130/sudo-sergeant-05-partitions-file-systems</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>sudo Sergeant 05: Partitions &amp; File Systems</title><link>https://community.element14.com/challenges-projects/element14-presents/sudosergeant/w/documents/3130/sudo-sergeant-05-partitions-file-systems</link><pubDate>Wed, 13 Dec 2017 15:24:31 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:6f80811c-a612-4149-885b-fa65c41b9eec</guid><dc:creator>tariq.ahmad</dc:creator><comments>https://community.element14.com/challenges-projects/element14-presents/sudosergeant/w/documents/3130/sudo-sergeant-05-partitions-file-systems#comments</comments><description>Current Revision posted to Documents by tariq.ahmad on 12/13/2017 3:24:31 PM&lt;br /&gt;
&lt;table cellpadding="0" cellspacing="0" style="padding:0px;margin:0px;background-color:#c4e3ed;width:100%;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td rowspan="3" style="vertical-align:bottom;"&gt;&lt;a href="/e14/assets/legacy/2017/FelixExcLeft1.png"&gt;&lt;img alt="image" class="nolightbox" src="/e14/assets/legacy/2017/FelixExcLeft1.png"  /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td rowspan="3" style="vertical-align:top;padding:8px 13px 13px 8px;"&gt;&lt;p style="margin:0;font-size:18px;font-weight:bold;padding-bottom:6px;"&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/benheck/"&gt;element14&amp;#39;s The Ben Heck Show&lt;/a&gt;&lt;/p&gt;&lt;p style="margin:0;padding-bottom:6px;line-height:18px;"&gt;&lt;strong&gt;Join the Ben Heck team every week for amazing hacks!&lt;/strong&gt; Watch them build and mod community-inspired projects using electronics!&lt;/p&gt;&lt;p style="margin:0;"&gt;&lt;a href="/challengesprojects/element14-presents/benheck/"&gt;Back to The Ben Heck Show homepage &lt;img loading="lazy" alt="image" src="/e14/assets/legacy/gen/LinkArrow.gif"  /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="padding:13px 10px 13px 13px;background-color:#004156;vertical-align:middle;" width="30%"&gt;&lt;a class="" href="https://www.element14.com/community/community/experts/benheck/sudosergeant?ICID=SS-episodedoc-topban"&gt;&lt;span style="color:#ffffff;text-decoration:none;"&gt;sudo Sergeant&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="padding:13px 10px 13px 13px;background-color:#005973;vertical-align:middle;"&gt;&lt;a class="jivecontainerTT-hover-container jive-link-community-small" href="/challengesprojects/element14-presents/benheck/ben-heck-exclusive/"&gt;&lt;span style="color:#ffffff;text-decoration:none;"&gt;Featured Bonus Content&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="padding:13px 10px 13px 13px;background-color:#006f91;vertical-align:middle;"&gt;&lt;a class="jive-link-wiki-small" href="/challenges-projects/element14-presents/benheck/ben-heck-exclusive/w/documents/9678/the-ben-heck-show-episode-archive"&gt;&lt;span style="color:#ffffff;text-decoration:none;"&gt;See All Episodes&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;table style="width:80%;display:block;margin:0 auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="padding-bottom:12px;"&gt;&lt;span&gt;&lt;a href="https://www.youtube.com/watch?v=oqGi4lp4KvA"&gt;www.youtube.com/watch&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p style="margin:0;border:1px solid #b8d7e5;background-color:#e9f6fc;padding:8px;max-width:634px;"&gt;Felix goes over disk partitions and file formats.&amp;nbsp; Working from command line, he shows you how to view the disk partitions that are on your storage device and how to modify the file system that they are formatted in.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Partitioning a hard drive divides the available space into sections that can be accessed independently. You can allocate an entire drive to a single partition, or use multiple partitions for dual-booting, maintaining swap partition, or to logically separate data such as audio or video files.&amp;nbsp; The partition table stores the required information.&amp;nbsp; Felix gives an overview of two types of partition tables, Master Boot Record (MBR) and Globally Unique Identifier Partition Table (GBT). The first 512 Bytes of a storage device is dedicated to the Master Boot Record (MBR). This comes from an older partitioning scheme that is designed to work with the boot process of the bios. During the boot process the bios loads the beginning 512 Bytes of the first valid disk in the bios disk order. The Global Unique Intentifier Partition Table (GPT) is a partitioning scheme that is part of unified extensible firmware interface specification.&amp;nbsp;&amp;nbsp; It uses globally unique identifiers (GUIDS), UUIDS in the Linux world, to define partitions and partition types.&amp;nbsp; It is designed to succeed the master boot record partitioning scheme method. GPT is recommended for systems that boot via a UEFI system.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Felix uses a Raspberry Pi and a (Tux the Linux Penguin) USB dongle to demonstrate how this works.&amp;nbsp; He takes Tux and plugs him into the USB.&amp;nbsp; He utilizes command line to locate where his device comes up in the device tree.&amp;nbsp; He uses the command lsblk to shows there are no partitions set up and the device comes up as SDA. He points out mmcblk0 which is the device.&amp;nbsp;&amp;nbsp; He shows you what mounted partitions look like by pointing to mmcblk2, mmcblk7, mmcblk5, mmcblk1, and mmcblk6. He also shows you the device directory which he gets to by typing in ls /dev.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;The utility for modifying partitions that Felix is going to uses is f disk and pulled from the following command:&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;blockquote class="jive-quote"&gt;&lt;p style="margin:0;"&gt; $ sudo fdisk /dev/sda &lt;/p&gt;&lt;/blockquote&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;He shows you how you can pull up the menu by typing m or pull up the partition table by typing p. To create a DOS partition table he types in n for new partition.&amp;nbsp; He then goes over the commands for creating a new partition table for DOS, how to make it the primary table, and how to set the size of the partition. Felix then goes over the steps for creating another partition.&amp;nbsp; He does another primary partition and prints the partition table again and demonstrates that a second partition has been added. You how to use command “l” to display all the known partition types.&amp;nbsp; He chooses a Linux partition and uses w2 to write out the partition table. After verifying the partition exists, he goes over formatting the partition. He formats the partition using the mkfs utility:&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;blockquote class="jive-quote"&gt;&lt;p style="margin:0;"&gt;$ sudo mkfs.ext4&amp;nbsp; /dev/sda1&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;Ext4 is a journalized file system which is pretty much the standard Linux filing system allocation table of writing super clocks and filesystem account information. sudo fdisk –l/dev/sda&amp;nbsp; Once the partition is formatted he’s then able to make a directory and mount it in the system.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h2&gt;&lt;span style="color:#2873ee;"&gt;Do you have any questions or advice on partitioning storage on the Raspberry Pi?&lt;/span&gt;&lt;/h2&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;h2&gt;&lt;span style="color:#2873ee;"&gt;Let us know in the comments below! &lt;/span&gt;&lt;/h2&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: rpibeginner, globally unique identifier partition table, gbt, gpt, mbr, masterbootrecord, uefi system, uuids, linux filing system, sudosergeant, partitioning, linux&lt;/div&gt;
</description></item></channel></rss>