<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ashwin Kailas on Medium]]></title>
        <description><![CDATA[Stories by Ashwin Kailas on Medium]]></description>
        <link>https://medium.com/@ashwinkailas?source=rss-15fa7c190b84------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Gm0KMMQ_s0T4uz-q.</url>
            <title>Stories by Ashwin Kailas on Medium</title>
            <link>https://medium.com/@ashwinkailas?source=rss-15fa7c190b84------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 04:53:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ashwinkailas/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Arch Linux (LVM) dual-boot with Windows tutorial]]></title>
            <link>https://medium.com/@ashwinkailas/arch-linux-lvm-dual-boot-with-windows-tutorial-e327ea8f3140?source=rss-15fa7c190b84------2</link>
            <guid isPermaLink="false">https://medium.com/p/e327ea8f3140</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[dual-boot]]></category>
            <category><![CDATA[lvm]]></category>
            <category><![CDATA[arch-linux]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Ashwin Kailas]]></dc:creator>
            <pubDate>Tue, 15 Nov 2016 19:09:37 GMT</pubDate>
            <atom:updated>2016-11-15T19:31:04.189Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been trying various Linux distributions on my laptop(HP Envy j0014tx) since I got it. So far I have tried Ubuntu, Fedora and Fedora spin (KDE). Ubuntu got boring once I started using it for a while and fedora got buggy after the 24 update. After some disastrous hardships me and my friend went through at the last hackathon we had attended, I decided to move from the KDE environment altogether. I found KDE really complicated and overloaded with customisable features, which is what most linux users look forward to, but not really what I wanted(sweat smile). I really like the cleanliness GNOME environment and I like the concept of installing a distro without a desktop environment as it gives user the freedom to install the one they want. I have decided not to install Fedora and Ubuntu anymore. The next option was Debian, which is considered to be the most stable Linux distro around and ideally you would want a stable OS for your laptop but, I thought I’ll learn a bit about Linux from this install (well.. why not, its study leave) and chose to install Arch Linux. I had installed a version of Arch Linux previously on my desktop computer but I knew the story would be different installing on my laptop with as the desktop was pretty old and used Legacy boot mode. Since I liked to get my hands dirty, I decided to proceed with it anyway.</p><p>When installing Arch, you do have the option to download a fully automated GUI mode install (like Arch Anywhere or Architect ) but if you are like me and loves learning stuff to the core, you can install the image from <a href="https://www.archlinux.org/download/">Arch Linux website</a> which doesn’t come with an installer. I had initially decided to write this article (my first article on the web) as I was doing the installation process but didn’t have any other device to work on (desktop needs repair). Now I am glad I didn’t do that ’cause it took me 2 installs and 2 days to get Arch working. For reference, I decided to follow the Arch wiki page to install the distro and ended up looking for all other sources as well, but most of the commands I use here would be a direct clone of the wiki page. I have decided to skip the making a bootable USB part (trust me, you wouldn’t wanna be installing Arch if you don’t know how to make a USB bootable). So here’s how I finally installed the distro:</p><h3>Before installation:</h3><p>You need to have some unallocated space for installing Arch Linux, I am dual-booting with Windows 8.1 here and had previously freed up enough space for installing Arch. Also, I would advice you to have a wired connection while installing the distro atleast ’cause a wired connection will be detected automatically without any configuration. A wireless connection could be set up but I decided to set it up after installation.</p><h3>Installation:</h3><p><strong>Test the connection by pinging a website:</strong></p><pre> ping www.google.com</pre><p><strong>Update the system clock:</strong></p><pre>timedatectl set-ntp true</pre><p><strong>Partitioning:</strong></p><p>This may vary with the boot mode you are in. On older PCs it may be MBR boot mode. My computer is using UEFI boot mode, you can do</p><pre>fdisk -l</pre><p>to list all partitions in your hard-drive and check the boot mode. There are various partitioning tools one can use for partitioning Arch, I used gdisk as it is directly compatible with UEFI bootmode. In UEFI bootmode, you will not be needing a /boot partition as the bootloader should be installed in the EFI partition. I will be using <strong>LVM parition</strong> to manage all the different partitions that Arch will be needing (You may follow normal partitioning instead of LVM as well ).</p><p>LVM is mainly used to concatenate space from different devices. Here’s the link on how to do it: <a href="https://wiki.archlinux.org/index.php/LVM">https://wiki.archlinux.org/index.php/LVM</a>.</p><p>Assuming that you have sufficient space to install Arch, type:</p><pre>gdisk /dev/sda</pre><p>/dev/sda can be replaced with the device you are installing to. Press ? to get options. Then:</p><ol><li>Create a partition (or delete on of your partition to get space for installing and then create).</li><li>Assign appropirate number (here I’m using 4).</li><li>Press return on First sector (unless you would like to do something clever), and when it asks for End sector press return to use entire free space or type + followed by size followed by G or M depending on the size</li><li>Change the partition type to LVM by referring to the list of Hexcodes available.</li><li>Write the changes to disk.</li></ol><p>Now we need to create Physical Volume on the LVM partition. Then add Volume Group on it to add various other Logical volumes for creating partitions for Arch (replace /dev/sda4 with the appropriate LVM partition in your drive for the following commands).</p><pre>pvcreate /dev/sda4<br>vgcreate archvol /dev/sda4 </pre><p><strong>NOTE</strong>: <strong>archvol</strong> can be replaced with any name. The partitions will be available under this name at /dev/mapper/archlin-lvname.</p><p>Now lets create logical volumes for root,swap and home. I am installing root and home in different partitions if you want, you may install it in single partition, in that case you need only two logical partitions.</p><pre>lvcreate -L 200G -n root archvol<br>lvcreate -L 5G -n swap archvol<br>lvcreate -l 100%FREE -n home archvol</pre><p>I have used up the entire free space left in the physical volume for home (note ‘l’ instead of ‘L’) . You may use lvremove to remove logical volumes.</p><p>Now we format home and root partition as ext4.</p><pre>mkfs.ext4 /dev/sda4/archlin/root<br>mkfs.ext4 /dev/sda4/archlin/home</pre><p>For swap partition:</p><pre>mkswap /dev/sda4/archlin/swap<br>swapon /dev/sda4/archlin/swap</pre><p><strong>Mount root partition to /mnt directory:</strong></p><pre>mount /dev/sda4/archlin/root /mnt</pre><p><strong>Make a separate directory for home and mount home partition to it:</strong></p><pre>mkdir -p /mnt/home<br>mount /dev/sda4/archlin/home /mnt/home</pre><p>Mount the EFI partition to /mnt/boot/efi (use gdisk -l or fdisk -l to determine your EFI partition and mount that parition for me, it was on /dev/sda1):</p><pre>mkdir -p /mnt/boot/efi<br>mount /dev/sda1 /mnt/boot/efi</pre><p>This will make sure that bootloader gets installed to EFI partition.</p><p><strong>Install system packages:</strong></p><pre>pacstrap /mnt base base-devel</pre><p>Sit and relax as this command will download packages from internet and install it. Wait till it gets completed.</p><p><strong>Generate fstab:</strong></p><pre>genfstab -U /mnt &gt;&gt; /mnt/etc/fstab</pre><p>This command generates fstab file which contains information about your partitions and mounting etc.</p><p><strong>Change to root:</strong></p><pre>arch-chroot /mnt</pre><p>Now we will begin making changes to our Arch Linux on our hard-drive.</p><p><strong>Set time-zone:</strong></p><pre>ln -s /usr/share/zoneinfo/<em>Region</em>/<em>City</em> /etc/localtime<br>hwclock --systohc</pre><p><strong>Set language:</strong></p><p>Uncomment en_US.UTF-8 UTF-8 in /etc/locale.gen. You can use nano or vi editor. Then create file /etc/locale.conf and type the following:</p><pre>LANG=<em>en_US.UTF-8</em></pre><p>Create file /etc/vconsole.conf and insert the following to it to set keyboard layout:</p><pre>KEYMAP=<em>de-latin1</em></pre><p><strong>Set Hostname:</strong></p><p>This will set your computer’s name on a network. Create file /etc/hostname and insert:</p><pre>yourhostnamehere</pre><p><strong>Initramfs:</strong></p><p>Since we are using LVM we need to regenereate initramfs to detect the LVM partition. Add lvm2 to the uncommented string HOOKS towards the end of /etc/mkinitcpio.conf file (The following line maybe different in your PC):</p><pre>HOOKS=&quot;base udev autodetect modconf block <strong>lvm2</strong> filesystems keyboard fsck&quot;</pre><p>Add it before filesystems. Make sure you are inserting it in the already uncommented line (without ‘#’). Now, regenerate initramfs image using:</p><pre>mkinitcpio -p linux</pre><p><strong>Creating root password:</strong></p><pre>passwd</pre><p>Then type in your password.</p><p><strong>Installing bootloader:</strong></p><p>Install grub and efibootmgr packages using pacman.</p><pre>pacman -S grub efibootmgr</pre><p><strong>Configuring Boot-loader:</strong></p><p>There are many boot-loaders available, you can choose anyone and install, I’m using grub here (Mount EFI partiton also).</p><pre>mount /dev/sda1 /mnt/boot/efi</pre><pre>grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=archlinux</pre><p>Here I’m not installing boot-loader into EFI partition instead to its parent directory. Some say writing it to EFI partition is a good practice ’cause even if your Linux partition gets corrupted you will still be able to load the other OS from grub menu. Most computers have a way to launch OSes from BIOS menu even if grub fails. So it doesn’t matter.</p><p>You may change the bootloader-id option to something else. This will be the title of the boot-loader when it is listed in BIOS. Then generate the configuration file:</p><pre>grub-mkconfig -o /boot/grub/grub.cfg</pre><p><strong>Adding the Windows boot option to grub:</strong></p><p>Open the file /boot/grub/grub.cfg and add the following to provide a windows boot option. You could install os-prober package via pacman and then generate grub configuration file to detect windows partition but it didn’t work for me so had to add it manually (thanking the website <a href="http://tech.memoryimprintstudio.com/">tech.memoryimprintstudio.com</a> for that).</p><pre>menuentry &quot;Windows&quot; {<br>  insmod part_gpt<br>  insmod fat<br>  insmod search_fs_uuid<br>  insmod chain<br>  search --fs-uuid --set=root $hints_string $fs_uuid<br>  chainloader /EFI/Microsoft/Boot/bootmgfw.efi<br>}</pre><p>Replace $hints_string by the output of</p><pre>grub-probe --target=fs_uuid /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi </pre><p>Replace $fs_uuid by the output of:</p><pre>grub-probe --target=hints_string /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi</pre><p>Installation process is now complete. You may exit from root and unmount the drive and reboot to boot into Arch Linux.</p><pre>exit<br>umount -R /mnt<br>reboot</pre><p>You will be greeted with Arch Linux login type username as root and the password you had created earlier to login.</p><h3>Installing a Desktop-Environment</h3><p>You may install a Desktop environment to suit your style here’s a <a href="https://wiki.archlinux.org/index.php/Desktop_environment#List_of_desktop_environments">link to Desktop Environments available</a>. I’ve installed GNOME and will include that too. Install GNOME packages:</p><pre>pacman -S gnome gnome-extra</pre><p>Then install a display manager I used GDM(GNOME Display Manager):</p><pre>pacman -S gdm</pre><p>Enable GDM from boot and start GDM:</p><pre>systemctl enable gdm<br>systemctl start gdm.service</pre><p>GNOME lockscreen shows up and you can login as root and later add a user. Also configure wireless networks by enabling NetworkManager using systemctl.</p><p><strong>And that’s all folks!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e327ea8f3140" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>