Cannot login via any method

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Cannot login via any method

      Hi all,
      I'm stuck.

      About a month ago (20th Dec 2017) I could ssh in on my username without issue, life was good.
      Now I am greeted in putty with "Could not chdir to home directory /home/<username-here>: No such file or directory"

      Source Code

      1. Could not chdir to home directory /home/dbe: No such file or directory

      I posted on here when I realized, and then forgot about it until I had time to try fix things. (What happened? No idea, I have not been installing anything new for months.)
      I am however, booting off USB, and we've had some power-outages due to severe weather.

      So here's where I'm stuck, I've forgotten the root password, and the web gui admin password is not working (don't think I changed it...)
      To reset the root password I've edited the recovery boot options in grub to drop me into /bin/bash, mounted the drive, set password, and then reboot caused a kernel panic.

      Thinking things are not going very well, I tried to login as root locally, it accepts the password but immediately loops back to the login screen, same thing from putty - immediate logout.
      Reading that an empty home dir is not a good omen, I connected the USB stick to an Ubuntu machine, and tried to fsck the partition, it comes up clean.
      I have 0 files or folders in /home.

      I rebooted OMV, took recovery mode in grub, entered the password to perform maintenance (JOY, it is accepted) and tried to run omv-firstaid. It fails to execute RPC, webgui password seems to remain unchanged.

      I'm currently stuck with a brick of a system that I have no idea how to recover.

      Worst case, will I be able to reconnect my raid drives if it turns out I need to re-install?


      Thanks for reading,
      dbell
    • Yes, after a rebuild, your RAID array should reconnect. (If nothing is wrong with the array.) And from the sound of it, you'll need to rebuild. Given what you're describing, that's what I would do.

      To be sure nothing happens to your drives, before rebuilding, I'd consider disconnecting the sata power plugs (not the data connections) from your RAID drives if you can get to them. Once OMV is up, and you have a basic configuration, shut down and plug power back into the drives.

      The second time around, consider cloning your USB boot drive. (With a backup, you can avoid these issues.)
      Good backup takes the "drama" out of computing
      ____________________________________
      OMV 3.0.99 Erasmus
      ThinkServer TS140, 12GB ECC / 32GB USB3.0
      4TB SG+4TB TS ZFS mirror/ 3TB TS

      OMV 3.0.99 Erasmus - Rsync'ed Backup
      R-PI 2 $29 / 16GB SD Card $8 / Real Time Clock $1.86
      4TB WD My Passport $119
    • Thanks @flmaxey,

      Unfortunately I was caught by my own laziness, kept meaning to clone the boot drive as a backup, never got to it.
      OMV had been working so nicely without intervention that I kept moving that lower on the priority list.

      As for rebuilding, is OMV 3 or 4 preferred at this point? It seems the life cycle on versions is fairly short for an open source offering of this nature.

      Also to clarify, you suggest leaving the SATA connectors attached to ensure the drives mount to the same names?

      Cheers,
      dbell
    • On your drives:
      Either way would work, disconnecting power or the sata connector (disconnect both?). With the power plug disconnected the drives will not spin up, and there's less chance you'd confuse the sata connectors. The reconnect might go better if the drive order is correct.

      On priorities - it is human nature to ignore what is working well until, of course, when it doesn't (work). :)

      On the choice between OMV 3 and 4:
      Obviously, 4 is going to be supported longer and it's based on a newer version of Debian, but the decision for you might be in the plugins you use. If the plugins you need are available in OMV4, that's they way I'd go. If plugin's are not an issue at all, if you're running a straight forward file server, I'd definitely go with OMV4.
      ________________________________

      BTW: When using a USB flash drive, installing the flashmemory plugin is a must. If you didn't use it before, that might be the reason why your drive failed. (Be sure to follow the instructions on the plugin page. Manual edits of etc/fstab are required.) This plugin is available in OMV4.

      On your older (failed?) drive, download h2testw_1.4 and test your old drive before you reuse it. Give it a fresh format and test it before reusing it. If it has any errors, I'd trash it. (Also, it's important to test even new USB drives before using them. There are a lot of cheap fakes out there.)

      If your booting with a USB drive, you might find these free utilities useful:
      h2testw1.4 is a standalone portable app. The others install in Windows.

      SDFormatter4.0
      h2testw1.4

      Win32Disk Imager

      (Here's an intro blurb on Win32DI)

      Win32Disk Imager is a utility that's designed for writing image files toflash media devices. What makes it stand out from similar utilitiesis that it can “read” a flash device and create an image file. If users decide to use an SD-card or a USB thumb drives as a boot drive;the ability to read flash devices makes Win32 Disk Imager useful forcloning booting drives. With a successful compare verification,which is done after a read /write operation is complete, users can beassured their read/write operations are successful and that the flashmedia used do not contain hard errors.


      In the bottom line, once OMV is configured the way you want. "Read" your USB drive to a file name, like OMV-2-19-18.img
      When it's done, do "Verify". (With no errors..) Then "Write" the image file to the 2nd drive. (And verify.) There's your clone. With an occasional update and swap, after a config change or software update, you'd have tested and proven backup.
      Good backup takes the "drama" out of computing
      ____________________________________
      OMV 3.0.99 Erasmus
      ThinkServer TS140, 12GB ECC / 32GB USB3.0
      4TB SG+4TB TS ZFS mirror/ 3TB TS

      OMV 3.0.99 Erasmus - Rsync'ed Backup
      R-PI 2 $29 / 16GB SD Card $8 / Real Time Clock $1.86
      4TB WD My Passport $119
    • @flmaxey

      Sounds like you're saying 'use OMV 4', unless there was a typo somewhere in that paragraph. I don't see a positive argument for OMV3 in there. As for plugins I believe I was using a bare minimum, miniDLNA is the only one coming to mind.

      I certainly did have the flashmemory plugin enabled, however for the rebuild I had thought to use an SSD instead - though cloning then might be even less appealing. I'd appreciate your thoughts on this - force the install on a small partition and clone that?
      I don't suppose OMV has a 'settings backup' option in the GUI? It's not the installation I mind, it's that I need to go through the steps of reconfiguring something that had been working so nicely.


      I've used Win32Disk in the past as a way to create a bootable USB, I was not aware it would perform a clone as well, thanks for making me aware of that easy approach. For simple creation of bootable USBs I've now taken to using Etcher.io it's wonderfully simply for those who occasionally feel a little braindead.

      Also a huge thanks for the additional utilities tips, I made an img of the USB drive as it currently exists and I plan on trying out some detective work, so running h2testw sounds like a good place to start.


      Interestingly, I've run the installer for OMV3 (which I'll run again to go with your recommendation of OMV4) and after a clean install it seems the default behaviour is to keep /home folder in the / partition rather than separating it. There goes my suspicion that I'd lost simply lost the home partition.
    • I'm using OMV3 at the moment but I have a few plugins that I'm not going to take a chance with, until I do OMV4 sets in a VM. (Urbackup is what I'm worried about. I have 5 clients backed up over the course of a year, and the current version of it is working great. So...)
      I'm also running ZFS but developments have rendered that concern mote. My pool will import into the newer version of ZFS, on OMV4.

      In your situation, I can't see a reason not to go with OMV4 and there are at least a few good reasons why you should.
      _____________________________

      On using h2testw, since it won't overwrite existing data, you really need to start with a freshly formatted drive if you want to test the entire drive. (See the readme for details.)

      Etcher is a fine product which does an integrated verify when it writes. But reading / creating an image file is essential to what I like to do and Win32Diskimager does verification as well, however, it's a second step. (Don't short cut,, verification is only an extra 7 minutes with a 32GB drive.)

      _____________________________


      Frankly, unless it was in a USB enclosure, I wouldn't use an SSD. If I did, I'd have to have at least 2 of them for the reasons following.

      I'm using name brand USB drives and have yet to have a problem. I have 3 each thumb drives, partly for OS backup, but also in the event that an update goes sideways, killing one or more functions (plugins) on my server. Being able to swap out a boot drive, on the outside of the case, and boot up in a minute has obvious advantages. I can "undo" an update.

      My process is, update and wait a week or so, to be sure everything is OK, then clone the drive and swap in the 2nd drive. The 3rd drive goes in a drawer, unused and it stays there until/unless I actually change the configuration of the NAS. (Add a share or a new service, remove a service, that kind of thing.) The generic software updates have no real effect on the function or configuration of the server so, if needed, the 3rd drive is a kind of insurance policy if something goes wrong and I copy the problem onto the 2nd drive. With the 3 of them, I know I can drop back to a known good state.
      (BTW: If you keep the image file, as large as it is, that's a 4th backup. It can be used to write new drives.)
      _____________________________

      I use 32GB USB drives. Given the wear leveling on them, bigger means they'll last longer but the resultant image files are huge. I think 32GB is a good trade off for durability and reasonable size image files with reasonable read/write times.

      BTW: after you read a drive, you can boot back up on it and take your time writing the 2nd drive. (A write can take an hour or more depending on size.) Then it's a matter of shutting down, doing a swap, and booting up again.
      _____________________________

      On the /home folder, I have to say that's interesting (that it would be retained) in a server install. This is a great feature for Linux desktops, like Linux Mint, because, along with user data, all application parameters are saved to /home. Hence, one could do a full reinstall, then reinstall a media player and it's original users settings are integrated.
      _____________________________

      There are other backup options, BTW. There's a backup plugin, but I've never used it. Also, since you have OMV-extras installed, click on it, then click on the Kernel tab. You may have some interest in one or more of these utilities - just making you aware of them.
      Good backup takes the "drama" out of computing
      ____________________________________
      OMV 3.0.99 Erasmus
      ThinkServer TS140, 12GB ECC / 32GB USB3.0
      4TB SG+4TB TS ZFS mirror/ 3TB TS

      OMV 3.0.99 Erasmus - Rsync'ed Backup
      R-PI 2 $29 / 16GB SD Card $8 / Real Time Clock $1.86
      4TB WD My Passport $119
    • I'm absolutely flummoxed.

      I was pretty sure that I'd narrowed down the login issue when I found that DEFAULT_HOME in in /etc/login.deps had to be "yes", I booted into recovery mode, went digging and found that it looked fine.

      So I let recovery mode finish the boot process...and now everything works. Why was it broken? I don't know! Why does it work now? Equally clueless.
    • It seems like something unhealthy may have happened to the boot partition. Now that you have the utilities for saving an image, to bail you out if OMV4 doesn't work out for you, I'd still consider rebuilding.
      After getting another USB drive, I'd definitely test that drive. And you could read it, verify it, then format and test the drive, and write the image back. (BTW: There's no need to reformat before imaging a drive. The image overwrites all.)

      In the bottom line, there's no point in building software on defective media and a test would be the only way to know. It could have been a fluke, weird things happen, but the OCD in me would want to test it.
      Good backup takes the "drama" out of computing
      ____________________________________
      OMV 3.0.99 Erasmus
      ThinkServer TS140, 12GB ECC / 32GB USB3.0
      4TB SG+4TB TS ZFS mirror/ 3TB TS

      OMV 3.0.99 Erasmus - Rsync'ed Backup
      R-PI 2 $29 / 16GB SD Card $8 / Real Time Clock $1.86
      4TB WD My Passport $119