You are not logged in.

#1 2018-07-17 13:53:15

quirico
Member
Registered: 2018-07-17
Posts: 12

[SOLVED] Error: you need to load the kernel first

https://s22.postimg.cc/6bber66pr/IMG_20 … 112812.jpg
This omnious screen showed up after I performed a major Windows 10 upgrade(I dual boot Windows and Arch Linux on the same drive), but I'm not sure if it was the cause. Unfortunately the system is in Italian, so I'm not sure what the error text is like in English, but it should be something like

Loading Linux linux
Error: premature end of file /vmlinuz-linux.
Loading initial ramdisk
Error: you need to load the kernel first
Press a key to continue

I can access GRUB and boot into Windows just fine, however trying to boot with the fallback kernel still gets me to the same error screen. I don't know how to fix it, can I even recover this system?

-- Mod note: Converted oversized image to URL, please follow the CoC on image sizes -- V1del

Last edited by quirico (2018-07-20 20:18:14)

Offline

#2 2018-07-17 14:07:27

seth
Member
Registered: 2012-09-03
Posts: 61,640

Re: [SOLVED] Error: you need to load the kernel first

Boot a live system (the install iso will do) and inspect the boot partition. You're probably short on space and windows created some BOFH style…
Chroot into the installed system, ensure to mount the boot partition and re-install linux, see https://wiki.archlinux.org/index.php/Pa … _rebooting

Of course, you may have to free some space on the boot partition first.

Offline

#3 2018-07-17 14:14:36

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,119

Re: [SOLVED] Error: you need to load the kernel first

Please only paste thumbnails or links to huge screenshots like that: https://wiki.archlinux.org/index.php/Co … s_and_code

Offline

#4 2018-07-17 14:43:13

quirico
Member
Registered: 2018-07-17
Posts: 12

Re: [SOLVED] Error: you need to load the kernel first

seth wrote:

Boot a live system (the install iso will do) and inspect the boot partition. You're probably short on space and windows created some BOFH style…
Chroot into the installed system, ensure to mount the boot partition and re-install linux, see https://wiki.archlinux.org/index.php/Pa … _rebooting

Of course, you may have to free some space on the boot partition first.

How do I safely free up space in /boot?

Offline

#5 2018-07-17 15:05:29

seth
Member
Registered: 2012-09-03
Posts: 61,640

Re: [SOLVED] Error: you need to load the kernel first

Depends on whether there're disposable files. Backups or i18n related files are good candidates.
However, first ensure that it's really a space issue and also be prepared that windows might keep dumping stuff there. If this ends up being a permanent issue, you'll have to grow the partition (what's gonna be PITA because of it's position) or move the linux boot to another partition.

Is this an EFI or a BIOS boot?

Offline

#6 2018-07-17 19:58:15

quirico
Member
Registered: 2018-07-17
Posts: 12

Re: [SOLVED] Error: you need to load the kernel first

seth wrote:

Depends on whether there're disposable files. Backups or i18n related files are good candidates.
However, first ensure that it's really a space issue and also be prepared that windows might keep dumping stuff there. If this ends up being a permanent issue, you'll have to grow the partition (what's gonna be PITA because of it's position) or move the linux boot to another partition.

Is this an EFI or a BIOS boot?

It is an EFI boot. I'll get to work tomorrow.

Offline

#7 2018-07-19 10:00:49

quirico
Member
Registered: 2018-07-17
Posts: 12

Re: [SOLVED] Error: you need to load the kernel first

OK I'm in the installation CD right now, how do I check the remaining free space? The output of df -h doesn't show me the partitions in my hard drive.

Offline

#8 2018-07-19 10:50:20

radiomike
Member
Registered: 2013-12-19
Posts: 73

Re: [SOLVED] Error: you need to load the kernel first

Have you mounted the boot partition?

Offline

#9 2018-07-19 13:46:09

quirico
Member
Registered: 2018-07-17
Posts: 12

Re: [SOLVED] Error: you need to load the kernel first

radiomike wrote:

Have you mounted the boot partition?

I did, still not showing up. But root partition shows up just fine.
EDIT: running df -h -a shows https://s22.postimg.cc/n4dk6hlb5/IMG_20 … 155010.jpg which I have no idea of what to make out of.

Last edited by quirico (2018-07-19 13:53:40)

Offline

#10 2018-07-19 14:13:58

seth
Member
Registered: 2012-09-03
Posts: 61,640

Re: [SOLVED] Error: you need to load the kernel first

You mounted sda1 and sda4 both into /mnt …

Please do not paste pictures of text - paste the text.

Offline

#11 2018-07-19 14:52:46

quirico
Member
Registered: 2018-07-17
Posts: 12

Re: [SOLVED] Error: you need to load the kernel first

seth wrote:

Boot a live system (the install iso will do) and inspect the boot partition. You're probably short on space and windows created some BOFH style…
Chroot into the installed system, ensure to mount the boot partition and re-install linux, see https://wiki.archlinux.org/index.php/Pa … _rebooting

Of course, you may have to free some space on the boot partition first.

I'm back to square one. First off, I actually managed to ensure it is not a space issue, somehow I got df to show the right output. Then I followed the instructions in the wiki word for word, and managed to perform a full update with pacman, with a seemingly successful rebuild of the Linux kernel. However upon reboot nothing seemed to chance. While pacman was doing its thing I glanced at a message saying "/boot is not mounted", maybe I messed up something in the process. I'd really appreciate a step to step guide right now...

Offline

#12 2018-07-19 14:58:05

quirico
Member
Registered: 2018-07-17
Posts: 12

Re: [SOLVED] Error: you need to load the kernel first

seth wrote:

You mounted sda1 and sda4 both into /mnt …

Please do not paste pictures of text - paste the text.

I am afraid something went over my head... am I not supposed to do it that way?... Sorry if it is incredibly stupid but it is probably the frustration and confusion getting the best of me, I suck at staying concentrated when troubleshooting big_smile

Offline

#13 2018-07-19 15:10:38

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,355

Re: [SOLVED] Error: you need to load the kernel first

quirico wrote:
seth wrote:

You mounted sda1 and sda4 both into /mnt …

Please do not paste pictures of text - paste the text.

I am afraid something went over my head... am I not supposed to do it that way?... Sorry if it is incredibly stupid but it is probably the frustration and confusion getting the best of me, I suck at staying concentrated when troubleshooting big_smile

You want to mount the root partition on /mnt.  Then, inside of that partition (/mnt) there is to be a directory called /boot.  Initially, you create that.  You use that directory /mnt/boot to mount your boot partition.
Then you perform the installation.  Then you unmount /mnt/boot, then /mnt.  You set your bootloader to tell the kernel to use the root partition.  You should have (during the installation) built your /etc/fstab file to mount the boot partition on /boot.  If you have not done that already, do it now.

Last edited by ewaller (2018-07-19 15:12:28)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#14 2018-07-19 15:25:28

quirico
Member
Registered: 2018-07-17
Posts: 12

Re: [SOLVED] Error: you need to load the kernel first

ewaller wrote:

You set your bootloader to tell the kernel to use the root partition.  You should have (during the installation) built your /etc/fstab file to mount the boot partition on /boot.  If you have not done that already, do it now.

This is something that is all done during installation and doesn't need to be redone now, right? If so, I have already done that obviously, as I had a fully working Arch install for over a year prior to this happening.

Offline

#15 2018-07-19 15:35:49

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,355

Re: [SOLVED] Error: you need to load the kernel first

Is your system booted now?  What is the output of the mount command?  Post the full text; not a photo.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#16 2018-07-20 18:47:03

quirico
Member
Registered: 2018-07-17
Posts: 12

Re: [SOLVED] Error: you need to load the kernel first

ewaller wrote:

Is your system booted now?  What is the output of the mount command?  Post the full text; not a photo.

# mount
/dev/sda4 on /mnt type ext4 (rw,realtime)
/dev/sda1 on /mnt/boot type vfat (rw,realtime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)

This means I'm good to go, right?

Offline

#17 2018-07-20 19:09:28

loqs
Member
Registered: 2014-03-06
Posts: 18,354

Re: [SOLVED] Error: you need to load the kernel first

Now you can post `df -h /mnt/boot`

Offline

#18 2018-07-20 19:40:16

quirico
Member
Registered: 2018-07-17
Posts: 12

Re: [SOLVED] Error: you need to load the kernel first

loqs wrote:

Now you can post `df -h /mnt/boot`

Size 256M, Used 80M, Use% 32%. Most likely not a full partition issue. While I am at it might as well post some pacman errors that I got while trying to reinstall mkinitcpio, linux and systemd yesterday, with the boot partition not mounted properly

[ALMP] upgraded linux (4.17.3-1 -> 4.17.6-1)
[ALPM-SCRIPTLET] WARNING: /boot appears to be a separate partition but is not mounted.
[ALPM] running 'systemd-binfmt.hook'...
[ALPM-SCRIPTLET] Skipped: Current root is not booted.
[ALPM] running 'systemd-daemon-reload.hook'...
[ALPM-SCRIPTLET] Skipped: Current root is not booted.
[ALPM] running 'systemd-sysctl.hook'...
[ALPM-SCRIPTLET] Skipped: Current root is not booted.
[ALPM] running 'systemd-udev-reload.hook'...
[ALPM-SCRIPTLET] Skipped: Device manager is not running.

I understand the linux error but not the systemd errors, what do they mean?

Offline

#19 2018-07-20 19:44:03

seth
Member
Registered: 2012-09-03
Posts: 61,640

Re: [SOLVED] Error: you need to load the kernel first

That you're running  "pacman --sysroot" - the critical one is about the unmounted boot partition, so re-install the kernel again (w/ the now mounted /boot partition)

Offline

#20 2018-07-20 19:45:16

quirico
Member
Registered: 2018-07-17
Posts: 12

Re: [SOLVED] Error: you need to load the kernel first

seth wrote:

That you're running  "pacman --sysroot" - the critical one is about the unmounted boot partition, so re-install the kernel again (w/ the now mounted /boot partition)

So if I understand correctly, the systemd errors are inconsequential, right?

Offline

#21 2018-07-20 19:48:34

seth
Member
Registered: 2012-09-03
Posts: 61,640

Re: [SOLVED] Error: you need to load the kernel first

Those are no "errors", not even "warnings" - you're merely informed that certain steps are not executed because it would be ill-advised in this context.

Offline

#22 2018-07-20 20:17:42

quirico
Member
Registered: 2018-07-17
Posts: 12

Re: [SOLVED] Error: you need to load the kernel first

Fixed it, finally. To summarize the steps I followed
>booted into LiveCD
>mounted the root and boot partitions, properly.
>reinstalled mkinitcpio, linux and systemd
>rebooted
Now the system is running fine again, as if nothing happened big_smile . In hindsight it was pretty easy but that's noob mistakes for you... big_smile

Offline

Board footer

Powered by FluxBB