<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Debiprasad Das</title>
    <description>The latest articles on DEV Community by Debiprasad Das (@debiplobi).</description>
    <link>https://dev.to/debiplobi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F828969%2Fb8c0a101-ef76-4144-8f06-d38cbff8e11a.jpg</url>
      <title>DEV Community: Debiprasad Das</title>
      <link>https://dev.to/debiplobi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/debiplobi"/>
    <language>en</language>
    <item>
      <title>How to Dual Boot Arch Linux With Windows</title>
      <dc:creator>Debiprasad Das</dc:creator>
      <pubDate>Wed, 06 Dec 2023 18:07:07 +0000</pubDate>
      <link>https://dev.to/debiplobi/how-to-dual-boot-arch-linux-with-windows-4l4o</link>
      <guid>https://dev.to/debiplobi/how-to-dual-boot-arch-linux-with-windows-4l4o</guid>
      <description>&lt;h3&gt;
  
  
  First Step:
&lt;/h3&gt;

&lt;p&gt;Create an empty unallocated Empty partition in windows then boot into archiso via a USB drive after flashing it via &lt;a href="https://etcher.balena.io/" rel="noopener noreferrer"&gt;balenaEtcher&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;after entering in TTY change the font if you want a bigger font.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;setfont ter-132n
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Setup WIFI connection on TTY:
&lt;/h3&gt;

&lt;p&gt;check your internet connection using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ping archlinux.org
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if you don't have internet connection then connnect it using iwctl&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First get your WIFI interface name
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;iwctl
&lt;span class="c"&gt;# Get WIFI interface name:&lt;/span&gt;
device list
&lt;span class="c"&gt;# Scan WIFI networks:&lt;/span&gt;
station &amp;lt;interface_name&amp;gt; scan
station &amp;lt;interface_name&amp;gt; get-networks
&lt;span class="c"&gt;# Finally, to connect to a network:&lt;/span&gt;
station &amp;lt;interface_name&amp;gt; connect &amp;lt;SSID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to learn more about &lt;a href="https://wiki.archlinux.org/title/iwd" rel="noopener noreferrer"&gt;iwctl&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Partition Disk:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cfdisk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NOTE : If it's does not show correct partition&lt;br&gt;
then select your drive. you can get drive list by typing &lt;code&gt;lsblk&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# example
cfdisk /dev/nvme0n1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Then select gpt, after entering in GUI.&lt;/li&gt;
&lt;li&gt;Select "Free space" and select "New" then press Enter.&lt;/li&gt;
&lt;li&gt;and then Enter the storage space you want to give it to your root and press Enter.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;and you will see a partition is being created and make sure this partition type is "Linux filesystem".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Next select the remaining "Free space" and press Enter, we will give this space to swap partition.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do same as before and then select the swap partition and select "Type" press enter to see all the types available.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select "Linux swap" from them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We don't need to create boot partition as we already has boot efi partition running windows,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;we just need to mount linux boot partition along side of windows, will do it later.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then select "Write" and confirm it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You will see "parition table has been altered" blue color text.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then select "Quit"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;type &lt;code&gt;lsblk&lt;/code&gt; to see your partitions name.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Format Created Partitions:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Format root partition:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkfs.ext4 /dev/&amp;lt;root_partition&amp;gt;

# for example my root partition name is dev/sda1
# I will do "mkfs.ext4 /dev/sda1"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Format swap partition:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkswap /dev/&amp;lt;swap_partition&amp;gt;

# for example my swap partition name is dev/sda2
# I will do "mkfs.swap /dev/sda2"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Mount Partitions:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Mount root partition:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mount /dev/&amp;lt;root_partition&amp;gt; /mnt

# for example my root partition name is dev/sda1
# I will do mount "mount /dev/sda1 /mnt"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Mount swap partition:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;swapon /dev/&amp;lt;swap_partition&amp;gt;

# for example my swap partition name is dev/sda2
# I will do mount "swapon /dev/sda2"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now type &lt;code&gt;lsblk&lt;/code&gt; and see that both partition has given proper MOUNTPOINTS&lt;/p&gt;

&lt;h3&gt;
  
  
  Setup Fastest Mirrors:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Verify that mirrorlist.bak file is created by
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls /etc/pacman.d/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Setup fastest mirrors from your contry
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;reflector --verbose --country '&amp;lt;YourCountry&amp;gt;' -l 5 --sort rate --save /etc/pacman.d/mirrorlist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install essential packages:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pacstrap /mnt base linux linux-firmware sof-firmware base-devel grub efibootmgr neovim vim networkmanager dhcpcd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Fstab:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Generate Fstab file and copy it to "etc" folder of arch linux system
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;genfstab -U /mnt &amp;gt;&amp;gt; /mnt/etc/fstab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;check if it's correctly copied by typing
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat /mnt/etc/fstab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Chroot:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Let's Chroot into linux system
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;arch-chroot /mnt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Check your parititions again by typing &lt;code&gt;lsblk&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Root password:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Enter your root password by typing
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;passwd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Standard User:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Create Standard User
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useradd -m &amp;lt;username&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Create user password
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;passwd &amp;lt;username&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Setup user privilages
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;usermod -aG wheel,storage,power &amp;lt;username&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Edit Sudoers file
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;EDITOR=nvim visudo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then remove "#" in this line(Uncomment this line in programming words)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# %wheel ALL=(ALL) ALL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Localization:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvim /etc/locale.gen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then remove "#" in this line(Uncomment this line in programming words)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# en_US.UTF-8 UTF-8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Generate locale
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;locale-gen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Create locale config file
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo LANG=en_US.UTF-8 &amp;gt; /etc/locale.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Export system language
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export LANG=en_US.UTF-8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Hostname:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Create hostname
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo &amp;lt;hostname&amp;gt; &amp;gt; /etc/hostname
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Update Hosts file
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvim /etc/hosts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;put this in the file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;127.0.0.1    localhost
::1          localhost
127.0.0.1    &amp;lt;hostname&amp;gt;.localdomain    localhost
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Time:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Setup time
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ln -sf /usr/share/zoneinfo/&amp;lt;Region&amp;gt;/&amp;lt;City&amp;gt; /etc/localtime
# You can use &amp;lt;tab&amp;gt; key to provide you region and city suggestions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then type this to sync current time&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;hwclock --systohc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Grub/Bootloader:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;First Deletermine your EFI partition using &lt;code&gt;lsblk&lt;/code&gt;, mostly it will be first one in your primary drive
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir /boot/efi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Mount EFI partition to your grub boot partition
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mount /dev/&amp;lt;efi_partition&amp;gt; /boot/efi/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Install &lt;code&gt;os-prober&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pacman -S os-prober
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Do this so grub can detect windows
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvim /etc/default/grub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then remove "#" in this line(Uncomment this line in programming words)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#GRUB_DISABLE_OS_PROBER=false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Finally install grub
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;grub-install --target=x86_64-efi --bootloader-id=grub-uefi --recheck
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Generate grub config
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;grub-mkconfig -o /boot/grub/grub.cfg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;NOTE: It should detect Windows Boot Manager&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If it's does not shows "Found Windows Boot Manager" &lt;a href="https://github.com/DebXD/dotfiles/blob/master/README.md" rel="noopener noreferrer"&gt;follow this&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Network Services:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Obtain IP addresss of wifi network
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemctl enable dhcpcd.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;This is strictly necessary for autostart wifi on boot and connect to wifi
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemctl enable NetworkManager.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Wrapping up:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Exit from Chroot.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;exit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Then  do this to unmount all of the partitions.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;umount -lR /mnt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NOW REBOOT AND REMOVE THE USB DRIVE WHEN SCREEN TURNS BLACK.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>archlinux</category>
      <category>beginners</category>
      <category>windows</category>
    </item>
  </channel>
</rss>
