LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-04-2019, 05:04 AM   #1
Sharvin26
LQ Newbie
 
Registered: Feb 2019
Posts: 21

Rep: Reputation: Disabled
Facing issues in configuring soft link for connman Directory ( Debian )


I have 4 Partitions on a disk.

mmcblk0p1 has the boot configuration.

mmcblk0p2 has a Debian Os. ( Let's name OS1 )

mmcblk0p3 has another Debian Os. ( Let's name OS2 )

mmcblk0p4 is persistent storage.

I am using connman as a network manager. Now all my networks that are connected are stored in /var/lib/connman/ directory. I want this directory to be available for both the OS1 and OS2. So my wifi Configuration from One Os can be available in Another OS.

I created a Shared_Memory directory and mounted the persistent partition on /root/Shared_Memory. I created a var directory in Shared_Memory directory and under var I created a lib directory. I created soft links between the persistent storage and /var/lib/connman/ directory as follows:

Quote:
cp -a /var/lib/connman /root/Shared_Memory/var/lib/connman
rm -r /var/lib/connman
ln -s /root/Shared_Memory/var/lib/connman /var/lib/connman
But then I faced the issue in the booting from the Partition. ( I was unable to boot from the Partition in which I made the changes )

So I mounted the Shared partition on my /home/debian path by creating a directory Shared_Memory.

Quote:
mount /dev/mmcblk0p4 /home/debian/Shared_Memory
And added in the /etc/fstab for making the mount permanent:-

/dev/mmcblk0p4 /home/debian/Shared_Memory ext4 defaults 0 2
I again created var directory under Shared_Memory and lib directory under var in Shared_Memory.

I repeated the above procedure on the /home/debian/Shared_Memory/var/lib directory and I was able to boot in the Partition.

But when I tried to connect a network using connman I was unable to connect to the Network.

So after searching for some time, I came across the /run/connman/resolv.conf file and when any network is connected using connman then all the nameserver and IP-address are stored there by default.

I found that /etc/resolv.conf is symlinked to the /run/connman/resolv.conf. And when I am trying to connect the network this breaks the Symbolic link at /etc/resolv.conf.

I found that configuration for the Symbolic link is stored under /etc/init.d/connman. I updated this line in the connman script from /etc/init.d/:

Quote:
mkdir -p /home/debian/Shared_Mem/run/connman
ln -sf /home/debian/Shared_Mem/run/connman/resolv.conf /etc/
I have restarted the service as follows:

Quote:
sudo chmod +x connman
sudo update-rc.d connman defaults
sudo service connman restart
After this, I have rebooted the system and then When I checked the /run/ directory It had a connman directory under it then I checked the Shared_Memory directory and under /run/ it has a connman directory.

Now when I try to connect the network the resolv.conf ( This is created dynamically whenever a network is connected ) is created at /run/connman/ But according to my understanding it should be created at this path /home/debian/Shared_Mem/run/connman/resolv.conf

How can I create a symbolic link for /var/lib/connman directory and /run/connman/resolv.conf so that it will connect to the network?
 
Old 03-05-2019, 01:36 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
i don't really see what the point is of opening yet another thread for this topic:
https://www.linuxquestions.org/quest...an-4175649167/
https://www.linuxquestions.org/quest...os-4175649017/
 
  


Reply

Tags
debian, linux, partition, symbolic link, wifi



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Facing issues in configuring Soft link for Connman Directory ( Debian ) Sharvin26 Linux - Software 3 03-01-2019 04:14 AM
Issues With Building ConnMan 1.31/iptables 1.6.0 tmose1106 Linux - Software 0 04-02-2016 10:51 PM
Slightly newbie: configuring either NetworkManager or Connman for E17 Something Else Linux - Networking 2 05-16-2013 04:10 PM
Debian Squeeze - Connman Does not see network Interfaces Jeff91 Linux - Software 0 06-24-2011 08:57 AM
LXer: Intel, Nokia Further Push ConnMan Software LXer Syndicated Linux News 0 06-23-2009 11:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration