LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware64 14.2 fails to boot after slackpkg upgrade-all (https://www.linuxquestions.org/questions/slackware-14/slackware64-14-2-fails-to-boot-after-slackpkg-upgrade-all-4175625268/)

iNC0GNi70 03-09-2018 11:51 AM

Slackware64 14.2 fails to boot after slackpkg upgrade-all
 
Hi, since some security patches I decided to do some updates, however, some things seemingly didn't work, I think lilo failed to run, and after an unwitting kernel update, the computer failed to boot (don't blame me, it was 2 am...)
So I tried to chroot from a Slackusb, but for some reason, it reports a segmentation fault upon logging in, just after giving me a fortune.
I have followed the instructions given here :
https://www.linuxquestions.org/quest...86#post5827786

Anyway I can recover my installation ? I'm pretty crippled without my Slackware now.

Also if it helps, I have restricted my root access to secure my system, so I think it may have prevented me from directly logging in as root in chroot, although I have no information other than a segmentation fault to confirm this.

Booting the computer with the huge kernel seems to bring me to a textual log screen, but none of the peripherals connected to the computer such as the computer will work, making the system unusable.

ZloySergant 03-09-2018 02:28 PM

FOA, what's written in terminal? I've got "almost" similar problem (after updating to -118). Had to remake initrd.
Second (worst), what's you're partitioning scheme?

bassmadrigal 03-09-2018 10:12 PM

How (and why) did you restrict root access? I'm not really sure why you think it would help secure your system.

Anyway, do you get the segmentation fault right after logging in as root when booting the installation media or when trying to chroot to your system partition? If it's the first one, it sounds like it may be corrupted and you may want to try and reimage your device. If it's the second, we'd need more info on how you restricted root access...

iNC0GNi70 03-10-2018 07:28 AM

Quote:

Originally Posted by ZloySergant (Post 5829136)
FOA, what's written in terminal? I've got "almost" similar problem (after updating to -118). Had to remake initrd.
Second (worst), what's you're partitioning scheme?

Aside of a segmentation fault, it returns no error. And my system is on sda4.

Quote:

Originally Posted by bassmadrigal (Post 5829230)
How (and why) did you restrict root access? I'm not really sure why you think it would help secure your system.

Anyway, do you get the segmentation fault right after logging in as root when booting the installation media or when trying to chroot to your system partition? If it's the first one, it sounds like it may be corrupted and you may want to try and reimage your device. If it's the second, we'd need more info on how you restricted root access...

Like this
Code:

echo 'ALL:ALL EXCEPT GROUP root:DENY' >>/etc/suauth
sed -i 's/^SU_WHEEL_ONLY.*/SU_WHEEL_ONLY yes/' /etc/login.defs
chown root:root /bin/su
chmod 4750 /bin/su
echo chown root:root /bin/su >>/etc/rc.d/rc.local
echo chmod 4750 /bin/su >>/etc/rc.d/rc.local

And
Code:

echo '-:ALL EXCEPT incognito:ALL' >>/etc/login.access
I did that mostly because I have some friends that used to want to hack me by any way possible so I just did that to prevent root access to be gained without me noticing it, also no one but me uses the computer and a single account is for me more secure.
And first, when I try to login as root through chroot using this command after mounting the necessary paths as explained in the topic I linked above :
Code:

chroot /mnt/Slackware env -i HOME=/root TERM=$TERM PS1='\u@\h:\w# ' PATH=/usr/bin:/usr/sbin:/bin:/sbin bash --login +h
It then gives me a fortune and a second after a segmentation fault.

bassmadrigal 03-10-2018 04:43 PM

Well, I've never tried doing this on a system that has root disabled, so it could very well be related to your issue. When you chroot, it uses everything from the folder that you're intending to act as the chroot. So, if root is disabled, once it starts using the chroot, it will hit those limitations and could very well lead to a segmentation fault.

If it is related to root being disabled, I think your only way to resolve this would be to temporarily revert your changes. You can do that while still at the prompt after booting up the installation media before the chroot.

However, towards your concern about getting hacked, by default, ssh doesn't allow root logins via password. You can only log in as root using a pre-generated ssh key (although, you can change it to not allow root ssh logins at all or enable password logins, if desired). So, they wouldn't be able to get in that way. Also, you could also change the default ssh port from 22 to some random number, which would make it more difficult to allow others to even figure out the port needed to log in. And I don't think there's any situation where a single user is more secure than a normal user and a separate user with elevated permissions that is only used when necessary.

iNC0GNi70 03-11-2018 12:02 AM

Would there be no way to login in with my username with chroot and su once in ?
Cause root ain't disabled, I can still use it if I su through my account.

bassmadrigal 03-11-2018 12:07 AM

Quote:

Originally Posted by iNC0GNi70 (Post 5829560)
Would there be no way to login in with my username with chroot and su once in ?
Cause root ain't disabled, I can still use it if I su through my account.

The installer isn't set up to allow anything other than root to log in. However, you might be able to use the --userspec=USER:GROUP option for chroot to specify a certain user, but I've never attempted it. It might be worth a shot.

linuxbawks 03-13-2018 06:49 PM

Why do you want to login as your user?

Login as root and fix your bootloader.

bassmadrigal 03-13-2018 07:09 PM

Quote:

Originally Posted by linuxbawks (Post 5830725)
Why do you want to login as your user?

Login as root and fix your bootloader.

If you would've read the posts, you would've realized that he has root logins disabled for his system. So, when he boots the installer and logs in as root (into the installer environment), it works ok, but when he chroots, and the system takes over, he gets a segmentation fault.

linuxbawks 03-13-2018 07:19 PM

root login disabled is a pragmatic measure. The only way to login is via installer.
Best run a fs check on root partition first using the installer env:

fsck -pf /dev/sda4

bassmadrigal 03-13-2018 07:32 PM

Quote:

Originally Posted by linuxbawks (Post 5830736)
root login disabled is a pragmatic measure. The only way to login is via installer.

And this was discussed above. I can't force OP to enable root logins for their system, so I provided a possible way around it, however, we haven't heard back if it worked or not. I wouldn't jump to harddrive/hardware issues just yet, since this was initially caused by just not upgrading the kernel properly.

linuxbawks 03-13-2018 07:40 PM

Why are you advising to change fs data by altering permission etc then when you dont have a diagnosis?

It's a good idea to run a fsck regardless.

Richard Cranium 03-13-2018 07:58 PM

Quote:

Originally Posted by linuxbawks (Post 5830744)
Why are you advising to change fs data by altering permission etc then when you dont have a diagnosis?

He didn't.

bassmadrigal 03-13-2018 09:22 PM

Quote:

Originally Posted by linuxbawks (Post 5830744)
Why are you advising to change fs data by altering permission etc then when you dont have a diagnosis?

Yeah, I'm not sure where you pulled that out of... all I suggested was to try and pass a certain user and group to the chroot to see if that can work around his root login restriction. Further up, I recommended OP to (temporarily) revert their changes, however, it seems they'd rather not resort to that.

Quote:

Originally Posted by linuxbawks (Post 5830744)
It's a good idea to run a fsck regardless.

Just like it's a good idea to clean the heatsink and vacuum out the dustbunnies from your case... but the likelihood of these solving OPs problem are pretty low.

linuxbawks 03-14-2018 10:08 AM

Quote:

Originally Posted by iNC0GNi70 (Post 5829067)
Hi, since some security patches I decided to do some updates, however, some things seemingly didn't work, I think lilo failed to run, and after an unwitting kernel update, the computer failed to boot (don't blame me, it was 2 am...)
So I tried to chroot from a Slackusb, but for some reason, it reports a segmentation fault upon logging in, just after giving me a fortune.
I have followed the instructions given here :
https://www.linuxquestions.org/quest...86#post5827786

Anyway I can recover my installation ? I'm pretty crippled without my Slackware now.

Also if it helps, I have restricted my root access to secure my system, so I think it may have prevented me from directly logging in as root in chroot, although I have no information other than a segmentation fault to confirm this.

Booting the computer with the huge kernel seems to bring me to a textual log screen, but none of the peripherals connected to the computer such as the computer will work, making the system unusable.

Did you by any chance reboot your system before the update process threw you back to a prompt?


All times are GMT -5. The time now is 12:36 AM.