LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-26-2024, 10:30 AM   #1
zinge
LQ Newbie
 
Registered: Apr 2024
Posts: 1

Rep: Reputation: 0
slackware 15 unbootable after slackpkg upgrade


I did a full upgrade after booting the new kernel, startx didn't work. The log showed no display device so I reinstalled the Nvidia drivers and it still didn't work. I made sure that nouveau was blacklisted and I recreated the grub.cfg. It is worth pointing out that I didn't update some config files when slackpkg asked me to but no files that have anything to do with x11 I think. xorg.conf is empty though so I tried the Nvidia xconfig utility and I got an exe error. The binaries literally wont run. I then tried reinstalling the Nvidia driver yet again and I recreated the grub.cfg. I now have an unbootable system which instantly throws me into the grub emergency shell without even letting me select the kernel or anything. Could the issue be that I did not make an initramfs (I forgot)? but wouldn't the system have been unbootable since the kernel upgrade and not after I installed the driver the 2nd time? I have no clue what the issue could be and no clue how to solve it. I would appreciate some help.
 
Old 04-26-2024, 11:49 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,359

Rep: Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335
Hello zinge & welcome to LQ.

I gather you have enough experience to get yourself into trouble, but not enough to get out. You haven't followed a basic commonsense principle
Quote:
When you're in a hole, the first thing to do is to stop digging!
If you want help, post some basic information How_To_Ask_a_Question

Next, answer some questions:
  • You had Slackware-15.0 which is a stable release. What did you update to?
  • What pc did you use to post this question?
  • What stops you simply reinstalling slackware-15.0?
  • What kernel(s) have you got now in /boot?
  • Have you manually installed them in your EFI setup?
 
Old 04-26-2024, 02:11 PM   #3
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,816

Rep: Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493
Boot from the install USB stick (slackware64-15.0-install-dvd.iso). Press enter, select keyboard, and press enter to get a shell prompt. Give command 'lsblk' and try to recognize the root partition. Say it's /dev/nvme0n1p3:
Code:
mount /dev/nvme0n1p3 /mnt
mkbindmounts
chroot /mnt
Now you are in your system and can build the initrd and configure the boot loader. After that:
Code:
exit
umount -R /mnt
poweroff
You are a grub user. If you had used elilo instead, it would have also been necessary to mount the EFI partition, for example 'mount /dev/nvme0n1p1 /mnt/boot/efi' just before chroot. Maybe also 'mount -t efivarfs none /mnt/sys/firmware/efi/efivars'
 
5 members found this post helpful.
Old 04-26-2024, 03:55 PM   #4
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,646

Rep: Reputation: 147Reputation: 147
Quote:
Originally Posted by Petri Kaukasoina View Post
mkbindmounts
I didn't know about that mkbindmounts command, thanks for that info. I'm sure this will come in handy some time.
 
1 members found this post helpful.
Old 04-26-2024, 05:34 PM   #5
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 769

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Originally Posted by zinge View Post
I did a full upgrade after booting the new kernel, startx didn't work. The log showed no display device so I reinstalled the Nvidia drivers and it still didn't work. I made sure that nouveau was blacklisted and I recreated the grub.cfg. It is worth pointing out that I didn't update some config files when slackpkg asked me to but no files that have anything to do with x11 I think. xorg.conf is empty though so I tried the Nvidia xconfig utility and I got an exe error. The binaries literally wont run. I then tried reinstalling the Nvidia driver yet again and I recreated the grub.cfg. I now have an unbootable system which instantly throws me into the grub emergency shell without even letting me select the kernel or anything. Could the issue be that I did not make an initramfs (I forgot)? but wouldn't the system have been unbootable since the kernel upgrade and not after I installed the driver the 2nd time? I have no clue what the issue could be and no clue how to solve it. I would appreciate some help.
It sounds like you:

1. Did an upgrade, but forgot to rebuild nvidia kernel modules, which gave you a booting OS, but no working X environment.
2. Broke your grub.cfg in attempt to repair the nvidia problem, giving you a non-booting OS.

That sound about right?

You will have to boot a rescue environment and chroot into the broken installation, the slackware installer usb that Petri mentioned is a good choice.

Find the kernel version you are planning on booting, and make sure you have the matching kernel-source package installed. You need the source to build the nvidia kernel modules. Once thats confirmed, build the nvidia kernel drivers and whatnot from your nvidia build method. There's a few methods out there so I dont know what you are doing. Personally I use the .run script that nvidia provides put it into a slackware package format, but you can also just run the script directly on the root filesystem.

I also dont bother putting nvidia kernel modules in my initrd. As long as the root disk is found and mounted properly, they'll be usable by the time I'm starting X, and I get a working text console at early boot still so I never saw the need for it in the initrd.

In any case, once you have the drivers properly installed, and you've sorted out your initrd (if you need it), then you'll have to generate the grub.cfg again, e.g:
Code:
grub-mkconfig -o /boot/grub/grub.cfg
The output of that command should mention the kernel and initrd are detected and used.

Please note that you don't really have to fix the nvidia problem to get grub booting into slackware again, so your first goal should just be to chroot into the broken OS, fix grub, and get Slackware booting to a command line at least. From there you can fix the nvidia problem like I mentioned. Unless there's a need to get nvidia kernel modules into the initrd then you might as well not overcomplicate it by doing it all via the chroot.

Good luck!

Quote:
Originally Posted by titopoquito View Post
I didn't know about that mkbindmounts command, thanks for that info. I'm sure this will come in handy some time.
The 'mkbindmounts' command only comes in the slackware installer's initrd afaik, hence needing to use the 'slackware64-15.0-install-dvd.iso' usb stick for the rescue. It was added in 2019, so its in slackware versions 15.0 or later. Just thought that info might be useful to people looking for this command.
 
4 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I stopped a slackpkg upgrade-all in midstream and now I cannot slackpkg upgrade-all jkh2cpu Slackware 5 02-13-2022 03:05 AM
slackpkg upgrade-all on an i486 leads to an unbootable system RuebeSoft Slackware - Installation 11 05-30-2021 04:45 AM
Weird slackpkg upgrade message during a slackpkg upgrade-all process. frtorres Slackware 8 02-13-2021 11:36 AM
[SOLVED] Slackpkg upgrade-all returns 'no packages to upgrade' after slackpkg-update has downloaded files san2ban Slackware 8 11-01-2019 05:44 AM
Sid unbootable after kernel upgrade st1cky_rice Debian 7 12-18-2005 07:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration