LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Upgraded to current using slackpkg. root is no longer recognized as valid login and the OS won't load on startup (https://www.linuxquestions.org/questions/slackware-installation-40/upgraded-to-current-using-slackpkg-root-is-no-longer-recognized-as-valid-login-and-the-os-wont-load-on-startup-4175675662/)

burning 05-21-2020 11:06 AM

Upgraded to current using slackpkg. root is no longer recognized as valid login and the OS won't load on startup
 
I'm using a Thinkpad T60. It's only got a 32-bit processor.
I ran slackpkg upgrade and decided to keep the config files rather than overwrite them.
It then asked me for my login, upon entering root, it never even asks me for my password. It just repeatedly asks me for my login.
I tried restarting the computer but after I select Slackware, it doesn't load. It just says loading linux.... and stops producing text after the 11th or 12th dot.

Am I going to have to reinstall?
What did I do wrong? Just so I know what not to do in future.

ehartman 05-21-2020 11:52 AM

Quote:

Originally Posted by burning (Post 6125736)
It then asked me for my login, upon entering root, it never even asks me for my password. It just repeatedly asks me for my login.

Slackware 14.2 or -current?
If you updated the wrong set of packages: -current is now complete on PAM, so you would have needed to add all new packages like cracklib, libpwquality and of course pam itself too.

Alien Bob 05-21-2020 12:57 PM

Quote:

Originally Posted by burning (Post 6125736)
What did I do wrong? Just so I know what not to do in future.

Doing an upgrade without adopting the changes in the config files, is a sure road to doom.
Also like was said in the previous post, when you work with slackware-current, it is not sufficient to only upgrade your set of installed packages. Every release of Slackware you will see that multiple packages have been added, and they are most often new requirements for the core packages in the distro.

You can fix this situation by booting from your slackware-current bootable install medium, then mount the various partitions under /mnt (which is what the setup program would otherwise have done for you) and then proceed in the hope that "chroot /mnt" will actually dump you in your fresh Slackware installation on the hard drive without having to go through the actual login process.
You would have to un-comment a mirror for Slackware-current in "/etc/slackpkg/mirrors" and then run "slackpkg update".
Then a "slackpkg new-config" would allow you to fix the missed configuration file changes. And a "slackpkg install-new" would install all those new packages in -current if you had overlooked them.
Then reboot and see what happens.

burning 05-21-2020 04:55 PM

Quote:

Originally Posted by ehartman (Post 6125757)
Slackware 14.2 or -current?
If you updated the wrong set of packages: -current is now complete on PAM, so you would have needed to add all new packages like cracklib, libpwquality and of course pam itself too.

It was Slackware 14.2 but I upgraded packages from a Slackware current mirror, assuming it would upgrade me from 14.2 to Current. Obviously I should've done a bit more research into it beforehand.

kermitdafrog8 05-21-2020 08:50 PM

Upgraded to current using slackpkg. root is no longer recognized as valid login and the OS won't load on startup
 
So with the latest updates with adding PAM is it required to use new configs?

Alien Bob 05-22-2020 04:16 AM

Quote:

Originally Posted by kermitdafrog8 (Post 6125917)
So with the latest updates with adding PAM is it required to use new configs?

You must never ignore updates to the Slackware configuration files. if you use slackpkg then after each upgrade it will ask you what to do with all the files in /etc/ directory that have a .new extension. You are cautioned to inspect very closely what these changes are.

And unless this affects changes you yourself made to a file, you are advised to adopt the changes suggested by Slackware.

A few examples of the files where I make changes myself that I do not want to see overwritten accidentally, are: /etc/inittab , /etc/ssh/sshd_config , /etc/password* , /etc/group* , /etc/auto.master , /etc/rc.d/rc.local , /etc/rc.d/rc.modules.local , all the files in /etc/mail/ , and there are certainly more.

This is one of the burdens/risks of running Slackware-current. You need to know what you are doing and if by chance you do manage to brick your system, you need to understand why that happened and know how to fix it. If that's not your game, then I strongly advise you to go back to a stable release.

burning 05-22-2020 11:05 AM

Quote:

Originally Posted by Alien Bob (Post 6125779)
Doing an upgrade without adopting the changes in the config files, is a sure road to doom.
Also like was said in the previous post, when you work with slackware-current, it is not sufficient to only upgrade your set of installed packages. Every release of Slackware you will see that multiple packages have been added, and they are most often new requirements for the core packages in the distro.

You can fix this situation by booting from your slackware-current bootable install medium, then mount the various partitions under /mnt (which is what the setup program would otherwise have done for you) and then proceed in the hope that "chroot /mnt" will actually dump you in your fresh Slackware installation on the hard drive without having to go through the actual login process.
You would have to un-comment a mirror for Slackware-current in "/etc/slackpkg/mirrors" and then run "slackpkg update".
Then a "slackpkg new-config" would allow you to fix the missed configuration file changes. And a "slackpkg install-new" would install all those new packages in -current if you had overlooked them.
Then reboot and see what happens.

Thanks. I've made a new bootable install medium and managed to boot it successfully. I checked my partition table using fdisk and cfdisk. It says that my bootable linux partition is /dev/sda1, my linux swap partition /dev/sda2 and my extended partition /dev/sda3. It then lists |-/dev/sda5 and |-/dev/sda6 as linux partitions. iirc those would be the logical partitions within sda3? In which case, as my memory eludes me, any idea what might've happened to /dev/sda4? as that didn't appear listed in the partition table.
Upon using fdisk to try and list the logical partitions [fdisk -l /dev/sda3] within sda3, the extended partition, it displayed:

Quote:

Failed to read extended partition table (offset=41945088): Invalid argument
Disk /dev/sda3: 1Kib, 1024 bytes, 2 sectors
Units: Sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
disklabel type: dos
Disk identifier: 0x00000000

Device Boot Start End Sectors Size ID Type
/dev/sda3p1 2048 41945087 41943040 20G 83 Linux
/dev/sda3p2 41945088 251662335 209717248 100G 5 Extended

https://docs.slackware.com/howtos:sl...oot_from_media
I tried following the guide in the link I just posted but I'm a little lost with how to figure out which partitions are exactly the ones I'll need to mount. Especially since I don't think I named any groups of logical partitions like they did in the example for logical partitions. Unless /dev/sda3 is what they mean by the name, in which case that didn't work for me, as when I tried to do mount /dev/sda3, it displayed: "mount: Can't find /dev/sda3 in /etc/fstab". It displayed the same thing for /dev/sda5 and /dev/sda6 even though those two could be read by fdisk without errors.

I can't remember exactly how I partitioned my drive but iirc I had a root partition and a home partition both logical within the sda3 extended partition. Seeing as it can't find them in the /etc/fstab file, is there a way I can add it or a way I can make sure I know exactly what partitions I need to mount in order to chroot properly?

BW-userx 05-22-2020 01:38 PM

To chroot mount your

https://zeldor.biz/2010/12/install-grub-from-chroot/
I’ve never and to do this. But I’d follow them directions and mount all of my directories on my system Before chroot to have everything connected then run slack update and the needed commands to upgrade my system.

That maybe over kill but it wouldn’t, or shouldn’t hurt the system by having everything mounted either.

Everything meaning all of the directories on the system. Not swap and home.

Just backdoor your system and open it’s fstab to find the correct partition for your system.

burning 05-23-2020 07:07 AM

Quote:

Originally Posted by BW-userx (Post 6126117)
To chroot mount your

https://zeldor.biz/2010/12/install-grub-from-chroot/
I’ve never and to do this. But I’d follow them directions and mount all of my directories on my system Before chroot to have everything connected then run slack update and the needed commands to upgrade my system.

That maybe over kill but it wouldn’t, or shouldn’t hurt the system by having everything mounted either.

Everything meaning all of the directories on the system. Not swap and home.

Just backdoor your system and open it’s fstab to find the correct partition for your system.

Thanks.
After trying to mount my hard drive [/dev/sda iirc] it said that /dev/sda is write-protected and that it would mount it in read-only mode. It then said "wrong fs type, bad option, bad superblock on /dev/sda, missing codepage or helper program, or other error."
upon trying to mount /dev/sda3, it says that it is also write protected and that it will be mounting it in read only mode.
It then says "mount: /dev/sda3 on /mnt failed: Cannot allocate memory".

running dmesg | tail gives me:
Quote:

scsi 4:0:0:0: Direct-Access SanDisk Ultra 1.00 PQ: 0 ANSI: 6
sd 4:0:0:0: [sdb] 120127488 512-byte logical blocks: (61.5 GB/57.3 GiB
sd 4:0:0:0: [sdb] Write Protect is off
sd 4:0:0:0: [sdb] Mode Sense: 43 00 00 00
sd 4:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DP
0 or FUA
sdb: sdb1
sd 4:0:0:0: [sdb] Attached SCSI removable disk
UDF-fs: warning (device sda): udf_fill_super: No partition found (2)
(mount,531,1): ocfs2_fill_super:1028 ERROR: superblock probe failed!
(mount,531,1): ocfs2_fill_super:1219 ERROR: status = -22
Also I think in my previous post, I may have forgotten the /mnt at the end of the mount command, so if anything from my last post in this thread sounds like it doesn't make sense, that'd be why.

BW-userx 05-23-2020 12:02 PM

Sounds like you messed it up. Me. I’d boot a live distro that has gparted on it then run check disk and have it repair it. Then try mounting it again.

And yes you need a valid mount point.

burning 05-25-2020 11:37 AM

Quote:

Originally Posted by BW-userx (Post 6126374)
Sounds like you messed it up. Me. Id boot a live distro that has gparted on it then run check disk and have it repair it. Then try mounting it again.

And yes you need a valid mount point.

Thanks, I used my ubuntu live bootable because I remembered that it had gparted. Using Gparted, I checked the partitions, it didn't detect any errors. Though for some reason, the next time I tried mounting my root and home partitions, it worked just fine. So maybe checking them did do something.

I did run into a bit of a snag when attempting to chroot though; I tried chroot /mnt but I just got "chroot: can't execute '/bin/sh': No such file or directory". Any idea why it's not there?

BW-userx 05-25-2020 01:20 PM

Mount /dev/sda1 /mnt.

Needs a valid mount point.

/bin/bash
Needs valid absolute path

colorpurple21859 05-25-2020 07:54 PM

every time you reboot a live system, you have to rerun the mount commands to mount your system to /mnt before you chroot.
from the ubuntu live post the output of
Code:

sudo parted -l

burning 05-26-2020 03:11 AM

Quote:

Originally Posted by BW-userx (Post 6127188)
Mount /dev/sda1 /mnt.

Needs a valid mount point.

/bin/bash
Needs valid absolute path

Oh, as in I need to have separate directories within /mnt to mount the separate partitions to specifically? I can't just mount /dev/sda5 and 6 to /mnt?
I could mount /dev/sda5 and 6 just fine I think, it didn't give me any error messages. And I checked inside of /bin/bash but I couldn't see chroot. chmod and a few others were there though, but not chroot.
(Also, /dev/sda1 is my boot partition, do I need to mount that one as well?)

colorpurple21859 05-26-2020 05:00 AM

Quote:

I can't just mount /dev/sda5 and 6 to /mnt?
no, the last partition you mounted to /mnt is what you would see at /mnt. Maybe why you got the /bin/bash error.

What is on /dev/sda5 and /dev/sda6? Without knowing what is on the partitions can't really say how to mount them, but for an example
assuming /dev/sda5 is / and /dev/sda6 is your home partition and /dev/sda1 is the boot partition, it would be something like this,
Code:

mount /dev/sda5 /mnt
mount /dev/sda1 /mnt/boot
mount /dev/sda6 /mnt/home
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount -o bind /run /mnt/run
chroot /mnt

You will need to change accordingly if it is something different.


All times are GMT -5. The time now is 09:12 PM.