Score:0

Extremely slow bootup in Ubuntu 20.04

ar flag

I have been experiencing extremely slow bootup on Ubuntu 20.04. I have Lenovo Thinkpad X201. The boot does not take that long for another Ubuntu 18.04 that I have installed on another partition.

Running dmesg in terminal and reading the output shows following lines that are probably related to delaying of boot :

[   39.616283] audit: type=1400 audit(1626546618.403:82): apparmor="DENIED" operation="open" profile="/{,usr/}sbin/dhclient" name="/proc/775/task/848/comm" pid=775 comm="dhclient" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0
[   39.616480] audit: type=1400 audit(1626546618.403:83): apparmor="DENIED" operation="open" profile="/{,usr/}sbin/dhclient" name="/proc/775/task/849/comm" pid=775 comm="dhclient" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0
[   39.616563] audit: type=1400 audit(1626546618.403:84): apparmor="DENIED" operation="open" profile="/{,usr/}sbin/dhclient" name="/proc/775/task/850/comm" pid=775 comm="dhclient" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0
[   62.154604] audit: type=1400 audit(1626546640.939:85): apparmor="DENIED" operation="capable" profile="/usr/sbin/cups-browsed" pid=971 comm="cups-browsed" capability=23  capname="sys_nice"
[  370.614154] aufs 5.4.3-20200302
[  370.614638] aufs aufs_fill_super:918:mount[1790]: no arg
[  370.744875] overlayfs: missing 'lowerdir'
[  388.973010] audit: type=1400 audit(1626546967.759:86): apparmor="DENIED" operation="ptrace" profile="snap.docker.dockerd" pid=1905 comm="ps" requested_mask="read" denied_mask="read" peer="/{,usr/}sbin/dhclient"
[  405.113288] Initializing XFRM netlink socket
[  483.800276] rfkill: input handler disabled
[  502.044283] audit: type=1400 audit(1626547080.831:91): apparmor="DENIED" operation="mknod" profile="/usr/share/hplip/systray.py" name="/var/crash/_usr_share_hplip_systray.py.1000.crash" pid=2732 comm="hp-systray" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000
[  626.132953] perf: interrupt took too long (2512 > 2500), lowering kernel.perf_event_max_sample_rate to 79500
[  951.554434] perf: interrupt took too long (3142 > 3140), lowering kernel.perf_event_max_sample_rate to 63500
[ 1251.050145] perf: interrupt took too long (3930 > 3927), lowering kernel.perf_event_max_sample_rate to 50750

What could be the reason for bootup taking that long and how to rectify it ?


Some more information :

Output of cat /etc/fstab :

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=7dd9bc28-9780-4a60-9f94-87c3471f2089 /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0

Output of sudo blkid :

/dev/sda1: UUID="7dd9bc28-9780-4a60-9f94-87c3471f2089" TYPE="ext4" PARTUUID="d19045a2-01"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/sda2: UUID="a566bb53-bff0-452b-9eb8-5ae08eb31dd0" TYPE="ext4" PARTUUID="d19045a2-02"
/dev/sda5: UUID="17b4a94c-68db-418f-83be-4453f380a4d6" TYPE="ext4" PARTUUID="d19045a2-05"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
/dev/loop11: TYPE="squashfs"
/dev/loop12: TYPE="squashfs"
/dev/loop13: TYPE="squashfs"
/dev/loop14: TYPE="squashfs"
/dev/loop15: TYPE="squashfs"
/dev/loop16: TYPE="squashfs"
/dev/loop17: TYPE="squashfs"
/dev/loop18: TYPE="squashfs"
/dev/loop19: TYPE="squashfs"
/dev/loop20: TYPE="squashfs"
/dev/loop21: TYPE="squashfs"
/dev/loop22: TYPE="squashfs"
/dev/loop23: TYPE="squashfs"
/dev/loop24: TYPE="squashfs"
/dev/loop25: TYPE="squashfs"
/dev/loop26: TYPE="squashfs"
/dev/loop27: TYPE="squashfs"
/dev/loop28: TYPE="squashfs"
/dev/loop29: TYPE="squashfs"
/dev/loop30: TYPE="squashfs"
/dev/loop31: TYPE="squashfs"

Output of systemd-analyze blame :

1min 15.451s apt-daily-upgrade.service                          
     43.216s ifupdown-pre.service                               
     41.231s dev-sda1.device                                    
     30.067s snapd.service                                      
     28.683s networkd-dispatcher.service                        
     27.266s dev-loop28.device                                  
     25.981s udisks2.service                                    
     25.328s dev-loop31.device                                  
     24.464s dev-loop12.device                                  
     24.307s dev-loop27.device                                  
     24.008s accounts-daemon.service                            
     23.806s dev-loop26.device                                  
     23.798s dev-loop23.device                                  
     23.590s dev-loop30.device                                  
     23.359s dev-loop29.device                                  
     23.130s dev-loop25.device                                  
     23.093s dev-loop13.device                                  
     22.859s networking.service                                 
     20.989s dev-loop22.device                                  
     20.909s dev-loop17.device                                  
     20.907s dev-loop24.device                                  
     20.905s dev-loop14.device                                  
     20.905s dev-loop11.device                                  
     19.782s dev-loop8.device                                   
     19.482s openvpnas.service                                  
     18.305s dev-loop9.device                                   
     18.304s dev-loop5.device                                   
     18.303s dev-loop6.device                                   
     18.301s dev-loop7.device                                   
     18.300s dev-loop16.device                                  
     18.297s dev-loop15.device                                  
     18.293s dev-loop19.device                                  
     16.610s dev-loop4.device                                   
     16.610s dev-loop2.device                                   
     16.609s dev-loop0.device                                   
     16.609s dev-loop1.device                                   
     16.607s dev-loop3.device                                   
     16.606s dev-loop10.device                                  
     16.603s dev-loop18.device                                  
     16.598s dev-loop20.device                                  
     16.597s dev-loop21.device                                  
     15.768s avahi-daemon.service                               
     15.294s NetworkManager.service                             
     15.178s polkit.service                                     
     14.492s switcheroo-control.service                         
     14.484s thermald.service                                   
     14.430s systemd-logind.service                             
     14.417s wpa_supplicant.service                             
     13.653s winbind.service                                    
     12.544s systemd-journal-flush.service                      
     11.046s grub-common.service                                
      9.978s apport.service                                     
      8.960s gpu-manager.service                                
      8.902s apache2.service                                    
      8.655s systemd-udevd.service                              
      8.618s NetworkManager-wait-online.service                 
      7.669s ModemManager.service                               
      6.905s rsyslog.service                                    
      6.046s teamviewerd.service                                
      4.932s apparmor.service                                   
      4.088s e2scrub_reap.service                               
      3.825s colord.service                                     
      3.223s lm-sensors.service                                 
      3.081s snapd.apparmor.service                             
      2.566s grub-initrd-fallback.service                       
      2.531s lightdm.service                                    
      2.525s plymouth-quit-wait.service                         
      2.514s systemd-sysctl.service                             
      2.484s systemd-tmpfiles-setup.service                     
      2.378s ssh.service                                        
      2.191s dns-clean.service                                  
      1.946s snap-audacity-756.mount                            
      1.884s snap-audacity-857.mount                            
      1.847s systemd-modules-load.service                       
      1.818s snap-chromium-1637.mount                           
      1.811s snap-chromium-1646.mount                           
      1.809s fwupd.service                                      
      1.753s snap-core-11187.mount                              
      1.728s snap-core-11316.mount                              
      1.615s keyboard-setup.service                             
      1.569s snapd.seeded.service                               
      1.539s snap-core18-2066.mount                             
      1.539s upower.service                                     
      1.522s snap-core18-2074.mount                             
      1.487s systemd-random-seed.service                        
      1.467s snap-core20-1026.mount                             
      1.393s snap-docker-471.mount                              
      1.325s snap-docker-796.mount                              
      1.219s snap-gnome\x2d3\x2d26\x2d1604-102.mount            
      1.198s snap-gnome\x2d3\x2d26\x2d1604-104.mount            
      1.143s snap-gnome\x2d3\x2d28\x2d1804-145.mount            
      1.133s systemd-timesyncd.service                          
      1.128s snap-gnome\x2d3\x2d28\x2d1804-161.mount            
      1.070s snap-gnome\x2d3\x2d34\x2d1804-66.mount             
      1.028s systemd-sysusers.service                           
      1.005s snap-gnome\x2d3\x2d34\x2d1804-72.mount             
       889ms snap-gnome\x2d3\x2d38\x2d2004-39.mount             
       861ms systemd-tmpfiles-setup-dev.service                 
       763ms snap-gnome\x2dsystem\x2dmonitor-160.mount          
       734ms snap-gnome\x2dsystem\x2dmonitor-163.mount          
       649ms snap-gtk2\x2dcommon\x2dthemes-13.mount             
       642ms [email protected]                               
       610ms snap-gtk2\x2dcommon\x2dthemes-9.mount              
       564ms snap-gtk\x2dcommon\x2dthemes-1514.mount            
       553ms phpsessionclean.service                            
       542ms snap-gtk\x2dcommon\x2dthemes-1515.mount            
       541ms systemd-udev-trigger.service                       
       494ms snap-handbrake\x2djz-142.mount                     
       438ms swapfile.swap                                      
       437ms systemd-backlight@backlight:acpi_video0.service    
       431ms snap-inkscape-9078.mount                           
       412ms console-setup.service                              
       404ms snap-inkscape-9090.mount                           
       386ms systemd-remount-fs.service                         
       320ms kerneloops.service                                 
       319ms systemd-update-utmp.service                        
       314ms systemd-journald.service                           
       283ms [email protected]                                  
       266ms ufw.service                                        
       263ms systemd-backlight@backlight:intel_backlight.service
       251ms setvtrgb.service                                   
       249ms snap-losslesscut-66.mount                          
       241ms snap-losslesscut-72.mount                          
       233ms plymouth-read-write.service                        
       225ms snap-snap\x2dstore-547.mount                       
1min 15.451s apt-daily-upgrade.service                          
1min 15.451s apt-daily-upgrade.service                          
     43.216s ifupdown-pre.service                               
     41.231s dev-sda1.device                                    
     30.067s snapd.service                                      
     28.683s networkd-dispatcher.service                        
     27.266s dev-loop28.device                                  
     25.981s udisks2.service                                    
     25.328s dev-loop31.device                                  
     24.464s dev-loop12.device                                  
     24.307s dev-loop27.device                                  
     24.008s accounts-daemon.service                            
     23.806s dev-loop26.device                                  
     23.798s dev-loop23.device                                  
     23.590s dev-loop30.device                                  
     23.359s dev-loop29.device                                  
     23.130s dev-loop25.device                                  
     23.093s dev-loop13.device                                  
     22.859s networking.service                                 
     20.989s dev-loop22.device                                  
     20.909s dev-loop17.device                                  
1min 15.451s apt-daily-upgrade.service                          
     43.216s ifupdown-pre.service                               
     41.231s dev-sda1.device                                    
     30.067s snapd.service                                      
     28.683s networkd-dispatcher.service                        
     27.266s dev-loop28.device                                  
     25.981s udisks2.service                                    
     25.328s dev-loop31.device                                  
     24.464s dev-loop12.device                                  
     24.307s dev-loop27.device                                  
     24.008s accounts-daemon.service                            
     23.806s dev-loop26.device                                  
     23.798s dev-loop23.device                                  
     23.590s dev-loop30.device                                  
     23.359s dev-loop29.device                                  
     23.130s dev-loop25.device                                  
     23.093s dev-loop13.device                                  
     22.859s networking.service                                 
     20.989s dev-loop22.device                                  
     20.909s dev-loop17.device                                  
     20.907s dev-loop24.device                                  
     20.905s dev-loop14.device                                  
     20.905s dev-loop11.device                                  
     19.782s dev-loop8.device                                   
     19.482s openvpnas.service                                  
     18.305s dev-loop9.device                                   
     18.304s dev-loop5.device                                   
     18.303s dev-loop6.device                                   
     18.301s dev-loop7.device                                   
     18.300s dev-loop16.device                                  
     18.297s dev-loop15.device                                  
     18.293s dev-loop19.device                                  
     16.610s dev-loop4.device                                   
     16.610s dev-loop2.device                                   
     16.609s dev-loop0.device                                   
     16.609s dev-loop1.device                                   
     16.607s dev-loop3.device                                   
     16.606s dev-loop10.device                                  
     16.603s dev-loop18.device                                  
     16.598s dev-loop20.device                                  
     16.597s dev-loop21.device                                  
     15.768s avahi-daemon.service                               
     15.294s NetworkManager.service                             
     15.178s polkit.service                                     
     14.492s switcheroo-control.service                         
     14.484s thermald.service                                   
     14.430s systemd-logind.service                             
     14.417s wpa_supplicant.service                             
     13.653s winbind.service                                    
     12.544s systemd-journal-flush.service                      
     11.046s grub-common.service                                
      9.978s apport.service                                     
      8.960s gpu-manager.service                                
      8.902s apache2.service                                    
      8.655s systemd-udevd.service                              
      8.618s NetworkManager-wait-online.service                 
      7.669s ModemManager.service                               
      6.905s rsyslog.service                                    
      6.046s teamviewerd.service                                
      4.932s apparmor.service                                   
      4.088s e2scrub_reap.service                               
      3.825s colord.service                                     
      3.223s lm-sensors.service                                 
      3.081s snapd.apparmor.service                             
      2.566s grub-initrd-fallback.service                       
      2.531s lightdm.service                                    
      2.525s plymouth-quit-wait.service                         
      2.514s systemd-sysctl.service                             
      2.484s systemd-tmpfiles-setup.service                     
      2.378s ssh.service                                        
      2.191s dns-clean.service                                  
      1.946s snap-audacity-756.mount                            
      1.884s snap-audacity-857.mount                            
      1.847s systemd-modules-load.service                       
      1.818s snap-chromium-1637.mount                           
      1.811s snap-chromium-1646.mount                           
      1.809s fwupd.service                                      
      1.753s snap-core-11187.mount                              
      1.728s snap-core-11316.mount                              
      1.615s keyboard-setup.service                             
      1.569s snapd.seeded.service                               
      1.539s snap-core18-2066.mount                             
      1.539s upower.service                                     
      1.522s snap-core18-2074.mount                             
      1.487s systemd-random-seed.service                        
      1.467s snap-core20-1026.mount                             
      1.393s snap-docker-471.mount                              
      1.325s snap-docker-796.mount                              
      1.219s snap-gnome\x2d3\x2d26\x2d1604-102.mount            
      1.198s snap-gnome\x2d3\x2d26\x2d1604-104.mount            
      1.143s snap-gnome\x2d3\x2d28\x2d1804-145.mount            
      1.133s systemd-timesyncd.service                          
      1.128s snap-gnome\x2d3\x2d28\x2d1804-161.mount            
      1.070s snap-gnome\x2d3\x2d34\x2d1804-66.mount             
      1.028s systemd-sysusers.service                           
      1.005s snap-gnome\x2d3\x2d34\x2d1804-72.mount             
       889ms snap-gnome\x2d3\x2d38\x2d2004-39.mount             
       861ms systemd-tmpfiles-setup-dev.service                 
       763ms snap-gnome\x2dsystem\x2dmonitor-160.mount          
       734ms snap-gnome\x2dsystem\x2dmonitor-163.mount          
       649ms snap-gtk2\x2dcommon\x2dthemes-13.mount             
       642ms [email protected]                               
       610ms snap-gtk2\x2dcommon\x2dthemes-9.mount              
       564ms snap-gtk\x2dcommon\x2dthemes-1514.mount            
       553ms phpsessionclean.service                            
       542ms snap-gtk\x2dcommon\x2dthemes-1515.mount            
       541ms systemd-udev-trigger.service                       
       494ms snap-handbrake\x2djz-142.mount                     
       438ms swapfile.swap                                      
       437ms systemd-backlight@backlight:acpi_video0.service    
       431ms snap-inkscape-9078.mount                           
       412ms console-setup.service                              
       404ms snap-inkscape-9090.mount                           
       386ms systemd-remount-fs.service                         
       320ms kerneloops.service                                 
       319ms systemd-update-utmp.service                        
       314ms systemd-journald.service                           
       283ms [email protected]                                  
       266ms ufw.service                                        
       263ms systemd-backlight@backlight:intel_backlight.service
       251ms setvtrgb.service                                   
       249ms snap-losslesscut-66.mount                          
       241ms snap-losslesscut-72.mount                          
       233ms plymouth-read-write.service                        
       225ms snap-snap\x2dstore-547.mount                       
       206ms snapd.socket                                       
       196ms snap-snap\x2dstore-542.mount                       
       178ms dev-hugepages.mount                                
       177ms dev-mqueue.mount                                   
       175ms sys-kernel-debug.mount                             
       173ms sys-kernel-tracing.mount                           
       167ms kmod-static-nodes.service                          
       161ms pppd-dns.service                                   
       160ms hddtemp.service                                    
       152ms snap-pdftk-9.mount                                 
       121ms systemd-user-sessions.service                      
       119ms wicd.service                                       
       115ms systemd-resolved.service                           
       109ms shadowsocks.service                                
        96ms plymouth-start.service                             
        83ms rtkit-daemon.service                               
        41ms [email protected]                      
        19ms alsa-restore.service                               
        13ms systemd-update-utmp-runlevel.service               
         8ms systemd-rfkill.service                             
         6ms e2scrub_all.service                                
         5ms sys-fs-fuse-connections.mount                      
         4ms sys-kekernelkernelrnel-config.mount

Output of snap list :

Name                  Version                     Rev    Tracking         Publisher   Notes
audacity              3.0.2                       857    latest/stable    diddledan   -
chromium              91.0.4472.114               1646   latest/stable    canonical*  -
core                  16-2.51.1                   11316  latest/stable    canonical*  core
core18                20210611                    2074   latest/stable    canonical*  base
core20                20210429                    1026   latest/stable    canonical*  base
docker                19.03.13                    796    latest/stable    canonical*  -
gnome-3-26-1604       3.26.0.20210629             104    latest/stable/…  canonical*  -
gnome-3-28-1804       3.28.0-19-g98f9e67.98f9e67  161    latest/stable    canonical*  -
gnome-3-34-1804       0+git.3556cb3               72     latest/stable    canonical*  -
gnome-3-38-2004       0+git.3d25b9b               39     latest/stable    canonical*  -
gnome-system-monitor  40.1-2-ga819fb4b55          163    latest/stable/…  canonical*  -
gtk-common-themes     0.1-52-gb92ac40             1515   latest/stable    canonical*  -
gtk2-common-themes    0.1                         13     latest/stable    canonical*  -
handbrake-jz          1.2.2                       142    latest/stable    jz          -
inkscape              1.1-ce6663b3b7-2021-05-25   9090   latest/stable    inkscape*   -
losslesscut           3.34.3                      72     latest/stable    mifino      -
pdftk                 2.02-4                      9      latest/stable    smoser      -
snap-store            3.38.0-64-g23c4c77          547    latest/stable/…  canonical*  -

Output of cat etc/network/interfaces :

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5). 

source /etc/network/interfaces.d/*

# The loopback network interface 
auto lo
iface lo inet loopback

# The primary network interface 
auto enp0s25 
iface enp0s25 inet dhcp

Output of cat /etc/netplan/*.yaml :

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

Output of free -h :

              total        used        free      shared  buff/cache   available
Mem:          3.6Gi       1.8Gi       550Mi       180Mi       1.3Gi       1.4Gi
Swap:         2.0Gi        15Mi       2.0Gi

/etc/fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=7dd9bc28-9780-4a60-9f94-87c3471f2089 /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0

Screenshot of Disks:

Screenshot of Disks

heynnema avatar
ru flag
Edit your question and show me `cat /etc/fstab` and `sudo blkid`. Select the pasted text and click the {} icon to format it. Start comments to me with @heynnema or I'll miss them.
waltinator avatar
it flag
Use `systemd-analyze blame` to get more data.
Abhishek Dubey avatar
ar flag
@heynnema Thank you for your comments. I have updated the question with the information that you had asked for.
heynnema avatar
ru flag
You may have multiple problems. Network, Docker layers, snaps, sda1, and VPN. Let's briefly start here... edit your question and show me `cat /etc/network/interfaces` and `cat /etc/netplan/*.yaml` and `free -h` and `snap list`. See my partial answer for how to check sda1/sda2/sda5. How long does your boot currently take?
Lorenz Keel avatar
gr flag
You use a huge amount of apps in snap format. If they exist in traditional format (and you are not interested in snap features), I suggest you to install them by `sudo apt install <app_name>` and remove the snap version by `sudo snap remove <app_name>`.
Abhishek Dubey avatar
ar flag
@heynnema I read your partial answer and infact I think it might have something to do with filesystem because every time I boot I also see sth like "clearing orphaned inode /dev/sda1". Also, until a few days ago, I used to get the error at the boot "Failed to raise network interfaces". Somehow I got it rectified when I restored /network/interfaces to default. Otherwise too, I cannot connect to any WiFi with this ubuntu while it works fine with other Ubuntu I loaded on other partition. Seems to have pretty much messed up with things.
heynnema avatar
ru flag
Yes, as I mentioned earlier, you probably have multiple problems. Have you done my answer? You also haven't put up the data that I requested in my prior comment.
heynnema avatar
ru flag
Got the info. Thanks. See the updates in my partial answer. How long does your computer take to boot? Now show me `sudo lshw -C network`.
Abhishek Dubey avatar
ar flag
@heynnema Unfortunately couldnot do filesystem checks at this time. Will do that tomorrow. Otherwise, did all the corrections except the /etc/fstab one. I have updated how that file looks in gedit. Seems to have multiple spaces. Does that look fine or it needs changes too ? Also, It take anything between 3-7 minutes to boot.
heynnema avatar
ru flag
The original /swapfile line in your /etc/fstab is fine with multiple spaces. Edit your question and show me screenshot(s) of the `Disks` application **SMART Data** window.
Abhishek Dubey avatar
ar flag
@heynnema Done. I observed that boot has been slightly faster now by a minute or so.
heynnema avatar
ru flag
The `Disks` image that you uploaded is not the **SMART Data** window. Go to the three dot button and select **SMART Data & Tests**. Enlarge the window to be able to capture all of the data with one screenshot (This data is also scrollable).
heynnema avatar
ru flag
Do you have a number of Docker containers or layers? I'm trying to figure out why you have all of those loop devices... your `snap list` isn't out of the ordinary.
heynnema avatar
ru flag
@AbhishekDubey Status please...
Abhishek Dubey avatar
ar flag
@heynnema Sorry for late replies. Except the fsck, I performed all the steps and booting time got slightly better by a minute. But, somehow I was stuck in loop at the login screen. I tried reinstalling ubuntu-desktop from the console but that was not working too. Eventually, I opted to reinstall fresh Ubuntu 20.04 LTS after taking backup of data. Hence, could not really complete the steps you had suggested. Sorry for that. During ubuntu usb live boot, I did observe file system checks running.
Score:0
ru flag

Note: You may have multiple problems. Network, Docker layers, snaps, sda1, and VPN.

Let's first check your file system(s)...

  • boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
  • open a terminal window by pressing Ctrl+Alt+T
  • type sudo fdisk -l
  • identify the /dev/sdXX device names for your "Linux Filesystem(s)"
  • type sudo fsck -f /dev/sda1, replacing sdXX with the number you found earlier
  • sudo fsck -f /dev/sda2
  • sudo fsck -f /dev/sda5
  • repeat the fsck command if there were errors
  • type reboot

/etc/network/interfaces

Comment out the following lines and reboot...

# The primary network interface 
auto enp0s25 
iface enp0s25 inet dhcp

/swapfile

With only 4G RAM, a 2G /swapfile is too small. We'll change it from 2G to 4G...

Note: Incorrect use of the rm and dd commands can cause data loss. Suggest copy/paste.

In the terminal...

sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm 4G RAM and 4G swap

Edit /etc/fstab, using sudo -H gedit /etc/fstab or sudo pico /etc/fstab.

Confirm this /swapfile line in /etc/fstab... and confirm no other “swap” lines... use SPACES in this line... confirm NO TABS...

/swapfile  none  swap  sw  0  0

reboot                    # reboot and verify operation

Update #1:

Reinstalled Ubuntu.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.