Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8528275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:45:55+00:00 2026-06-11T08:45:55+00:00

I am using linux to develop an embedded application. I have a HOST linux

  • 0

I am using linux to develop an embedded application. I have a HOST linux distro (fedora) and a TARGET linux distro (not sure what it is but it doesnt matter).

The TARGET file system is a folder in the HOST file system. So for example the TARGET boots via nfs from /home/paul/target/rootfs on the HOST filesystem, inside which is the usual linux file structure.

I am adding a daemon program to the TARGET. I am cross compiling it on the HOST and using a make target (make install) to copy files into the TARGET file system and set up the daemon to run. I copy

  • the daemon binary
  • some libs & a start up script
  • some symbolic links (symlinks) to facilitate auto starting of the daemon

It is the later of these that is giving me problems. In order to auto start on boot I need to create symlinks in the TARGET fs at /etc/rc.d/rc0.d through to rc6.d, which point to my start up script /etc/rc.d/init/d/mdns.

The problem is I need to create these symlinks on the HOST machine but for use by the TARGET. So they cannot point to the full path as seen by the HOST machine, they need to point to the path as seen when the TARGET runs.

So for example

I need to create a symlink in /home/paul/target/rootfs/etc/rc0.d but the symlink needs to be called K16mdns and point to /etc/init.d/mdns not /home/paul/target/rootfs/etc/init.d/mdns

How can I use the ln command to do this? I need to specify 3 things to ln (besides the -s flag):- The links file name, the target of the link and the directory to create the link in. I dont see this combination in the ln man page.

It always seems to end up either mucking up the /etc/rc.d directories on the HOST or creating symlinks in the TARGET fs using paths only relevant to the HOST which obviously fail (The TARGET doesnt have the path /home/paul/target/rootfs/etc/init.d/mdns).

When I create the symlinks manually on the TARGETs command line it all works great but clearly this isnt a practical solution.

Thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:45:57+00:00Added an answer on June 11, 2026 at 8:45 am

    You should use relative paths when symlinking, e.g.

    cd /home/paul/target/rootfs/etc/init.d
    ln -s mndns ../rc0.d/K16mdns
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to develop a GUI application using C++ on Linux or Windows. My
I have to develop a small application that will connect to a Linux server
I've been asked to develop an HMI application using an Android Tablet, but I'm
I develop cross-platform application for Maemo/Meego/Linux platforms using python (PySide). I use a workaround
I'd like to develop a Linux(here mainly KDE)/Win/Mac application using QT. The thing is
I am using Linux Mint 12, Kernel 3. I have installed and configured Open
I'm using linux. I have a function called like: PlayBackgroundIntroMusic((char *)IntroMusic); The functions is:
I'm using Linux Ubuntu Intrepid Ibex and using as compiler the gcc , but
I'm programming C using Linux gcc with -std=c89 switch. I have a variable storing
We develop an application in an embedded environment. It is a high level computing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.