Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Linux-zen kernel panic init error (Read 6012 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

Re: Linux-zen kernel panic init error

Reply #15
OMG! I think that fixed it! Thank you Chris! I re-installed "Linux" and now the "Linux" kernel works! woohoo!
Now please, explain to me what this is all about, I don't understand how this works, how does this affect that?
How does /usr/lib64 affect the kernel? O.o

And my linux-zen still works - it was the "Linux" kernel that stopped working because of an update.
Alright, what happened is that the symlink betwen /usr/lib64 that points to /usr/lib got deleted. There are only 2 possible ways that this could have happened. One is by running pacman with --force, which you have stated that you have done. The other is by building and installing software as root instead of as a normal user. Based on the fact you used --force, I am going to say that is most likely the problem. We can confirm that is was force that caused it, untar the package dolphin-emu-fresh that you installed, inside of that package do you see the file usr/lib64/libdiscord-rpc.a inside your package?
Chris Cromer

Re: Linux-zen kernel panic init error

Reply #16
Yeah, libdiscord-rpc.a exists in that package, and yep I used --force, had to or the package wouldn't install.

How do I make it so that this PKGBUILD won't break my installation in the future? This is a very peculiar problem in my view, I don't quite understand how that does this.

Re: Linux-zen kernel panic init error

Reply #17
I uninstalled & re-installed the dolphin-emu package just to see if it would try to make me use --force again or not, this time it did not make me use --force... I did ls /usr/lib64 and the only file I see is that libdiscord-rpc.a file, does that mean I have to re-create a symlink again or..?

Re: Linux-zen kernel panic init error

Reply #18
Yeah, libdiscord-rpc.a exists in that package, and yep I used --force, had to or the package wouldn't install.

How do I make it so that this PKGBUILD won't break my installation in the future? This is a very peculiar problem in my view, I don't quite understand how that does this.
I am going to give you a very important piece of advice, please take it to heart. Never use --force unless an Artix or Arch dev tells you to. pacman wouldn't install the package and gave you that error because it is unsafe and will break something, and basically what you did by adding --force is tell pacman "I don't care that the package will break my system, do it anyway."

When these types of issues happen, the problem is the package and the package needs to be fixed. In this case you can fix it by adding this to your package:
Code: [Select]
mkdir -p ${pkgdir}/usr/lib
cp -R ${pkgdir}/usr/lib64/* ${pkgdir}/usr/lib
rm -rf ${pkgdir}/usr/lib64

The problem with your package is that it creates a folder called "/usr/lib64", in artix linux "/usr/lib64" is a symlink, not a folder. When you did --force, you overwrote the symlink with the folder, so now the symlink no longer existed. All libraries should be in "/usr/lib" always.

Now to explain why it didn't break the moment you did --force. When you did --force the symlink was deleted. The system didn't break at this moment though, it would break later when you upgraded or installed a kernel. The reason why is that when the initramfs is created it and the kernel look for files in "/usr/lib64" and copies those files into the initramfs. However since the symlink was deleted, "/usr/lib64" was missing all the files needed by the initramfs were not copied into the initramfs(such as firmware, kernel modules, and libraries). So when the new kernel got updated/installed, the system broke. This is also why my fix didn't actually fix the problem right away. Even though we recreated the symlink, the initramfs didn't have the kernel modules, firmware, and libraries from "/usr/lib64" so naturally it would still not boot. The moment you rebuilt the initramfs it would then add the files from "/usr/lib64" to the initramfs and then it would start working again. Typically when you install/update a kernel, or install/update modules for a kernel initramfs is rebuilt automatically by Artix, however you could have also just ran:
Code: [Select]
mkinitcpio -p linux
This would rebuild the initramfs for the linux kernel. I assume to rebuild the initramfs for the zen kernel it would be this:
Code: [Select]
mkinitcpio -p linux-zen
, but I am guessing since I don't use nor have ever used the zen kernel.

Hopefully this info will help you out, and please remember that --force is bad and should never be used unless you have a really good reason to do it(a developer telling you to use it).
Chris Cromer

Re: Linux-zen kernel panic init error

Reply #19
I uninstalled & re-installed the dolphin-emu package just to see if it would try to make me use --force again or not, this time it did not make me use --force... I did ls /usr/lib64 and the only file I see is that libdiscord-rpc.a file, does that mean I have to re-create a symlink again or..?
Yes, the fact that your /usr/lib64 only has 1 file is really really bad, it should have hundreds if not thousands of files and folders inside of it. You need to redo my fix again to get the symlink back.
Chris Cromer

Re: Linux-zen kernel panic init error

Reply #20
Please run this and tell me the output:
Code: [Select]
pacman -S filesystem

I noticed a typo in my code above needed to fix your package, it is fixed now.
Chris Cromer

Re: Linux-zen kernel panic init error

Reply #21
Code: [Select]
(1/1) checking available disk space                                                               [##########################################################] 100%
:: Processing package changes...
(1/1) reinstalling filesystem                                                                     [##########################################################] 100%
error: extract: not overwriting dir with file /usr/lib64
error: problem occurred while upgrading filesystem
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
Errors occurred, no packages were upgraded.

hmmm.... is now a time to use force? I don't want to make things worse so I'll wait for your answer.


edit: and why is it that dolphin-emu is breaking my system like this? That's odd isn't it? I guess it was only just recent that it started doing that... hmm...
Thank you for that thorough explanation, I understand what you are saying perfectly about the /usr/lib stuff.

Re: Linux-zen kernel panic init error

Reply #22
Code: [Select]
(1/1) checking available disk space                                                               [##########################################################] 100%
:: Processing package changes...
(1/1) reinstalling filesystem                                                                     [##########################################################] 100%
error: extract: not overwriting dir with file /usr/lib64
error: problem occurred while upgrading filesystem
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
Errors occurred, no packages were upgraded.

Great, this is what I thought was going to happen. Don't use --force. There are 2 ways to handle this, if you ran my fix from my previous post, do this:
Code: [Select]
rm -f /usr/lib64
pacman -S filesystem
This will erase the temporary symlink we created and then install the symlink from the filesystem package.

Or if you have not run my fix from the previous post do this:
Code: [Select]
cp -R /usr/lib64/* /usr/lib
rm -rf /usr/lib64
pacman -S filesystem
This will move the libraries that are in lib64 into lib. Then it will delete lib64. Finally it will install the symlink for lib64 that is in the filesystem package.
Chris Cromer

Re: Linux-zen kernel panic init error

Reply #23
Quote
edit: and why is it that dolphin-emu is breaking my system like this?
Because your package has a /usr/lib64 folder, packages must never have a /lib  /lib64 or /usr/lib64 folder in them, ever. Just rename the lib64 folder to lib in your package and your package will be fixed.
Chris Cromer

 

Re: Linux-zen kernel panic init error

Reply #24
where should this go in the PKGBUILD?

Code: [Select]
mkdir -p ${pkgdir}/usr/lib
cp -R ${pkgdir}/usr/lib64/* ${pkgdir}/usr/lib
rm -rf ${pkgdir}/usr/lib64

before or after make DESTDIR="${pkgdir}" install ?

Re: Linux-zen kernel panic init error

Reply #25
where should this go in the PKGBUILD?

Code: [Select]
mkdir -p ${pkgdir}/usr/lib
cp -R ${pkgdir}/usr/lib64/* ${pkgdir}/usr/lib
rm -rf ${pkgdir}/usr/lib64

before or after make DESTDIR="${pkgdir}" install ?
After
Chris Cromer

Re: Linux-zen kernel panic init error

Reply #26
Ah ok, I thought so. my /usr/lib64 is loaded with symlinks and apparently a couple of folders  - wine xorg vdpau upower and some others, you said it shouldn't have folders though right? or have I got that backwards? I'll go read over everything again to get a better understanding of it all. thank you so much for all of this, I appreciate the thorough explanations.

Re: Linux-zen kernel panic init error

Reply #27
Ah ok, I thought so. my /usr/lib64 is loaded with symlinks and apparently a couple of folders  - wine xorg vdpau upower and some others, you said it shouldn't have folders though right? or have I got that backwards? I'll go read over everything again to get a better understanding of it all. thank you so much for all of this, I appreciate the thorough explanations.
I said that it should have both folders and files. And no problem, we all have to learn these things at some point. And trust me, I have screwed up systems way worse than this. Just part of the learning experience.
Chris Cromer