How do I modify my "bind-home.conf" file in LL2 from a live CD? - Printable Version +- Linux Lite Forums (https://www.freecinema2022.gq/forums) +-- Forum: Software - Support (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=5) +--- Forum: Other (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=20) +--- Thread: How do I modify my "bind-home.conf" file in LL2 from a live CD? (/showthread.php?tid=895) |
How do I modify my "bind-home.conf" file in LL2 from a live CD? - m654321 - 09-25-2014 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 Re: How do I modify my "bind-home.conf" file in LL2 from a live CD? - gold_finger - 09-25-2014 (09-25-2014, 07:42 PM)m654321 link Wrote: 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: sudo parted -l Re: How do I modify my "bind-home.conf" file in LL2 from a live CD? - m654321 - 09-26-2014 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 Re: How do I modify my "bind-home.conf" file in LL2 from a live CD? - gold_finger - 09-26-2014 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: sudo mount /dev/sda3 /mnt Now list the contents of that DATA partition Code: 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: sudo umount /mnt Time to look at and fix (if necessary) the fstab file. Mount the root partition to the live environment. Code: sudo mount /dev/sda5 /mnt First, let's confirm that you made the mount point of "/mnt/DATA" in your installed system Code: 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: gksu leafpad /mnt/etc/fstab It should look something like this: Code: # /etc/fstab: static file system information. 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: 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. Re: How do I modify my "bind-home.conf" file in LL2 from a live CD? - m654321 - 09-26-2014 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 Re: How do I modify my "bind-home.conf" file in LL2 from a live CD? - gold_finger - 09-26-2014 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. Re: How do I modify my "bind-home.conf" file in LL2 from a live CD? - m654321 - 09-26-2014 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? Re: How do I modify my "bind-home.conf" file in LL2 from a live CD? - gold_finger - 09-26-2014 You're welcome, m654321. Glad it all worked out. (09-26-2014, 05:52 PM)m654321 link Wrote: 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. |