We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,355 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Symbolic Link Problem - Read-only Root

In setting up an embedded system, a Linux box needed to have a read-only root partition. However, the OS must be able to write to certain files (the drive was partitioned into /, /home, /tmp, /usr, /var with the only read-only being / ). So I created symbolic links to the following files:
/etc/mtab (linked to /proc/mounts/etc/mtab)
/etc/network/interfaces (linked to /var/network/interfaces)
/etc/resolv.conf (linked to /var/network/resolv.conf)
/etc/hostname (linked to /var/network/hostname)

All work except /etc/hostname. Whenever I create the symbolic link, the system does not boot or fails to boot all the way.
Does anyone know a fix or an alternative to symbolic links here? /etc/hostname must be writeable.

1
Contributor
1
Reply
3 Weeks
Discussion Span
1 Year Ago
Last Updated
2
Views
Question
Answered
iamthesgt
Junior Poster
119 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

I was never able to find how to make the symbolic link, so I just wrote a simple script to remount the partition as rw, change the hostname, and remount the partition as ro.

iamthesgt
Junior Poster
119 posts since Nov 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
Question Self-Answered as of 1 Year Ago

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0640 seconds using 2.66MB