{"id":897,"date":"2012-12-25T23:00:53","date_gmt":"2012-12-26T07:00:53","guid":{"rendered":"http:\/\/blog.portnumber53.com\/?p=897"},"modified":"2012-12-25T23:00:53","modified_gmt":"2012-12-26T07:00:53","slug":"raspberry-pi-mount-flash-disks-at-boot","status":"publish","type":"post","link":"https:\/\/blog.portnumber53.com\/index.php\/2012\/12\/25\/raspberry-pi-mount-flash-disks-at-boot\/","title":{"rendered":"Raspberry Pi: mount flash disks at boot"},"content":{"rendered":"<p>Now that I got a little time to work on my Raspberry Pi, I decided to have 2 2GB flash drives mounted at boot to save some write cycles on the SD card:<\/p>\n<p>After a few failed times, I googled for a while and the important bit is the 6th field in your \/etc\/fstab file. Here&#39;s mine:<\/p>\n<p>&nbsp;<\/p>\n<p>[root@pi ~]# cat \/etc\/fstab<br \/>\n\t#<br \/>\n\t# \/etc\/fstab: static file system information<br \/>\n\t#<br \/>\n\t# &lt;file system&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dir&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;type&gt;&nbsp;&nbsp;&nbsp; &lt;options&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dump&gt; &lt;pass&gt;<br \/>\n\tdevpts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/dev\/pts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; devpts&nbsp;&nbsp;&nbsp; defaults&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br \/>\n\tshm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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sp;&nbsp;&nbsp; 2<br \/>\n\t\/dev\/sdb1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/home&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ext4&nbsp;&nbsp;&nbsp; defaults&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2<\/p>\n<p>&nbsp;<\/p>\n<p>The &quot;2&quot; in the 6th field tells the kernel to wait for the drive to be available before trying to mount it.<\/p>\n<p>Here&#39;s the &quot;mount&quot; command output:<\/p>\n<p>\/dev\/mmcblk0p1 on \/boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii,shortname=mixed,errors=remount-ro)<br \/>\n\t\/dev\/sdb1 on \/home type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)<br \/>\n\t\/dev\/sda2 on \/data type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)<br \/>\n\t\/dev\/sda3 on \/tmp type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)<br \/>\n\t\/dev\/sda1 on \/var type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that I got a little time to work on my Raspberry Pi, I decided to have 2 2GB flash drives mounted at boot to save some write cycles on the SD card: After a few failed times, I googled for a while and the important bit is the 6th&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/blog.portnumber53.com\/index.php\/2012\/12\/25\/raspberry-pi-mount-flash-disks-at-boot\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,14],"tags":[61,143,219,245,286],"class_list":["post-897","post","type-post","status-publish","format-standard","hentry","category-hardware","category-linux","tag-boot","tag-flash-drive","tag-linux","tag-mount","tag-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/comments?post=897"}],"version-history":[{"count":0,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/897\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/media?parent=897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/categories?post=897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/tags?post=897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}