LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Stuck on a problem for months because i forget the password (https://www.linuxquestions.org/questions/slackware-installation-40/stuck-on-a-problem-for-months-because-i-forget-the-password-4175729638/)

Blitzkiller 10-06-2023 10:04 PM

Stuck on a problem for months because i forget the password
 
Good day

I was trying to install Slackware but I have a problem, when I was set up the user root and the visual interfaz I forget the password therefore I try to fix in other ways that I dont remeber good, the problem is this, I turn on the computer and the first screen is this:

GNU GRUB Version 2.06
grub>

I figured that I can boot into the system if I run this comands:

insmod all_video
set root=(hd0,gpt3);
linux /boot/vmlinuz root=/dev/sda1 nomodeset
initrd /boot/initrd.gz;
boot

After that, the screen show me this:

modprobe: ERROR: could not insert ´ext4: Exec format error
mount: mounting /dev/sda1 on /mnt failed: Invalid argument.
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
You can try to fix it. Type ´exit´ when things are done.

/bin/sh: cant acces tty: job control turned off
/#

Thing that I know:

This envioremen the system is not monted in rewrite
The problem is not in init command
The problem is at the grub boatloader

I try to restore the factory settings but was useless, do you have any idea what can I do?

Thank you beforehand

hazel 10-07-2023 12:35 AM

You do have a grub problem but you solved it temporarily with the instructions you gave. The error messages which you then got came from the kernel, not from grub. But for some reason, the kernel couldn't load the ext4 filesystem driver module from the initrd and therefore couldn't mount the root partition.

Restoring factory settings was a waste of time; it only affects the firmware, not the bootloader on disk. In this kind of situation the usual procedure is to boot from a rescue image on a CD or memory stick and repair the system from there. You could, for example, have set a new root password that way. But as this is a completely new system, perhaps reinstalling would be easier than trying to fix it. Especially as you/we have no idea what you have done to the system "in ways you can't remember".

Writing down the root password and storing it in a safe place is also useful. Don't beat yourself up, we've all been there.

fatmac 10-07-2023 04:12 AM

As suggested above, re install, & write down your passwords.... :)

Petri Kaukasoina 10-07-2023 04:31 AM

Quote:

Originally Posted by Blitzkiller (Post 6457424)
insmod all_video
set root=(hd0,gpt3);
linux /boot/vmlinuz root=/dev/sda1 nomodeset
initrd /boot/initrd.gz;
boot

modprobe: ERROR: could not insert ´ext4: Exec format error

That error means initrd tries to load module ext4 but the module in initrd is not compiled for the kernel version you boot. You could try to load the huge kernel which has ext4 built in. Change the linux command to
Code:

linux /boot/vmlinuz-huge root=/dev/sda3 nomodeset ro
and don't use the initrd command at all.

Edit: changed root= kernel parameter. Without initrd you need to point kernel to the correct root partition.

hazel 10-07-2023 05:41 AM

Thanks, Petri! You've explained the one bit of the kernel message that I couldn't understand.

zeebra 10-07-2023 05:59 PM

How is it with runlevel 1 in Slackware actually? In some other distroes, runlevel 1 allows you to get a root "maintenance" console without having to log in with a password, so you can change the password there. Is this also the case in Slackware?

Petri Kaukasoina 10-08-2023 02:30 AM

Quote:

Originally Posted by zeebra (Post 6457559)
How is it with runlevel 1 in Slackware actually? In some other distroes, runlevel 1 allows you to get a root "maintenance" console without having to log in with a password, so you can change the password there. Is this also the case in Slackware?

No, you need to log in even in run level 1.

Instead, you could append 'init=/bin/sh' to the kernel command line to get a root command line without login. At least on systems booting without initrd.

(The OP got a similar command line of the initrd system. That does not help without access to the ext4 root disk.)


All times are GMT -5. The time now is 02:47 AM.