latest dead computer
Hi All,
I seem to be breaking computers for fun these days. I'll point out that I am referring to a different computer to my last thread https://www.linuxquestions.org/quest...or-4175644198/ this time I was testing out hard drives by plugging them into my fedora 28 box. I have to admit I was being a bit cavalier, simply connecting the SATA and power cables to the back of the drive and booting without actually placing the drive in a bay. I was powering down before connecting/disconnecting drives. Anyway the first worked fine. I modified fstab to recognise the UUID, mounted, all good. After I removed this drive and connected another, the PC did not boot. After power up I did not even get the boot screen. I figured I must have broken fstab while changing it. I booted from a Linux Mint USB and checked the partitions were still in place and fstab looked okay. There was no issue I could see but I restored my backup copy of fstab all the same just to be sure. I booted again and things looked better. I got the grub menu (I only have fedora installed, no dual boots. 2 fixes drives and one USB drive plugged in permanently), selected the latest kernel and away it went. However, the boot goes through to the blue fedora icon and that is it. I don't get any further. A trawl around the net suggested I try to ssh in from another PC. Bingo, that worked but I couldn't ssh to my user as there is no /home/tim Okay, ssh to root works fine. The /home directory is empty but I can mount that partition seperately and all the files are there. I partition my hard drive as an LVM and fstab looks like this: Quote:
Cheers |
When in doubt read the messages. From your ssh session "journalctl -b 0" should suffice for the current boot. To see (only) the previous boot use "journalctl -b -1".
|
I connect disks temporarily in same manner as you describe rather frequently. Usually I sit the disk down on a piece of cardboard or DVD sleeve or wood or anti-static sleeve to reduce potential for damage by a bump while in use.
Try to find clues to the /home problem in the journal. If you can't manage this via ssh, try to boot to multi-user: at the Grub menu, strike the e key, cursor down to the kernel line, append a 3, then F10 to boot. |
thanks for the useful instructions. I thought I had it sussed but maybe not so. I kept seeing a message where permission was denied when attempting to open /etc/fstab. When I checked the permissions I then saw that fstab was owned by myself and was in my group. This is consistent with the steps I outlined above.
I could not change ownership/group in the current session as the file system is mounted read-only Quote:
Quote:
Quote:
|
When you paste in logs and such it needs to be in code tags in order for it to be comprehensible. Use the [#] button above the input box, or type in [c0de] and [/c0de] in manually at start and end of the pasted block (spelled correctly of course). If what you wish to paste is large, upload instead, which when successfully booted normally you can do with the Fedora command pastebinit.
It's not clear what you did. When you paste something in, include the cmdline you used to get or create it. Better excess detail than too little. Fstab probably does not need to be recreated. Paste it in here so we can look at it. What we need to find out is why anything is being mounted readonly or not at all. |
sorry, this is an abridged output of
Code:
journalctl -b 0 Code:
an 07 18:07:08 eraserhead kernel: audit: type=1400 audit(1546844825.189:46): avc: denied { read } for pid=508 comm="systemd-fstab-g" name="fstab" dev="dm-0" ino=1050389 scontext=system_u:system_r:init_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=0 Code:
# Code:
[tim@eraserhead /]$ ll /dev/disk/by-uuid/ Code:
Filesystem Size Used Avail Use% Mounted on |
Quote:
Code:
/dev/mapper/fedora-root / ext4 defaults 1 1 |
no joy yet. I am attaching a chunk of journalctl prior to the first fstab error in case this can help
Code:
k... |
last night I backed up fstab then fiddled with the file based on post # 7. No joy. Switched off the computer & went to bed.
This morning I booted from USB, restored the backed up copy and rebooted. All good! Scratching my head. I'll review this when I get back from work. |
I am marking this as solved. I don't know why the problem occurred and I don't know how it was solved but I have learned a lot. Thanks for all the help.
|
Hello reader,
timl's quest helped me, so I thought I'd add a bit to this post. Fedora 31 (5.4.13-201.fc31.x86_64), windows 10 dualboot, 2 extra ntfs hdds While trying to debug an unrelated userland problem, I modified /etc/fstab . Nothing crazy, just changed the mount points of some ntfs data partitions from /home/<me>/disks/<stuff> to /mnt/<disknameshere> . When rebooting, fedora loading screen ran, than hung. None of my grub options would get past the end of loading. Rebooted to grub, when boot options displayed press e to edit, added 'single' to the end of the linux line to get into single user mode. Here, I found that root had mounted ro, however swap, boot, and home were not mounted at all. I was able to mount them manually, and even remount root rw, however none of this persisted on boot. Upon diggint into journalctl, I found a few interesting lines (paraphrased): systemd-fstab-generator[###]: Failed to open /etc/fstab: Permission denied systemd-remount-fs[###]: Failed to open /etc/fstab: Permission denied My (novice) train of thought here went - for some reason, startup doesn't have permission to access fstab. Permissions were normal, so I figured it must be something to do with root not being mounted when systemd-remount-fs was trying to access /etc/fstab A million wrong rabbit holes later, followed mrmazda's advice of 'comment out everything except root and boot, add back one at a time'. This fixed it. No idea how. I made backups of my fstab at different points along the way and I see absolutely zero difference between the original changes that I tried to make, and the current iteration. The one theory I have is that, between my initial fstab changes and my first reboot, about 30 min passed and I did NOT run systemctl daemon-reload. I'm wondering if some systemd generated unit file might have been incorrectly configured/generated, some-magik-how this prevented partitions from being mounted? |
All times are GMT -5. The time now is 11:30 PM. |