You are not logged in.

#1 2018-12-27 20:18:53

6c656c
Member
Registered: 2018-03-02
Posts: 18

[SOLVED] Kernel modules are not loading after system upgrade

Hi,

I've tried unsuccessfully to install virtualbox via pacman yesterday, but I wasn't able to make it work because of some problems regarding partial upgrades. Briefly, I was installing packages using -Sy command, which is not a good idea (I've learned that today), and it broke my system completely, basically nothing was working because kernel modules were not loading (kernel version got messed up). Fortunately, I was able to "fix" it booting in single-user mode and executing the following command:

# pacman -U /var/cache/pacman/pkg/linux-4.13.9-1-x86_64.pkg.tar.xz

The thing is, after that I upgraded pacman with -Syu and everything was working great, until the next reboot. The kernel was also upgraded (to linux-4.19.12.arch1-1), hence the same problem occurred all over again. Well, if it helps

$ uname -r

Returns me:

4.13.9-1-ARCH

I've searched a lot here but still couldn't find an answer. I've read here that I might fix it adding an entry to fstab, but I don't want to give it a try and get a broken system afterwards (can't afford to do that during exam season).

I hope you guys can give me some directions. Thanks a lot for reading this.

Last edited by 6c656c (2018-12-28 10:29:45)

Offline

#2 2018-12-27 20:31:06

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Kernel modules are not loading after system upgrade

Your /boot was not mounted for the upgrade. From the chroot, make sure it is mounted and then reinstall linux.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-12-27 20:40:32

6c656c
Member
Registered: 2018-03-02
Posts: 18

Re: [SOLVED] Kernel modules are not loading after system upgrade

jasonwryan wrote:

Your /boot was not mounted for the upgrade. From the chroot, make sure it is mounted and then reinstall linux.

I just can't understand how that happened, as I can cd into /boot right now. How wasn't it mounted before?

Is it possible to do that in my system or do I have to install arch on a usb stick? I'm sorry, I'm a total newbie so it would be great if you could give me more details.

Offline

#4 2018-12-27 20:45:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,531
Website

Re: [SOLVED] Kernel modules are not loading after system upgrade

It wasn't mounted when you upgraded from 4.13.9 to 4.19.12.  The new kernel was placed in the /boot/ directory on the root filesystem.  But when you reboot, the kernel is read from the boot partition.  The boot partition is supposed to be mounted on the boot directory, but it was not at the time of your upgrade.

Mount your boot partition properly, the rerun the upgrade.  At some point you may want to remove the files from the boot directory in the root partition; these get masked or covered up when you mount the root partition, but they still take up space on your drive for no reason (very little space really, so it's no rush).

In hindsight, this would be much easier to explain - if you need further explanation - if you described your partitioning scheme - so we can refer to less ambiguous device names rather than "boot".  What are your partitions and what's in your fstab?

Last edited by Trilby (2018-12-27 20:47:12)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2018-12-27 20:54:10

6c656c
Member
Registered: 2018-03-02
Posts: 18

Re: [SOLVED] Kernel modules are not loading after system upgrade

Trilby wrote:

It wasn't mounted when you upgraded from 4.13.9 to 4.19.12.  The new kernel was placed in the /boot/ directory on the root filesystem.  But when you reboot, the kernel is read from the boot partition.  The boot partition is supposed to be mounted on the boot directory, but it was not at the time of your upgrade.

Mount your boot partition properly, the rerun the upgrade.  At some point you may want to remove the files from the boot directory in the root partition; these get masked or covered up when you mount the root partition, but they still take up space on your drive for no reason (very little space really, so it's no rush).

In hindsight, this would be much easier to explain - if you need further explanation - if you described your partitioning scheme - so we can refer to less ambiguous device names rather than "boot".  What are your partitions and what's in your fstab?

That made a lot of sense to me, thanks for taking the time to explain. My /etc/fstab looks like this:

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
# /dev/nvme0n1p3 UUID=fbe0ba60-b5a2-4053-9fe7-db64f7548974
/dev/nvme0n1p3      	/         	ext4      	rw,relatime,data=ordered	0 1

# /dev/nvme0n1p4 UUID=c26e6184-728b-4009-a4bf-6ad35ddc2262
/dev/nvme0n1p4      	/home     	ext4      	rw,relatime,data=ordered	0 2

# UUID=fbe0ba60-b5a2-4053-9fe7-db64f7548974
/dev/nvme0n1p3      	/         	ext4      	rw,relatime,data=ordered	0 1

# UUID=c435eb2d-0c94-460d-adf3-109af044ac48
/dev/nvme0n1p2      	none      	swap      	defaults  	0 0

Offline

#6 2018-12-27 21:32:19

loqs
Member
Registered: 2014-03-06
Posts: 19,106

Re: [SOLVED] Kernel modules are not loading after system upgrade

The fstab contains a duplicate entry for / and no entry for /boot.

Offline

#7 2018-12-27 21:41:34

6c656c
Member
Registered: 2018-03-02
Posts: 18

Re: [SOLVED] Kernel modules are not loading after system upgrade

loqs wrote:

The fstab contains a duplicate entry for / and no entry for /boot.

I can see that, but how am I supposed to fix it? Shall I use genfstab?

Offline

#8 2018-12-27 21:42:35

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,531
Website

Re: [SOLVED] Kernel modules are not loading after system upgrade

It's a text file, open it in an editor and fix it.

Genfstab will only work if you currently have all the partitions properly mounted.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2018-12-27 21:56:21

6c656c
Member
Registered: 2018-03-02
Posts: 18

Re: [SOLVED] Kernel modules are not loading after system upgrade

Trilby wrote:

It's a text file, open it in an editor and fix it.

Genfstab will only work if you currently have all the partitions properly mounted.

Alright. Executing fdisk -l that's what I got:

Device            Start       End   Sectors   Size Type
/dev/nvme0n1p1     2048    534527    532480   260M EFI System
/dev/nvme0n1p2   534528   8923135   8388608     4G Linux filesystem
/dev/nvme0n1p3  8923136  92809215  83886080    40G Linux filesystem
/dev/nvme0n1p4 92809216 500118158 407308943 194.2G Linux filesystem

And lsblk -f:

NAME        FSTYPE LABEL  UUID                                 FSAVAIL FSUSE% MOUNTPOINT
nvme0n1                                                                       
├─nvme0n1p1 vfat   SYSTEM EA2C-1B0D                                           
├─nvme0n1p2 swap          c435eb2d-0c94-460d-adf3-109af044ac48                [SWAP]
├─nvme0n1p3 ext4          fbe0ba60-b5a2-4053-9fe7-db64f7548974   15.9G    54% /
└─nvme0n1p4 ext4          c26e6184-728b-4009-a4bf-6ad35ddc2262  124.3G    30% /home

Hence, I assume I have to change my fstab to:

# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
# /dev/nvme0n1p1 UUID=EA2C-1B0D
/dev/nvme0n1p1      	/boot         	vfat      	rw,relatime,data=ordered	0 2

# /dev/nvme0n1p4 UUID=c26e6184-728b-4009-a4bf-6ad35ddc2262
/dev/nvme0n1p4      	/home     	ext4      	rw,relatime,data=ordered	0 2

# UUID=fbe0ba60-b5a2-4053-9fe7-db64f7548974
/dev/nvme0n1p3      	/         	ext4      	rw,relatime,data=ordered	0 1

# UUID=c435eb2d-0c94-460d-adf3-109af044ac48
/dev/nvme0n1p2      	none      	swap      	defaults  	0 0

Is that correct? After that I'd just have to reboot and upgrade the system again?

Offline

#10 2018-12-27 22:07:34

loqs
Member
Registered: 2014-03-06
Posts: 19,106

Re: [SOLVED] Kernel modules are not loading after system upgrade

I would suggest mounting /dev/nvme0n1p1 to /boot without specifying any options then checking the output of mount for the actual options used and using that output as the options for fstab.
rw and relatime are not fs specific I think data=ordered is specific to ext3/ext4.

Last edited by loqs (2018-12-27 22:08:48)

Offline

#11 2018-12-27 22:31:30

6c656c
Member
Registered: 2018-03-02
Posts: 18

Re: [SOLVED] Kernel modules are not loading after system upgrade

loqs wrote:

I would suggest mounting /dev/nvme0n1p1 to /boot without specifying any options then checking the output of mount for the actual options used and using that output as the options for fstab.
rw and relatime are not fs specific I think data=ordered is specific to ext3/ext4.

Thanks. Well, I did

 sudo mount /dev/nvme0n1p1 /boot 

and got no output. Should I put 'defaults' in fstabs?

Offline

#12 2018-12-27 22:35:02

loqs
Member
Registered: 2014-03-06
Posts: 19,106

Re: [SOLVED] Kernel modules are not loading after system upgrade

No run `mount` now without any options and check its output.

Offline

#13 2018-12-28 00:46:37

6c656c
Member
Registered: 2018-03-02
Posts: 18

Re: [SOLVED] Kernel modules are not loading after system upgrade

loqs wrote:

No run `mount` now without any options and check its output.

I see, the last line was:

/dev/nvme0n1p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

I suppose I need to include these options on fstab, am I right?

Thanks a lot for the patience, kind stranger smile

Offline

#14 2018-12-28 01:07:27

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Kernel modules are not loading after system upgrade

You can read up on each of the options and determine which you actually need. A minimum set would be "defaults,relatime".

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB