<?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: Sammy Barasa</title>
    <description>The latest articles on DEV Community by Sammy Barasa (@sammybarasa).</description>
    <link>https://dev.to/sammybarasa</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%2F431784%2F8e879bc6-68c4-46a3-88bc-ab2bc25d0e64.png</url>
      <title>DEV Community: Sammy Barasa</title>
      <link>https://dev.to/sammybarasa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sammybarasa"/>
    <language>en</language>
    <item>
      <title>FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory on Digital OceanDroplet</title>
      <dc:creator>Sammy Barasa</dc:creator>
      <pubDate>Sat, 02 Nov 2024 17:36:44 +0000</pubDate>
      <link>https://dev.to/sammybarasa/fatal-error-ineffective-mark-compacts-near-heap-limit-allocation-failed-javascript-heap-out-of-memory-on-digital-oceandroplet-4m89</link>
      <guid>https://dev.to/sammybarasa/fatal-error-ineffective-mark-compacts-near-heap-limit-allocation-failed-javascript-heap-out-of-memory-on-digital-oceandroplet-4m89</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;A memory Heap error occurred on Digital ocean droplet while trying to build a react app during deployment. I do development primarily in Django and front end using ReactJs. During deployment, I have to do the final build for React to produce a compiled static file that can be served by Django. The memory error occurred during the build when running &lt;code&gt;yarn build&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&amp;lt;&lt;span class="nt"&gt;---&lt;/span&gt; Last few GCs &lt;span class="nt"&gt;---&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="o"&gt;[&lt;/span&gt;139947:0x6613440]    32615 ms: Mark-Compact 244.4 &lt;span class="o"&gt;(&lt;/span&gt;258.4&lt;span class="o"&gt;)&lt;/span&gt; -&amp;gt; 243.5 &lt;span class="o"&gt;(&lt;/span&gt;258.6&lt;span class="o"&gt;)&lt;/span&gt; MB, 858.51 / 0.00 ms  &lt;span class="o"&gt;(&lt;/span&gt;average mu &lt;span class="o"&gt;=&lt;/span&gt; 0.116, current mu &lt;span class="o"&gt;=&lt;/span&gt; 0.034&lt;span class="o"&gt;)&lt;/span&gt; allocation failure&lt;span class="p"&gt;;&lt;/span&gt; scavenge might not succeed
&lt;span class="o"&gt;[&lt;/span&gt;139947:0x6613440]    33392 ms: Mark-Compact 244.6 &lt;span class="o"&gt;(&lt;/span&gt;258.6&lt;span class="o"&gt;)&lt;/span&gt; -&amp;gt; 243.7 &lt;span class="o"&gt;(&lt;/span&gt;258.9&lt;span class="o"&gt;)&lt;/span&gt; MB, 711.03 / 0.00 ms  &lt;span class="o"&gt;(&lt;/span&gt;average mu &lt;span class="o"&gt;=&lt;/span&gt; 0.101, current mu &lt;span class="o"&gt;=&lt;/span&gt; 0.085&lt;span class="o"&gt;)&lt;/span&gt; allocation failure&lt;span class="p"&gt;;&lt;/span&gt; scavenge might not succeed


&amp;lt;&lt;span class="nt"&gt;---&lt;/span&gt; JS stacktrace &lt;span class="nt"&gt;---&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
&lt;span class="nt"&gt;-----&lt;/span&gt; Native stack trace &lt;span class="nt"&gt;-----&lt;/span&gt;

 1: 0xb86ecf node::OOMErrorHandler&lt;span class="o"&gt;(&lt;/span&gt;char const&lt;span class="k"&gt;*&lt;/span&gt;, v8::OOMDetails const&amp;amp;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;/home/aislackbot/.nvm/versions/node/v20.17.0/bin/node]
 2: 0xef74d0 v8::Utils::ReportOOMFailure&lt;span class="o"&gt;(&lt;/span&gt;v8::internal::Isolate&lt;span class="k"&gt;*&lt;/span&gt;, char const&lt;span class="k"&gt;*&lt;/span&gt;, v8::OOMDetails const&amp;amp;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;/home/aislackbot/.nvm/versions/node/v20.17.0/bin/node]
 3: 0xef77b7 v8::internal::V8::FatalProcessOutOfMemory&lt;span class="o"&gt;(&lt;/span&gt;v8::internal::Isolate&lt;span class="k"&gt;*&lt;/span&gt;, char const&lt;span class="k"&gt;*&lt;/span&gt;, v8::OOMDetails const&amp;amp;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;/home/aislackbot/.nvm/versions/node/v20.17.0/bin/node]
 4: 0x1109355  &lt;span class="o"&gt;[&lt;/span&gt;/home/aislackbot/.nvm/versions/node/v20.17.0/bin/node]
 5: 0x11098e4 v8::internal::Heap::RecomputeLimits&lt;span class="o"&gt;(&lt;/span&gt;v8::internal::GarbageCollector&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;/home/aislackbot/.nvm/versions/node/v20.17.0/bin/node]
 6: 0x11207d4 v8::internal::Heap::PerformGarbageCollection&lt;span class="o"&gt;(&lt;/span&gt;v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;/home/aislackbot/.nvm/versions/node/v20.17.0/bin/node]
 7: 0x1120fec v8::internal::Heap::CollectGarbage&lt;span class="o"&gt;(&lt;/span&gt;v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;/home/aislackbot/.nvm/versions/node/v20.17.0/bin/node]
 8: 0x10f72f1 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath&lt;span class="o"&gt;(&lt;/span&gt;int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;/home/aislackbot/.nvm/versions/node/v20.17.0/bin/node]
 9: 0x10f8485 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath&lt;span class="o"&gt;(&lt;/span&gt;int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;/home/aislackbot/.nvm/versions/node/v20.17.0/bin/node]
10: 0x10d5ad6 v8::internal::Factory::NewFillerObject&lt;span class="o"&gt;(&lt;/span&gt;int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;/home/aislackbot/.nvm/versions/node/v20.17.0/bin/node]
11: 0x1531906 v8::internal::Runtime_AllocateInYoungGeneration&lt;span class="o"&gt;(&lt;/span&gt;int, unsigned long&lt;span class="k"&gt;*&lt;/span&gt;, v8::internal::Isolate&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;/home/aislackbot/.nvm/versions/node/v20.17.0/bin/node]
12: 0x196aef6  &lt;span class="o"&gt;[&lt;/span&gt;/home/aislackbot/.nvm/versions/node/v20.17.0/bin/node]
error Command failed with &lt;span class="nb"&gt;exit &lt;/span&gt;code 1.
info Visit https://yarnpkg.com/en/docs/cli/run &lt;span class="k"&gt;for &lt;/span&gt;documentation about this command.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Build error&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
Creating an optimized production build...
The build failed because the process exited too early. This probably means the system ran out of memory or someone called &lt;span class="nb"&gt;kill&lt;/span&gt; &lt;span class="nt"&gt;-9&lt;/span&gt; on the process.
error Command failed with &lt;span class="nb"&gt;exit &lt;/span&gt;code 1.
info Visit https://yarnpkg.com/en/docs/cli/run &lt;span class="k"&gt;for &lt;/span&gt;documentation about this command.
yarn run v1.22.22
&lt;span class="nv"&gt;$ &lt;/span&gt;react-scripts build
Creating an optimized production build...
The build failed because the process exited too early. This probably means the system ran out of memory or someone called &lt;span class="nb"&gt;kill&lt;/span&gt; &lt;span class="nt"&gt;-9&lt;/span&gt; on the process.
error Command failed with &lt;span class="nb"&gt;exit &lt;/span&gt;code 1.
info Visit https://yarnpkg.com/en/docs/cli/run &lt;span class="k"&gt;for &lt;/span&gt;documentation about this command.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Resolution
&lt;/h2&gt;

&lt;p&gt;The above error is as a result of the Node.js installation having the heap memory restricted. While executing the build process, this heap memory restriction is exceeded.   &lt;/p&gt;

&lt;p&gt;Thankfully this value can be adjusted through &lt;code&gt;NODE_OPTIONS&lt;/code&gt; and be exported to the linux system where Node.js is installed.&lt;/p&gt;

&lt;p&gt;In my case I adjusted the value to &lt;code&gt;4096&lt;/code&gt; with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;NODE_OPTIONS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"--max-old-space-size=4096"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running &lt;code&gt;yarn build&lt;/code&gt; then works afterwords&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;NODE_OPTIONS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"--max-old-space-size=4096"&lt;/span&gt;
yarn build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--max-old-space-size&lt;/code&gt; Sets the max memory size of V8's old memory section. According to NodeJs documentation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;As memory consumption approaches the limit, V8 will spend more time on garbage collection in an effort to free unused memory.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  research
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://nodejs.org/api/cli.html" rel="noopener noreferrer"&gt;NodeJs Documentation Reference&lt;/a&gt;&lt;br&gt;
&lt;a href="!https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-mib"&gt;About --max-old-space-size=SIZE in node-options&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>backenddevelopment</category>
      <category>linux</category>
    </item>
    <item>
      <title>How to restore Ubuntu desktop UI After an Unexpected tty1 Boot without initial internet access</title>
      <dc:creator>Sammy Barasa</dc:creator>
      <pubDate>Thu, 13 Jun 2024 02:48:40 +0000</pubDate>
      <link>https://dev.to/sammybarasa/how-to-restore-ubuntu-desktop-ui-after-an-unexpected-tty1-boot-without-initial-internet-access-2g1j</link>
      <guid>https://dev.to/sammybarasa/how-to-restore-ubuntu-desktop-ui-after-an-unexpected-tty1-boot-without-initial-internet-access-2g1j</guid>
      <description>&lt;h2&gt;
  
  
  introduction
&lt;/h2&gt;

&lt;p&gt;My Ubuntu 24.04 desktop unexpectedly boot into tty1 presenting a shell interface to interact with on bootup.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzsb9lm5908q561ifotjo.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzsb9lm5908q561ifotjo.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
The above image shows the tty1 output.   &lt;/p&gt;

&lt;p&gt;Sometimes this happens when one accidentally removes critical components such as the desktop environment or Python. In my case, I had installed Python while trying to solve other issues I encountered with Python3.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Login to tty1 {tty(n)} with your username and password
&lt;/h2&gt;

&lt;p&gt;First, log in with your username and password to access the system. This way we can run commands and possibly recover the desktop UI.   &lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Confirm you have access to the internet
&lt;/h2&gt;

&lt;p&gt;Once logged in, you have to confirm if you have an internet connection. The easiest way to do this is to run the &lt;code&gt;ping&lt;/code&gt; command to the internet, and select any address or domain name available.&lt;/p&gt;

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

ping google.com


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you have an internet connection you will receive packets from the address or domain. Therefore you can skip to step 4.&lt;br&gt;
If you cant receive packets, don't worry, we've got you. You can connect to a LAN or move closer to a WLAN connection and proceed to establish a connection to the internet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Recover an internet connection
&lt;/h2&gt;

&lt;p&gt;In linux, everything can be represented using a file format and this also includes all the network interfaces on the Network Interface Card(NIC). NIC has the ethernet LAN interface and the Wireless LAN (Wi-Fi) interface. These interfaces are stored in the  &lt;code&gt;/sys/class/net&lt;/code&gt; file. so we proceed to list them.&lt;/p&gt;

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

&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; /sys/class/net


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jojs27ln7ec5v4cd6ky.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jojs27ln7ec5v4cd6ky.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
The LAN interface starts with an &lt;strong&gt;e&lt;/strong&gt; while the WLAN interface starts with &lt;strong&gt;w&lt;/strong&gt;. Note down the interface names.&lt;br&gt;
Connecting the interfaces has several ways.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;use network management interface command&lt;code&gt;nmtui&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If &lt;code&gt;nmtui&lt;/code&gt; command is available you can easily get the connection established via the interface that pops up from running running the &lt;code&gt;nmtui&lt;/code&gt;command. &lt;/p&gt;

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

nmtui


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuzv2e9dx4vhjm3fj04a4.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuzv2e9dx4vhjm3fj04a4.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modify configs
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In somecases &lt;code&gt;nmtui&lt;/code&gt; is not available and even &lt;code&gt;netplan&lt;/code&gt; command was not available due to damaged packages and missing packages. As was in my case. Here we have to modify configs. For LAN or wired connection, we can establish a connection without modifying configs while for Wireless connection, we have to modify configs.&lt;br&gt;
You can confirm the state of the link or interfaces whether they are up or down using the &lt;code&gt;ip a&lt;/code&gt; command&lt;/p&gt;

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

ip a


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq4bigtlol5xnz02qun7x.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq4bigtlol5xnz02qun7x.jpeg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As highlighted here the ethernet and wireless interfaces might be in down state.&lt;/p&gt;

&lt;h4&gt;
  
  
  wired connection
&lt;/h4&gt;

&lt;p&gt;Connect the LAN cable from your router to the LAN port of your computer&lt;/p&gt;

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

&lt;span class="nb"&gt;sudo &lt;/span&gt;ifconfig eth0 up


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;change &lt;strong&gt;&lt;em&gt;eth0&lt;/em&gt;&lt;/strong&gt; to your interface label. The interface will now show up on &lt;code&gt;ifconfig&lt;/code&gt; command.&lt;br&gt;
If you are using DHCP on your router then&lt;/p&gt;

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

&lt;span class="nb"&gt;sudo &lt;/span&gt;dhclient eth0


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The LAN link will obtain an IP address and running simple ping command will return packets from the internet. If you have to assign an IP address you can use the following command.&lt;/p&gt;

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

ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
route add default gw GATEWAY-IP eth0


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If it has worked up to here you can proceed to step 4. If the wired connection hasn't worked, lets try the wireless connection route.&lt;/p&gt;

&lt;h4&gt;
  
  
  wireless connection
&lt;/h4&gt;

&lt;p&gt;For establishing a wireless connection from recovery terminal, checkout the following reference Reference 1, Reference 2&lt;/p&gt;

&lt;h2 id="Step-4--Check-and-repair-packages"&gt; Step 4: Check and repair packages&lt;/h2&gt;

&lt;p&gt;Update packages  and that there are no broken packages since we now have an internet connection.&lt;/p&gt;

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

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get upgrade
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nt"&gt;--fix-broken&lt;/span&gt; &lt;span class="nb"&gt;install&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;let all these run and install&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: confirm dgm or dgm3
&lt;/h2&gt;

&lt;p&gt;Confirm the display manager is installed or not&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Install ubuntu-desktop
&lt;/h2&gt;

&lt;p&gt;Now reinstall the Ubuntu desktop UI &lt;/p&gt;

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

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;ubuntu-desktop


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Step 7: Install and configure the display manager dgm3
&lt;/h2&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;gdm3


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Properly configure the display manager by running the following command&lt;/p&gt;

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

&lt;span class="nb"&gt;sudo &lt;/span&gt;dpkg-reconfigure gdm3


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Step 8: Reboot
&lt;/h2&gt;

&lt;p&gt;Reboot system to apply changes&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;reboot


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Upon bootup, your Ubuntu UI built on GNOME desktopenvironment should now pop up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Thank you. Hope this helps you recover your Ubuntu desktop when the internet connection is not available. When any other issues arise, you can proceed to trouble shoot further. It is important to back up configuration files to avoid loosing initial state during troubleshooting.&lt;/p&gt;

&lt;h3&gt;
  
  
  references
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://serverfault.com/questions/21475/starting-network-connection-from-ubuntu-recovery" rel="noopener noreferrer"&gt;Starting network from Ubuntu recovery&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a id="my-link" href="https://askubuntu.com/questions/1249160/connecting-to-personal-wifi-on-ubuntu-server-20-04" rel="noopener noreferrer"&gt;Wireless connection in ubuntu terminal&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a id="my-link2" href="https://linuxconfig.org/ubuntu-20-04-connect-to-wifi-from-command-line" rel="noopener noreferrer"&gt;Wireless connection by editing &lt;code&gt;/etc/netplan/&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://medium.com/@elysiumceleste/restoring-the-ubuntu-ui-after-an-unexpected-tty1-boot-9f1042e03139" rel="noopener noreferrer"&gt;Restoring the Ubuntu UI After an Unexpected tty1 Boot&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>mount: /mount/path: wrong fs type, bad option, bad superblock on /dev/sda3, missing codepage or helper program, or other error.</title>
      <dc:creator>Sammy Barasa</dc:creator>
      <pubDate>Mon, 15 Apr 2024 03:04:34 +0000</pubDate>
      <link>https://dev.to/sammybarasa/mount-mountpath-wrong-fs-type-bad-option-bad-superblock-on-devsda3-missing-codepage-or-helper-program-or-other-error-2l84</link>
      <guid>https://dev.to/sammybarasa/mount-mountpath-wrong-fs-type-bad-option-bad-superblock-on-devsda3-missing-codepage-or-helper-program-or-other-error-2l84</guid>
      <description>&lt;p&gt;I changed from Windows Desktop to Ubuntu almost a year ago due to blue screen errors that damaged my productivity. Prior Linux environment experience was on deployment servers, cloud containers and WSL. My other 3 partitions on the hard disk are still NTFS after installing the Ubuntu desktop. I document the issues I face and how I overcome them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;Upon upgrading from Ubuntu 23.01 to Ubuntu 23.10, I encountered a strange error when the Ubuntu desktop GUI file explorer Icon was active and I rushed to check my three partitions. The error read "wrong fs type, bad option, bad superblock on /dev/sda3, missing codepage or helper program, or other error". You can imagine how terrified I was!&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm2x7roajiun3ginsea1s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm2x7roajiun3ginsea1s.png" alt="mount: /mount/path: wrong fs type, bad option, bad superblock on /dev/sda3, missing codepage or helper program, or other error" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Research &lt;br&gt;
Listing all the block devices showed two device partitions with no mount path with the following command:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzkktbhzlic29iughmw97.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzkktbhzlic29iughmw97.png" alt="Listing all the block devices" width="800" height="399"&gt;&lt;/a&gt;&lt;br&gt;
navigating to the media folder to check the available directories, the two media paths were missing&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kesa@KESA-DESKTOP:/&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;media/
kesa@KESA-DESKTOP:/media&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;kesa
kesa@KESA-DESKTOP:/media&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;kesa/
kesa@KESA-DESKTOP:/media/kesa&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;XYZ
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;Manually mount the device or partition. Create mount paths with the label of the partition that can be found using &lt;code&gt;lsblk -f&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjc0essktos9r5uaq7wwa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjc0essktos9r5uaq7wwa.png" alt="list block devices towith -f flag to see device labels" width="800" height="659"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my case:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kesa@KESA-DESKTOP:/media/kesa&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo mkdir &lt;/span&gt;WORKSPACE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;mount the device partition using the mount command to the newly created mount path&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kesa@KESA-DESKTOP:/media/kesa&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;mount /dev/sda3 /media/kesa/WORKSPACE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2z8o98psfxmmpsam7nmk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2z8o98psfxmmpsam7nmk.png" alt="mount device command" width="728" height="244"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kesa@KESA-DESKTOP:/media/kesa&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;mount /dev/sda1 /media/kesa/New&lt;span class="se"&gt;\ &lt;/span&gt;Volume
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;change the device name and path in your scenario. Ensure you use the root user when you encounter permission issues. Check final block devices with the list block command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv9lv0x8cj8vr739sjv2h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv9lv0x8cj8vr739sjv2h.png" alt="manual mount successful" width="714" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Using disks application
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjq5px6ynrlfxf3augo5p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjq5px6ynrlfxf3augo5p.png" alt="disks application option" width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjpawe2kcmabgxqdj3eo3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjpawe2kcmabgxqdj3eo3.png" alt="turn off user sessions defaults" width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Turn User Session Defaults Off and click OK&lt;/p&gt;

</description>
      <category>ubuntu</category>
      <category>mount</category>
      <category>path</category>
      <category>errors</category>
    </item>
  </channel>
</rss>
