You are not logged in.

#1 2011-07-01 01:59:49

rg_arc
Member
Registered: 2011-03-20
Posts: 507

[SOLVED] I can only log into root.. /home doesn't exist

So I deleted ubuntu from my computer and I only want to use Arch Linux and Windows on my computer. The partitions I was using for ubuntu were /dev/sda3 and /dev/sda6 so I went into gparted and removed the contents of those partitions. They were marked as unallocated so I made sda3 and sda6 ext4 without changing the size of the partitions or anything.

The problem came up when I rebooted and found that the sda6 partition I changed to ext4 is now called sda8 and my root and home (sda7 and sda6) were moved around after the partition change. So I believe now my /home doesn't exist, or rather, the previous contents have been removed (thankfully everything is saved on my external hard drive for backup) and I can't log into arch linux using my previous user name and password. I can however log into arch linux using my root access and root password thankfully.

Here is the list of partitions on my computer:

# blkid
/dev/sda1: LABEL="PQSERVICE" UUID="4D54-C080" TYPE="vfat" 
/dev/sda2: LABEL="ACER" UUID="82FA0C29FA0C1BD3" TYPE="ntfs" 
/dev/sda3: UUID="e9581dad-55f7-4a08-99f0-e0f42f217d54" TYPE="ext4" 
/dev/sda5: UUID="faca0d2d-3ffa-4225-915f-61220ca95c66" TYPE="swap" 
/dev/sda6: UUID="3600519c-10d0-4a8b-b070-2131dfed877f" TYPE="ext4" LABEL="root" 
/dev/sda7: LABEL="home" UUID="aecfc731-d67b-4081-8946-94abb37cb357" TYPE="ext4" 
/dev/sda8: LABEL="home" UUID="4f186834-d875-4846-bad9-706850869a35" TYPE="
#

/dev/sda2 is my Windows partition and now I have /dev/sda7 and /dev/sda8 marked as home. How can I get /home working again and create a username and password like before? Should I go back into gparted and change things around again? Another factor I didn't realize until too late, my ubuntu partition /dev/sda3 that I deleted was marked as a primary and everything from sda4 to sda8 is marked as extended.. its really confusing to be honest.

Last edited by rg_arc (2011-07-02 12:02:33)

Offline

#2 2011-07-01 02:05:27

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [SOLVED] I can only log into root.. /home doesn't exist

Please post your fstab so we can see how Arch is manipulating these partitions (or at least intended to).  Judging from your blkid output and your description, your partition scheme was all over the place.

Last edited by ANOKNUSA (2011-07-01 02:07:54)

Offline

#3 2011-07-01 02:07:36

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: [SOLVED] I can only log into root.. /home doesn't exist

#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump>$
devpts                 /dev/pts      devpts    defaults            0    $
shm                    /dev/shm      tmpfs     nodev,nosuid        0    $
/dev/sda5 swap swap defaults 0 0
/dev/sda7 / ext4 defaults,noatime 0 1
/dev/sda8 /home ext4 defaults,noatime,user_xattr 0 2

here is my fstab

Offline

#4 2011-07-01 02:18:52

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

Re: [SOLVED] I can only log into root.. /home doesn't exist

/dev/sda8: LABEL="home" UUID="4f186834-d875-4846-bad9-706850869a35" TYPE="

That line concerns me.  Note the TYPE clause.

I am also concerned that /dev/sda[78] share the same label hmm

You say the /home does not exist.  What do you mean?  Is there a mount point called /home on sda7 ?  If not, then sda8 has no place to mount.
Can you create a mount point (say in /mnt) and mount sda8 there by hand (as root).  If so, is your home stuff in /mnt/whateverYouCalledIt/  ??


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

#5 2011-07-01 02:21:02

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: [SOLVED] I can only log into root.. /home doesn't exist

well... sda7 I believe is where my original /home was and sda8 was basically a mistake I made in gparted...I should have just left it unallocated and dealt with it later.

rg_edit: sda6 is apparently my current arch linux root... previously it was sda7.. now sda7 is /home for some reason.

Last edited by rg_arc (2011-07-01 02:25:37)

Offline

#6 2011-07-01 02:25:32

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

Re: [SOLVED] I can only log into root.. /home doesn't exist

rg_arc wrote:

well... sda7 I believe is where my original /home was and sda8 was basically a mistake I made in gparted...I should have just left it unallocated and dealt with it later.

But your fstab mounts sda8 on /home, not sda7.  Note that sda7 is mounted as /.


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

#7 2011-07-01 02:26:31

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: [SOLVED] I can only log into root.. /home doesn't exist

^ yes I see that ewaller.. I don't understand why though

Offline

#8 2011-07-01 02:49:09

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

Re: [SOLVED] I can only log into root.. /home doesn't exist

rg_arc wrote:

^ yes I see that ewaller.. I don't understand why though

Okay, now I'm confused.  /etc/fstab is written by you.

You can verify that /dev/sda7 is mounted on / using the mount command without any parameters.
If /dev/sda7 is mounted at /, then what had been on sda7 is now gone.

Do you have a separate boot partition (sda3 ??)

The best I can suggest is to create a couple mount points under /mnt, and mount /dev/sda3 and /dev/sda8 there and see what is on them.
The other volumes are VFAT and NTFS.  Is that what you would expect?


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

#9 2011-07-01 02:51:15

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

Re: [SOLVED] I can only log into root.. /home doesn't exist

Oh, I just noticed /dev/sda6.  You should try mounting that as well and see what is on it. 

To avoid bad assumptions on my part, can you post the output of mount   ?? Thanks.


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

#10 2011-07-01 02:55:43

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: [SOLVED] I can only log into root.. /home doesn't exist

# mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=215934,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)
/dev/sda6 on / type ext4 (rw,noatime,commit=0)
devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda8 on /home type ext4 (rw,noatime,user_xattr,commit=0)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
/dev/sda3 on /media/e9581dad-55f7-4a08-99f0-e0f42f217d54 type ext4 (rw,nosuid,nodev,uhelper=udisks)
#

here you go... its sda6 on /

Offline

#11 2011-07-01 02:57:04

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: [SOLVED] I can only log into root.. /home doesn't exist

so maybe my /home is just on sda8 now? and I just need to somehow get that to work with sda6?

Offline

#12 2011-07-01 03:03:46

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

Re: [SOLVED] I can only log into root.. /home doesn't exist

Okay, /dev/sda6 is your root.  Not what I expected.

Since you are root (That is all that works), what happens if you

mount /dev/sda7 /home


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

#13 2011-07-01 03:05:47

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [SOLVED] I can only log into root.. /home doesn't exist

Nor do I.  Thing is, though, /etc/fstab needs to be manually edited.  GParted won't just reshuffle you fstab.

EDIT: Ignore my idiocy.  I was looking at the blkid output again.

Last edited by ANOKNUSA (2011-07-01 03:09:55)

Offline

#14 2011-07-01 03:38:40

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: [SOLVED] I can only log into root.. /home doesn't exist

well... using the command you gave me.. the terminal basically didn't have any error messages or anything so I guess maybe thats a good thing? Maybe sda7 is /home?

Offline

#15 2011-07-01 03:42:58

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

Re: [SOLVED] I can only log into root.. /home doesn't exist

Don't keep us on pins and needles -- what does ls /home  say??


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

#16 2011-07-01 07:45:42

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: [SOLVED] I can only log into root.. /home doesn't exist

#mount /dev/sda7 /home
#

thats what happens like I said. Also, when arch asks me to log into the system I tried to use my previous username and password and it says: directory doesn't exist logging in as home= /

rg_edit: I just realized you meant this command.. didn't have my glasses on

# ls /home
lost+found
#

Last edited by rg_arc (2011-07-01 08:45:31)

Offline

#17 2011-07-01 11:54:31

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: [SOLVED] I can only log into root.. /home doesn't exist

# mount /dev/sda8 /home
mount: /dev/sda8 already mounted or /home busy
mount: according to mtab, /dev/sda8 is already mounted on /home
#

hmmm.. take a look at this

Offline

#18 2011-07-01 12:44:11

lukaszan
Member
Registered: 2011-05-05
Posts: 117

Re: [SOLVED] I can only log into root.. /home doesn't exist

rg_arc wrote:
# mount /dev/sda8 /home
mount: /dev/sda8 already mounted or /home busy
mount: according to mtab, /dev/sda8 is already mounted on /home
#

hmmm.. take a look at this

Yeah, sda8 is mounted at boot via fstab. Then you mounted sda7, so you have both sda7 and sda8 mounted at /home. The output from 'ls' above should have been from sda7 as it was the last to be mounted.

You need to calm yourself down a little bit and focus on what you're doing. Very difficult to tell what's going on.

First thing after reboot do

ls /home

It will give you contents of sda8. We already know sda7 is empty, so if sda8 is empty as well, means you removed all your home data. You can choose whether you want sda7 or sda8 as your home. Just adjust fstab accordingly, reboot, and restore your data from backup to /home and you're done.

Word of advice: when you remove partition and then create another one, gparted often messes up partion table (i.e. the numbers in sdax). It's better to simply reformat a partition. Otherwise you'd have to fix partition table with fdisk.

Offline

#19 2011-07-01 13:10:31

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] I can only log into root.. /home doesn't exist

When you find out what partion is what:

https://wiki.archlinux.org/index.php/Pe … ice_naming


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#20 2011-07-02 00:09:25

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: [SOLVED] I can only log into root.. /home doesn't exist

So when I mounted /dev/sda7 to see what is inside. I found out that it also says "lost+found" but it has my user name in there as well. So I am assuming that is where my /home data is located at now.

# mount /dev/sda7 /home
# ls /home
lost+found *username*
#

Last edited by rg_arc (2011-07-02 00:13:11)

Offline

#21 2011-07-02 01:15:27

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

Re: [SOLVED] I can only log into root.. /home doesn't exist

I'll bet you can log in as your user now.

If so, you will have to fix your /etc/fstab


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

#22 2011-07-02 02:50:06

rg_arc
Member
Registered: 2011-03-20
Posts: 507

Re: [SOLVED] I can only log into root.. /home doesn't exist

ok I can do that and get /home back and working again. But I haven't ever needed to change anything with /etc/fstab before so this is the first time I have ever needed to work on it. So I am going to refer to my fstab and make changes here and ask you guys if you think I did it right. If I mess up my fstab then I know its a serious mistake in some cases so I want to get it right the first time.

#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump>$
devpts                 /dev/pts      devpts    defaults            0    $
shm                    /dev/shm      tmpfs     nodev,nosuid        0    $
/dev/sda5 swap swap defaults 0 0
/dev/sda7 / ext4 defaults,noatime 0 1
/dev/sda8 /home ext4 defaults,noatime,user_xattr 0 2

ok so this is the original fstab with sda7 being / ext4 and assuming that is where my username and profile is located. Should I just go through and find the UUID for sda7 and put /home in front of it? What should I do with sda8?

rgedit: So I made some changes to my fstab assuming that sda7 is /home with my username and info. I put UUID for all of the partitions instead of just /dev/sda. Here are the changes I made:

#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0

UUID=3600519c-10d0-4a8b-b070-2131dfed877f /     ext4
defaults,noatime  0      1
UUID=aecfc731-d67b-4081-8946-94abb37cb357 /home ext4
defaults,noatime  0      2
UUID=faca0d2d-3ffa-4225-915f-61220ca95c66 swap  swap
defaults          0      0

previously I didn't have /dev/sda6 as root in the fstab so I put it in the fstab as root where it belongs and did everything according to wiki examples and what I have read about fstab. So hopefully I can log into /home and root access still works.

Last edited by rg_arc (2011-07-02 11:58:39)

Offline

Board footer

Powered by FluxBB