Cannot mount unencrypted directory to encrypted home directory with fstab?
I have Ubuntu Karmic. I chose to install with an encrypted home directory.
Recently I got a warning that I only had 2GB of drive space left. This is mostly because of my videos. So I went and bought a new hard drive and partitioned it and made 1 ext4 partition and copied my videos all to the new hard drive. I added a line in my fstab to mount the new hard drive to ~/videos, but when I reboot the computer, there is a screen saying something like "error mounting /home/me/videos, press S to skip or something else to reboot". If I press S to skip, then when my system comes up there is a video directory but it's empty because my other hard drive didn't get mounted. I can run sudo mount /dev/sdb video/ and it will mount fine and I can see all my videos, so why can't fstab mount it? Does this have something to do with my encrypted home directory? |
Quote:
So fstab can't mount the drive as the mountpoint does not exist because it has not been unencrypted yet. You could mount the drive somewhere else eg /videos because that mountpoint will exist when fstab is doing its thing, and then make a link to it from your home directory. |
So it DOES have to do with my encryption. LAME! I knew that was bound to complicate something. I really wanted to be able to mount the new hard drive to /videos because I have a HTPC that shares that directory and scripts that reference it and everything. I was going to have fstab mount it to ~/videos and everything would be seamless. If I had LVM I could just add this HDD to the volume, but I don't know if you can LVM with encryption either...
Plus it's going to be more annoying than a thousand suns to not be able to see any of my videos from my home directory. I rip and encode DVDs and everything, and having to use a /videos will be so lame. Is there any way to put the mount command in a script that runs after I log in at least? |
Quote:
Quote:
The answer is in my previous post: Mount the drive somewhere that is not encrypted, then make a link from your (encrypted) home directory to the (valid) mountpoint. Problem solved. If you don't know how to do that, or can't work it out for yourself, then please post here again :) |
Quote:
Code:
cd ~ |
Quote:
|
Quote:
Please let us know how you get on.... |
Not well at all! Now I can't mount the directory, even by hand. It does this no matter where I try to mount it. And putting it in my fstab doesn't work either, probably for the same reason. I googled the error message, and lots of people said it was caused by evms, but it doesn't even look like I have any evms package installed, and there are no evms configs in /etc. I'm really stumped.
Code:
chaz@brutus:~$ sudo fdisk -l |
I see your problem:
First of all/ there is no directory ~/video. It's ~/Videos, with a capital V. Try mounting with a capital V and see if that does it. Code:
sudo mount -t ext4 /dev/sda1 Videos/ |
Quote:
On my system there's no ~/Videos. There is a directory ~/video. I created it. I appreciate the idea but I get the mount error no matter where I attempt to mount /dev/sda1...even if I create a new directory and try to mount it there. |
Post the output of this command:
Code:
sudo mount -t auto /dev/sda1 /mnt This of course assumes that you currently have nothing mounted in /mnt. If you do, then just create a new directory under /mnt or /media or where ever. |
Code:
chaz@brutus:/$ cd mnt/ |
Quote:
What is the output of the following commands please: Code:
mount Then, I think we'll be able to give you the exact commands you need. |
This one really has me stumped. /dev/sda1 is formatted ext4. I have a couple files on it, and I have mounted it in the past on this system. I have no idea why, but now it will not mount anywhere. The only thing I can think is that when I added it to my fstab, to try to have it auto-mount, then some program or daemon saw it and put it in a config somewhere and now that's why it won't mount. But I have no idea what that would be.
Code:
chaz@brutus:~$ mount Code:
chaz@brutus:~$ sudo fdisk -l Code:
chaz@brutus:~$ mkdir wtf |
Thanks.
It looks like /dev/sda1 is no longer mounted (though it probably was in your post #12). Please try the following: 1] Remove all reference(s) to /dev/sda1 from /etc/fstab 2] Run the following commands Code:
sudo mkdir /media/video # Make a mountpoint for /dev/sda1 3] Now add this line to /etc/fstab Code:
/dev/sda1 /media/video ext4 0 1 Your videos should now be where you expect to find them. |
All times are GMT -5. The time now is 09:57 PM. |