Restore IPKG after DSM upgrade on Synology
This Tutorial guides you through the steps needed to restore IPKG and the /opt/ folder after updating the DSM-Version.
1.) Restart the NAS
Restart (reboot) the NAS using the graphical interface from DSM after upgrading the DSM-version (DSM 4.2 -> DSM 4.3).
2.) Restore symbolic link /opt
While upgrading the DSM-version the symbolic link /opt gets lost. With the following command we are going to restore that.
NAS> ln -s /volume1/@optware/ /opt
3.) Check file /root/.profile
Check the file “/root/.profile” using vi (nano does not work jet). For editing press “i”, this puts the vi editor into insert mode. Press “” to exit the insert mode.
Use “:x ” to quit vi and save changes.
Use “:q!” to quit vi without saving.
NAS> vi /root/.profile
The file “/root/.profile” should look somthing like this:
umask 022
#PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbi$
#export PATH
#This fixes the backspace when telnetting in.
#if [ “$TERM” != “linux” ]; then
# stty erase
#fi
HOME=/root
export HOME
TERM=${TERM:-cons25}
export TERM
PAGER=more
export PAGER
PS1=”`hostname`> ”
alias dir=”ls -al”
alias ll=”ls -la”
# special library path def
#LD_LIBRARY_PATH=/opt/lib:/opt/include
#export LD_LIBRARY_PATH
4.) Check file /etc/rc.local
Check the file “/etc/rc.local” using vi.
NAS> vi /etc/rc.local
The file “/etc/rc.local” should look somthing like this:
#!/bin/sh
# Optware setup
#[ -x /etc/rc.optware ] && /etc/rc.optware start
exit 0
5.) Restart the NAS
After restarting the NAS everything should be like it was before upgrading the DSM-version. The “ipkg” command should be available and all the packages that were installed, for example “nano” 🙂
Reference
http://www.jufer.info/projekte/synology_nas/restore_ipkg_after_dsm_upgrade