Mint 19 slow boot - is it "safe" to add "noresume" to grub?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
slowboot
Level 1
Level 1
Posts: 3
Joined: Fri Jun 29, 2018 5:13 pm

Mint 19 slow boot - is it "safe" to add "noresume" to grub?

Post by slowboot »

After installing Mint 19, my computer took 2-3 times longer to boot than it did with Mint 18.3.

This change made the computer boot at least as fast as before, but I don't have technical knowledge so I don't know if it is "safe" to use this change as a fix.

Here is the change:

$ xed admin:///etc/default/grub

and changed the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noresume"

saved /etc/default/grub, then

$ sudo update-grub


So, is it "safe" to add "noresume" to grub?

User avatar
kc1di
Level 16
Level 16
Posts: 6146
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: Mint 19 slow boot - is it "safe" to add "noresume" to grub?

Post by kc1di »

before you do that your should diagnose what is actually taking so much time during the boot process.
you can do that by issuing this command in a terminal

Code: Select all

systemd-analyze blame
it will give you a list of the times it takes for each item in the bootup procedure.
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608

User avatar
Sir Charles
Level 7
Level 7
Posts: 1895
Joined: Thu Jan 04, 2018 1:00 pm

Re: Mint 19 slow boot - is it "safe" to add "noresume" to grub?

Post by Sir Charles »

slowboot wrote:
Fri Jun 29, 2018 5:33 pm
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noresume"
That your boot time is longer might be due to the fact that the kernel is trying to mount a swap partition as it is specified in the fstab-file but in reality is "misplaced". There is a 90-second timeout before the boot process can proceed again. If i am not mistaken, the kernel will ignore the resume partition (swap) used to restart from hibernate if you pass it the 'noresume' option at boot hence shorter boot time.

Could you open a terminal and run the following command one at a time?

Code: Select all

cat /etc/fstab
and

Code: Select all

sudo blkid -o list
Copy the whole output from the terminal for each command and paste it back here using code tags</>from the toolbar above the edit-box to enclose them.

But LM 19 will be using a swap file by default and not a swap partition. So it could be something else.
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

Mattyboy
Level 6
Level 6
Posts: 1193
Joined: Thu Mar 26, 2015 2:17 pm

Re: Mint 19 slow boot - is it "safe" to add "noresume" to grub?

Post by Mattyboy »


slowboot
Level 1
Level 1
Posts: 3
Joined: Fri Jun 29, 2018 5:13 pm

Re: Mint 19 slow boot - is it "safe" to add "noresume" to grub?

Post by slowboot »

@kc1di

systemd-analyze blame - the slowest time was less than a second.

@Marziano

cat /etc/fstab

Code: Select all

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p2 during installation
UUID=xxxxxxx /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=yyyyyyy  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0
sudo blkid -o list

Code: Select all

device     fs_type label    mount point    UUID
-------------------------------------------------------------------------------
/dev/nvme0n1p1
           vfat             /boot/efi      yyyyyyy
/dev/nvme0n1p2
           ext4             /              xxxxxxx
/dev/nvme0n1
                            (in use)
@Mattyboy

systemd-analyze time

with the line RESUME=UUID=zzzzzzz in /etc/initramfs-tools/conf.d/resume
+ 35s (kernel)

with the line RESUME=none in /etc/initramfs-tools/conf.d/resume
+ 4s (kernel)

switching from RESUME=none to RESUME=UUID=zzzzzzz in /etc/initramfs-tools/conf.d/resume, sudo update-initramfs -u gives:

Code: Select all

update-initramfs: Generating /boot/initrd.img-4.15.0-23-generic
W: initramfs-tools configuration sets RESUME=UUID=zzzzzzz
W: but no matching swap device is available.
In comparison switching to RESUME=none, sudo update-initramfs -u gives:

Code: Select all

update-initramfs: Generating /boot/initrd.img-4.15.0-23-generic

@everyone

changing RESUME=UUID=zzzzzzz to RESUME=none in /etc/initramfs-tools/conf.d/resume does fix the slow boot, but is this the best fix for the problem?

slowboot
Level 1
Level 1
Posts: 3
Joined: Fri Jun 29, 2018 5:13 pm

Re: Mint 19 slow boot - is it "safe" to add "noresume" to grub?

Post by slowboot »

Mattyboy's solution - changing RESUME=UUID=xxxxxx to RESUME=none

Code: Select all

xed admin:///etc/initramfs-tools/conf.d/resume
comment out RESUME=UUID=xxxxxx (by adding a # to the start of the line) and add the line RESUME=none

Code: Select all

#RESUME=UUID=xxxxxx
RESUME=none
save the file

update

Code: Select all

sudo update-initramfs -u
re-boot

User avatar
Sir Charles
Level 7
Level 7
Posts: 1895
Joined: Thu Jan 04, 2018 1:00 pm

Re: Mint 19 slow boot - is it "safe" to add "noresume" to grub?

Post by Sir Charles »

It sure looks like a functioning solution.
I guess, functionally speaking, it is kind of equivalent to the parameter "noresume" that you had previously used.

But what is puzzling me is that, since LM 19 makes use of a swapfile in stead of a swap partition, how come then the file/etc/initramfs-tools/conf.d/resumewith the contentRESUME=UUID=xxxxxxyyyyyyyyis present at all in the system.

Isn't that indicative of the existence of an actual partition to be used as "resume device" and therefore creating confusion for the kernel?
It would be interesting if someone could shed some light on this.
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

gm10
Level 20
Level 20
Posts: 10999
Joined: Thu Jun 21, 2018 5:11 pm

Re: Mint 19 slow boot - is it "safe" to add "noresume" to grub?

Post by gm10 »

Yes, you can resume from swapfiles, so that's intentional. Swapfiles have been supported for many years btw, just like swap partitions are still supported in LM19.
Tune up your LM 19+: ppa:gm10/linuxmint-tools

User avatar
Sir Charles
Level 7
Level 7
Posts: 1895
Joined: Thu Jan 04, 2018 1:00 pm

Re: Mint 19 slow boot - is it "safe" to add "noresume" to grub?

Post by Sir Charles »

gm10 wrote:
Sat Jun 30, 2018 8:53 am
Yes, you can resume from swapfiles, so that's intentional. Swapfiles have been supported for many years btw, just like swap partitions are still supported in LM19.
You don't mean thatRESUME=UUID=xxxxxxyyyyyyyy in/etc/initramfs-tools/conf.d/resumepoints to the /swapfile? That's kind of impossible, isn't it? Why it is there in the first place, needing to be "disabled", that's what I don't understand. Maybe I have misunderstood the whole issue of this thread altogether.
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

User avatar
Seadreamer
Level 4
Level 4
Posts: 229
Joined: Sat Jun 25, 2016 10:12 pm

Re: Mint 19 slow boot - is it "safe" to add "noresume" to grub?

Post by Seadreamer »

Where would a swap file be located and what determines the size?
Homebrew Intel i7 8700k 32gb RAM
LinuxMint 19.3 Mate
Win 10 for games

User avatar
Sir Charles
Level 7
Level 7
Posts: 1895
Joined: Thu Jan 04, 2018 1:00 pm

Re: Mint 19 slow boot - is it "safe" to add "noresume" to grub?

Post by Sir Charles »

The swapfile is placed in / and according to https://www.omgubuntu.co.uk/2016/12/ubu ... swap-files
Sizing of swap files is different to the swap partitions and typically use no more than 5% of free disk space
I don't have any swapfile on my system so I cannot tell for sure how Mint 19 implements swapfile and decides its sizing when it is installed by default. Here is a How-To by @xenopeek for creating a swapfile "manually".
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

Post Reply

Return to “Installation & Boot”