[{"data":1,"prerenderedAt":217},["ShallowReactive",2],{"$f1ywvvncx08lpn":3,"$f12wmn6wcbmwh9":10},{"id":4,"type":5,"meta":6},"archive\u002Fgentoo-on-arm","markdown",{"title":7,"date":8,"description":9},"Gentoo on ARM","3\u002F2\u002F2023","Installing gentoo on an ARM computer.",{"frontmatter":11,"meta":12,"nodes":41},{"title":7,"date":8,"description":9},{"toc":13},{"title":14,"searchDepth":15,"depth":15,"links":16},"",2,[17,20,23,26,29,32,35,38],{"id":18,"depth":15,"text":19},"the-context","The context",{"id":21,"depth":15,"text":22},"setting-up","Setting up",{"id":24,"depth":15,"text":25},"warning","Warning",{"id":27,"depth":15,"text":28},"the-iso","The ISO",{"id":30,"depth":15,"text":31},"the-stage-tarball","The stage tarball",{"id":33,"depth":15,"text":34},"the-system-logger","The system logger",{"id":36,"depth":15,"text":37},"the-bootloader","The bootloader",{"id":39,"depth":15,"text":40},"conclusion","Conclusion",[42,45,49,51,60,62,65,67,79,81,84,86,94,112,137,149,151,157,209,212,214],[43,44,19],"h2",{"id":18},[46,47,48],"p",{},"One day, I was using my M1 mac to look at the gentoo docs for fun. I wanted to try and install gentoo on an ARM VM using UTM, but when I looked at the handbook, it was empty. I then just abandoned the idea and installed it instead on an x86_64 VM. But I wanted to come back to it, because it was a cool project, and see if I could do it.",[43,50,22],{"id":21},[46,52,53,54,59],{},"First off, you should use the ",[55,56,58],"a",{"href":57},"https:\u002F\u002Fwiki.gentoo.org\u002Fwiki\u002FHandbook:AMD64\u002FFull\u002FInstallation","AMD64 handbook"," for most of the proccess. This post will mainly cover the differences and what tweaks you have to do rather than a full handbook.",[43,61,25],{"id":24},[46,63,64],{},"You probably shouldn't do this on real hardware, and good luck if you're trying to use real hardware or you want graphics.",[43,66,28],{"id":27},[46,68,69,70,74,75,78],{},"Just use the arm64 iso. Gentoo ",[71,72,73],"strong",{},"does"," support arm64, it's just the install guide is missing. This means that (at least some) packages ",[71,76,77],{},"will"," compile on arm64.",[43,80,31],{"id":30},[46,82,83],{},"Use the arm64 stage tarball, obviously. I made the mistake of using an amd64 stage tarball, and not suprisingly, it didn't work.",[43,85,34],{"id":33},[46,87,88,89,93],{},"The gentoo install guide recommends ",[55,90,92],{"href":91},"https:\u002F\u002Fpackages.gentoo.org\u002Fpackages\u002Fapp-admin\u002Fsysklogd","sysklogd",", but you might get an error when you try and compile it, because it isn't stable on ARM yet.",[46,95,96,97,101,102,106,107,111],{},"You can use the two other options listed, ",[55,98,100],{"href":99},"https:\u002F\u002Fpackages.gentoo.org\u002Fpackages\u002Fapp-admin\u002Fsyslog-ng","syslog-ng",", or ",[55,103,105],{"href":104},"https:\u002F\u002Fpackages.gentoo.org\u002Fpackages\u002Fapp-admin\u002Fmetalog","metalog",". For syslog-ng, you can just install it using ",[108,109,110],"code",{},"emerge"," and then enable the service with openrc, like so:",[113,114,117],"pre",{"language":115,"class":116},"sh","shj shiki shj-lang-sh",[108,118,120],{"class":119},"language-sh",[121,122,125,130,131,136],"span",{"class":123,"style":124},"line","display: inline",[121,126,129],{"class":127,"style":128},"shj-syn-func shj-func","color:#1e66f5;--shiki-dark:#89b4fa","rc-update"," ",[121,132,135],{"class":133,"style":134},"shj-syn-kwd shj-kwd","color:#8839ef;--shiki-dark:#cba6f7","add"," syslog-ng default",[46,138,139,140,143,144,148],{},"This is all assuming you ",[71,141,142],{},"want"," a system logger, because you don't actually need one. If you go the systemd route, you don't need to do any of this, because systemd ",[145,146,147],"del",{},"forces upon you"," uses it's own logger.",[43,150,37],{"id":36},[46,152,153,156],{},[71,154,155],{},"Note",": I will not cover MBR booting, because I don't feel like it. This is surprisingly simple, just specify to GRUB you're using arm64:",[113,158,159],{"language":115,"class":116},[108,160,161,179,180,179,185,179,198],{"class":119},[121,162,163,130,166,130,171,130,176],{"class":123,"style":124},[121,164,165],{"class":127,"style":128},"echo",[121,167,170],{"class":168,"style":169},"shj-syn-str shj-str","color:#40a02b;--shiki-dark:#a6e3a1","'GRUB_PLATFORMS=\"efi-64\"'",[121,172,175],{"class":173,"style":174},"shj-syn-oper shj-oper","color:#179299;--shiki-dark:#94e2d5",">>",[121,177,178],{"class":173,"style":174},"\u002Fetc\u002Fportage\u002Fmake.conf","\n",[121,181,182,184],{"class":123,"style":124},[121,183,110],{"class":127,"style":128}," --ask sys-boot\u002Fgrub",[121,186,187,190,191,194,195,197],{"class":123,"style":124},[121,188,189],{"class":127,"style":128},"grub-install"," --target",[121,192,193],{"class":173,"style":174},"=","arm64-efi --efi-directory",[121,196,193],{"class":173,"style":174},"\u002Fboot",[121,199,200,203,130,206],{"class":123,"style":124},[121,201,202],{"class":127,"style":128},"grub-mkconfig",[121,204,205],{"class":133,"style":134}," -o",[121,207,208],{"class":173,"style":174},"\u002Fboot\u002Fgrub\u002Fgrub.cfg",[46,210,211],{},"and you're done!",[43,213,40],{"id":39},[46,215,216],{},"The primary reason you might run into issues with this guide is the same reason there isn't an official one: ARM devices vary wildly, and you are bound to run into issues with a single one-size-fits-all guide. But, this guide does work on UTM when I tested it, so take that as you will. Gentoo is an awesome distro, and is very unique in it's customizability, and I would recommend to every computer nerd to give it a go.",1793746156625]