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 2012-04-06 03:04:45

n1ng
Member
Registered: 2010-01-07
Posts: 7

Debnas and DNS325

Hi Everyone,

I've upgraded to a DNS325 from the DNS323.  I'm trying to port my fun_plug script over to the DNS325.  I've being booting off a usb drive successfully with my DNS323, but can seem to get it working with this DNS325.  Any help would be greatly appreciated!

Here is what the fun_plug script looks like:

#Edited fun_plug mounts
export DISK1=/mnt/HD/HD_a2
export DISK2=/mnt/HD/HD_b2
export USBROOT=/mnt/USB/HD_c1
export DISTDIR=linux

cd $USBROOT

mount --bind $DISK1 $DISTDIR$DISK1
mount --bind $DISK2 $DISTDIR$DISK2
mount --bind / $DISTDIR/mnt/root
mount --bind /dev $DISTDIR/dev
mount --bind /sys  $DISTDIR/sys
mount --bind /sys/crfs $DISTDIR/sys/crfs
mount --bind /web $DISTDIR/web
mount --bind /proc $DISTDIR/proc

cp -f /proc/mounts $DISTDIR/etc/mtab
rm -f $DISTDIR/etc/fstab
touch $DISTDIR/etc/fstab
cp -f /etc/resolv.conf $DISTDIR/etc
hostname >$DISTDIR/etc/hostname
cp -f /etc/hosts $DISTDIR/etc

$USBROOT/$DISTDIR/boot/chroot $USBROOT/$DISTDIR /boot/linuxrc

Offline

 

#2 2012-04-06 11:05:57

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Debnas and DNS325

What happens when you execute the script?

Offline

 

#3 2012-04-10 06:19:23

n1ng
Member
Registered: 2010-01-07
Posts: 7

Re: Debnas and DNS325

The system boots up normally.  Without ssh access.

Offline

 

#4 2012-04-10 20:26:49

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Debnas and DNS325

I suggest to collect some loginfo:

Code:

#!/bin/sh

exec >>/mnt/HD/HD_a2/debian.log 2>&1

#Edited fun_plug mounts
export DISK1=/mnt/HD/HD_a2
export DISK2=/mnt/HD/HD_b2
export USBROOT=/mnt/USB/HD_c1
...

Offline

 

#5 2012-04-12 02:44:07

n1ng
Member
Registered: 2010-01-07
Posts: 7

Re: Debnas and DNS325

Thanks for the tip here is the output.  BTW I managed to install debian squeeze to the HDD, updated the script to look for "squeeze" directory instead of "linux".  Still cannot ssh in.

This is what is in the log:

mount: mount point squeeze/sys/crfs does not exist
mount: mount point squeeze/web does not exist
/boot/linuxrc: 15: /etc/init.d/sysklogd: not found
/boot/linuxrc: 16: /etc/init.d/klogd: not found
/boot/linuxrc: 27: MAKEDEV: not found
/boot/linuxrc: 38: /etc/init.d/atd: not found
Starting periodic command scheduler: cron.
/boot/linuxrc: 51: /usr/bin/killall: not found
/boot/linuxrc: 52: /usr/bin/killall: not found
Starting Samba daemons: nmbd smbd.
/boot/linuxrc: 60: /etc/init.d/mysql: not found
/boot/linuxrc: 61: apache2ctl: not found

Offline

 

#6 2012-04-12 11:39:08

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: Debnas and DNS325

Where did this squeeze rootfs come from? Actually this output looks normal, given that CHROOTROOT/boot/linuxrc tries to start some daemons directly, instead of parsing the /etc/rcX.d folders. I think this squeeze just hasn't installed the daemons that are 'not found'.
The only surprising part it that you expected sshd, and I don't see a 'not found' for it. So either your expectation is wrong, or sshd is started, but doesn't show up for some reason.

Offline

 

#7 2012-04-13 21:10:27

n1ng
Member
Registered: 2010-01-07
Posts: 7

Re: Debnas and DNS325

Got the squeeze rootfs from dlink's site.  I guess I will keep trying.  Mijzelf thanks for helping me out!

Offline

 

#8 2012-04-15 06:20:04

n1ng
Member
Registered: 2010-01-07
Posts: 7

Re: Debnas and DNS325

I think I figured it out.  Mijzelf is right.  The script does execute correctly.  I installed telnet to see if I can login via telnet versus ssh and it worked with the funplug usb script!  So I also checked the ssh.log dunno why I didn't think to do so earlier, and it turns out that ssh did launch correctly but killed itself because the rsa key files had global write permissions (or something like that).  So if will tinker with the startup script to perhaps change the permissions on the files.  Hopefully it's a fix that I can handle...

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB