NSLU2-Linux
view · edit · print · history

DS101.PersistentHomedir History

Hide minor edits - Show changes to markup

April 23, 2006, at 06:44 PM by eriktar --
Added lines 40-48:

The third way

mv /root /volume1/root

Edit /etc/passwd and change the following line from:

root:x:0:0:root:/root:/opt/bin/bash

to:

root:x:0:0:root:/volume1/root:/opt/bin/bash
September 12, 2005, at 03:19 AM by Doughboy --
Changed lines 5-6 from:

The contents of the ramdisk are copied from /dev/hda4 on boot. So to root's homedir "stick", do the following:

to:

The contents of the ramdisk are copied from /dev/hda4 on boot. So to make root's homedir "stick", do the following:

Changed line 14 from:
  1. umount /tmp
to:
  1. umount /mnt
Added lines 16-39:


Alternate Method

The DS101's /dev/hda4 (not sure about g+) seems to be persistent across reboots initiated by reboot command or holding down the power button. Afterwards, even if the unit is unplugged it seems to be persistent. The ramdisk and dev/hda4 seem to be in sync always with the following exception:

When it is not shutdown cleanly (eg. you cut power on the DS101 while it is booted and running) then on subsequent restart it appears to "reset" the entire /dev/hda4 to a stock configuration (presumably from flash?).

This needs more verification - need others to test and provide feedback.

Instructions:

  1. mv /root /volume1/root
  2. ln -s /volume1/root root
  3. Add following lines at end of /opt/etc/rc.optware
    rm -rf /root
    ln -s /volume1/root /root
  4. reboot
September 12, 2005, at 12:29 AM by repvik --
Added lines 1-15:

Making root's homedir persistent

The / directory of the ds101 and ds101g+ is in a ramdisk. Presumably to let the drive spin down properly. This also means that certain directories (like /bin, /dev/, etc.defaults) are lost when you power off or restart. The contents of the ramdisk are copied from /dev/hda4 on boot. So to root's homedir "stick", do the following:

  1. mkdir /volume1/root
  2. mount /dev/hda4 /mnt
  3. cd /mnt
  4. mv root/.profile /volume1/root
  5. rmdir root
  6. ln -s /volume1/root root
  7. cd /
  8. umount /tmp
  9. reboot to verify that the change stuck
view · edit · print · history · Last edited by eriktar.
Based on work by Doughboy.
Originally by repvik.
Page last modified on April 23, 2006, at 06:44 PM