You are not logged in.
So recently I did a system wide upgrade, but unfortunately, as the title say, when I reboot, it keeps booting to a different kernel. I've searched for a few solution but to no avail, one solution mentioned that I need to downgrade, reboot, mount the boot, then upgrade again, so I did, ended up with a downgraded kernel, and luckily, everything works fine so far. So I tried to upgrade again, this time mounting the root as the /boot, but the problem still persist, so I downgrade again, because I fear it might cause some unwanted stuff in the future I should mention that each time I downgrade, I don't mount the boot to root, so maybe that is one of the case?
Also, I didn't create a boot partition because I'm following the MBR scheme from the wiki https://wiki.archlinux.org/index.php/pa … ion_scheme since I dualboot with w10 using MBR. Could this be actually a bad practice to do?
here are a few command result that might help:
uname -a
Linux toasty 4.16.8-1-ARCH #1 SMP PREEMPT Wed May 9 11:25:02 UTC 2018 x86_64 GNU/Linux
linux version downloaded by pacman
--omitted --
linux-4.16.8-1-x86_64.pkg.tar.xz
linux-4.17.3-1-x86_64.pkg.tar.xz
linux-4.17.8-1-x86_64.pkg.tar.xz
-- omitted --
fidsk -l
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1026047 1024000 500M 7 HPFS/NTFS/exFAT
/dev/sda2 1026048 208099447 207073400 98.8G 7 HPFS/NTFS/exFAT
/dev/sda3 208101376 209713151 1611776 787M 27 Hidden NTFS WinRE
/dev/sda4 209713152 1953521663 1743808512 831.5G f W95 Ext'd (LBA)
/dev/sda5 209715200 524287999 314572800 150G 7 HPFS/NTFS/exFAT
/dev/sda6 * 524290048 775948287 251658240 120G 83 Linux
/dev/sda7 775950336 943722495 167772160 80G 82 Linux swap / Sola
/dev/sda8 943724544 1953521663 1009797120 481.5G 83 Linux
mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=3537988k,nr_inodes=884497,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda6 on / type ext4 (rw,relatime,data=ordered)
-- omitted --
/dev/sda8 on /home type ext4 (rw,relatime,data=ordered)
-- omitted --
cat fstab
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda6
UUID=cf1e3f36-b9bf-47ce-b420-e9a4a9a7e9f6 / ext4 rw,relatime,data=ordered 0 1
# /dev/sda8
UUID=aa3bc63c-9bf5-4b58-ae9c-18c56f195f6e /home ext4 rw,relatime,data=ordered 0 2
# /dev/sda7
UUID=72047c9f-c6dc-4824-ac02-29699d7e9fe6 none swap defaults,pri=-2 0 0
I read that it could be that grub loads the old linux image somewhere but the problem is, I don't know where. I once deleted the only /boot in root but I realized that that is POSSIBLY a mistake so I restore a backup of the /boot folder then install the linux kernel again without mounting the boot, luckily it works but the problem is still there too. Are there any solution to this? I've been thinking of reinstalling arch but I don't really want to do that Could this problem also be solved by creating a boot partition, then reinstall the grub and linux kernel in that partition?
Thank you for the help and attention.
Possible solution
Rerun 'pacman -Syu' without mounting root to /boot
Last edited by plebeian (2018-07-23 09:50:36)
Offline
So recently I did a system wide upgrade, but unfortunately, as the title say, when I reboot, it keeps booting to a different kernel. I've searched for a few solution but to no avail, one solution mentioned that I need to downgrade, reboot, mount the boot, then upgrade again, so I did, ended up with a downgraded kernel, and luckily, everything works fine so far. So I tried to upgrade again, this time mounting the root as the /boot
What? No no no. Don't do that. That solution was for a similar symptom when the user did have a separate boot partiton but failed to have it mounted during the upgrade - then they would mount the boot partition at /boot. Never mount your root partition at /boot - in fact doing so would cause the symptoms you are having (as well as some stray files like a kernel and initrd image in the root of your filesystem).
So go back to the start. Describe the original problem. Run `pacman -Syu` normally (e.g. with no crazy remounting of anything). Then reboot.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
So go back to the start. Describe the original problem. Run `pacman -Syu` normally (e.g. with no crazy remounting of anything). Then reboot.
Ok, here's the chronological order from the start:
I do a normal pacman -Syu, then after it's done, I reboot my laptop and greeted with my display manager not loading, but alt+f2 brings the terminal interface and I can login fine. I found out that uname -a yields a different kernel version than pacman -Q linux, in result, my wifi-card doesn't work and lots of module doesn't load because of that (i think). So that starts the hunt for solution and leads to that method and leads here. And you're right, there're stray kernel images in my root folder , I'll just move it out and redo pacman -Syu again
I'll report back of the result
Edit: Here's a recent pacman -Syu result
:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [####################################################] 100%
(1/1) checking package integrity [####################################################] 100%
(1/1) loading package files [####################################################] 100%
(1/1) checking for file conflicts [####################################################] 100%
(1/1) checking available disk space [####################################################] 100%
:: Processing package changes...
(1/1) upgrading linux [####################################################] 100%
:: Running post-transaction hooks...
(1/3) Updating linux module dependencies...
(2/3) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 4.17.8-1-ARCH
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 4.17.8-1-ARCH
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: wd719x
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful
(3/3) Arming ConditionNeedsUpdate...
Last edited by plebeian (2018-07-22 03:00:04)
Offline
Alright, I did pacman -Syu again without mounting anything and the problem is still there, display manager did not load but can access the terminal interface with alt+f2. Did uname -a and pacman -Q linux, they are still different. What could be the problem?
uname result
Linux toasty 4.16.8-1-ARCH #1 SMP PREEMPT Wed May 9 11:25:02 UTC 2018 x86_64 GNU/Linux
pacman -Q result
linux 4.17.8-1
Offline
I'd take a look at /dev/sda1
Offline
Okay, I've mounted /dev/sda1 on /boot, and here are the ls -l result
total 41124
drwx------ 1 root root 8192 Jul 12 07:53 Boot
-rw------- 1 root root 407560 Jul 6 14:14 bootmgr
-rw------- 1 root root 1 Apr 12 06:34 BOOTNXT
-rw------- 1 root root 8192 Jun 25 14:12 BOOTSECT.BAK
drwx------ 1 root root 4096 May 12 21:53 grub
-rw------- 1 root root 28692472 May 12 21:51 initramfs-linux-fallback.img
-rw------- 1 root root 7750221 May 12 21:51 initramfs-linux.img
drwx------ 1 root root 0 May 13 09:04 Recovery
drwx------ 1 root root 0 May 13 05:56 'System Volume Information'
-rw------- 1 root root 5232496 May 9 19:21 vmlinuz-linux
-rw------- 1 root root 0 May 13 08:32 '$WINRE_BACKUP_PARTITION.MARKER'
I don't think the kernel is copied there, since even on the compiling process, it's explicitly say the kernel is moved to /boot
(2/3) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
-- omitted --
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
-- omitted --
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful
Any other ideas? Is it okay if I use an older kernel when the system has already upgraded? So far there's no problem, but would there be any in the future?
Last edited by plebeian (2018-07-23 09:25:11)
Offline
file /boot/vmlinuz-linux
Offline
Alright, here's a funny thing:
[plebeian@toasty ~]$ sudo file /boot/vmlinuz-linux
/boot/vmlinuz-linux: Linux kernel x86 boot executable bzImage, version 4.16.8-1-ARCH (builduser@heftig-7043) #1 SMP PREEMPT Wed May 9 11:25:02 UTC 2018, RO-rootFS, swap_dev 0x4, Normal VGA
[plebeian@toasty ~]$ uname -a
Linux toasty 4.16.8-1-ARCH #1 SMP PREEMPT Wed May 9 11:25:02 UTC 2018 x86_64 GNU/Linux
[plebeian@toasty ~]$ pacman -Q linux
linux 4.16.8-1
[plebeian@toasty ~]$
Now it boots with the correct kernel , I'm guessing it's because of what Trillby suggest, or maybe because of what Seth suggest too. Either way, I'm quite happy that it runs with the correct kernel now. Thank you for the response and help guys Editing the main post and title with possible solution.
Offline