[SOLVED] Upgraded to current using slackpkg. root is no longer recognized as valid login and the OS won't load on startup
Slackware - InstallationThis forum is for the discussion of installation issues with Slackware.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ls /mnt/sda5/boot
ls /mnt/sda5/home
ls /mnt/sda1/home
Apologies, I think I may have been mounting my partitions incorrectly in such a way that makes them rather confusing.
/dev/sda5 was created to act as my root partition
/dev/sda6 was created to act as my home partition
/dev/sda1 is my boot partition.
For the duration of this thread I have been mounting my root partition (sda5) first, mounting it to /mnt .
I have then been following that up by mounting my boot partition (sda1) to /mnt/boot and my home partition (sda6) to /mnt/home as part of following this example:
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
An obvious problem you might have noticed would arise were I to do it in this manner, which would be that /dev/sda5 already contained within it a /home directory and /boot directory respectively. This only occurred to me moments ago when I rebooted my laptop. Previously I had assumed that in the process of mounting, the mount points themselves would have been created automatically much in the same way that opening a nonexistent text file in vim or nano would then create that file to write into, without having to create it before editing it. At the time of giving the mount command; I thought that doing "mount /dev/sda6 /mnt/home" created the "/home" directory within /mnt , however I now realize that this was not the case and that the only reason this did not throw an error message has been because /dev/sda5 , the partition I had already mounted to /mnt , coincidentally already contained a /home directory within itself.
Upon learning of this mistake, I tried mounting the partitions again, this time making their mount points specifically unique so as to make sure they would not interfere with one another. /mnt/bootpartition (sda1), /mnt/homepartition (sda6) and /mnt/rootpartition (sda5) respectively.
Now that all three of these partitions were mounted separately and more clearly, I could look inside them properly.
looking inside of the home/ directory within the root partition (sda5) revealed my old home/ directory which contained within it my personal files. Luckily they weren't erased as I thought.
The home/ directory within the boot partition (sda1) was completely empty, including hidden files.
I think one oversight on my part might be that in my eternal "newbieness" to Linux and partition management in general, I forgot to realize that my "home partition" would only act as a home partition if I save everything I want to place in /home in that partition as opposed to the /home directory within my root partition. I think it must've been to do with my forgetting to set the appropriate permissions when creating my user account.
Long story short, I don't think I ever used my home partition, and the home partition doesn't even have a home/ directory inside of it. For some reason it's in my root partition (sda5) but that's most likely due to error on my part.
It looks like you originally had sda1 as a home partition and not as a boot partition. This likely means that your boot files are on your root partiton, sda5, under the /boot/ directory.
At some point (probably during installation), it looks like you had sda6 mounted under /usr/local/.
So, the next question to figure out what you want to do is what is the sizes of the partitions? If they match your details in post #18, then it seems that sda1 should be your /boot/ as that is 512MB, sda5 should be the root partition at 21.5GB and sda6 should be your /home partition with 107GB. If so, here's what I'd do.
After this, the contents should look something like the following:
contents of root partition (sda5) should be normal (unchanged).
contents of boot partition (sda1) should have the contents of the /boot/ folder, but not the /boot/ folder itself (so things like System.map, vmlinuz*, and maybe initrd.gz files).
contents of home partition (sda6) should be the usernames on the system and probably lost+found/. It should not have a /home/ folder.
After this, make sure you /etc/lilo.conf has your "root" as /dev/sda5 (or its UUID/label/etc if you're using persistent naming) and that it is pointing to the right vmlinuz (and initrd.gz if applicable) in your /boot/ folder/partition. Then run lilo to make sure everything is saved and reboot.
It looks like you originally had sda1 as a home partition and not as a boot partition. This likely means that your boot files are on your root partiton, sda5, under the /boot/ directory.
At some point (probably during installation), it looks like you had sda6 mounted under /usr/local/.
So, the next question to figure out what you want to do is what is the sizes of the partitions? If they match your details in post #18, then it seems that sda1 should be your /boot/ as that is 512MB, sda5 should be the root partition at 21.5GB and sda6 should be your /home partition with 107GB. If so, here's what I'd do.
After this, the contents should look something like the following:
contents of root partition (sda5) should be normal (unchanged).
contents of boot partition (sda1) should have the contents of the /boot/ folder, but not the /boot/ folder itself (so things like System.map, vmlinuz*, and maybe initrd.gz files).
contents of home partition (sda6) should be the usernames on the system and probably lost+found/. It should not have a /home/ folder.
After this, make sure you /etc/lilo.conf has your "root" as /dev/sda5 (or its UUID/label/etc if you're using persistent naming) and that it is pointing to the right vmlinuz (and initrd.gz if applicable) in your /boot/ folder/partition. Then run lilo to make sure everything is saved and reboot.
Because the home directory with my personal files and the like is in my root partition. The home directory in my boot partition is empty and void of any files. On trying to move it into the homepartition, it simply says no files of that name exist.
Quote:
mv: can't rename '/mnt/bootpartition/home/*': No such file or directory
Wouldn't it make sense to put the home/ directory from my root partition into my home partition? or at least its contents if the home partition isn't supposed to contain a home directory. My understanding was that the home partition was for Documents/images and the like which would mostly describe the contents of the home directory currently in my root partition.
Because the home directory with my personal files and the like is in my root partition. The home directory in my boot partition is empty and void of any files. On trying to move it into the homepartition, it simply says no files of that name exist.
Wouldn't it make sense to put the home/ directory from my root partition into my home partition? or at least its contents if the home partition isn't supposed to contain a home directory. My understanding was that the home partition was for Documents/images and the like which would mostly describe the contents of the home directory currently in my root partition.
Yes, I thought that bootpartition contained your user's home directory. If it is on rootpartition, you can mv the files from there to homepartition and then delete the contents of bootpartition (or at least the home/ directory).
It looks like you originally had sda1 as a home partition and not as a boot partition. This likely means that your boot files are on your root partiton, sda5, under the /boot/ directory.
At some point (probably during installation), it looks like you had sda6 mounted under /usr/local/.
So, the next question to figure out what you want to do is what is the sizes of the partitions? If they match your details in post #18, then it seems that sda1 should be your /boot/ as that is 512MB, sda5 should be the root partition at 21.5GB and sda6 should be your /home partition with 107GB. If so, here's what I'd do.
After this, the contents should look something like the following:
contents of root partition (sda5) should be normal (unchanged).
contents of boot partition (sda1) should have the contents of the /boot/ folder, but not the /boot/ folder itself (so things like System.map, vmlinuz*, and maybe initrd.gz files).
contents of home partition (sda6) should be the usernames on the system and probably lost+found/. It should not have a /home/ folder.
After this, make sure you /etc/lilo.conf has your "root" as /dev/sda5 (or its UUID/label/etc if you're using persistent naming) and that it is pointing to the right vmlinuz (and initrd.gz if applicable) in your /boot/ folder/partition. Then run lilo to make sure everything is saved and reboot.
So, before when I posted the contents of my fstab file, I had mounted everything in the way that was posted earlier which I think lead to some problems. Now that I've moved everything to its appropriate place, how should I go about mounting everything in order to see the fstab file in the way we need it to be for it to tell us what we want?
because, after only mounting sda1, 5 and 6 to their respective mount points, separate from one another; the fstab reads:
And would I be right in making lilo.conf's boot /dev/sda1? Just because it already says it's /dev/sda so i'm wondering if that's having any effect on the startup. Or, by it being /dev/sda, does it load the rest of the sda's? (it already says /dev/sda5 is the root)
mount /dev/sda5 /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount -o bind /run /mnt/run
chroot /mnt
leave you lilo as is and run lilo, will install lilo bootloader to mbr of sda
I believe sda1 was created to be a boot partition but some how was left out during installation.
If the files on /dev/sda6 or duplicates of what is in /usr/local/ on /dev/sda5, you should be able to comment out the /dev/sda6 mount in your fstab and free up that partition for other uses..
Last edited by colorpurple21859; 06-18-2020 at 03:04 PM.
So, before when I posted the contents of my fstab file, I had mounted everything in the way that was posted earlier which I think lead to some problems. Now that I've moved everything to its appropriate place, how should I go about mounting everything in order to see the fstab file in the way we need it to be for it to tell us what we want?
because, after only mounting sda1, 5 and 6 to their respective mount points, separate from one another; the fstab reads:
And would I be right in making lilo.conf's boot /dev/sda1? Just because it already says it's /dev/sda so i'm wondering if that's having any effect on the startup. Or, by it being /dev/sda, does it load the rest of the sda's? (it already says /dev/sda5 is the root)
The fstab doesn't show what's currently mounted, just where things are supposed to be mounted. To view currently mounted filesystems, you'd use the mount command.
So, to have things automounted on boot, you'd want to have your fstab file have all your correct sda partitions mapped to the correct locations on the root drive.
@colorpurple21859, burning should be fine to mount sda1 and sda6 on /boot/ and /home/ respectively if they moved the contents over to those drives like I suggested earlier. It seems the intention of burning is to have a separate partiton for /boot/ and /home/.
burning should be fine to mount sda1 and sda6 on /boot/ and /home/ respectively if they moved the contents over to those drives
I agree with your 100% on this, but the problems started with trying to upgrade to current on a system that the partitioning wasn't setup correctly to begin with. I think the op should get the system back to booting correctly before trying to move things around, so they aren't dealing with a bad upgrade and moving things around at the same time.
The fstab doesn't show what's currently mounted, just where things are supposed to be mounted. To view currently mounted filesystems, you'd use the mount command.
So, to have things automounted on boot, you'd want to have your fstab file have all your correct sda partitions mapped to the correct locations on the root drive.
@colorpurple21859, burning should be fine to mount sda1 and sda6 on /boot/ and /home/ respectively if they moved the contents over to those drives like I suggested earlier. It seems the intention of burning is to have a separate partiton for /boot/ and /home/.
Ah thanks. I forgot it was as simple as rooting into sda5 and checking the fstab there. The fstab file now has sda1 to /boot and sda6 to /home.
Trying to run LILO outputs:
Warning: LBA32 addressing assumed
Warning: Unable to determine video adapter in use in the present system.
Fatal: open /boot/slack.bmp: No such file or directory
Seeing as slack.bmp actually is in the /boot directory, this must be because of something to do in the lilo.conf file pointing to the the wrong place. It must still be pointing to /dev/sda5/boot rather than /dev/sda1.
would I be right in assuming I should change the following section of my lilo.conf file:
would I be right in assuming I should change the following section of my lilo.conf file:
No this is correct
Quote:
Fatal: open /boot/slack.bmp: No such file or directory
either you didn't mount /dev/sda1 and /dev/sda6 before chrooting or you did mount the partitions but didn't move your files over to the respective partitions correctly.
Quote:
The fstab file now has sda1 to /boot and sda6 to /home.
unless you moved you /boot files to /dev/sda1 and your /home files to /dev/sda6 you will still have problems with these entries included in your fstab.
you will have to do this by mounting each partition somewhere besides on top of /dev/sda5 /boot and /home to move the files over.
If the op has done the mv commands as per post 51 correctly then the chroot commands should be
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
Last edited by colorpurple21859; 06-19-2020 at 09:17 AM.
either you didn't mount /dev/sda1 and /dev/sda6 before chrooting or you didn't move your files over to the respective partitions correctly.
unless you moved you /boot files to /dev/sda1 and your /home files to /dev/sda6 you will still have problems with these entries included in your fstab.
you will have to do this by mounting each partition somewhere besides on top of /dev/sda5 /boot and /home your to move the files over.
If the op has done the mv commands as per post 51 correctly then the chroot commands should be
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
Thank you. I forgot to mount the other partitions properly. I was under the impression that my file system was messed up because I had previously mounted those partitions in that way so in my last attempt to get lilo working, I only mounted sda5.
I mounted them all how you said I should just now and ran Lilo. The system successfully reboots now without need for the live bootable but I was unable to login. No matter which login I tried.
Code:
Welcome to Linux 5.4.42-smp i686 (tty1)
darkstar login: root
/bin/login: error while loading shared libraries: libpam.so.0: cannot open shared object file: No such file or directory
Welcome to Linux 5.4.42-smp 1686 (tty1)
darkstar login:
Also on startup I glanced mention of the following errors:
Just after it loaded video mode: "Wrong EFI signature."
and a bit later:
"/usr/bin/fc-cache: error while loading shared libraries: libbrotlidec.so.1: cannot open shared object file: No such file or directory"
not sure if these tell much. Apologies if they're unrelated.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.