{"id":44,"date":"2007-05-10T16:51:43","date_gmt":"2007-05-10T15:51:43","guid":{"rendered":"http:\/\/bergs.biz\/blog\/2007\/05\/10\/grub-and-root-on-partitionable-raid1-array\/"},"modified":"2008-04-16T16:34:50","modified_gmt":"2008-04-16T14:34:50","slug":"grub-and-root-on-partitionable-raid1-array","status":"publish","type":"post","link":"https:\/\/bergs.biz\/blog\/2007\/05\/10\/grub-and-root-on-partitionable-raid1-array\/","title":{"rendered":"Grub and root on partitionable RAID1 array"},"content":{"rendered":"<p>To make a long story short &#8212; don&#8217;t do it, it won&#8217;t work. \ud83d\ude42<\/p>\n<p>And now the long version of the whole story. The following applies to Debian 4.0 aka &#8220;Etch,&#8221; but it&#8217;s not specific to Debian, since the principles of the whole procedure is the same on all Linux distributions.<\/p>\n<p>For the first time I wanted to use a partitionable RAID1 array, because I wanted to spare myself the trouble of creating multiple partitions on <em>both <\/em>drives which would then be combined to individual RAID1 arrays. Instead I would have to create a single partitionable RAID1 array and partition it afterwards.<\/p>\n<p><!--more-->I had an existing non-RAID system on the first of two 20 GB hard drives. To construct a level-1 RAID you need two drives &#8212; however I only had a single spare drive. So I created the RAID1 array in degraded mode, i. e. with only a single drive and the other one missing. To do this, I created a single primary partition, extending across the whole drive, on the spare\/empty drive. I then created the array as follows:<br \/>\n<code><br \/>\n#mdadm --create \/dev\/md_d0 --level=1 --raid-devices=2 missing \/dev\/hdb1<br \/>\n<\/code><br \/>\nThis array now needed to be partitioned, so I invoked cfdisk on it:<br \/>\n<code><br \/>\n#cfdisk \/dev\/md_d0<br \/>\n<\/code><br \/>\nI then created filesystems on the partitions like follows:<br \/>\n<code><br \/>\n#mkfs -t xfs -L \"\/usr\" \/dev\/md_d0p6<br \/>\n<\/code><br \/>\nAfterwards I copied the existing filesystems to the just-created filesystems on the degraded array using <code>cp -ax \/usr \/tmp\/raid\/<\/code>.<\/p>\n<p>I then changed <code>\/etc\/fstab<\/code> to mount the filesystems from the (degraded) array instead of from <code>\/dev\/hda<\/code>. I also changed Grub&#8217;s <code>menu.lst<\/code> to refer to the root on the RAID1 volume (<code>\/dev\/md_d0p1<\/code>).<\/p>\n<p>Finally, I rebooted. All was well. \ud83d\ude42<\/p>\n<p>I then partitioned the first hard drive <code>\/dev\/hda<\/code> the same way as described above and added the partition to the array:<br \/>\n<code><br \/>\n#mdadm -A \/dev\/md_d0 \/dev\/hda1<br \/>\n<\/code><br \/>\nAfter some minutes during which the degraded array on <code>\/dev\/hdb1<\/code> was copied over to <code>\/dev\/hda1<\/code>, the array was consistent and clean.<\/p>\n<p>Now for the final boot&#8230; I was holding my breath&#8230; Failure! \ud83d\ude41<\/p>\n<p>For &#8220;some&#8221; reason Grub couldn&#8217;t load stage1. I took a Knoppix 5.x CD and tried to &#8220;repair&#8221; my setup. Suddenly I realized that there wasn&#8217;t anything to be repaired &#8212; this setup simply can&#8217;t work.<\/p>\n<p>And here is why:<\/p>\n<p>Other than LILO, Grub can directly read filesystems. It doesn&#8217;t rely upon a list of blocks that it needs to read consecutively (as LILO does,) but you can specify pathnames for modules on an existing filesystem that Grub will then read. <em>However,<\/em> in my setup there <em>is no<\/em> filesystem to be read.<\/p>\n<p>Why is this???<\/p>\n<p>Well, remember that I created a partitionable array, i. e. <code>\/dev\/hda1<\/code> doesn&#8217;t contain a filesystem that Grub could parse to load the kernel and initial ramdisk from. Grub would have to assemble the RAID1 array first, and then access the root filesystem in the first partition on this partitionable array. However, this functionality current doesn&#8217;t exist in Grub, and I&#8217;m not sure whether it will <em>ever<\/em> be included.<\/p>\n<p>When I realized that my setup wouldn&#8217;t work, I went back to the original setup of my system. The whole procedure cost me about 3 hours &#8212; which were well spent, because I learnt how this &#8220;partitionable array&#8221; stuff works.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To make a long story short &#8212; don&#8217;t do it, it won&#8217;t work. \ud83d\ude42 And now the long version of the whole story. The following applies to Debian 4.0 aka &#8220;Etch,&#8221; but it&#8217;s not specific to Debian, since the principles of the whole procedure is the same on all Linux distributions. For the first time [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[20],"class_list":["post-44","post","type-post","status-publish","format-standard","hentry","category-computers","tag-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Grub and root on partitionable RAID1 array - Ralf&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bergs.biz\/blog\/2007\/05\/10\/grub-and-root-on-partitionable-raid1-array\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Grub and root on partitionable RAID1 array - Ralf&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"To make a long story short &#8212; don&#8217;t do it, it won&#8217;t work. \ud83d\ude42 And now the long version of the whole story. The following applies to Debian 4.0 aka &#8220;Etch,&#8221; but it&#8217;s not specific to Debian, since the principles of the whole procedure is the same on all Linux distributions. For the first time [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bergs.biz\/blog\/2007\/05\/10\/grub-and-root-on-partitionable-raid1-array\/\" \/>\n<meta property=\"og:site_name\" content=\"Ralf&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2007-05-10T15:51:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2008-04-16T14:34:50+00:00\" \/>\n<meta name=\"author\" content=\"Ralf Bergs\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ralfbergs\" \/>\n<meta name=\"twitter:site\" content=\"@ralfbergs\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ralf Bergs\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2007\\\/05\\\/10\\\/grub-and-root-on-partitionable-raid1-array\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2007\\\/05\\\/10\\\/grub-and-root-on-partitionable-raid1-array\\\/\"},\"author\":{\"name\":\"Ralf Bergs\",\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/#\\\/schema\\\/person\\\/354e37390b493c875f972bd313d29201\"},\"headline\":\"Grub and root on partitionable RAID1 array\",\"datePublished\":\"2007-05-10T15:51:43+00:00\",\"dateModified\":\"2008-04-16T14:34:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2007\\\/05\\\/10\\\/grub-and-root-on-partitionable-raid1-array\\\/\"},\"wordCount\":521,\"commentCount\":6,\"publisher\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/#\\\/schema\\\/person\\\/354e37390b493c875f972bd313d29201\"},\"keywords\":[\"linux\"],\"articleSection\":[\"Computers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/bergs.biz\\\/blog\\\/2007\\\/05\\\/10\\\/grub-and-root-on-partitionable-raid1-array\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2007\\\/05\\\/10\\\/grub-and-root-on-partitionable-raid1-array\\\/\",\"url\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2007\\\/05\\\/10\\\/grub-and-root-on-partitionable-raid1-array\\\/\",\"name\":\"Grub and root on partitionable RAID1 array - Ralf&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/#website\"},\"datePublished\":\"2007-05-10T15:51:43+00:00\",\"dateModified\":\"2008-04-16T14:34:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2007\\\/05\\\/10\\\/grub-and-root-on-partitionable-raid1-array\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/bergs.biz\\\/blog\\\/2007\\\/05\\\/10\\\/grub-and-root-on-partitionable-raid1-array\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2007\\\/05\\\/10\\\/grub-and-root-on-partitionable-raid1-array\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Grub and root on partitionable RAID1 array\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/\",\"name\":\"Ralf's Blog\",\"description\":\"Just another WordPress weblog\",\"publisher\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/#\\\/schema\\\/person\\\/354e37390b493c875f972bd313d29201\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/#\\\/schema\\\/person\\\/354e37390b493c875f972bd313d29201\",\"name\":\"Ralf Bergs\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/Ralf-Tower-2026-1024x1024.jpg\",\"url\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/Ralf-Tower-2026-1024x1024.jpg\",\"contentUrl\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/Ralf-Tower-2026-1024x1024.jpg\",\"width\":1024,\"height\":1024,\"caption\":\"Ralf Bergs\"},\"logo\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/Ralf-Tower-2026-1024x1024.jpg\"},\"description\":\"Geek, computer guy, licensed and certified electrical and computer engineer, husband, best daddy.\",\"sameAs\":[\"https:\\\/\\\/bergs.biz\\\/\",\"https:\\\/\\\/linkedin.com\\\/in\\\/ralfbergs\\\/\",\"https:\\\/\\\/x.com\\\/ralfbergs\"],\"url\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/author\\\/rabe\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Grub and root on partitionable RAID1 array - Ralf&#039;s Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/bergs.biz\/blog\/2007\/05\/10\/grub-and-root-on-partitionable-raid1-array\/","og_locale":"en_US","og_type":"article","og_title":"Grub and root on partitionable RAID1 array - Ralf&#039;s Blog","og_description":"To make a long story short &#8212; don&#8217;t do it, it won&#8217;t work. \ud83d\ude42 And now the long version of the whole story. The following applies to Debian 4.0 aka &#8220;Etch,&#8221; but it&#8217;s not specific to Debian, since the principles of the whole procedure is the same on all Linux distributions. For the first time [&hellip;]","og_url":"https:\/\/bergs.biz\/blog\/2007\/05\/10\/grub-and-root-on-partitionable-raid1-array\/","og_site_name":"Ralf&#039;s Blog","article_published_time":"2007-05-10T15:51:43+00:00","article_modified_time":"2008-04-16T14:34:50+00:00","author":"Ralf Bergs","twitter_card":"summary_large_image","twitter_creator":"@ralfbergs","twitter_site":"@ralfbergs","twitter_misc":{"Written by":"Ralf Bergs","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bergs.biz\/blog\/2007\/05\/10\/grub-and-root-on-partitionable-raid1-array\/#article","isPartOf":{"@id":"https:\/\/bergs.biz\/blog\/2007\/05\/10\/grub-and-root-on-partitionable-raid1-array\/"},"author":{"name":"Ralf Bergs","@id":"https:\/\/bergs.biz\/blog\/#\/schema\/person\/354e37390b493c875f972bd313d29201"},"headline":"Grub and root on partitionable RAID1 array","datePublished":"2007-05-10T15:51:43+00:00","dateModified":"2008-04-16T14:34:50+00:00","mainEntityOfPage":{"@id":"https:\/\/bergs.biz\/blog\/2007\/05\/10\/grub-and-root-on-partitionable-raid1-array\/"},"wordCount":521,"commentCount":6,"publisher":{"@id":"https:\/\/bergs.biz\/blog\/#\/schema\/person\/354e37390b493c875f972bd313d29201"},"keywords":["linux"],"articleSection":["Computers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bergs.biz\/blog\/2007\/05\/10\/grub-and-root-on-partitionable-raid1-array\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bergs.biz\/blog\/2007\/05\/10\/grub-and-root-on-partitionable-raid1-array\/","url":"https:\/\/bergs.biz\/blog\/2007\/05\/10\/grub-and-root-on-partitionable-raid1-array\/","name":"Grub and root on partitionable RAID1 array - Ralf&#039;s Blog","isPartOf":{"@id":"https:\/\/bergs.biz\/blog\/#website"},"datePublished":"2007-05-10T15:51:43+00:00","dateModified":"2008-04-16T14:34:50+00:00","breadcrumb":{"@id":"https:\/\/bergs.biz\/blog\/2007\/05\/10\/grub-and-root-on-partitionable-raid1-array\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bergs.biz\/blog\/2007\/05\/10\/grub-and-root-on-partitionable-raid1-array\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/bergs.biz\/blog\/2007\/05\/10\/grub-and-root-on-partitionable-raid1-array\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bergs.biz\/blog\/"},{"@type":"ListItem","position":2,"name":"Grub and root on partitionable RAID1 array"}]},{"@type":"WebSite","@id":"https:\/\/bergs.biz\/blog\/#website","url":"https:\/\/bergs.biz\/blog\/","name":"Ralf's Blog","description":"Just another WordPress weblog","publisher":{"@id":"https:\/\/bergs.biz\/blog\/#\/schema\/person\/354e37390b493c875f972bd313d29201"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bergs.biz\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/bergs.biz\/blog\/#\/schema\/person\/354e37390b493c875f972bd313d29201","name":"Ralf Bergs","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bergs.biz\/blog\/wp-content\/uploads\/2026\/04\/Ralf-Tower-2026-1024x1024.jpg","url":"https:\/\/bergs.biz\/blog\/wp-content\/uploads\/2026\/04\/Ralf-Tower-2026-1024x1024.jpg","contentUrl":"https:\/\/bergs.biz\/blog\/wp-content\/uploads\/2026\/04\/Ralf-Tower-2026-1024x1024.jpg","width":1024,"height":1024,"caption":"Ralf Bergs"},"logo":{"@id":"https:\/\/bergs.biz\/blog\/wp-content\/uploads\/2026\/04\/Ralf-Tower-2026-1024x1024.jpg"},"description":"Geek, computer guy, licensed and certified electrical and computer engineer, husband, best daddy.","sameAs":["https:\/\/bergs.biz\/","https:\/\/linkedin.com\/in\/ralfbergs\/","https:\/\/x.com\/ralfbergs"],"url":"https:\/\/bergs.biz\/blog\/author\/rabe\/"}]}},"_links":{"self":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/comments?post=44"}],"version-history":[{"count":0,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/44\/revisions"}],"wp:attachment":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/media?parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/categories?post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/tags?post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}