Author Topic: Trying To Understand The C3000 Bootprocess  (Read 2299 times)

ivo

  • Newbie
  • *
  • Posts: 14
    • View Profile
Trying To Understand The C3000 Bootprocess
« on: January 29, 2005, 06:55:34 pm »
I'm trying to figure out how exactly the c3000 (normally) boots.


As far as I know, the root filesystem is on mtd2, the home is on mtd3, /etc is a symlink to /home/etc, and the original (?) etc is in /root/etc

How can the system boot if (initially) /home (and therefore, /etc) isn't mounted? How does the system (init?) know that /root/etc is to be used?

I suspect that /root isn't related to root's homedirectory (as on many linux systems) but that it's an alternative, temporary rootfilesystem, somehow. I just can't find where the switch takes place to the normal environment

Oh, and does anyone know what 'smf' means? (It's the name of the system on mtd1, I expect it's the standalone flash linux environment)

Is there anyone who can shed some light on this?

Cheers

  Ivo

ivo

  • Newbie
  • *
  • Posts: 14
    • View Profile
Trying To Understand The C3000 Bootprocess
« Reply #1 on: January 30, 2005, 07:39:36 am »
Quote
I'm trying to figure out how exactly the c3000 (normally) boots.


As far as I know, the root filesystem is on mtd2, the home is on mtd3, /etc is a symlink to /home/etc, and the original (?) etc is in /root/etc

How can the system boot if (initially) /home (and therefore, /etc) isn't mounted? How does the system (init?) know that /root/etc is to be used?

I suspect that /root isn't related to root's homedirectory (as on many linux systems) but that it's an alternative, temporary rootfilesystem, somehow. I just can't find where the switch takes place to the normal environment
[div align=\"right\"][a href=\"index.php?act=findpost&pid=64490\"][{POST_SNAPBACK}][/a][/div]

Ok, I figured it out myself eventually - here's an explanation for anyone who's interested.

Upon initial boot, /etc is a link to /home/etc. /home isn't mounted at this point, and contains a symlink /home/etc to /root/etc. So effectively, /etc is /root/etc.

In /root/etc, rc.rofilesys does the interesting stuff, such as mounting /dev/mtdblock3 as /home  and, eventually, starting the pcmcia system to detect and mount the microdrive.

Once /home is mounted from /dev/mtdblock3 and rc.rofilesys is finished, execution returns to rc.sysinit, which will do the appropriate runlevel stuff in rc5.d. By now, this will be a new, 'filled' directory (because home, and therefore the new /etc, was mounted)