LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   antiX / MX Linux (https://www.linuxquestions.org/questions/antix-mx-linux-127/)
-   -   Hit several problems when installing AntiX-9 to a friend's computer to upgrade an existing system (https://www.linuxquestions.org/questions/antix-mx-linux-127/hit-several-problems-when-installing-antix-9-to-a-friends-computer-to-upgrade-an-existing-system-4175665245/)

hazel 12-01-2019 12:56 PM

Hit several problems when installing AntiX-9 to a friend's computer to upgrade an existing system
 
My own Antix upgrade was a whole disk install as I had no separate home partition on that machine and it contained no important data. I ran into some problems with the openchrome video driver (described in another thread) but they quickly got sorted by the community. Thanks, guys!

My friend's computer has pure Intel electronics so I didn't anticipate any problems. However, she has a more conventional layout with a home partition that contains a lot of data, so we chose the option to reuse existing partitioning. Everything appeared to go smoothly until we rebooted. Then all hell broke loose!

First of all we got the dreaded grub rescue prompt. Fortunately GRUB itself told us what was missing: a file in the /boot/grub/i386-pc directory. In fact, when we rebooted from the installation disc, I found that whole directory was missing. I copied it over from /usr/lib/grub and we rebooted. This time we got to a normal grub prompt. Back to the CD, chrooted and ran update-grub. After that we got a normal boot. It's clear that the whole grub install on that branch of the script was bad.

And that wasn't the only thing. During the install I had set a root password and created a user for my friend. Neither of these worked. Fortunately the demo user was still available (surely it shouldn't have been at this point) and I was able to log in and check /etc/passwd. There wasn't an entry for my friend and I think the root password must still have been the original one. It seems we had a simple copy of the passwd and shadow files from the CD rather than one that embodied our choices. I guessed that demo had full sudo rights, so I logged in under that name and did a sudo su, then reset the root password and created the other user.

Then we ran into another problem. My friend could log in at a console but not via slim. All she got was "failed to execute login command". However I could log in via slim as root. By this point we were both tired so we decided to call it a day. A little googling shows that this error is definitely a slim configuration problem. I shall need the names of a few files to check next time I go round there.

It seems that this type of installation using existing partitions misses out at least two stages that the whole-disk installation carries out successfully.

anticapitalista 12-01-2019 01:55 PM

Seems like a possible bad burn/download. Did you check the md5sums before installing?

Also, what distro was on the system before installation? Its config files under /home may have caused login issues.
What is supposed to happen if you install over an older antiX version, is that you are prompted to set up a new user but a pop up appears (asking to save or keep old files) if you use the same username since you already have a separate /home with the same name.

hazel 12-01-2019 02:05 PM

I used the same image as for my own installation disc but made a new disc for her so that she could have her own copy to keep. The image was checked with md5sum before burning, and both discs were burned at speed=0.

I'm not sure which AntiX she had earlier. It was the one with the metro station. Same one that I had.

Whatever the problems with the home partition, they don't explain why grub wasn't properly installed or what happened to /etc/passwd and /etc/shadow.

PS: I've just thought of something. When I added her as a user by hand, I forgot to add her to any groups. Could her not being in the video group have caused the login problem? That would explain why I could log in as root. In which case, please could you give me a list of the groups she needs to be in so that I can add her to them?

anticapitalista 12-02-2019 07:41 AM

I think it is more likely to be an ownership issue.

Try chown -R foo:foo /home/foo (where foo is your new username)

You should be able to login to the desktop now, but you will probably see that it is missing wallpaper icons etc.
If so, you need to copy the hidden files (as user) in /etc/skel to /home/foo

Preserving /home is probably not a good idea when upgrading to a newer version.

IMO it is best for user to not have a separate /home partition. Instead create a separate data partition that can be symlinked to the user directory. So, on upgrade, choose to install/overwrite /home. Your data partition will be untouched. Just recreate the symlinks.

hazel 12-02-2019 07:59 AM

That explanation sounds very reasonable to me. I shall be seeing her at church tonight and we can fix up another home appointment. It's a bit tricky with her as she works unsocial hours.

I'm not quite clear about your preferred home setup. Do you mean that the user's home directory should contain a symlink to a data partition mounted elsewhere? Or that it should be a symlink? For example, I have a data partition on my main machine and mount it on /home/data in all my systems, but I still have separate home directories on the root partitions to hold config files. I could do the same thing for my friend if you think it better.

btw the installation image we are talking about is AntiX-base, not AntiX-full, in case you want to check the installer script.

anticapitalista 12-02-2019 11:41 AM

I set up with /home on / partition (sda1). My data partition is on sda3. I then symlink /media/Data to /home/anticap via rox-filer.
So, via rox, when I click on Data folder in /home/anticap, it mounts. I prefer this to automounting the Data directory.

hazel 12-04-2019 04:33 AM

Thank you! It was the ownership that was wrong. Everything was owned by demo! I should have checked that at the time. I chowned it and now we have a working desktop.

All the same, there was something funny about that install. The demo user should have been taken out of /etc/passwd and my friend inserted before it got copied over. Why didn't that happen?


All times are GMT -5. The time now is 06:16 PM.