Cannot Log in after new install using BTRFS subvolumes

Questions about Grub, the liveCD and the installer
Forum rules
Before you post please read this

Cannot Log in after new install using BTRFS subvolumes

Postby AvonGil on Sun Jul 28, 2013 7:28 am

Hi everyone, I really want to have snapshots of my file system so I installed LMDE onto an SSD and then used the following quide to help me move over / and /home to subvolumes...

http://penzoditutto.blogspot.com/2013/0 ... ebian.html

Here is what I did:
-------------------------------------------------------
Installed Linux Mint DE to the SSD and then did the following the live installer:

sudo su
mkdir /mnt/btrfs
mount /dev/sdc2 /mnt/btrfs/

Create two subvolumes (one for / and one for /home):

/sbin/btrfs subvolume create /mnt/btrfs/root-sub
/sbin/btrfs subvolume create /mnt/btrfs/home-sub

rsync -avz --exclude=root-sub --exclude=home-sub /mnt/btrfs/ /mnt/btrfs/root-sub/
rsync -avz /mnt/btrfs/home/ /mnt/btrfs/home-sub/

cd /mnt/btrfs/
rm -r !(root-sub|home-sub)

/sbin/btrfs subvolume list /mnt/btrfs/

output was :
ID 261 top level 5 path root-sub
ID 263 top level 5 path home-sub

now set the root-sub subvolume:
/sbin/btrfs subvolume set-default 261 /mnt/btrfs/

Then Set /etc/fstab to mount subvolumes:

gedit /mnt/btrfs/root-sub/etc/fstab
Made the following changes to fstab NOTE the xxx_whatever etc was my UUID, I cannot remmeber it....

# /dev/sda2
UUID=xxxx_whatever_xxxxxx / btrfs defaults 0 0

then add a line to mount the home-sub subvolume in /home folder:
# home subvolume
UUID=xxxx_whatever_xxxxxx /home btrfs defaults,subvol=home-sub 0 0
--------------------------------------


after a reboot I could not log in! I got an error message that the system could not find the /home/alvaro directory and should try to log in using /. When trying to log into the root directory it fails. I cannot log in as root user either to try to fix this....

Found this bug:
https://bugs.launchpad.net/linuxmint/+bug/1055046

Can anyone help please? Im running out of things to try!
AvonGil
Level 1
Level 1
 
Posts: 3
Joined: Sun Jul 28, 2013 7:15 am

Linux Mint is funded by ads and donations.
 

Re: Cannot Log in after new install using BTRFS subvolumes

Postby penzoiders on Sun Jul 28, 2013 8:56 am

Hi Alvaro,

As your system boots it means that / subvol is working.

Try to boot the livecd and fix permissions on the /home subvolume's folders.

They may be read only and so not working (try with a unsafe 777 recursive for all subvolume, then narrow it down)

I think this can be the issue to fix.
User avatar
penzoiders
Level 1
Level 1
 
Posts: 17
Joined: Sun Feb 03, 2013 10:17 am

Re: Cannot Log in after new install using BTRFS subvolumes

Postby AvonGil on Mon Jul 29, 2013 9:00 pm

I changed the permissions of /home to 777. I still cannot log in!
Same error:
"Your home directory is listed as '/home/*****' but it does not appear to exist. Do you want to log in with the /(root) as your home directory? It is unlikely anything will work unless you use a failsafe session."

When I try to log in as root that fails and tells me that a users home directory must be owned by that user and have permisions of 644...

How do I log in and set those permision and chown if I cannot log in as root?? I can only really boot of the USB and edit the file system there, but I cannot set the owner of /home/alvaro as alvaro since that user does not exist on the USB file system.

Any thoughts?
AvonGil
Level 1
Level 1
 
Posts: 3
Joined: Sun Jul 28, 2013 7:15 am

Re: Cannot Log in after new install using BTRFS subvolumes

Postby Makoto on Wed Jul 31, 2013 7:21 pm

Just a thought. I recently formatted an external storage HDD to Btrfs. The drive's directory was owned by root preventing me from doing anything with it with standard user permissions. I would recommend finding out who owns /home/[user].

Have you tried logging into the root account straight up?
Or you might be able to add the user alvaro on the live install, then change ownership of the folder.
Makoto
Level 1
Level 1
 
Posts: 39
Joined: Sun Jun 09, 2013 2:11 pm

Re: Cannot Log in after new install using BTRFS subvolumes

Postby AvonGil on Tue Aug 13, 2013 10:33 pm

Ok, I booted off the USB live install again and made a new user with the same name as mine. I changed the ownership of the /home/alvaro from mint to alvaro with the -R option.
I still cannot log in as the alvaro user (or root) it stats that the home directory has been set to '/home/alvaro' but it does not exist. Something must have gone wrong specifying where the home directory is, but everything seems ok.

How can I log in as root to see if I can fix this issue?
AvonGil
Level 1
Level 1
 
Posts: 3
Joined: Sun Jul 28, 2013 7:15 am

Re: Cannot Log in after new install using BTRFS subvolumes

Postby Makoto on Thu Aug 29, 2013 4:16 am

To log in as root, use CTRL+ALT+F1 to bring up a tty. Use the login name "root" together with the root password. Then chown the folder of the mount point of the BTRFS recursively. That worked for me :)
Makoto
Level 1
Level 1
 
Posts: 39
Joined: Sun Jun 09, 2013 2:11 pm


Return to Installation & Boot

Who is online

Users browsing this forum: abickerton and 4 guests