{"id":12,"date":"2011-12-09T19:28:29","date_gmt":"2011-12-09T19:28:29","guid":{"rendered":"http:\/\/droidtutorials.net\/?p=12"},"modified":"2011-12-09T19:28:29","modified_gmt":"2011-12-09T19:28:29","slug":"grub-2-adding-a-boot-option","status":"publish","type":"post","link":"http:\/\/www.zacherickson.com\/blog\/grub-2-adding-a-boot-option\/","title":{"rendered":"Grub 2 &#8211; Adding a Boot Option"},"content":{"rendered":"<p>I always forget how to add an option so here is the quick and dirty.<\/p>\n<p>Add to grub 2 by adding a file to the \/etc\/grub.d\/ folder. There are several in there already (those are the current options) Grub organizes them by name so <strong>00_header<\/strong> comes before <strong>10_linux<\/strong>. Add a new file ie: (<strong>12_newfile<\/strong>) and edit it in your favorite editor.<\/p>\n<p>I am going to use this file for an install drive from the mini.iso<br \/>\nso you may have to determine what the correct settings are here is my file:<\/p>\n<p><em>#!\/bin\/sh -e<\/em><br \/>\n<em> echo &#8220;#HD Ubuntu Install&#8221;<\/em><br \/>\n<em> cat &lt;&lt; EOF<\/em><br \/>\n<em> menuentry &#8220;HD Install&#8221; {<\/em><br \/>\n<em> set root=(hd0,1)<\/em><br \/>\n<em> linux \/linux<\/em><br \/>\n<em> initrd \/initrd.gz vga=normal ramdisk_size=14972 root=\/dev\/rd\/0 rw &#8212;<\/em><br \/>\n<em> }<\/em><br \/>\n<em> EOF<\/em><\/p>\n<p>The important part is the root=(hd0,1) and the linux\/initrd<\/p>\n<p>root is the drive you want to use, for instance if you want to use \/dev\/sda1 it is (hd0,1) sda2 would be (hd0,2) sdb1 would be (hd1,1) etc.<\/p>\n<p>linux is the linux image names are often: linux vmlinuz<\/p>\n<p>initrd is often initrd.gz \u00a0these things can change so best to do a search to get the right options.<\/p>\n<p>Once your write this file you have to make it executable and have grub reconfigure the grub.cfg file, from the command line type:<\/p>\n<p><em>sudo chmod +x 12_filename<\/em><\/p>\n<p><em>sudo update-grub<\/em><\/p>\n<p>Reboot and your new option will be there.<\/p>\n<p>Links:<\/p>\n<p><a href=\"http:\/\/ubuntuforums.org\/showthread.php?t=28948\">http:\/\/ubuntuforums.org\/showthread.php?t=28948<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I always forget how to add an option so here is the quick and dirty. Add to grub 2 by adding a file to the \/etc\/grub.d\/ folder. There are several in there already (those are the current options) Grub organizes &hellip; <a href=\"http:\/\/www.zacherickson.com\/blog\/grub-2-adding-a-boot-option\/\">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":[5],"tags":[9,17,29],"class_list":["post-12","post","type-post","status-publish","format-standard","hentry","category-ubuntu-2","tag-boot-options","tag-grub-2","tag-ubuntu"],"_links":{"self":[{"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":0,"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/posts\/12\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/media?parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/categories?post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/tags?post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}