You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
478 lines
17 KiB
478 lines
17 KiB
<!DOCTYPE html> |
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> |
|
<head> |
|
<title> |
|
Yet Another Arch Guide // Hagfi.sh |
|
</title> |
|
|
|
<link href="http://gmpg.org/xfn/11" rel="profile"> |
|
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> |
|
|
|
<meta name="description" content=""> |
|
<meta name="keywords" content=""> |
|
<meta name="author" content="Kristof Vandam - Adam Verbeeck"> |
|
<meta name="generator" content="Hugo 0.92.0" /> |
|
|
|
<meta property="og:title" content="Yet Another Arch Guide" /> |
|
<meta property="og:description" content="" /> |
|
<meta property="og:type" content="website" /> |
|
<meta property="og:locale" content="en_US" /> |
|
<meta property="og:url" content="https://blog.hagfi.sh/administration/yet-another-arch-guide/" /> |
|
|
|
|
|
|
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/base-min.css"> |
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/pure-min.css"> |
|
|
|
|
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.5.0/grids-responsive-min.css"> |
|
|
|
|
|
|
|
<link rel="stylesheet" href="https://blog.hagfi.sh//css/redlounge.css"> |
|
<link rel="stylesheet" href="https://blog.hagfi.sh//css/prism.css"> |
|
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"> |
|
<link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'> |
|
<link href='//fonts.googleapis.com/css?family=Libre+Baskerville:400,700,400italic' rel='stylesheet' type='text/css'> |
|
|
|
|
|
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/touch-icon-144-precomposed.png"> |
|
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.png"> |
|
|
|
|
|
<link href="" rel="alternate" type="application/rss+xml" title="Hagfi.sh" /> |
|
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script> |
|
<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script> |
|
<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script> |
|
<script src="//cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script> |
|
<script src="//cdn.jsdelivr.net/npm/vuewordcloud@18.7.11/VueWordCloud.js"></script> |
|
<script src="https://blog.hagfi.sh//js/prism.js"></script> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="application/javascript"> |
|
var doNotTrack = false; |
|
if (!doNotTrack) { |
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
|
ga('create', 'UA-124890410-1', 'auto'); |
|
|
|
ga('send', 'pageview'); |
|
} |
|
</script> |
|
|
|
|
|
</head> |
|
|
|
<body> |
|
|
|
|
|
<div id="layout" class="pure-g"> |
|
<div class="sidebar pure-u-1 pure-u-md-1-4" id="app"> |
|
<div class="header"> |
|
|
|
|
|
|
|
|
|
<h1 class="brand-title"><a href="/">Hagfi.sh</a></h1> |
|
<h2 class="brand-tagline">A devops guide to the galaxy</h2> |
|
|
|
<div class="counters"> |
|
<a class="counter" href="/">13 |
|
<div class="counter-sub">Documents</div> |
|
</a> |
|
<a class="counter" href="/tags">29 |
|
<div class="counter-sub">Tags</div> |
|
</a> |
|
<a class="counter" href="/categories">3 |
|
<div class="counter-sub">Categories</div> |
|
</a> |
|
</div> |
|
|
|
<nav class="nav"> |
|
|
|
</nav> |
|
|
|
<div class="search-wrapper"> |
|
<input |
|
type="text" |
|
placeholder="Search ..." |
|
v-model="search" |
|
@keydown.down.prevent="navigate(1)" |
|
@keydown.up.prevent="navigate(-1)" |
|
@keyup.enter.prevent="navigate(result[selected].href)" |
|
ref="searchInput" |
|
class="search" |
|
/> |
|
|
|
<svg height="100" width="100" ref="resultPoint" class="result-point"> |
|
<circle cx="5" cy="5" r="5" fill="#FFF" /> |
|
</svg> |
|
|
|
<ul class="result-items"> |
|
<li v-for="r, i of result" class="result-item" ref="resultItem"> |
|
<div class="result-item-wrapper" :class="{ 'result-item-selected': selected === i }"> |
|
<div class="result-item-left"> |
|
<span class="post-date"> |
|
<span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator" v-text="'/'"></span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span> |
|
</span> |
|
<template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template> |
|
</div> |
|
<div class="result-item-left"> |
|
<span class="result-item-separator nav-item-separator" v-text="'//'"></span><a :href="r.href" v-text="r.title" class="result-item-link"></a> |
|
</div> |
|
</div> |
|
</li> |
|
</ul> |
|
</div> |
|
|
|
|
|
|
|
</div> |
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="content pure-u-1 pure-u-md-3-4"> |
|
<a name="top"></a> |
|
|
|
|
|
|
|
|
|
<div id="toc" class="pure-u-1 pure-u-md-1-4"> |
|
<small class="toc-label">Contents</small> |
|
<nav id="TableOfContents"> |
|
<ul> |
|
<li><a href="#target">Target</a></li> |
|
<li><a href="#pre-requirements">Pre-requirements</a></li> |
|
<li><a href="#first-things-first">First things first</a> |
|
<ul> |
|
<li><a href="#keyboard-layout">Keyboard layout</a></li> |
|
<li><a href="#check-your-internet-connection">Check your internet connection</a></li> |
|
<li><a href="#set-timezone">Set timezone</a></li> |
|
</ul> |
|
</li> |
|
<li><a href="#prepairing-your-disks">Prepairing your disks</a> |
|
<ul> |
|
<li><a href="#check-which-disks-you-have-available">Check which disks you have available</a></li> |
|
<li><a href="#partitioning">Partitioning</a></li> |
|
<li><a href="#lvm">LVM</a></li> |
|
<li><a href="#filesystems">Filesystems</a></li> |
|
<li><a href="#mount-your-disks-and-strap-your-seatbelt-we-gonna-pacstrap">Mount your disks and strap your seatbelt, we gonna pacstrap</a></li> |
|
<li><a href="#make-sure-it-boots">Make sure it boots!</a></li> |
|
<li><a href="#making-it-yours">making it yours</a></li> |
|
<li><a href="#grub">Grub</a></li> |
|
<li><a href="#fstab">fstab</a></li> |
|
<li><a href="#lvm-cant-bot">LVM can’t bot</a></li> |
|
<li><a href="#cross-fingers---reboot">Cross fingers - reboot</a></li> |
|
<li><a href="#enable-services">Enable services</a></li> |
|
</ul> |
|
</li> |
|
</ul> |
|
</nav> |
|
</div> |
|
|
|
|
|
<section class="post"> |
|
<h1 class="post-title"> |
|
<a href="/administration/yet-another-arch-guide/">Yet Another Arch Guide</a> |
|
</h1> |
|
<h3 class="post-subtitle"> |
|
|
|
</h3> |
|
|
|
<span class="post-date"> |
|
<span class="post-date-day"><sup>30</sup></span><span class="post-date-separator">/</span><span class="post-date-month">Nov</span> <span class="post-date-year">2018</span> |
|
</span> |
|
|
|
|
|
|
|
<span class="post-author-single">By <a class="post-author" target="">Kristof Vandam - Adam Verbeeck</a></span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="post-categories"> |
|
|
|
<a class="post-category post-category-administration" href="https://blog.hagfi.sh//categories/administration">administration</a> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
<p>Setting up Arch with other bells and whistles.</p> |
|
<h2 id="target">Target</h2> |
|
<p>Lenovo X240 |
|
i5-4300U |
|
8GB DDR3 RAM |
|
500GB SSD</p> |
|
<h2 id="pre-requirements">Pre-requirements</h2> |
|
<ul> |
|
<li>Bootable USB with Arch installer installed</li> |
|
<li>Cabled connection</li> |
|
<li>Device connected to a power supply</li> |
|
</ul> |
|
<h2 id="first-things-first">First things first</h2> |
|
<h3 id="keyboard-layout">Keyboard layout</h3> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">loadkeys [keyboard-identifier] |
|
</code></pre><h3 id="check-your-internet-connection">Check your internet connection</h3> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">ping archlinux.org |
|
</code></pre><h3 id="set-timezone">Set timezone</h3> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">timedatectl set-timezone Europe/Brussels |
|
</code></pre><h2 id="prepairing-your-disks">Prepairing your disks</h2> |
|
<h3 id="check-which-disks-you-have-available">Check which disks you have available</h3> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">fdisk -l |
|
</code></pre><h3 id="partitioning">Partitioning</h3> |
|
<p>Device your disk into individual partitions:</p> |
|
<ol> |
|
<li>boot</li> |
|
<li>arch</li> |
|
<li>windows</li> |
|
</ol> |
|
<h4 id="some-letters-we-gonna-use">Some letters we gonna use</h4> |
|
<ul> |
|
<li><strong>p</strong> show your partition</li> |
|
<li><strong>n</strong> new partition</li> |
|
<li><strong>a</strong> set the bootflag</li> |
|
<li><strong>t</strong> set the type</li> |
|
<li><strong>L</strong> show available types</li> |
|
<li><strong>w</strong> write the changes</li> |
|
</ul> |
|
<h4 id="the-actual-work">The actual work</h4> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">fdisk [your-disk] |
|
</code></pre><p>press <strong>n</strong> to create a new partition, the first prompt asks the type of partition, use <strong>p</strong> for Primary |
|
Partition number, enter. |
|
first sector, enter. |
|
goto ‘Specify your sizes’.</p> |
|
<h4 id="specify-your-sizes">Specify your sizes</h4> |
|
<p>+[SIZE][TGMK]</p> |
|
<h4 id="set-the-bootflag">Set the bootflag</h4> |
|
<p>A partition needs a bootflag for the MBR know which partition use at startup</p> |
|
<h4 id="set-the-types">Set the types</h4> |
|
<p>Use <strong>t</strong> to set the type:</p> |
|
<p><strong>83</strong> for boot <em>(linux)</em> |
|
<strong>8e</strong> for arch <em>(lvm)</em> |
|
<strong>7</strong> for windows <em>(HPFS/NTFS/exFAT)</em></p> |
|
<h3 id="lvm">LVM</h3> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">pvcreate /dev/sda2 |
|
vgcreate vg0 /dev/sda2 |
|
lvcreate -L +2G -n swap vg0 |
|
lvcreate -l 100%FREE -n swap vg0 |
|
</code></pre><h3 id="filesystems">Filesystems</h3> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">mkswap /dev/mapper/vg0-swap |
|
mkfs.ext4 /dev/sda1 |
|
mkfs.xfs /dev/mapper/vg0-root |
|
</code></pre><h3 id="mount-your-disks-and-strap-your-seatbelt-we-gonna-pacstrap">Mount your disks and strap your seatbelt, we gonna pacstrap</h3> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">mount /dev/mapper/vg0-root /mnt |
|
mkdir /mnt/boot |
|
mount /dev/sda1 /mnt/boot |
|
</code></pre><pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">pacstrap /mnt base base-devel vim bash-completion networkmanager |
|
</code></pre><h3 id="make-sure-it-boots">Make sure it boots!</h3> |
|
<p>genfstab -U /mnt » /mnt/etc/fstab</p> |
|
<h3 id="making-it-yours">making it yours</h3> |
|
<p>arch-chroot /mnt</p> |
|
<h4 id="time-date-region">Time, Date, Region</h4> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">ln -sf /usr/share/zoneinfo/Europe/Brussels /etc/localtime |
|
hwclock --systohc |
|
locale-gen |
|
</code></pre><p>/etc/locale.conf</p> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">LANG=en_US.UTF-8 UTF-8 |
|
</code></pre><p>/etc/vconsole.conf</p> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">KEYMAP=be-latin1 |
|
</code></pre><p>/etc/hostname</p> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">myhostname |
|
</code></pre><p>/etc/hosts</p> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">127.0.0.1 localhost |
|
::1 localhost |
|
127.0.0.1 myhostname.localdomain myhostname |
|
</code></pre><pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">passwd |
|
</code></pre><h3 id="grub">Grub</h3> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">pacman -S grub |
|
grub-install /dev/sda |
|
grub-mkconfig > /boot/grub/grub.cfg |
|
</code></pre><p><em>Ignore warnings</em></p> |
|
<h3 id="fstab">fstab</h3> |
|
<p>Add swap to fstab</p> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">/dev/mapper/vg0-swap swap swap default 0 0 |
|
</code></pre><p>Check your work by swapping the swap</p> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">swapoff -a |
|
mount -a |
|
swapon -a |
|
free |
|
</code></pre><p>does your swap have bytes?</p> |
|
<h3 id="lvm-cant-bot">LVM can’t bot</h3> |
|
<p>Add the LVM module to the mkinitcpio config file at /etc/mkinitcpio.conf</p> |
|
<p>add <em>lvm2</em> to the HOOKS Array before filestystems</p> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">... |
|
HOOKS=(base udev autodetect modconf block lvm2 filestystems keyboard fsck) |
|
... |
|
</code></pre><pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">mkinitcpio -p linux |
|
</code></pre><h3 id="cross-fingers---reboot">Cross fingers - reboot</h3> |
|
<h3 id="enable-services">Enable services</h3> |
|
<pre tabindex="0"><code class="language-.language-command" data-lang=".language-command">systemctl enable NetworkManager |
|
systemctl start NetworkManager |
|
</code></pre> |
|
|
|
|
|
|
|
|
|
<div class="tags-list"> |
|
<span class="dark-red">Tags</span><span class="decorative-marker">//</span> |
|
|
|
<a class="post-tag post-tag-arch" href="https://blog.hagfi.sh//tags/arch">arch</a>, |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="paging"> |
|
<span class="paging-label">More Reading</span> |
|
|
|
<div class="paging-newer"> |
|
<span class="dark-red">Newer</span><span class="decorative-marker">//</span> |
|
<a class="paging-link" href="/administration/bash/">Bash Tips & Tricks</a> |
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</section> |
|
|
|
<div id="disqus_thread"></div> |
|
<script type="application/javascript"> |
|
var disqus_config = function () { |
|
|
|
|
|
|
|
}; |
|
(function() { |
|
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) { |
|
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.'; |
|
return; |
|
} |
|
var d = document, s = d.createElement('script'); s.async = true; |
|
s.src = '//' + "hagfish" + '.disqus.com/embed.js'; |
|
s.setAttribute('data-timestamp', +new Date()); |
|
(d.head || d.body).appendChild(s); |
|
})(); |
|
</script> |
|
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> |
|
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a> |
|
|
|
|
|
<div class="footer"> |
|
<hr class="thin" /> |
|
<div class="pure-menu pure-menu-horizontal pure-menu-open"> |
|
<ul class="footer-menu"> |
|
|
|
</ul> |
|
</div> |
|
|
|
<p>© 2022. All rights reserved.</p> |
|
</div> |
|
</div> |
|
</div> |
|
|
|
|
|
|
|
|
|
<script> |
|
var app = new Vue({ |
|
el: '#app', |
|
data: { |
|
fuse: null, |
|
search: "", |
|
result: [], |
|
index: [], |
|
selected: 0 |
|
}, |
|
mounted() { |
|
let self = this |
|
|
|
|
|
window.addEventListener("keypress", function(e) { |
|
self.$refs.searchInput.focus() |
|
}) |
|
|
|
let options = { |
|
shouldSort: true, |
|
threshold: 0.6, |
|
location: 0, |
|
distance: 100, |
|
maxPatternLength: 32, |
|
minMatchCharLength: 1, |
|
keys: [ |
|
"title", |
|
"author", |
|
"date", |
|
"content" |
|
] |
|
} |
|
axios.get('/index.json') |
|
.then(function (response) { |
|
self.index = response.data |
|
self.fuse = new Fuse(response.data, options) |
|
}) |
|
.catch(function (error) { |
|
}) |
|
}, |
|
watch: { |
|
result(nval, oval) { |
|
nval.length > 0 ? this.pointer(0) : this.pointer(-1) |
|
}, |
|
search(nval, oval) { |
|
this.result = this.fuse.search(nval) |
|
} |
|
}, |
|
methods: { |
|
navigate(val) { |
|
switch (val) { |
|
case 1: if (this.selected < this.result.length - 1) { this.selected++ }; break; |
|
case -1: if (this.selected > 0 ) { this.selected-- }; break; |
|
default: window.location.href = val; break; |
|
} |
|
this.pointer(this.selected) |
|
}, |
|
pointer(selected) { |
|
let self = this |
|
|
|
if (selected >= 0) { |
|
Vue.nextTick().then(function() { |
|
let height = self.$refs.resultItem[selected].clientHeight |
|
let top = self.$refs.resultItem[selected].getBoundingClientRect().top |
|
let left = self.$refs.resultItem[selected].getBoundingClientRect().left |
|
|
|
self.$refs.resultPoint.style.top = (top+height/2)+'px' |
|
self.$refs.resultPoint.style.left = (left-20)+'px' |
|
}) |
|
} else { |
|
this.$refs.resultPoint.style.left = '-50px' |
|
return |
|
} |
|
} |
|
} |
|
}) |
|
</script> |
|
</body> |
|
</html>
|
|
|