Home Directory Disappeared - Can't Log In

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
ArchiMark
Level 2
Level 2
Posts: 51
Joined: Mon Jul 08, 2013 6:57 pm

Home Directory Disappeared - Can't Log In

Post by ArchiMark »

Hope someone can please advise.....

I'm dual booting LM17Mate and Win8 on my little Lenovo Flex 10 laptop....

Was working OK until something odd happened last evening.

At some point I noticed that the icons for the Computer and one other item disappearred from the desktop. But system was still working OK or so it seemed.

Later I restarted laptop and when I login, I get error message:
Your home directory is listed as '/home/mark' but it does not appear to exist. Do you want to log in with the / (root) directory as your home directory? It is unlikely anything will work unless you use a failsafe session.
If I click 'Yes' the display goes dark and I never get to desktop.

Anyway to fix this or do I have to reinstall LinuxMint?

Thanks for any help!

Mark
Zalbor
Level 4
Level 4
Posts: 321
Joined: Tue Apr 19, 2011 11:53 am

Re: Home Directory Disappeared - Can't Log In

Post by Zalbor »

Do you remember if you did anything unusual before the problem started?

Also, it would help to have some information on your partitions. Try to run the following commands in a terminal and post their output:

Code: Select all

sudo parted -l

Code: Select all

cat /etc/fstab
Also:

Code: Select all

ls -l /home
I'm not sure I could personally help with whatever the problem is, but the information may be useful.

EDIT: If you don't know how to use the terminal without logging in normally, try to press Ctrl+Alt+F1 and log in there (remember that you can't see your password, just type it and press enter).
EDIT 2: Thinking about, that won't help much since you won't be able to copy the text. Could you either take a picture of the screen with the output, or find another way?
ArchiMark
Level 2
Level 2
Posts: 51
Joined: Mon Jul 08, 2013 6:57 pm

Re: Home Directory Disappeared - Can't Log In

Post by ArchiMark »

Thank you for your help....

I recall that I was trying to unmount the SD card after copying some files to it. Then I removed the card and restarted laptop. That's when I first got the problem logging in....

Here's the info requested:

Code: Select all

# parted -l
Model: ATA Samsung SSD 840 (scsi)
Disk /dev/sda: 250GB
Sector Size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start       End         Size      File System   Name                        Flags
 1           17.4kB   134MB    134MB                                                         msftres
 2           135MB    1184MB  1049MB   ntfs                                              diag
 3           1184MB  1456MB   273MB    fat32                                            boot
 4           1456MB   119GB    117GB    ntfs                                              msftdata  
 5           119GB    159GB     40.0GB  ext4             Basic data partition   msftdata
 8           159GB    222GB    63.0GB   ext4            
 9           222GB    224GB    1858MB  linux-swap(1) 
 6           224GB    237GB     13.0GB  ntfs                                              msftdata
 7           237GB   13.2GB     13.2GB  ntfs                                              diag

# cat /etc/fstab
# <file system>                                            <mount point>     <type>    <options>          <dump>   <pass>
# / was on /dev/sda5 during installation
#UUID=191f65af-e0fc-4a55-ada7-de493b749095   /                   ext4      errors=remount-ro  0          1
# /boot/efi was on /dev/sda3 during installation
#UUID=D3CB-11A7                                           /boot/efi          vfat       defaults                 0          1
# /home was on /dev/sda8 during installation 
#UUID=c7e2825-b080-4ef4-a23a-adc47dc8cdfc   /home             ext4      defaults                 0          2
# swap was on /dev/sda9 during installation     
#UUID=8f57f6f8-7afd-43d0-bb68-d19bb947e0cf    none              swap      sw                        0          0
/dev/mmcblk0p1                                                /                    ext4     noatime,nodiratime,commit=600,reservation,defaults,errors=remount-ro                           0          1

# ls -l /home
total 0

User avatar
WharfRat
Level 21
Level 21
Posts: 13909
Joined: Thu Apr 07, 2011 8:15 pm

Re: Home Directory Disappeared - Can't Log In

Post by WharfRat »

This line in /etc/fstab

#UUID=c7e2825-b080-4ef4-a23a-adc47dc8cdfc /home ext4 defaults 0 2

is commented out by the '#'.

That will prevent the /home partition from mounting :wink:
ImageImage
Cosmo.
Level 23
Level 23
Posts: 17817
Joined: Sat Dec 06, 2014 7:34 am

Re: Home Directory Disappeared - Can't Log In

Post by Cosmo. »

Not only that line, but the complete sda is commented out. But this does not happen by unmounting a SD card, even not, if "removing" it should have been done without unmounting it beforehand. .....
User avatar
WharfRat
Level 21
Level 21
Posts: 13909
Joined: Thu Apr 07, 2011 8:15 pm

Re: Home Directory Disappeared - Can't Log In

Post by WharfRat »

Cosmo. wrote:Not only that line, but the complete sda is commented out. But this does not happen by unmounting a SD card, even not, if "removing" it should have been done without unmounting it beforehand. .....
Good eye, I missed that :oops:
ImageImage
ArchiMark
Level 2
Level 2
Posts: 51
Joined: Mon Jul 08, 2013 6:57 pm

Re: Home Directory Disappeared - Can't Log In

Post by ArchiMark »

Thanks for catching this!

I should have noticed this...... :oops:

Wonder how I managed to do this..... :?:

Don't have my laptop with me now, but will uncomment drive early tomorrow morning....

Thanks!
deleted

Re: Home Directory Disappeared - Can't Log In

Post by deleted »

You can't edit that file without being root (su) or using sudo.
-Zumwalt
ArchiMark
Level 2
Level 2
Posts: 51
Joined: Mon Jul 08, 2013 6:57 pm

Re: Home Directory Disappeared - Can't Log In

Post by ArchiMark »

Zumwalt wrote:You can't edit that file without being root (su) or using sudo.
-Zumwalt
Yes, understand.....

Thanks!
Zalbor
Level 4
Level 4
Posts: 321
Joined: Tue Apr 19, 2011 11:53 am

Re: Home Directory Disappeared - Can't Log In

Post by Zalbor »

I noticed something else about that fstab:

A normal-looking entry for / (the root partition) is commented out, and a really strange one is uncommented. It looks like "/dev/mmcblk0p1" points to an SD card, right?

ArchiMark: How did you unmount the SD card? It looks to me like the SD card is mounted as /, and everything else is not mounted at all.
ArchiMark
Level 2
Level 2
Posts: 51
Joined: Mon Jul 08, 2013 6:57 pm

Re: Home Directory Disappeared - Can't Log In

Post by ArchiMark »

ArchiMark wrote:
Zumwalt wrote:You can't edit that file without being root (su) or using sudo.
-Zumwalt
Yes, understand.....

Thanks!
Booted up in LM Recovery Mode and got to console as root.

I see root prompt #....

Tried editing /etc/fstab file, but I can't save the changes as it says it's read only.....

Now what?????

Thanks!
ArchiMark
Level 2
Level 2
Posts: 51
Joined: Mon Jul 08, 2013 6:57 pm

Re: Home Directory Disappeared - Can't Log In

Post by ArchiMark »

Zalbor wrote:I noticed something else about that fstab:

A normal-looking entry for / (the root partition) is commented out, and a really strange one is uncommented. It looks like "/dev/mmcblk0p1" points to an SD card, right?

ArchiMark: How did you unmount the SD card? It looks to me like the SD card is mounted as /, and everything else is not mounted at all.
Yes, the /dev/mmcblk0p1 points to a SD card......as I'd noted, I was working with a SD around time that system went wonky on me....

It seems that when I unmounted the card, for some reason, system went haywire.....
User avatar
WharfRat
Level 21
Level 21
Posts: 13909
Joined: Thu Apr 07, 2011 8:15 pm

Re: Home Directory Disappeared - Can't Log In

Post by WharfRat »

Recovery mode mounts the partition as read only. Remount it read/write

Code: Select all

mount -o remount,rw  /
ImageImage
ArchiMark
Level 2
Level 2
Posts: 51
Joined: Mon Jul 08, 2013 6:57 pm

Re: Home Directory Disappeared - Can't Log In

Post by ArchiMark »

WharfRat wrote:Recovery mode mounts the partition as read only. Remount it read/write

Code: Select all

mount -o remount,rw  /
Everything is back to normal now.....

THANKS to you and everyone else here that assisted.

The friendly and helpful assistance here makes it a pleasure to use LM and learn more about linux.

Mark
Post Reply

Return to “Newbie Questions”