Author Topic: Symlink /home To /mnt/ide2/home  (Read 4333 times)

climber

  • Full Member
  • ***
  • Posts: 189
    • View Profile
Symlink /home To /mnt/ide2/home
« on: March 05, 2007, 03:48:01 am »
Hi,

I want to create the following symlink:

/home is a symlink of /mnt/ide2/home


What I did:

- copy the whole /home directory to /mnt/ide2/home
- Create symlink:  ln -s /mnt/ide2/home/ /home


When I do a reboot I get the following error message:

Module dependencies:     OK
mount: special device /hom/user  does not exist

I think I did not all entries but I don't know where and which to do to fix this problem.

Can anybody help me?


Thanks
climber

SL-C3100 with pdaXrom beta3

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Symlink /home To /mnt/ide2/home
« Reply #1 on: March 05, 2007, 10:34:56 am »
Did you copy hidden stuff? I probably can't help, but I can weed out simple solutions for those who can.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

Chero

  • Hero Member
  • *****
  • Posts: 1140
    • View Profile
    • http://users.telenet.be/zaurususer/Chero
Symlink /home To /mnt/ide2/home
« Reply #2 on: March 05, 2007, 01:50:15 pm »
Do you actually have a problem - apart from the error message ?

I thought this message came from the "one-partition-setup".
Correct me if I'm wrong.

Chero.
HP-95LX -> HP Jornada 680 -> SL-C860 -> SL-C3100 -> Fuji u810 -> SL-C1000 -> HTC uni -> SL-C860 -> SL-C760.
March 12 2009 : Back because the Zaurus is one of a kind.
SL-C760 : pdaXrom
Pandora pre-ordered -> received and tested : great device but not my cup of tea -> sold.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3707
    • View Profile
Symlink /home To /mnt/ide2/home
« Reply #3 on: March 05, 2007, 04:46:34 pm »
do the pdaXrom startup scripts act like those in sharp or cacko, which attempt to recreate the home directory if the /home/zaurus/Documents directory doesn't exist?

I tried moving /home/zaurus/Documents elsewhere and symlinking in, using cacko1.23 on my 3100 and the startup scripts tried to remove the symlink and fix things, but actually broke it completely!
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

Drake01

  • Full Member
  • ***
  • Posts: 226
    • View Profile
Symlink /home To /mnt/ide2/home
« Reply #4 on: March 05, 2007, 10:24:28 pm »
Quote
mount: special device /hom/user  does not exist

I think I did not all entries but I don't know where and which to do to fix this problem.

Can anybody help me?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=155384\"][{POST_SNAPBACK}][/a][/div]
I'm not an expert on Linux, but on my desktop and my Zaurus, /home is mounted.  It's not just a simple directory; the system is actually mounting it.  I don't believe you can simply symlink it.  I think you'd have to find what is mounting it and change that script.

I would suggest changing /etc/fstab, but I've heard that this doesn't always work as one would expect in pdaXrom.
Device: SL-C3200 running pdaXii13v2 build 5.5.0
Networking: Symbol Spectrum24 WLAN card; Kingston CIO10T CF NIC
Storage: 4GB Transcend 150x SD; 16GB Transcend 133x CF; 4GB Seagate CF HDD; 4GB Patriot SD
HID: Logitech V450 Laser Mouse; generic silicone USB keyboard; 2 generic optical mice; stock plastic stylus
GPS: generic "UT-41" USB GPS Receiver
Case: neoprene case from my old Palm foldable keyboard

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Symlink /home To /mnt/ide2/home
« Reply #5 on: March 05, 2007, 10:31:32 pm »
as I have mentioned before in some other post, the best would be to bind the directory instead:


mount --bind /mnt/ide2/home /home
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

climber

  • Full Member
  • ***
  • Posts: 189
    • View Profile
Symlink /home To /mnt/ide2/home
« Reply #6 on: March 06, 2007, 03:30:26 am »
Chero: No I have only the error message on booting but everything works after.

Meanie: That could be also a solution and maybe the better one! Where should I put in your code to bind it automatically?

Thanks
climber

climber

  • Full Member
  • ***
  • Posts: 189
    • View Profile
Symlink /home To /mnt/ide2/home
« Reply #7 on: March 09, 2007, 06:26:56 am »
Meanie,

could you help me please because I tried so many things without success!

Where should I put in your code to bind it automatically?

Thanks
climber

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Symlink /home To /mnt/ide2/home
« Reply #8 on: March 09, 2007, 09:40:44 am »
Quote
Meanie,

could you help me please because I tried so many things without success!

Where should I put in your code to bind it automatically?

Thanks
climber
[div align=\"right\"][a href=\"index.php?act=findpost&pid=155822\"][{POST_SNAPBACK}][/a][/div]

Hi Climber,

because I also did a similar thing recently, I can tell you:

Put this into a script called /etc/rc.d/init.d/mountbind:

Code: [Select]
#!/bin/sh
. /etc/rc.d/init.d/functions
COUNTER=0

case "$1" in
  start)
    while [ ! -d /mnt/ide2/home ]; do
  sleep 1
  COUNTER=$[$COUNTER+1]
  if [ $COUNTER -gt 45 ]; then
    echo /mnt/ide2/home does not become available!
    echo Cannot bind /home!
    echo Please try removing any CF cards and reboot.
    echo Or did /mnt/ide2/home get deleted or corrupted?
    action "Binding home from HDD:" mount --bind /mnt/ide2/home /home
    exit 1
  fi
    done
    action "Binding home from HDD:" mount --bind /mnt/ide2/home /home
;;
  stop)
;;
esac
exit 0

As you see, this uses the same looped detection mechanism as I suggested for your swap issue in z-portal.info. :-)
In fact, this is the problem what I used that for initially.

Once more for the OESF people:

Sometimes, the devices (SD or CD cards) don't get available quickly enough in order to let subsequent rc scripts use the devices.
For example, when there is a CF WLAN card inserted, the microdrive initialization is so slow, that a script liek the one above, albeit executed as the last script in the rc sequence, cannot access the microdrive.
Hence the need for that loop.
It checks each second if the directory (and hence the device) in question is available and only THEN runs the actual action.

Why two occurrecnces of the action? The purpose is that the user gets the red "FAILED" message in the timeout case.
Of course, one could leave away the "exit 1" instead and make te script even more elegant with an error state variable and conditional exit value at the end... :-)


Oh, and link this script to rcX.d (X=1..5) as "S60mountbind".
Otherwise it won't be executed ;-)
Also, be sure to make the script executable.

daniel
« Last Edit: March 09, 2007, 09:41:26 am by daniel3000 »
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

climber

  • Full Member
  • ***
  • Posts: 189
    • View Profile
Symlink /home To /mnt/ide2/home
« Reply #9 on: March 15, 2007, 06:21:00 am »
Daniel,

thank you for your answer. It works very well !!! :-)

Regards
climber