<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>On 07/04/2021 19:54, Alistair wrote:
</p>
    <blockquote type="cite" cite="mid:4639293.31r3eYUQgx@lappy3">
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      <meta name="qrichtext" content="1">
      <style type="text/css">p, li { white-space: pre-wrap; }</style>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">I have managed to foul up my Thinkpad running kubuntu 20.04, and cannot login to the desktop.</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">I can login to the TTY2 console, where 'HOME=/'. The /home folder contains only '.' and '..'.</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">I was trying to delete some folders and files from an external hdd. These had previously been created using the 'rsync' command on this m/c and account.</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Deleting failed using the GUI so I tried to recursively remove the from the command line as the normal user, then using sudo.</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">At this point I started getting messages about system crash, kmail started complaining that it could not write to mailboxes. There were other messages so I shut the box down, during which it reported that it could not write to the drive.</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">It booted up to the GUI login screen, but refused login to my account.</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">I switched to the TTY2 console and logged in there:</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">It reports "no directory, logging in with HOME=/"</p>
      <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The 'ls -a /home' command results in "'.' and '..'" only.</p>
      <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">It refuses to start the gui (startx) timing out with:</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">"xauth: timeout in locking authority file //.Xauthority</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">xaut: timeout in locking authority file //.Xauthority</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(EE)</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fatal server error</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(EE) Cannot open log file "//.local/share/xorg/xorg.1.log</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(EE)</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(EE)</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Please consult the X.Org Foundation support at <a class="moz-txt-link-freetext" href="http://wiki.x.org">http://wiki.x.org</a> for help</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(EE)</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">xinit: giving up</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Xinit: unable to connect to X server: connection refused</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">xinit: server error</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">xauth: timeout in locking authority file //.Xauthority"</p>
      <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">How do I recover the system?</p>
      <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Regards,</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Alistair</p>
    </blockquote>
    <p>Alistair,</p>
    <p>Your /home/<username> has been removed. Maybe all of /home. 
</p>
    <p>As others have said, restore your user data from backups. Some or all of your data may still be there. </p>
    <p>Deleting files returns the space to the the free space pool  so it can be overwritten.  On rotating rust, that's all that happens. On SSD, the drive will do housekeeping from time to time. That essentially means that it will erase the free space, so its ready for the next write. Erase is a slow operation, so SSDs try to do it ahead of time.</p>
    <p>With magnetic storage, you have a chance to get some of your data back, if there is really no other way. How much and what depends on luck and what space has been overwritten. With flash storage, the probability of data recovery is a lot less as what the drive does by way of internal housekeeping is not under user control, nor is when it does it.</p>
    <p>Regards,</p>
    <p>Roy Bamford.
</p>
    <p>
</p>
    <p> 
</p>
  </body>
</html>