[Solved]Deleted Windows, Linux boot option gone

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
WharfRat

Re: Deleted Windows, Linux boot option gone

Post by WharfRat »

Linux_User157 wrote:I loathe Windows, and don't want to dual boot, but I like gaming. I don't want Wine because of security reasons. I can't use virtualbox because of limited processing power, ram, video ram and other limitations. Do you of anything else? Besides an external hard drive. That is something I was thinking of using.
The only simple solution to your dilemma is to have two computers, one that runs windows and of course the other running linux.

From what I've heard there is no substitute for windows' gaming other than a natively installed windows OS.
Linux_User157

Re: Deleted Windows, Linux boot option gone

Post by Linux_User157 »

Does an external hard drive count as natively installing Windows?
WharfRat

Re: Deleted Windows, Linux boot option gone

Post by WharfRat »

Linux_User157 wrote:Does an external hard drive count as natively installing Windows?
I imagine it would be since it's not in a virtual environment.
Linux_User157

Re: [Solved]Deleted Windows, Linux boot option gone

Post by Linux_User157 »

I followed the instructions, but what do I do afterwards? /home/user on my hard drive still seems not to be mounted. I tried the newer ecryptfs-mount-private too. I actually think it IS mounted, It just isn't showing up. Yes, my user name is user, by the way.
WharfRat

Re: [Solved]Deleted Windows, Linux boot option gone

Post by WharfRat »

Linux_User157 wrote:I followed the instructions, but what do I do afterwards? /home/user on my hard drive still seems not to be mounted. I tried the newer ecryptfs-mount-private too. I actually think it IS mounted, It just isn't showing up. Yes, my user name is user, by the way.
It's been a few days and I'm getting lost here :?

Are you saying that you can't get to your files in your home folder :?:
Linux_User157

Re: [Solved]Deleted Windows, Linux boot option gone

Post by Linux_User157 »

Yes. I can't get to the files.
WharfRat

Re: [Solved]Deleted Windows, Linux boot option gone

Post by WharfRat »

Linux_User157 wrote:Yes. I can't get to the files.
OK, try this one line at a time:

Code: Select all

sudo -i
export envvars='opts fnek fnek_sig d sigs mount_sig mount_opts tmpdir'
for o in $envvars;do export "$o=";done; opts=ro;tmpdir=/tmp/mine
/sbin/cryptsetup luksOpen /dev/sdb3 crypt
mount /dev/mapper/mint--vg-root /mnt
For the following replace wharfrat with your user's /home folder name

Code: Select all

d=$(find /mnt/home/.ecryptfs/wharfrat -type d -name ".Private") && echo "$d"   
ls "$d/ECRYPTFS_FNEK_ENCRYPTED"* >/dev/null 2>&1 && fnek="--fnek" || fnek=
ecryptfs-insert-wrapped-passphrase-into-keyring "$d/../.ecryptfs/wrapped-passphrase"  # Enter the user's password when prompted
sigs=$(sed -e "s/[^0-9a-f]//g" "$d/../.ecryptfs/Private.sig") && echo "$sigs"
If you get 1 line with characters and numbers then follow the next three lines

Code: Select all

   mount_sig=$(echo "$sigs" | head -n1) && echo "$mount_sig"
   fnek_sig=
   mount_opts="$opts,ecryptfs_sig=$mount_sig,ecryptfs_cipher=aes,ecryptfs_key_bytes=16" && echo "$mount_opts"
otherwise if the result is two lines then use these

Code: Select all

  mount_sig=$(echo "$sigs" | head -n1) && echo "$mount_sig"
  fnek_sig=$(echo "$sigs" | tail -n1) && echo "$fnek_sig"
  mount_opts="$opts,ecryptfs_sig=$mount_sig,ecryptfs_fnek_sig=$fnek_sig,ecryptfs_cipher=aes,ecryptfs_key_bytes=16" && echo "$mount_opts"

Code: Select all

mkdir "$tmpdir"
mount -i -t ecryptfs -o "$mount_opts" "$d" "$tmpdir"
ls -lh /tmp/mine
Your files should be accessable in /tmp/mine
Linux_User157

Re: [Solved]Deleted Windows, Linux boot option gone

Post by Linux_User157 »

It worked, but it won't let me move it, and I had to open the folder everything was in with root.
WharfRat

Re: [Solved]Deleted Windows, Linux boot option gone

Post by WharfRat »

Linux_User157 wrote:It worked, but it won't let me move it, and I had to open the folder everything was in with root.
Finally, something actually worked - it's about time :roll:

I don't know if you plan on installing Mint again, but I would suggest a normal unencrypted installation as you just discovered the intricate complexities with an encrypted system.
Linux_User157

Re: [Solved]Deleted Windows, Linux boot option gone

Post by Linux_User157 »

I'm still using encryption and reinstalling. It's my fault for dual booting and messing with it. But one problem remains. /temp/mine is locked, and even when I open it with root, I don't have the permissions to move it.
WharfRat

Re: [Solved]Deleted Windows, Linux boot option gone

Post by WharfRat »

Linux_User157 wrote:I'm still using encryption and reinstalling. It's my fault for dual booting and messing with it. But one problem remains. /temp/mine is locked, and even when I open it with root, I don't have the permissions to move it.
You can use cp -a /tmp/mine /destination or mount -o remount,rw /tmp/mine
Linux_User157

Re: [Solved]Deleted Windows, Linux boot option gone

Post by Linux_User157 »

Code: Select all

mint ~ # mount -o remount,rw /tmp/mine
When remounting eCryptfs, you need to pass the mount utility the -i parameter to avoid calling the mount helper
It's comical to me how complicated this is.
WharfRat

Re: [Solved]Deleted Windows, Linux boot option gone

Post by WharfRat »

Linux_User157 wrote:

Code: Select all

mint ~ # mount -o remount,rw /tmp/mine
When remounting eCryptfs, you need to pass the mount utility the -i parameter to avoid calling the mount helper
It's comical to me how complicated this is.
Yea it's never easy with this stuff :roll:

Try this

Code: Select all

umount /tmp/mine
export opts=rw
mount_opts="$opts,ecryptfs_sig=$mount_sig,ecryptfs_fnek_sig=$fnek_sig,ecryptfs_cipher=aes,ecryptfs_key_bytes=16" && echo "$mount_opts"
mount -i -t ecryptfs -o "$mount_opts" "$d" "$tmpdir"
Is there a reason you can't just use cp -a or the file manager if you're not comfortable with the cl:?:
Linux_User157

Re: [Solved]Deleted Windows, Linux boot option gone

Post by Linux_User157 »

I don't know what cp -a is, the files wouldn't appear in the home directory in my file manager even after I mounted it, and I am comfortable with the terminal. It isn't difficult, just complicated. By that I mean specifically this. Also the last line put out this.

Code: Select all

mint ~ # mount -i -t ecryptfs -o "$mount_opts" "$d" "$tmpdir"
mount: mount point  does not exist
WharfRat

Re: [Solved]Deleted Windows, Linux boot option gone

Post by WharfRat »

Linux_User157 wrote:I don't know what cp -a is, the files wouldn't appear in the home directory in my file manager even after I mounted it, and I am comfortable with the terminal. It isn't difficult, just complicated. Also the last line put out this.

Code: Select all

mint ~ # mount -i -t ecryptfs -o "$mount_opts" "$d" "$tmpdir"
mount: mount point  does not exist
Reboot the live media and go through the setup again here viewtopic.php?f=46&t=258637&p=1401911#p1401852
changing this line for o in $envvars;do export "$o=";done; opts=ro;tmpdir=/tmp/mine to this for o in $envvars;do export "$o=";done; opts=rw;tmpdir=/tmp/mine
Linux_User157

Re: [Solved]Deleted Windows, Linux boot option gone

Post by Linux_User157 »

Still locked. I tried to manually move a folder out of it using mv, still locked on the desktop. Is it the tmp folder that is locking it? Everything else seems to be locked except for one thing.
Image
WharfRat

Re: [Solved]Deleted Windows, Linux boot option gone

Post by WharfRat »

Don't use move, use copy.

There's no need to use move as copy will do the same as move, i.e,. the files will just remain in /tmp/mine after copying them to the destination location.

Using cp -a will preserve all the original file dates and times if that's important.
Linux_User157

Re: [Solved]Deleted Windows, Linux boot option gone

Post by Linux_User157 »

Got everything over. One question though. Does the meta data for files you send to people have anything that can lead back to you? I'm assuming no, but I thought I'd ask anyway. Thanks for all the help.
WharfRat

Re: [Solved]Deleted Windows, Linux boot option gone

Post by WharfRat »

Linux_User157 wrote:Got everything over. One question though. Does the meta data for files you send to people have anything that can lead back to you? I'm assuming no, but I thought I'd ask anyway. Thanks for all the help.
Not quite sure about that - I've never checked.
Locked

Return to “Installation & Boot”