Merging grub and grub.pacnew: default command line

Hello,

I am currently merging my /etc/default/grub and /etc/default/grub.pacnew files and I am not sure to do it properly. In my currently working grub file I have:

GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=UUID=NUMBER_of_nvme0n1p2_ROOT_PARTITION resume_offset=NUMBER_WITH_SIX_FIGURES"

and in my pacnew file, which were last modified the 31th July 2020:

GRUB_CMDLINE_LINUX_DEFAULT="quiet udev.log_priority=3"

I have read a topic on the old Manjaro forum (but I apparently cannot post a link to it… - Merging-grub-and-grub-pacnew/94224/2) and I would therefore let the present line in my grub file, but it is just an intuition…
I do not know to what this number with 6 figures refers after resume_offset (maybe to my swap file??).
I would really appreciate any help.
Thanks for your attention!

inxi --no-host -Fxzc0
System:    Kernel: 5.4.52-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.1.0 Desktop: Xfce 4.14.2 Distro: Manjaro Linux 
Machine:   Type: Laptop System: Notebook product: N650DU v: N/A serial: <filter> 
           Mobo: Notebook model: N650DU serial: <filter> UEFI: American Megatrends v: 5.12 date: 02/26/2018 
Battery:   ID-1: BAT0 charge: 44.2 Wh condition: 44.2/62.2 Wh (71%) model: Notebook BAT status: Full 
CPU:       Topology: Quad Core model: Intel Core i5-7500T bits: 64 type: MCP arch: Kaby Lake rev: 9 L2 cache: 6144 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 21607 
           Speed: 1600 MHz min/max: 800/3300 MHz Core speeds (MHz): 1: 1596 2: 1600 3: 1577 4: 1600 
Graphics:  Device-1: Intel HD Graphics 630 vendor: CLEVO/KAPOK driver: i915 v: kernel bus ID: 00:02.0 
           Display: x11 server: X.org 1.20.8 driver: intel unloaded: modesetting resolution: <xdpyinfo missing> 
           OpenGL: renderer: Mesa Intel HD Graphics 630 (KBL GT2) v: 4.6 Mesa 20.1.3 direct render: Yes 
Audio:     Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: CLEVO/KAPOK driver: snd_hda_intel v: kernel 
           bus ID: 00:1f.3 
           Sound Server: ALSA v: k5.4.52-1-MANJARO 
Network:   Device-1: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel port: f040 bus ID: 01:00.0 
           IF: wlp1s0 state: up mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: CLEVO/KAPOK driver: r8168 
           v: 8.048.03-NAPI port: e000 bus ID: 05:00.0 
           IF: enp5s0 state: down mac: <filter> 
Drives:    Local Storage: total: 1.14 TiB used: 604.30 GiB (51.9%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 960 EVO 250GB size: 232.89 GiB 
           ID-2: /dev/sda vendor: Seagate model: ST1000LM048-2E7172 size: 931.51 GiB 
Partition: ID-1: / size: 227.24 GiB used: 34.05 GiB (15.0%) fs: ext4 dev: /dev/nvme0n1p2 
           ID-2: /home size: 911.95 GiB used: 570.25 GiB (62.5%) fs: ext4 dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 65.5 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 217 Uptime: 18d 3h 48m Memory: 7.70 GiB used: 5.98 GiB (77.6%) Init: systemd Compilers: gcc: 10.1.0 
           Shell: bash v: 5.0.18 inxi: 3.0.37 `

resume is your swap : not touch :wink:
You can (if you want) only add “ udev.log_priority=3” in your etc/default/grub

2 Likes

Yes, that’s the location of your swap file.

1 Like

Thanks for your answers @papajoke and @jabber!

If I correctly understand, I can add udev.log_priority=3 in my etc/default/grub “if I also want to stop systemd from printing its version number when booting”. Since I do not see why it is interesting to configure it like this, I am inclined to let my grub file as it was before, namely:

GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=UUID=NUMBER_of_nvme0n1p2_ROOT_PARTITION resume_offset=NUMBER_WITH_SIX_FIGURES"

Is there any risk by doing it?
Thanks again.

P.S. : by the way, how can I know the number of my swap file?

1 Like

Tip: Don’t modify GRUB_CMDLINE_LINUX_DEFAULT. Instead, add your custom entries to GRUB_CMDLINE_LINUX. That way it’s much easier to merge.

GRUB_CMDLINE_LINUX_DEFAULT="quiet udev.log_priority=3"
GRUB_CMDLINE_LINUX="resume=UUID=NUMBER_of_nvme0n1p2_ROOT_PARTITION resume_offset=NUMBER_WITH_SIX_FIGURES"
2 Likes

If you mean the offset number, I’m going to point you to the Arch Wiki section:

h!ttps://wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file
(NOTE- remove the ! from h!ttps)

They suggest running filefrag -v /swapfile

1 Like

Thanks for your answer @Yochanan nd @jabber!
WIth the following configuration, that I have now in my grub file thanks to you @Yochanan , will I be able to boot properly?

GRUB_CMDLINE_LINUX_DEFAULT="quiet udev.log_priority=3"
GRUB_CMDLINE_LINUX="resume=UUID=NUMBER_of_nvme0n1p2_ROOT_PARTITION resume_offset=NUMBER_WITH_SIX_FIGURES"

Thanks again!!

1 Like

As long as it was booting properly before, yes.

2 Likes

Indeed, I have rebooted without any problem! Thanks a lot for your help!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.