Linux Lite Forums

Software - Support => Other => Topic started by: m654321 on April 26, 2015, 07:51:11 AM

Title: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: m654321 on April 26, 2015, 07:51:11 AM
I have just set up a LL2.4 dual boot on a new laptop, pre-installed with win8.1, with UEFI (fast boot, secure boot) enabled.  Everything has worked very well until I got to the stage of binding LL2.4's  /mnt/DATA partition on sdb to My Home Directory on sda.  The laptop has two separate physical drives: SSD1 (sda) for the operating systems, SSD2 (sdb) for the /mnt/DATA.  I have done this set-up before, but only with an MBR file structure, not a GPT one as in the present set up.  I don't know if the use of GPT in the present set-up affects binding, or if the information I should enter in either the fstab file or the bind-home.conf  file is different for GPT compared to MBR set-ups. I'd be grateful if you could advise.

At the moment when I reboot the laptop & choose LL from the grub screen it doesn't fully boot but hangs indefinitely at the screen with the image of the feather with the progress bar below it.  I let the progress bar run completely to the right, but still no rebooting. Any help on this one is much appreciated  as I'm out of my depth here.

Regards
Mike
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: Wirezfree on April 26, 2015, 08:33:55 AM
Hi,

Never used UEFI/GPT,
but did you remember to take ownership of the /mnt/DATA dir.??

Code: [Select]
sudo chown -R yourusername: /mnt/DATA
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: gold_finger on April 26, 2015, 09:27:35 AM
EDIT (added later):  Just realized that you said you're having problems booting into LL now.  Directions below assume that you're booted into your installed LL.  If you can't now, see additional note at end of post.


GPT partitioning does not make any difference.  I don't have a UEFI computer, but I can't think of any logical reason why that would make any difference either.  I also don't have any SSD's; but I don't think that is the cause of the problem.

Most logical place to start is confirming that you are auto-mounting the DATA partition on boot-up.  If it's not mounted, binding to it will fail.  So run this command to see the contents of the fstab file.  (Command just "looks" at the file -- you can't make corrections/changes to the file from this.)
Code: [Select]
cat /etc/fstab
If there is no line for auto-mounting the DATA partition, add one.

If there is a line for DATA partition, can you manually explore the folders/files on "/mnt/DATA" using the file manager without running into problems?  Do you have the necessary folders on that DATA partition that you are trying to bind to Home?  (Eg.  If trying to bind Home's "Documents" folder to the DATA partition, do you have a folder called "Documents" on DATA to bind to?)  Double-check the folder names on DATA -- are they an exact match (spelling / uppercase / lowercase / etc.) to the folders on Home?

Confirm that the DATA partition's UUID in the fstab file is the same one shown by this command for the partition:
Code: [Select]
sudo blkid -c /dev/null

If none of the above has helped, post back with full output from all of the commands below:

Code: [Select]
lsblk
sudo blkid -c /dev/null
cat /etc/fstab
ls -l /etc/init | grep 'bind'
cat /etc/init/bind-home.conf
ls -l $HOME
ls -l /mnt
ls -l /mnt/DATA



EDIT:  If you can't boot into LL now, were you able to before you attempted to bind Home and DATA?

Boot using "live" LL DVD/USB then do the following to mount your installations Root, Home and DATA partitions to the live environment.  (If you don't have a separate Home partition, then just mount the other two.)  Substitute your correct drive and partition numbers where I have "XY" in "/dev/sdXY".

Code: [Select]
sudo mkdir /myRoot /myHome /myData
sudo mount /dev/sdXY /myRoot  # mount root partition here
sudo mount /dev/sdXY /myHome  # skip this step if no separate Home partition
sudo mount /dev/sdXY /myData  # mount DATA partition here

Now run all of these commands, then copy/paste their full output back here for us to see.  Note that there are two lines to list your Home folders below.  One applies if you have a separate Home partition.  The other applies if Home is on your Root partition.  Use the one that applies to you.  (In command to list Home folders, substitute your real username in place of "username".)
Code: [Select]
sudo parted -l
sudo blkid -c /dev/null
cat /myRoot/etc/fstab
ls -l /myRoot/etc/init | grep 'bind'
cat /myRoot/etc/init/bind-home.conf
ls -l /myHome/username  #use if you have a separate partition for Home
ls -l /myRoot/home/username  #use if Home is on Root partition
ls -l /myRoot/mnt
ls -l /myData
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: m654321 on April 26, 2015, 11:02:37 AM
I made an error, goldfinger, but am unable to correct it (inexperience)...
After mounting the DATA partition to the live environment I ran    ls -l /mnt to check the 11 directories I had created on /mnt/DATA.
It seems I had made an error.... i.e. instead of Music and Pictures being separate directories they were one, i.e. MusicPictures.
The other 9 directories were there. I tried using sudo rmdir MusicPictures but it didn't work

I will reinstate Music and Pictures but how do I delete MusicPictures first?

I ran cat /etc/fstab but all I got was...
overlayfs / overlayfs  rw 0  0
tmpfs /tmp tmpfs nosuid,no dev 0  0

I will get the full output from the above command line you've suggested I input as soon as I can.

Many thanks
Mike
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: gold_finger on April 26, 2015, 04:36:51 PM
If you've got any files under MusicPictures, you need to delete them first.  The rmdir command only deletes empty directories. 

Here's example from "live" LL, mounting the DATA partition at /myData in live environment.  Lines with "#" are just describing the command that follows.

Code: [Select]
# Make mount point for DATA partition
sudo mkdir /myData

# Mount it to the new mount point
sudo mount /dev/sdXY /myData

At that point, if you prefer, you can use your gui file manager (Thunar).  Just open it up, then navigate to root of file system.  You'll see "myDATA" as one of the folders under root (/).   Right-click it and choose "Open folder as Root".  If you haven't already done so, make two new folders for Music and Pictures.  Open MusicPictures and copy/paste files into the appropriate new Music or Pictures folder if you need to.  Then go back one directory level so you see MusicPictures folder itself (not what's in it).  Right-click it and choose "Delete".  (You can do that even if you don't move stuff out of the folder.)



Using the terminal, if you wanted to remove a directory that had files in it, you'd use this command with the "r" option to "recursively" remove the files within it too:

Code: [Select]
rm -r /myData/MusicPictures
If that didn't work, you can add the "f" option to "force" removal.

Code: [Select]
rm -rf /myData/MusicPictures
Add your new folders if needed.

Code: [Select]
sudo mkdir /myData/{Music,Pictures}  # No spaces between Music and Pictures

Try booting into the installed system again. 

If it works, you will need to change ownership of those new Music and Pictures folders from Root to your username.  Easiest thing to do is run the command to recursively change ownership of everything in the DATA partition to your username.  (Note:  because you're back in the installed system, the mount point is back to what you set it for in the installed system.  It's not the same mount point you used in the "live" LL.)

Code: [Select]
sudo chown -R username: /mnt/DATA  # Use real username in place of "username"

If it did not boot, follow procedure I outlined in last post for booting into the "live" LL disk, run those commands and post the output back here.  Make sure to follow command instructions I edited into that post later specifically for when you're running from the "live" environment.  (My original instructions were written assuming you were in the installed system, before I remembered that you said you couldn't boot into it now.  The EDIT I added has the live instructions.)  That's why you got the miscellaneous looking info from "cat /etc/fstab" command.  From "live" LL, instructions were to run "cat /myRoot/etc/fstab".

Last thing to note.  When running from live DVD or non-persistent USB stick, you will need to repeat the procedure for creating mount points and then mounting your various hard drive partitions.  On each reboot, those things get wiped out -- so, for example, you can't just reboot the live DVD and run "cat /myRoot/etc/fstab" again on its own.
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: Jerry on April 26, 2015, 05:55:20 PM

I let the progress bar run completely to the right, but still no rebooting. Any help on this one is much appreciated  as I'm out of my depth here.


Pressing F4 during boot will show you at which point it is currently stuck at.
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: m654321 on April 27, 2015, 08:47:00 AM
goldfinger, I have followed your instructions in the EDIT at the end of your Reply no.2 in this thread and am posting the output from the terminal below in response to typing in the commands you asked me to run.  You will see that I have now created two new folders Music and Pictures from  MusicPictures, and deleted the later in DATA. Needless to say, after fixing the MusicPictures error, I was still unable to boot normally into LL, just hanging for ever at the boot progress screen. As you see below I don't have a separate
 /home partition...

Code: [Select]
linux@linux:~$ sudo mkdir /myRoot /myData
linux@linux:~$ sudo mount /dev/sda6 /myRoot
linux@linux:~$ sudo mount /dev/sdb1 /myData
linux@linux:~$ sudo parted -l
Model: ATA Samsung SSD 850 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name                          Flags
 1      1049kB  945MB   944MB   ntfs         Basic data partition          hidden, diag
 2      945MB   1050MB  105MB   fat32        EFI system partition          boot
 3      1050MB  1184MB  134MB                Microsoft reserved partition  msftres
 4      1184MB  126GB   125GB   ntfs         Basic data partition          msftdata
 5      126GB   126GB   9437kB                                             bios_grub
 6      126GB   250GB   124GB   ext4


Model: ATA Samsung SSD 850 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  1000GB  1000GB  ntfs               msftdata


Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0
has been opened read-only.
Error: Invalid partition table - recursive partition on /dev/sr0.         
Ignore/Cancel? i                                                         
Model: MATSHITA BD-CMB UJ160 (scsi)
Disk /dev/sr0: 795MB
Sector size (logical/physical): 2048B/2048B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags

Code: [Select]
linux@linux:~$ sudo blkid -c /dev/null
/dev/loop0: TYPE="squashfs"
/dev/sda1: LABEL="Recovery" UUID="3A08F27308F22E0F" TYPE="ntfs"
/dev/sda2: LABEL="SYSTEM" UUID="6E57-A726" TYPE="vfat"
/dev/sda4: LABEL="OS" UUID="4A90FA7B90FA6CB7" TYPE="ntfs"
/dev/sda6: UUID="003c628a-8078-4a71-8209-33d7117d0285" TYPE="ext4"
/dev/sr0: LABEL="Linux Lite 2.4 64-bit" TYPE="iso9660"
/dev/sdb1: UUID="34A0C4C82DE3D9D1" TYPE="ntfs"

Code: [Select]
linux@linux:~$ cat /myRoot/etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda6 during installation
UUID=003c628a-8078-4a71-8209-33d7117d0285 /               ext4    errors=remount-ro 0       1
# Mount DATA partition
UUID=34A0C4C82DE3D9D1         /mnt/DATA                ntfs-3g
defaults, windows_names, locale=en_US.utf8      0          0

Code: [Select]
linux@linux:~$ ls -l /myRoot/etc/init | grep 'bind'
-rw-r--r-- 1 root root  765 Apr 26 07:21 bind-home.conf
linux@linux:~$ cat /myRoot/etc/init/bind-home.conf
# Remount partitions with bind
#
description "Bind DATA Partition Subdirectories to My Home Directory"

start on stopped mountall

script
mount --bind /mnt/DATA/Distros /home/m-linuxlite/Distros
mount --bind /mnt/DATA/Documents /home/m-linuxlite/Documents
mount --bind /mnt/DATA/Downloads /home/m-linuxlite/Downloads
mount --bind /mnt/DATA/Music /home/m-linuxlite/Music
mount --bind /mnt/DATA/Pictures /home/m-linuxlite/Pictures
mount --bind /mnt/DATA/Podcasts /home/m-linuxlite/Podcasts
mount --bind /mnt/DATA/Public /home/m-linuxlite/Public
mount --bind /mnt/DATA/Template /home/m-linuxlite/Template
mount --bind /mnt/DATA/TV /home/m-linuxlite/TV
mount --bind /mnt/DATA/Videos /home/m-linuxlite/Videos
mount --bind /mnt/DATA/VMs /home/m-linuxlite/VMs
end script

Code: [Select]
linux@linux:~$ ls -l /myRoot/home/m-linuxlite
total 134556
drwxr-xr-x 2 1000 1000     4096 Apr 26 06:28 Desktop
drwxrwxr-x 2 1000 1000     4096 Apr 26 07:03 Distros
drwxr-xr-x 2 1000 1000     4096 Apr 25 12:06 Documents
drwxr-xr-x 3 1000 1000     4096 Apr 26 02:01 Downloads
drwxr-xr-x 2 1000 1000     4096 Apr 25 12:06 Music
drwxr-xr-x 2 1000 1000     4096 Apr 25 12:06 Pictures
drwxrwxr-x 2 1000 1000     4096 Apr 26 07:04 Podcasts
drwxr-xr-x 2 1000 1000     4096 Apr 25 12:06 Public
drwxr-xr-x 2 1000 1000     4096 Apr 25 12:06 Templates
drwxrwxr-x 2 1000 1000     4096 Apr 26 07:04 TV
drwxr-xr-x 2 1000 1000     4096 Apr 25 12:06 Videos
drwxrwxr-x 2 1000 1000     4096 Apr 26 07:04 VMs
(Edited by gold_finger eliminating some output that was not needed.)


Code: [Select]
linux@linux:~$ ls -l /myRoot/mnt
total 4
drwxr-xr-x 2 root root 4096 Apr 26 06:34 DATA
linux@linux:~$ ls -l /myData
total 0
drwxrwxrwx 1 root root 0 Apr 26 06:53 Distros
drwxrwxrwx 1 root root 0 Apr 26 06:53 Documents
drwxrwxrwx 1 root root 0 Apr 26 06:53 Downloads
drwxrwxrwx 1 root root 0 Apr 27  2015 Music
drwxrwxrwx 1 root root 0 Apr 27  2015 Pictures
drwxrwxrwx 1 root root 0 Apr 26 06:53 Podcasts
drwxrwxrwx 1 root root 0 Apr 26 06:53 Public
drwxrwxrwx 1 root root 0 Apr 26 02:22 $RECYCLE.BIN
drwxrwxrwx 1 root root 0 Apr 26 02:22 System Volume Information
drwxrwxrwx 1 root root 0 Apr 26 06:53 Templates
drwxrwxrwx 1 root root 0 Apr 26 06:53 TV
drwxrwxrwx 1 root root 0 Apr 26 06:53 Videos
drwxrwxrwx 1 root root 0 Apr 26 06:53 VMs
linux@linux:~$

(Edited by gold_finger:  enclosed all output in code tags.)
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: gold_finger on April 27, 2015, 09:42:20 AM
I have an idea of what is causing your problems, but need to confirm a few things first.  Please answer all of the following questions.

1.  As I understood it, you originally installed LL in Legacy mode, then followed instructions in video posted by Jerry to convert the install to using UEFI mode.  Is that correct?

2.  Once converted to UEFI mode, were you able to boot into both Windows and LL without needing to toy around with UEFI boot settings?  (You could keep computer set to boot in UEFI mode and successfully boot into both OS's, correct?)

3.  When booting in UEFI mode, did you see a grub menu on boot and were you able to successfully boot from that into both Windows and LL?

4.  Once you got LL working in UEFI mode, (if you can remember), approximately how many times did you shutoff/reboot computer before the boot problem with LL happened?

5.  Did the LL boot problem coincide with having done any system updates?  Or was it only a problem once you tried to setup the binding to DATA partition?

6.  Can you still boot into Windows without any problem and if so, are you using its entry shown in grub menu to boot into it, or are you booting to it some other way?



General observations from your posted output:
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: m654321 on April 27, 2015, 10:20:09 AM
Goldfinger, here are the answers to your questions - many thanks for this
Mike

1.
  As I understood it, you originally installed LL in Legacy mode, then followed instructions in video posted by Jerry to convert the install to using UEFI mode.  Is that correct?   

I started the install of LL for dual-boot, once I'd seen Jerry's posted video. The video required that initially the install be carried out in legacy mode, which was switched back to UEFI using Ubuntu 14.10 run as live media towards the end of the video.

2.  Once converted to UEFI mode, were you able to boot into both Windows and LL without needing to toy around with UEFI boot settings?  (You could keep computer set to boot in UEFI mode and successfully boot into both OS's, correct?)  YES, no problems.

3.  When booting in UEFI mode, did you see a grub menu on boot and were you able to successfully boot from that into both Windows and LL?
YES, the grub screen listed both Windows and Ubuntu.

4.  Once you got LL working in UEFI mode, (if you can remember), approximately how many times did you shutoff/reboot computer before the boot problem with LL happened? 

Don't know exactly, but it seemed like several times, but the dual-booting was flawless prior to attempting binding.

5.  Did the LL boot problem coincide with having done any system updates?  Or was it only a problem once you tried to setup the binding to DATA partition?
LL boot problem coincided only with setting up binding (no problem at all before this).  System updates downloaded & installed flawlessly, & was done by Ubuntu live media towards the end of the LL install (on video).

6.  Can you still boot into Windows without any problem and if so, are you using its entry shown in grub menu to boot into it, or are you booting to it some other way?
YES, I choose the windows entry on the grub menu. This is working fine, booting rapidly into Win8.1 (less than 10 seconds)

I should add that when I went back into LL using a live LL DVD, following your instructions, I did this in legacy mode (fast boot off, secure boot off, CSM on).
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: gold_finger on April 27, 2015, 01:21:29 PM
Thanks for the answers -- very helpful.

I should add that when I went back into LL using a live LL DVD, following your instructions, I did this in legacy mode (fast boot off, secure boot off, CSM on).

Yes, I knew you'd have to do that -- not a problem for doing what you were doing.


6.  Can you still boot into Windows without any problem and if so, are you using its entry shown in grub menu to boot into it, or are you booting to it some other way?

YES, I choose the windows entry on the grub menu. This is working fine, booting rapidly into Win8.1 (less than 10 seconds)

Part in red is potentially a key clue.

If you did not disable Fast Startup in Windows 8, I believe it defaults to just going into a hibernated state when you shutdown.  That is what enables it to boot very rapidly when you startup again.  If Windows is in that hibernated state, that may be causing the boot problem because it might be protecting (or interfering with) the DATA partition (which is NTFS) in some way.

I'm not sure if that's the problem or not though.  If it was, then I would think your accessing the partition with the commands before would also have failed.  But I don't know that because I have ZERO experience with Win 8 or accessing hibernated drives.  Also, I don't know if you'd see the grub menu or if Windows would just resume itself if it were in a hibernated state.  So, this may a completely wrong speculation on my part.  Just to be sure, boot into Windows, then follow instructions here to turn off Fast Startup (http://www.eightforums.com/tutorials/6320-fast-startup-turn-off-windows-8-a.html) and do a full (real) shutdown.  Then try booting into LL.


If that didn't work, there is one thing about your fstab file that I didn't notice before.  This line:
Code: [Select]
UUID=34A0C4C82DE3D9D1   /mnt/DATA   ntfs-3g   defaults, windows_names, locale=en_US.utf8   0   0
(I believe) Should be:
Code: [Select]
UUID=34A0C4C82DE3D9D1   /mnt/DATA   ntfs-3g   defaults,windows_names,locale=en_US.utf8   0   0
The second version has no spaces between "defaults, windows_names, locale=en_US.utf8".  I'm not 100% sure, but I think that does make a difference.  Boot with live LL again, mount the Root partition and edit that fstab file with the change.

Code: [Select]
sudo mount /dev/sda6 /mnt
gksu leafpad /mnt/etc/fstab

Make your edit in the file, then save and close.

Code: [Select]
sudo umount /dev/sda6
Reboot and see if that made any difference.
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: N4RPS on April 28, 2015, 01:20:09 AM
Hello!

In Win8, Windows Key-X then A will open an administrative-level command prompt. You can then enter:

Code: [Select]
powercfg -h off
to disable the hibernation file.

The presence of hiberfil.sys definitely causes issues if you try to read from and write to a Windows partition in Linux. It also prevents those Windows password blankers (like pogostick.net) from working. Switching mine off made accessing files of a Windows partition in Linux MUCH easier.

Of course, Your Windows 8 boot time gets longer, but as they say, everything comes at a price...

73 DE N4RPS
Rob
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: m654321 on April 28, 2015, 04:35:54 AM
Thanks Goldfinger, thanks Rob...

I tried what you both suggested, but with no luck.
If you are stuck too, I may just go for a single OS (LL2.4) install and have windows in a VM for when I need it
with /home on sdb1. Should I avoid a swap area with SSD drives - I've heard it can wear them out.
The UEFI Dual boot I have seems troublesome when I introduce binding.  Maybe windows is protecting sdb1?
Maybe something else...

Regards
Mike
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: m654321 on April 28, 2015, 08:48:25 AM
... I should add to reply#11 above that I did not delete the folders in /home before attempting binding. I can't see from my notes whether I should have done this or not, or is that something one only does with sym-linking, the alternative to binding?

Mike 
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: gold_finger on April 28, 2015, 01:10:11 PM
Thanks Goldfinger, thanks Rob...

I tried what you both suggested, but with no luck.
If you are stuck too, I may just go for a single OS (LL2.4) install and have windows in a VM for when I need it

Don't give up yet.  I actually didn't expect those things to solve the problem -- I just wanted to eliminate various possibilities to narrow it down.

Main thing I saw missing in the fstab file was that there is no entry for the "EFI System Partition".  Assuming that your conversion to UEFI mode actually did work, (and from what you have answered, it did), there should be an entry for that partition in fstab.  Why it's not there now is a mystery?  Anyway, I'm pretty sure that once you add an entry for it the boot problem will be solved.

--  Boot with live LL again and open a terminal.

--  Open fstab as root with following command:

Code: [Select]
gksu leafpad /etc/fstab
--  Widen the size of the text editor window so that no lines wrap.  Do that to double-check that all lines beginning with "UUID=" are in fact one continuous line.  Only reason I want you to check that is because when I copy/pasted your original one here, the "UUID=" line for the DATA partition entry had a carriage return after "ntfs-3g" forcing the rest of that entry onto a new line.  That very well could just have been a quirk caused by the forum when you pasted it here and not something that is actually in your file on the computer.  I just want you to check to be sure.

--  Add this missing 2-line entry for the EFI partition to the end of the file:

Code: [Select]
# EFI System Partition
UUID=6E57-A726  /boot/efi   vfat   defaults   0   1

--  Save file, close everything out and reboot.  See if you can boot into installed LL now?  (This time, I am expecting it to work.)


Assuming you can now boot into LL, take ownership of the mount point for DATA partition with this command in a terminal (substitute your real username):
Code: [Select]
sudo chown -R username: /mnt/DATA
If that command spits out an error message saying it can't set permissions right, redo it without the "-R" part of command.  NTFS formatting doesn't set permissions like Linux formats (Ext4, Ext3, etc.), so it's possible the "-R" to recursively chown the subdirectories and files won't work.  (I haven't toyed with NTFS in quite a while, so not sure whether you'll see any errors or not.  Just covering bases.)  In any event, once you change ownership of the mount point itself, you shouldn't have any problems accessing things.


... I should add to reply#11 above that I did not delete the folders in /home before attempting binding. I can't see from my notes whether I should have done this or not, or is that something one only does with sym-linking, the alternative to binding?

Deleting pre-existing Home folders is only necessary when using symlinks.  If you didn't, then the symlink command would essentially be trying to create a second directory using the identical name as one that already exists -- and the command will fail.

When "binding", you're essentially re-mounting specific directories within the DATA partition to specific other locations within the file system -- in this case, to your Home directory.  So, just like you needed a mount point (/mnt/DATA) for the DATA partition; you need mount points for the bound directories.  Your current Home directories serve as those mount points.  Eg.  /home/username/Documents becomes the mount point for /mnt/DATA/Documents.

If you decided later that you want to add another folder (eg. "Miscellaneous") to the DATA partition and also have it show-up in Home, you'd need to make a folder named "Miscellaneous" in both /mnt/DATA and /home/username.  Then remember to add an entry for the binding of it to your bind-home.conf file in /etc/init.
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: m654321 on April 30, 2015, 12:37:26 PM
Goldfinger, you wrote to add the following 2 lines to fstab file...

# EFI System Partition
UUID=6E57-A726  /boot/efi   vfat   defaults   0   1

I regret to say, goldfinger, that this didn't work...
Thankfully, I have copies of the LL2.4/win8.1 UEFI dual boot on a separate disks, without
the binding, just in case anything goes wrong (which it has)!

I have to admit that out of frustration, I started again, setting up from scratch on
the SSD.  For this reason any UUID that you ask to look at will therefore be different from the above
except for the EFI system that appears to have the same UUID second time round.

With your continued support, I'll keep persevering...

Regards
Mike
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: m654321 on April 30, 2015, 03:58:30 PM
On sdb, where I have tried to set up a shared DATA partition (that we are having difficulty in binding), it was formatted as ntfs on a GPT drive. I formatted in ntfs so that I could share data between both win8.1 and LL. 

It has just occurred to me that as sdb  carries the flag 'msftdata', as a microsoft basic data partition, it might be protected by windows from being shared or bound to My Home Directory in LL..?  What do you think? 

If this is the case, then changing from an ntfs to an ext4 file structure on sdb should work, but then, presumably, I wont be able to share data with win8.1. 

It's worth noting that rebooting LL after a fresh install for a dual boot UEFI system also got stuck and hung indefinitely, when I ran the install so that /home and swap would go on on sdb (/ being on sda).  In the end, the only UEFI win8.1/LL set up so far that has appeared to work for me is one where I exclude sdb, and have the two OSes with LL's home installed as root, all on sda. So could the msftdata flag be interfering???

Mike

Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: N4RPS on April 30, 2015, 05:58:30 PM
Hello!

There are programs to let you access ext2/ext4 partitions from Windows, but they are read only.

More here: http://www.howtogeek.com/112888/3-ways-to-access-your-linux-partitions-from-windows/ (http://www.howtogeek.com/112888/3-ways-to-access-your-linux-partitions-from-windows/)

73 DE N4RPS
Rob


Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: gold_finger on April 30, 2015, 10:38:24 PM
Goldfinger, you wrote to add the following 2 lines to fstab file...

# EFI System Partition
UUID=6E57-A726  /boot/efi   vfat   defaults   0   1

I regret to say, goldfinger, that this didn't work...

I'm stumped!  But doesn't matter now because you re-installed everything from scratch.


On sdb, where I have tried to set up a shared DATA partition (that we are having difficulty in binding), it was formatted as ntfs on a GPT drive. I formatted in ntfs so that I could share data between both win8.1 and LL. 

It has just occurred to me that as sdb  carries the flag 'msftdata', as a microsoft basic data partition, it might be protected by windows from being shared or bound to My Home Directory in LL..?  What do you think?

I kind of doubt that the "msftdata" flag is causing any problems and doubt that the NTFS formatting is the problem either.

I suppose you could change the formatting to FAT32 instead.  As long as none of the files you want to save there are bigger than 4GB, FAT32 will work and it's natively supported by Windows.  Or you could try the things N4RPS pointed to and format it as Ext3, or Ext4.  Personally, I don't think that's the issue and if I were you I'd wait to get booting sorted out first -- then try symlinks to the DATA partition instead of binding to it.  If symlinks work, just use those.  Follow instructions to create those in the tutorial you used originally (https://www.linuxliteos.com/forums/tutorials/howto-create-and-use-a-separate-data-partition/).


It's worth noting that rebooting LL after a fresh install for a dual boot UEFI system also got stuck and hung indefinitely, when I ran the install so that /home and swap would go on on sdb (/ being on sda).  In the end, the only UEFI win8.1/LL set up so far that has appeared to work for me is one where I exclude sdb, and have the two OSes with LL's home installed as root, all on sda. So could the msftdata flag be interfering???

Again, I doubt it's the "msftdata" flag.  Something else is causing the problem.  A while back, forum member sysdrum reported on this having problems with installs whenever he put the Root and Home partitions on separate HDD's (https://www.linuxliteos.com/forums/suggestions-and-feedback/lite-2-2-beta-feedback/msg7650/?PHPSESSID=2c7e2365327cff07d692ef02d586ab55#msg7650).  I've been meaning to test that out to see for  myself, but just haven't gotten around to it.  However, I don't doubt him -- he's not new to Linux -- I just am not sure if that is a blanket problem or one specific to certain machines/components.

With the above in mind and assuming that you followed the steps to complete the UEFI conversion just as you did before, but with no booting success -- can you do another LL install and put Root and Home on sda, leaving sdb for DATA and Swap?  That should work if you're a victim of same problem sysdrum encountered.  (Assuming that most of your data files end up on DATA partition, your Home partition can be fairly small -- 3-5GB should be more than enough.)


EDIT ADDED LATER:

From this post of yours (https://www.linuxliteos.com/forums/other-17/win8-1-os-%28c%29-partition-refuses-to-shrink!/msg14199/#msg14199), you said:
Quote
In the good fully functioning copy that I have of the UEFI dual boot (fast boot & secure boot enabled), that I didn't attempt to install binding on, it works amazingly: the grub screen comes up almost immediately and both LL and win8.1 load from the grub menu in less than 6 seconds!  It's the binding problem that's driving me absolutely crazy...  I am still going to work on this but await further feedback from you on next steps...  I wondered if you could reply on that thread for the binding, so that everything is kept together in one place.

Can you put that good copy back in the computer and run a quick test?

Assuming you have a DATA partition that you just did not setup for binding, can you at least choose it from file manager in LL, mount it and explore the contents on the partition?  If nothing on it, create a few test folders/files on it from within Windows, then see if you can read them in LL after mounting the partition?  Report back results.

Also, when booted into LL on good copy, can you post the output of these 4 terminal commands back here for us to see:
Code: [Select]
lsblk
sudo blkid -c /dev/null
cat /etc/fstab
[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: m654321 on May 02, 2015, 02:12:32 AM
Just before you sent your last reply (#17 above),  I had already made some progress yesterday with two cloned copies of the original pre-installed win8.1. 

I installed LL2.4 from scratch on each copy, with UEFI fully enabled in dual-boot.  Everything working beautifully as it did initially (i.e. prior to binding) in previous attempts, following Nehal J Wani's Youtube LL installation video.  For the two investigations described here, I followed Wani's video to the letter, so didn't have separate root and home partitions (as I previously had problems with a separate 'root' & 'home'). On sda I had just swap and root installed alongside the windows OS partitions.  I reserved sdb entirely for a single large DATA partition that takes up the whole drive.  GPT format used throughout as before. I ran two investigations, as follows:

***I should first mention two steps I took, in the present investigations, with each of the cloned copies: (1)  I left sdb as unallocated until  dual-boot was fully established and working in UEFI, and (2) when I carried out binding, I did this with UEFI enabled (fast & secure boot on) - I wondered if doing binding with CSM enabled (then UEFI enabled after binding), rather than UEFI enabled from the beginning of binding, had inadvertently led to the problem of me being unable to reboot into LL.  What I did seems to have worked, as I don't have any booting problems now for LL from the grub screen in either cloned copy, though establishing a real cause & effect is somewhat problematic (unless these things are repeated several times to confirm observations).

FIRST INVESTIGATION. 
I wanted to see if LL would bind to /mnt/DATA on sdb, if sdb was formatted as ext4 instead of ntfs.  Success - it does (the full formatted size of the sdb drive - around 920GB - appearing when I click Properties on each of the home folders).  But of course in using ext4, I am assuming that I've prevented win8.1 from sharing the folders on /mnt/DATA. So, though I have binding for LL, which is a result, I probably don't have folder sharing for win8.1. 

SECOND INVESTIGATION
I wanted to see if LL would bind to /mnt/DATA on sdb, if sdb was formatted as ntfs (as in the previous unsuccessful attempts), so that I could share DATA with win8.1.  What was different this time, compared to the unsuccessful attempts that didn't allow me to reboot into LL, was that I took the steps described in the paragraph marked *** above.   The success I had here was that I have no problems now in rebooting LL from the grub screen as in the first investigation above, but when I check properties for the home folders it's clear that binding hasn't occured.

I am keep the drives for both set-ups (described above) for further investigation.  However for now I need to use the 1st set-up as I need a computer for my work! Also I'm back to work on Tuesday 5th May so don't have much time to play around with this system after having a week off work.

Thankyou for your continued support... much appreciated as always
Regards
Mike

PS. When I've finally got the setup fully working I'd be happy to post a tutorial for this, if you would like (?), which would  include a transcript of Wani's video, just to make things easier. Obviously, I'd ask you, goldfinger, to check it before final posting, as I wouldn't like others to copy any of my 'bad practice'..!!
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: gold_finger on May 02, 2015, 09:22:23 AM
m654321,

Good job running your experiments. That's best way to learn and it sounds like you're now the resident expert on getting LL installed in UEFI mode.  Think it probably would be a good idea to write a tutorial spelling out the steps from that video to make it a little easier for people to follow.  If you want me to look at it first that's fine, but since you've succeeded at least three times now I'm sure whatever you write will be good.

I'm not sure why the binding doesn't seem to be working with the NTFS formatted partition.  That puzzles me.  Just to complete test with that setup, can you boot into Windows and create a few test files in the Documents folder on that DATA partition; then reboot into LL and go to Documents in your Home folder and see if they show-up there?  (If you've already got some files/folders in Documents, no need to create test docs.  Just see if they show up in your LL /home/username/Documents folder.)  If they don't show in home, can you see/access them by navigating directly to /mnt/DATA?  Report back results and then post back results of following terminal commands so I can double-check for anything that might be causing the problem:

Substitute your username where I have "username" below.
Code: [Select]
sudo blkid -c /dev/null
cat /etc/fstab
cat /etc/init/bind-home.conf
mount
ls -l /home/username
ls -l /mnt
ls -l /mnt/DATA
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: m654321 on May 02, 2015, 03:25:42 PM
Thanks goldfinger.  I have to say something very strange has just happened, following everything going so smoothly.
I removed the sda/sdb drives for the setup where LL was only bound to sdb's /mnt/DATA (ext4 formatted). It was working very well in UEFI as I mentioned in previous post.  I replaced this with the sda/sdb drives for the setup where sdb's /mnt/DATA was ntfs formatted. They were then changed around a second time and now neither setup boots to the grub screen. How is it possible that when I remove the drives and put them back, after using drives for another setup, that  the grub screen doesn't show on booting? Most peculiar ...

In order to supply you with the information you asked for in the last post I need to obviously reinstall grub and then hopefully boot into LL. I know how to do this with MBR (you showed me previously) , but is this different for GPT with the EFI setup?  The instructions for MBR that you gave me previously were as follows, where X is the partition number for LL's root partition:

sudo mount /dev sdaX /mnt 
sudo grub-install --boot-directory=/mnt/boot /dev/sda
sudo umount /dev/sdaX

then sudo-update-grub on reboot.

Shall I run this on my setup?

Regards
Mike
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: gold_finger on May 02, 2015, 06:22:15 PM
That is strange -- I don't know why booting gets messed up when you switch out the drives.

Re-installing grub is different with UEFI.  Unfortunately, I can't remember the steps for that; but you can use your live Ubuntu DVD/USB again and run Boot-Repair from that.  Just make sure you boot the Ubuntu disk in UEFI mode, then follow instructions for installing Boot-Repair to live environment and running the "Recommended Repair" on this page:  https://help.ubuntu.com/community/Boot-Repair#A2nd_option_:_install_Boot-Repair_in_Ubuntu (https://help.ubuntu.com/community/Boot-Repair#A2nd_option_:_install_Boot-Repair_in_Ubuntu).  That should do the same thing as you manually entering the commands (that I can't remember).

Boot-Repair will spit out a pastebin page with its results after you run it.  Save that page's address just in case it doesn't fix things.  It may have clues as to what's wrong.  Run Boot-Repair a second time if first time didn't work.

P.s.  If you get booting sorted back out, after you test bind access to NTFS partition, test out symlinking to the partition too.  Just navigate to /mnt/DATA and make a new folder called "Testing" on it.  Then just make a random test text file in it.  When done, create a symlink to your home with this command (substitute real username):
Code: [Select]
ln -s /mnt/DATA/Testing /home/username
Open home folder in Thunar file manager and see if you have access to that folder and can open the test file.
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: m654321 on May 03, 2015, 06:52:14 AM
Many thanks goldfinger.
Success at last, but before I got there, here's a brief recount...

As my win8.1/LL2.4 dual-boot setup, with sdb's /mnt/DATA on an nfts partition, failed to boot after placing this setup back into the laptop (on two drives - sda & sdb), I then tried to boot into the live environment of Ubuntu 14.10 (DVD) in UEFI mode, to do the necessary boot repair that you suggested so I'd get my grub screen back. 

No luck: after initially downloading files from the Ubuntu live DVD, the process got stuck at the Ubuntu screen, and didn't boot, hanging indefinitely at the orange screen with Ubuntu + logo.  So, I deleted the LL partitions (again) on sda, and reinstalled LL to get the fully functional UEFI dual boot up & running again, with LL home directory installed as root.

When done, I then booted to Win8.1, gave sdb a drive label (i.e. D:), so that it was accessible in Windows, and did what you suggested and put a notepad file within one of the folders on D:, then tested for binding but LL failed to detect any notepad file in 'Testing': so again no binding.  I then did the symlink test you suggested, and it worked. 

Following the success with the symlink test,  I then deleted the contents of my bind-home.conf file, deleted all folders in Home (except Desktop), and symlinked all 12 folders in /mnt/DATA to Home.  It worked.  I'm now setting up win 7 in a virtual machine (VMs stored on sdb) and am curious to see if it all runs smoothly with the symlinking - so far so good...  Also interested to see if the VM will access the data folders on sdb.  I'll report back when this is done, before giving this thread a 'topic solved'.

Regards
Mike
Title: Re: bind-home.conf not binding to /home on LL2.4/win8.1 UEFI dual boot set-up
Post by: gold_finger on May 03, 2015, 02:19:01 PM
Glad symlinks worked.  Obviously there must be something about a UEFI install that causes the bind method to fail.  Not sure why that is, but something to keep in mind myself whenever I finally take the plunge and get a new computer with UEFI.  (Current computers suit my needs just fine, so could be another year or two before I do that though.)
Title: [SOLVED] bind-home.conf not binding to home on LL2.4/win8.1 UEFI dual boot setup
Post by: m654321 on May 03, 2015, 03:34:17 PM
Just to confirm again that everything is working well with the win8.1/LL dual-boot setup with UEFI enabled.
The directories in /mnt/DATA on sdb are accessible by both OSes, without any glitches,  & also accessible by win7 set up in a virtual machine (Oracle Virtualbox) within LL.
A good job done - many thanks again goldfinger  for your help - without it, I wouldn't have been able to achieve this... ;)

I am now ticking this thread as 'topic solved' 

Regards
Mike

PS. I'll put together a tutorial on the UEFI enabled dual-boot set up a bit later, when I have a bit more free time.