Monday, August 2, 2021

Slow boot after swap change on Ubuntu 20.04

Ctrl + Alt + T

sudo pico /etc/fstab

sudo blkid

/dev/nvme0n1p1: LABEL="Recovery" UUID="342C31292C30E80E" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="b216ec44-2555-4d52-a461-4e6c1f31d5e1"

/dev/nvme0n1p2: UUID="6432-6322" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="436bc9cd-3cdd-4ba8-b4a2-1d338842284c"

/dev/nvme0n1p4: LABEL="Windows 10" UUID="0AC23C37C23C28F9" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="be8fda84-463f-463d-b9b1-6d0028408028"

/dev/nvme0n1p5: UUID="fcd094f0-7812-4d60-9363-ac17b9017089" TYPE="ext4" PARTUUID="281c7215-c15a-451e-963a-4b7d62c3800b"

/dev/nvme0n1p6: UUID="d469e0bf-c759-49fd-90a5-c0b21ea27f92" TYPE="ext4" PARTUUID="fbf42101-1580-4272-8555-806939835a6c"

/dev/sda1: UUID="1A7A02E67A02BF0F" TYPE="ntfs" PARTUUID="6e87ea35-01"

/dev/sdb1: UUID="FCBC33EEBC33A1D6" TYPE="ntfs" PARTUUID="91ca82e5-01"

/dev/loop0: TYPE="squashfs"

/dev/loop1: TYPE="squashfs"

/dev/nvme0n1p3: PARTLABEL="Microsoft reserved partition" PARTUUID="14eda80c-0499-4082-a23f-54f02135bbc8"

/dev/nvme0n1p7: UUID="cf5fc7be-eec5-4d72-9a72-dbb283c481e5" TYPE="swap" PARTUUID="d5432ea7-cf06-564d-b97f-1837c2731cb3"

Change necessary UUID and save fstab.


sudo cat /var/log/boot.log

------------ Sun Aug 01 22:56:18 MSK 2021 ------------

Gave up waiting for suspend/resume device

/dev/nvme0n1p6: clean, 321690/1974272 files, 3272567/7895552 blocks

[  OK  ] Finished Tell Plymouth To Write Out Runtime Data.

[  OK  ] Finished Create Volatile Files and Directories.

         Starting Network Name Resolution...

         Starting Network Time Synchronization...

         Starting Update UTMP about System Boot/Shutdown...

[  OK  ] Finished Update UTMP about System Boot/Shutdown.

[  OK  ] Finished Load AppArmor profiles.

[  OK  ] Started Entropy daemon using the HAVEGE algorithm.

         Starting Load AppArmor pro…managed internally by snapd...

[  OK  ] Finished Load AppArmor pro…s managed internally by snapd.

[  OK  ] Started Network Time Synchronization.

[  OK  ] Reached target System Initialization.

[  OK  ] Started ACPI Events Check.

[  OK  ] Started CUPS Scheduler.

[  OK  ] Started Daily Cleanup of Temporary Directories.

[  OK  ] Reached target Paths.

[  OK  ] Reached target System Time Set.

[  OK  ] Reached target System Time Synchronized.

[  OK  ] Started Trigger anacron every hour.

[  OK  ] Started Daily apt download activities.

[  OK  ] Started Daily apt upgrade and clean activities.

[  OK  ] Started Periodic ext4 Onli…ata Check for All Filesystems.

[  OK  ] Started Discard unused blocks once a week.

[  OK  ] Started Refresh fwupd metadata regularly.

[  OK  ] Started Daily rotation of log files.

[  OK  ] Started Daily man-db regeneration.

[  OK  ] Started Message of the Day.

[  OK  ] Started Ubuntu Advantage update messaging.

[  OK  ] Reached target Timers.

[  OK  ] Listening on ACPID Listen Socket.

[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.

[  OK  ] Listening on CUPS Scheduler.

[  OK  ] Listening on D-Bus System Message Bus Socket.

         Starting Socket activation for snappy daemon.

[  OK  ] Listening on UUID daemon activation socket.

[  OK  ] Listening on Socket activation for snappy daemon.

[  OK  ] Reached target Sockets.

[  OK  ] Reached target Basic System.

         Starting Accounts Service...

[  OK  ] Started ACPI event daemon.

         Starting Save/Restore Sound Card State...

[  OK  ] Started Run anacron jobs.

         Starting LSB: automatic crash report generation...

         Starting Avahi mDNS/DNS-SD Stack...

[  OK  ] Started Regular background program processing daemon.

[  OK  ] Started CUPS Scheduler.

[  OK  ] Reached target Printer.

[  OK  ] Started D-Bus System Message Bus.

         Starting Network Manager...

[  OK  ] Started Save initial kernel messages after boot.

         Starting Remove Stale Onli…t4 Metadata Check Snapshots...

[  OK  ] Reached target Login Prompts.

         Starting Detect the availa…eal with any system changes...

         Starting LSB: Record successful boot for GRUB...

[  OK  ] Started irqbalance daemon.

         Starting Dispatcher daemon for systemd-networkd...

[  OK  ] Started nfancurve.

         Starting NVIDIA Persistence Daemon...

[  OK  ] Started Set the CPU Frequency Scaling governor.

         Starting Authorization Manager...

         Starting Restore /etc/reso… the ppp link was shut down...

         Starting System Logging Service...

         Starting Snap Daemon...

         Starting Login Service...

         Starting Thermal Daemon Service...

         Starting Disk Manager...

         Starting WPA supplicant...

[  OK  ] Started Network Name Resolution.

[  OK  ] Started NVIDIA Persistence Daemon.

[  OK  ] Finished Restore /etc/reso…re the ppp link was shut down.

[  OK  ] Finished Remove Stale Onli…ext4 Metadata Check Snapshots.

[  OK  ] Finished Save/Restore Sound Card State.

[  OK  ] Started System Logging Service.

[  OK  ] Reached target Host and Network Name Lookups.

[  OK  ] Reached target Sound Card.

[  OK  ] Started LSB: automatic crash report generation.

[  OK  ] Started LSB: Record successful boot for GRUB.

[  OK  ] Finished Detect the availa… deal with any system changes.

         Starting GRUB failed boot detection...

[  OK  ] Finished GRUB failed boot detection.

[  OK  ] Started Avahi mDNS/DNS-SD Stack.

[  OK  ] Started Make remote CUPS printers available locally.

[  OK  ] Started Thermal Daemon Service.

[  OK  ] Started WPA supplicant.

[  OK  ] Started Network Manager.

[  OK  ] Reached target Network.

         Starting Network Manager Wait Online...

         Starting Permit User Sessions...

[  OK  ] Started Authorization Manager.

         Starting Modem Manager...

         Starting Hostname Service...

[  OK  ] Finished Permit User Sessions.

         Starting Terminate Plymouth Boot Screen...

         Starting Set console scheme...

[  OK  ] Finished Set console scheme.

[  OK  ] Created slice system-getty.slice.

[  OK  ] Started Accounts Service.


sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.8.0-63-generic
Found initrd image: /boot/initrd.img-5.8.0-63-generic
Found linux image: /boot/vmlinuz-5.8.0-43-generic
Found initrd image: /boot/initrd.img-5.8.0-43-generic
Found Windows Boot Manager on /dev/nvme0n1p2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings
done

sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-5.8.0-63-generic
I: The initramfs will attempt to resume from /dev/nvme0n1p7
I: (UUID=cf5fc7be-eec5-4d72-9a72-dbb283c481e5)
I: Set the RESUME variable to override this.

FIRST SOLUTION OF RESUME PROBLEM
cd /etc/initramfs-tools/conf.d/
touch resume
pico resume
Create only one line like this:
RESUME=none
or I preferred line below - system boots few seconds faster
RESUME=UUID=cf5fc7be-eec5-4d72-9a72-dbb283c481e5
sudo update-initramfs -u

SECOND SOLUTION OF RESUME PROBLEM
cat /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to 
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=SWAPUUID from sudo blkid"

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=cf5fc7be-eec5-4d72-9a72-dbb283c481e5"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"    

sudo update-grub

https://linuxize.com/post/how-to-add-swap-space-on-ubuntu-20-04/

No comments:

Post a Comment