You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



How do I modify my "bind-home.conf" file in LL2 from a live CD?

Author (Read 3812 times)

0 Members and 1 Guest are viewing this topic.

Re: How do I modify my "bind-home.conf" file in LL2 from a live CD?
« Reply #8 on: September 26, 2014, 03:12:45 PM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Reputation: 325
  • Linux Lite Member
    • View Profile

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
You're welcome, m654321.  Glad it all worked out.


PS. Are there any benefits to encrypting the home folder on LL2 (as in the LL guidance notes)?  Would it give added protection against malware? I am the only user (home user) of the win7/LL2 dual-boot system. If I encrypted, would files be still accessible by win7?

I haven't messed around much with encrypting partitions/folders, so not really knowledgeable on intricacies for that.  But, I personally don't see the point in your case of encrypting the /home folder since it only contains program config files.  All of your important data files are on the DATA partition.  If I were going to encrypt something, I'd encrypt the DATA partition.  My limited understanding is that encryption is more for protection against someone physically getting hold of your hard drive and trying to read the info off of it.  When encrypted they can't read it.

As far as it helping protect against some type of malware goes?  I'm not sure about that.  I'd guess that might be the case if the encrypted volume was not mounted and opened with the password at the time of an attack; but once the volume is unencrypted by the password I think the protection is gone until it gets unmounted again.

If you are thinking of encrypting the DATA partition, it would be a good idea to make a brand new post about that.  Ask if others have a setup where an encrypted volume is accessed by both Linux and Windows and what the procedure is for setting something like that up.  I don't have the knowledge to guide you through that.
Try Linux Beginner Search Engine for answers to Linux questions.
 

Re: How do I modify my "bind-home.conf" file in LL2 from a live CD?
« Reply #7 on: September 26, 2014, 01:52:29 PM »
 

m654321

  • Gold Level Poster
  • *******
  • 893
    Posts
  • Reputation: 86
  • Linux Lite Member, 'Advocate' & Donator
    • View Profile

  • CPU: Intel Pentium [email protected] (2cores) on an Asus X71Q

  • MEMORY: 4Gb

  • VIDEO CARD: Intel GM45 Express Chipset

  • Kernel: 4.x
It's working beautifully now, Gold_finger, either from a win7 boot or an LL2 boot - the subdirectories (folders) all showing in either OS, together with the full size of the DATA partition, i.e. 582 GB of disk space under win7 but significantly more at  625 GB under LL2. 

There was only one error, but it was a major one, and would appear to be the cause of why the binding wasn't working.
On the last line of the fstab file, I had entered the UUID of the LL2 partition (on sda5), instead of the UUID for the DATA partition (on sda3), which I have now corrected it to.

Wonderful.
Thankyou so much for your attention to detail and explaining instructions so clearly.

Kind regards
Mike

PS. Are there any benefits to encrypting the home folder on LL2 (as in the LL guidance notes)?  Would it give added protection against malware? I am the only user (home user) of the win7/LL2 dual-boot system. If I encrypted, would files be still accessible by win7? 
64bit OS (32-bit on Samsung netbook) installed in Legacy mode on MBR-formatted SSDs (except pi which uses a micro SDHC card):
2017 - Raspberry pi 3B (4cores) ~ [email protected] - LibreElec, used for upgrading our Samsung TV (excellent for the task)  
2012 - Lenovo G580 2689 (2cores; 4threads] ~ [email protected] - LL3.8/Win8.1 dual-boot (LL working smoothly)
2011 - Samsung NP-N145 Plus (1core; 2threads) ~ Intel Atom [email protected] - LL 3.8 32-bit (64-bit too 'laggy')
2008 - Asus X71Q (2cores) ~ Intel [email protected] - LL4.6/Win8.1 dual-boot, LL works fine with kernel 4.15
2007 - Dell Latitude D630 (2cores) ~ Intel [email protected] - LL4.6, works well with kernel 4.4; 4.15 doesn't work
 

Re: How do I modify my "bind-home.conf" file in LL2 from a live CD?
« Reply #6 on: September 26, 2014, 11:24:37 AM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Reputation: 325
  • Linux Lite Member
    • View Profile

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
Stupid me forgot that the DATA partition, which is formatted NTFS, will not show permissions like a normal "Ext4" or "Ext3" file system.

Skip what I said about checking ownership on that partition and continue on to the fstab file.
Try Linux Beginner Search Engine for answers to Linux questions.
 

Re: How do I modify my "bind-home.conf" file in LL2 from a live CD?
« Reply #5 on: September 26, 2014, 08:41:38 AM »
 

m654321

  • Gold Level Poster
  • *******
  • 893
    Posts
  • Reputation: 86
  • Linux Lite Member, 'Advocate' & Donator
    • View Profile

  • CPU: Intel Pentium [email protected] (2cores) on an Asus X71Q

  • MEMORY: 4Gb

  • VIDEO CARD: Intel GM45 Express Chipset

  • Kernel: 4.x
Quote
You should see your folders Documents, Music, Pictures, etc. listed in the output.  Hopefully, they will also show as being owned by your username instead of root.  If you don't see them listed, or they are listed but show up as owned by root, report back the output of that ls -l command.

It seems  that the output of ls -l command is owned by root, here it is:

linux@linux:~$ sudo mount /dev/sda3 /mnt
linux@linux:~$ ls -l /mnt
total 4
drwxrwxrwx 1 root root 4096 Sep 25 14:08 Documents
drwxrwxrwx 1 root root    0 Sep 25 14:20 Downloads
drwxrwxrwx 1 root root    0 Sep 25 14:20 Music
drwxrwxrwx 1 root root    0 Sep 25 14:20 Pictures
drwxrwxrwx 1 root root    0 Sep 25 13:30 $RECYCLE.BIN
drwxrwxrwx 1 root root    0 Sep 24 14:02 System Volume Information
drwxrwxrwx 1 root root    0 Sep 25 14:20 Videos

PS. I have changed the label for the DATA partition as you instructed.

Mike
« Last Edit: September 26, 2014, 08:43:59 AM by m654321 »
64bit OS (32-bit on Samsung netbook) installed in Legacy mode on MBR-formatted SSDs (except pi which uses a micro SDHC card):
2017 - Raspberry pi 3B (4cores) ~ [email protected] - LibreElec, used for upgrading our Samsung TV (excellent for the task)  
2012 - Lenovo G580 2689 (2cores; 4threads] ~ [email protected] - LL3.8/Win8.1 dual-boot (LL working smoothly)
2011 - Samsung NP-N145 Plus (1core; 2threads) ~ Intel Atom [email protected] - LL 3.8 32-bit (64-bit too 'laggy')
2008 - Asus X71Q (2cores) ~ Intel [email protected] - LL4.6/Win8.1 dual-boot, LL works fine with kernel 4.15
2007 - Dell Latitude D630 (2cores) ~ Intel [email protected] - LL4.6, works well with kernel 4.4; 4.15 doesn't work
 

Re: How do I modify my "bind-home.conf" file in LL2 from a live CD?
« Reply #4 on: September 26, 2014, 04:40:43 AM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Reputation: 325
  • Linux Lite Member
    • View Profile

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
Ok -- going to take things slow and one at a time.

First -- your bind-home.conf file looks fine; so no need to do anything more with that.

Second -- I'm sure that /etc/fstab does exist; you just couldn't find it by navigating with file manager for some reason.  So, from your output I can see which partition it will be on and can give directions for opening the file with a terminal.  Will get to that soon.

Third -- as more of a "house cleaning" type of thing, I want you to change the "label" of that DATA partition.  We'll do that first, then fix the fstab file -- which is probably the source of the boot problem.


All instructions below are assuming that you have booted using a live LL CD (not from the installed system).

Right now your "label" for the DATA partition is "/mnt/DATA".  That's the correct mount point, but you really shouldn't use that as the label for the partition.  I could be wrong, but think it's not a good idea to have characters like "/" in the label names for partitions.  (I vaguely remember reading that it's best to just have letters, numbers, no special characters and ideally no spaces.  So just to be sure no future problems arise, lets change the label name for the partition.)

Open GParted and right-click on the /dev/sda3 partition.  Choose "Label".  In dialog box, change the label from "/mnt/DATA" to just "DATA", then click "OK".  Then apply the change by Edit -> Apply All Operations.  No data loss will occur by just changing the label.  Go ahead and close GParted after that.

Now, let's just confirm that your DATA partition has the folders in it already that you are trying to bind to your Home directory.  Open a terminal and follow instructions below:

Mount the DATA partition to live environment
Code: [Select]
sudo mount /dev/sda3 /mnt
Now list the contents of that DATA partition
Code: [Select]
ls -l /mnt
You should see your folders Documents, Music, Pictures, etc. listed in the output.  Hopefully, they will also show as being owned by your username instead of root.  If you don't see them listed, or they are listed but show up as owned by root, report back the output of that ls -l command.

Unmount the DATA partition now
Code: [Select]
sudo umount /mnt

Time to look at and fix (if necessary) the fstab file.  Mount the root partition to the live environment.
Code: [Select]
sudo mount /dev/sda5 /mnt
First, let's confirm that you made the mount point of "/mnt/DATA" in your installed system
Code: [Select]
ls /mnt/mnt
You should see "DATA" listed in the output.  If you don't, that means you forgot to make the mount point.  Stop and report back if that is the case.

Assuming that "DATA" does exist, let's now open your fstab file and check the contents.
Code: [Select]
gksu leafpad /mnt/etc/fstab
It should look something like this:
Code: [Select]
# /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/sda5 during installation
UUID=81d5afda-0060-4b09-b6ad-0ec4ca44c675    /     ext4    errors=remount-ro    0       1
# swap was on /dev/sda6 during installation
UUID=16dcba94-f685-48f9-b644-cf0e3bda3e5a    none     swap    sw              0       0
# Mount DATA partition
UUID=1777422933172576 /mnt/DATA ntfs-3g  defaults,windows_names,locale=en_US.utf8  0  0

If you don't see those last two lines, go ahead and add them to the file now.  I used your correct UUID information, so the lines should be correct.  Hit <Enter> once after the end of the last line, then save the file and close the text editor.

Unmount the root partition
Code: [Select]
sudo umount /mnt
Close the terminal.

Now try rebooting into your installed system again and report back results plus any other things noted above that needed to be reported on.
Try Linux Beginner Search Engine for answers to Linux questions.
 

Re: How do I modify my "bind-home.conf" file in LL2 from a live CD?
« Reply #3 on: September 26, 2014, 01:40:18 AM »
 

m654321

  • Gold Level Poster
  • *******
  • 893
    Posts
  • Reputation: 86
  • Linux Lite Member, 'Advocate' & Donator
    • View Profile

  • CPU: Intel Pentium [email protected] (2cores) on an Asus X71Q

  • MEMORY: 4Gb

  • VIDEO CARD: Intel GM45 Express Chipset

  • Kernel: 4.x
I still have the same problem with LL2 hanging indefinitely at autologin, despite correcting the typos in the "bind-home.conf" file.
I looked for /etc/fstab in root but couldn't find it.  I could only find etc/fstab.d/, and the contents there were empty.  Does that mean my fstab file hasn't been created for some reason. I thought I had done it - maybe I forgot to save it!

I have copied & pasted the contents of  bind-home.conf, as well as the output of the command line you suggested , below. To answer your question. I have not yet had the bound data partition set-up working for a Win7/ll2 dual-boot. The previous system I had that was working, which you helped me set up in August, was a dual-boot system (with binding to /mnt/DATA)  involving distros only (no MS Windows OS at all).

Contents of “bind-home.conf” file...

# Remount partitions with bind
#
description "Bind DATA Partition Subdirectories to My Home Directory"

start on stopped mountall

script
mount --bind /mnt/DATA/Documents  /home/m-ll2/Documents
mount --bind /mnt/DATA/Downloads   /home/m-ll2/Downloads
mount --bind /mnt/DATA/Music   /home/m-ll2/Music
mount --bind /mnt/DATA/Pictures   /home/m-ll2/Pictures
mount --bind /mnt/DATA/Videos   /home/m-ll2/Videos
end script

linux@linux:~$ sudo parted -l
Model: ATA ST750LM022 HN-M7 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  64.4GB  64.4GB  primary   ntfs            boot
 2      64.4GB  125GB   60.2GB  extended
 5      64.4GB  114GB   50.0GB  logical   ext4
 6      114GB   125GB   10.2GB  logical   linux-swap(v1)
 3      125GB   750GB   626GB   primary   ntfs

linux@linux:~$ sudo blkid -c /dev/null
/dev/loop0: TYPE="squashfs"
/dev/sda1: LABEL="WINDOWS 7 Home Edition 32-bit" UUID="3C24AD8F24AD4CA8" TYPE="ntfs"
/dev/sda3: LABEL="/mnt/DATA" UUID="1777422933172576" TYPE="ntfs"
/dev/sda5: UUID="81d5afda-0060-4b09-b6ad-0ec4ca44c675" TYPE="ext4"
/dev/sda6: UUID="16dcba94-f685-48f9-b644-cf0e3bda3e5a" TYPE="swap"
/dev/sr0: LABEL="Linux Lite 2.0 32-bit" TYPE="iso9660"

Kind regards
Mike
« Last Edit: September 26, 2014, 01:42:15 AM by m654321 »
64bit OS (32-bit on Samsung netbook) installed in Legacy mode on MBR-formatted SSDs (except pi which uses a micro SDHC card):
2017 - Raspberry pi 3B (4cores) ~ [email protected] - LibreElec, used for upgrading our Samsung TV (excellent for the task)  
2012 - Lenovo G580 2689 (2cores; 4threads] ~ [email protected] - LL3.8/Win8.1 dual-boot (LL working smoothly)
2011 - Samsung NP-N145 Plus (1core; 2threads) ~ Intel Atom [email protected] - LL 3.8 32-bit (64-bit too 'laggy')
2008 - Asus X71Q (2cores) ~ Intel [email protected] - LL4.6/Win8.1 dual-boot, LL works fine with kernel 4.15
2007 - Dell Latitude D630 (2cores) ~ Intel [email protected] - LL4.6, works well with kernel 4.4; 4.15 doesn't work
 

Re: How do I modify my "bind-home.conf" file in LL2 from a live CD?
« Reply #2 on: September 25, 2014, 05:57:00 PM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Reputation: 325
  • Linux Lite Member
    • View Profile

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
Can I log with my administrator rights when using a live CD? How do I do this?  Presumably, that would allow me to then save the corrections I wish to make and then hopefully allow LL2 to reboot normally, once again.

No need to log in as Admin.  All you need to do is make sure you open the file as Admin/(Root).  Assuming you just opened the file manager and navigated to the file, once you find it, right-click on it and choose "Open as Administrator".  When you're done making the changes it will then allow you to save it because you're working on it as root instead of as regular user.

If still have boot problems after making the fix, copy/paste what is in that file back here for us to look at.  Also, let us know if you changed the partition structure on the disk at all since you first had the bound data partition set-up and working.

P.s.  You didn't forget to create an entry in the /etc/fstab file for auto-mounting the DATA partition on boot did you?  If above instructions didn't work, post back the contents of the /etc/fstab file from that installed system in addition to /etc/init/bind-home.conf.  Also, post back output of following two commands:
Code: [Select]
sudo parted -l
sudo blkid -c /dev/null
« Last Edit: September 25, 2014, 08:13:55 PM by gold_finger »
Try Linux Beginner Search Engine for answers to Linux questions.
 

How do I modify my "bind-home.conf" file in LL2 from a live CD?
« Reply #1 on: September 25, 2014, 03:42:31 PM »
 

m654321

  • Gold Level Poster
  • *******
  • 893
    Posts
  • Reputation: 86
  • Linux Lite Member, 'Advocate' & Donator
    • View Profile

  • CPU: Intel Pentium [email protected] (2cores) on an Asus X71Q

  • MEMORY: 4Gb

  • VIDEO CARD: Intel GM45 Express Chipset

  • Kernel: 4.x
I have just been working on creating a /mnt/DATA partition (NTFS formatted) that I can use to share files between Win 7 and LL2 on a dual-boot system. Gold_finger gave me some very helpful and detailed guidance on this during August.
 
I have just created an upstart job named "bind-home.conf" to enable me to bind subdirectories in a separate /mnt/DATA partition to LL2's home directory.  I appear to have made a mistake, as I appear unable to boot up properly in LL2 (in hangs indefinitely at the screen with the feather). So, then I used a live CD to enable me to make changes to the bind-home.conf  file and hopefully fix the problem.  I was able to open the file,  where I had indeed made some careless typos. Then I edited the file, making the necessary corrections, but then  was not allowed to save the changes.  Can I log with my administrator rights when using a live CD? How do I do this?  Presumably, that would allow me to then save the corrections I wish to make and then hopefully allow LL2 to reboot normally, once again.

Many thanks for any help on this one.  I am a linux newbie (from MS Windows in April 2014) and am groping around in the dark at the moment
with this problem.

Regards
Mike
64bit OS (32-bit on Samsung netbook) installed in Legacy mode on MBR-formatted SSDs (except pi which uses a micro SDHC card):
2017 - Raspberry pi 3B (4cores) ~ [email protected] - LibreElec, used for upgrading our Samsung TV (excellent for the task)  
2012 - Lenovo G580 2689 (2cores; 4threads] ~ [email protected] - LL3.8/Win8.1 dual-boot (LL working smoothly)
2011 - Samsung NP-N145 Plus (1core; 2threads) ~ Intel Atom [email protected] - LL 3.8 32-bit (64-bit too 'laggy')
2008 - Asus X71Q (2cores) ~ Intel [email protected] - LL4.6/Win8.1 dual-boot, LL works fine with kernel 4.15
2007 - Dell Latitude D630 (2cores) ~ Intel [email protected] - LL4.6, works well with kernel 4.4; 4.15 doesn't work
 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section