DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-03-15 18:20:40

Stork
Member
Registered: 2008-12-18
Posts: 32

Root's files not lasting over reboots

The files I put in the root directory, when I'm logged in as root, are disappearing when the DSN 323 is rebooted.  First, why?  Second, how do I prevent this from occurring?

I'm particularly concerned about my .profile file which defines aliases and the checks my Seagate drive.

Firmware 1.05 w/funplug 0.5

Offline

 

#2 2009-03-15 19:07:56

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Root's files not lasting over reboots

What's the 'root directory'? If you mean /home/root, then it's on the ramdisk.

Offline

 

#3 2009-03-15 20:24:04

Stork
Member
Registered: 2008-12-18
Posts: 32

Re: Root's files not lasting over reboots

Yes, "root directory" = "/home/root/".

OK.  How do I get it to save and execute a .profile type of file upon login after a reboot or shutdown.?  Or, am I SOL?

Are the user login accounts also on the ramdisk?

Offline

 

#4 2009-03-15 22:10:02

jdoering
Member
Registered: 2008-04-10
Posts: 95

Re: Root's files not lasting over reboots

Yes; /home is part of the ramdisk based rootfs.

It should be easy to create something like /ffp/home and then symlink that to /home either from fun_plug or with an ffp startup script (in /ffp/start). There don't appear to be any files under /home by default so nothing to preserve there. I guess you could change the home directory locations themselves; but those come from the passwd file and would have to be synced back to the flash partitions (like password changes) so the symlink method is probably more direct. I haven't tried this; but it looks straight-forward - unless somehow who has tried is aware of gotchas?

-Jeff

Offline

 

#5 2009-03-15 22:54:53

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Root's files not lasting over reboots

not aware of any problems, but I use a moveroot script, found here http://dns323.kood.org/forum/viewtopic.php?id=2753

Offline

 

#6 2009-03-15 23:01:45

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Root's files not lasting over reboots

how about usermod and store-passwd.sh? too easy?

Offline

 

#7 2009-03-15 23:11:39

Stork
Member
Registered: 2008-12-18
Posts: 32

Re: Root's files not lasting over reboots

I give.

Fonz, if usermod & store-passwd.sh will make it permanent, then I'll go for it.  BUT, this is beyond my knowledge.  Please give the full commands.  TIA.

Offline

 

#8 2009-03-16 00:10:40

luusac
Member
Registered: 2008-04-29
Posts: 360

Re: Root's files not lasting over reboots

an example of usermod is in the script that I posted the link to.  As to store-passwd.sh - it is located in /ffp/sbin (in ffp 0.5 at least) have a look there, or in the wiki under how to:ffp http://dns323.kood.org/howto:ffp

Last edited by luusac (2009-03-16 00:15:45)

Offline

 

#9 2009-03-16 02:33:15

Stork
Member
Registered: 2008-12-18
Posts: 32

Re: Root's files not lasting over reboots

I tried the script.  At first it didn't work.  After trying a bunch of "stuff" with nothing working, I then looked at the ffp/start directory with an "ls -alg".  It took about 30 seconds to for me to realize that the "mvhomeroot.sh" only had rw permissions.  Hmmm.  So, I chmod'd it for rwx and rebooted.  Upon login, it executed the .profile file as I hoped.  Victory!  Thanks.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB