You are not logged in.

#1 2014-08-17 07:10:29

karsep5
Member
Registered: 2014-08-17
Posts: 8

Accidentally formatted the partition containing /home

I accidentally formatted my partition which was used as /home in my archlinux installation using GParted from a different OS. Now I am not able to get my arch linux started. The booting gets stuck when trying to find that drive. Is there a way for me to fix this problem without reinstalling my OS again?

Appreciate the help

Offline

#2 2014-08-17 07:15:40

rwzy
Member
Registered: 2014-08-14
Posts: 5

Re: Accidentally formatted the partition containing /home

No I don't think so?


time is all we are

Offline

#3 2014-08-17 07:44:57

Asmir
Member
From: BiH
Registered: 2011-10-06
Posts: 67

Re: Accidentally formatted the partition containing /home

Just format the same partition with the previous filesystem to make sure it mounts at boot, if needed edit /etc/fstab.
After that make your home dir and chown it. Most of your settings are already in the /etc so there are minor things to configure.

Offline

#4 2014-08-17 12:20:16

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Accidentally formatted the partition containing /home

Yes, you can fix the problem without reinstalling Arch Linux.

Why won't Arch Linux boot? Was there an error message?

Offline

#5 2014-08-17 13:48:48

karsep5
Member
Registered: 2014-08-17
Posts: 8

Re: Accidentally formatted the partition containing /home

@drcouzelis
The boot stops at
[ TIME ] Timed out waiting for devive dev-disk-by\x2_________.device
[DEPEND] Dependency failed for /home
[DEPEND] Dependency failed for Local File Systems
[DEPEND] Dependency failed for File System Check on /dev/disk/by-uuid/{an uuid}

After that it stops further loading and takes me to the emergency mode.

Offline

#6 2014-08-17 13:57:49

archie84
Member
Registered: 2014-08-17
Posts: 14

Re: Accidentally formatted the partition containing /home

As Asmir pointed out, the problem seems to be in /etc/fstab.
Can you post the contents of that file?

Offline

#7 2014-08-17 14:04:13

karsep5
Member
Registered: 2014-08-17
Posts: 8

Re: Accidentally formatted the partition containing /home

@Asmir @archie84

Tried editing the fstab file and I was able to get back the login and my LXDE environment. But all programs seem to be lost. The start(program launcher) only has a Run and Logout option. The terminal launcher has gone missing(it was under accessories from the Start menu) so not sure how to proceed installing stuff.

Offline

#8 2014-08-17 14:07:29

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 454

Re: Accidentally formatted the partition containing /home

Offline

#9 2014-08-17 14:28:21

loqs
Member
Registered: 2014-03-06
Posts: 17,363

Re: Accidentally formatted the partition containing /home

Was the home directory of the user you were logging into under the wiped /home?  If so did you recreate it with correct ownership permissions?

Offline

#10 2014-08-17 14:32:40

karsep5
Member
Registered: 2014-08-17
Posts: 8

Re: Accidentally formatted the partition containing /home

@loqs
Yes. Some of the commands still are looking for the preferences from the now deleted directory.

ls -l /dev/disk/by-uuid show the permissions to be the same.

Offline

#11 2014-08-17 14:49:31

loqs
Member
Registered: 2014-03-06
Posts: 17,363

Re: Accidentally formatted the partition containing /home

So you have not recreated the /home/username/ directory?
Can you post the output of the below to help clarify

#pwck -r

Edit:
Specify which directory I am referencing

Last edited by loqs (2014-08-17 14:50:59)

Offline

#12 2014-08-17 14:56:20

karsep5
Member
Registered: 2014-08-17
Posts: 8

Re: Accidentally formatted the partition containing /home

@loqs

user 'karsep5':directory '/home/karsep5' does not exist
pwck: no changes

I was not sure if that has to be manually created. I tried using the same commands I used for creating the user. It just said user exists.

Last edited by karsep5 (2014-08-17 14:58:25)

Offline

#13 2014-08-17 15:02:10

loqs
Member
Registered: 2014-03-06
Posts: 17,363

Re: Accidentally formatted the partition containing /home

You can recreate it with

#usermod -d /home/karsep5 karsep5

Offline

#14 2014-08-17 15:07:18

karsep5
Member
Registered: 2014-08-17
Posts: 8

Re: Accidentally formatted the partition containing /home

@loqs

Thank you really for being patient and bearing with this.

I just got

usermod: no changes

I tried creating the directory directly but getting a permission denied error without sudo.

My current /home directory permissions based on ls -l from / are

drwxr-xr-x 3 775 root 4096

Is this right? Should I try to create the user directory with sudo?

Offline

#15 2014-08-17 15:15:23

loqs
Member
Registered: 2014-03-06
Posts: 17,363

Re: Accidentally formatted the partition containing /home

Does

#usermod -m -d /home/karsep5 karsep5

work any better?
If not then

#usermod -d /home/karsep5.new karsep5
#usermod -m -d /home/karsep5 karsep5

Or manual method (substitute users primary group in below)

#mkdir /home/karsep5
#chown karsep5:group /home/karsep5

Edit: remove extra -

Last edited by loqs (2014-08-17 15:16:04)

Offline

#16 2014-08-17 15:25:28

rebootl
Member
Registered: 2012-01-10
Posts: 431
Website

Re: Accidentally formatted the partition containing /home

Sorry for interfering but,

Should I try to create the user directory with sudo?

I think yes you have to use sudo or do it as root.


Personal website: reboot.li
GitHub: github.com/rebootl

Offline

#17 2014-08-17 17:05:03

karsep5
Member
Registered: 2014-08-17
Posts: 8

Re: Accidentally formatted the partition containing /home

Thank you guys. Appreciate the support.

Even after following all the steps, I had issues with my lxde desktop environment which got resolved only after explicitly deleting the user and recreating.

Offline

#18 2014-08-17 19:15:30

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,785

Re: Accidentally formatted the partition containing /home

Would this be a good time to extol the virtues of redundant tested backups?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#19 2014-08-18 05:45:29

karsep5
Member
Registered: 2014-08-17
Posts: 8

Re: Accidentally formatted the partition containing /home

@ewaller. Couldn't agree more. However I had just finished setting up my system. So no damage done.

Offline

Board footer

Powered by FluxBB