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 2006-09-07 21:37:40

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Debian how-to

Installation

Code:

# Get gunzip, tar and busybox-with-chroot from
# gzip-1.3.5.tar.bz2, tar-1.15.91.tar.bz2 and busybox-1.00-pre1.tar.bz2 at http://download.dsmg600.info/
ln -s /mnt/HD_a2/busybox-with-chroot /bin/chroot
mkdir /mnt/HD_a2/slind
cd /mnt/HD_a2/slind
wget http://www.emdebian.org/slind/slind-installer/powerpc/slind-installer-nfsroot-powerpc.tar.gz
gunzip -c slind-installer-nfsroot-powerpc.tar.gz | tar -xf -
mount -t proc proc /mnt/HD_a2/slind/proc
cp /etc/resolv.conf /mnt/HD_a2/slind/tmp
chroot /mnt/HD_a2/slind /bin/sh
# Select a or b option
# a) For busybox variant (recommended)
debootstrap --arch powerpc suffolk / http://www.emdebian.org/slind/target/
# b) For coreutils/sysvinit variant (takes way too much memory!)
debootstrap --arch powerpc --variant=gnu suffolk / http://www.emdebian.org/slind/target/
# End of selection
exit
umount /mnt/HD_a2/slind/proc

Using

Code:

mount -t proc proc /mnt/HD_a2/slind/proc
chroot /mnt/HD_a2/slind /bin/sh

Getting nano

Code:

wget http://ftp.ee.debian.org/debian/pool/main/n/ncurses/libncurses5_5.4-4_powerpc.deb
wget http://ftp.ee.debian.org/debian/pool/main/n/nano/nano_1.2.4-5_powerpc.deb
dpkg -i libncurses5_5.4-4_powerpc.deb
dpkg -i nano_1.2.4-5_powerpc.deb
export TERM='vt100'
nano

Getting dropbear

Code:

wget http://security.debian.org/debian-security/pool/updates/main/z/zlib/zlib1g_1.2.2-4.sarge.2_powerpc.deb
wget http://security.debian.org/debian-security/pool/updates/main/d/dropbear/dropbear_0.45-2sarge0_powerpc.deb
dpkg -i zlib1g_1.2.2-4.sarge.2_powerpc.deb
dpkg -i dropbear_0.45-2sarge0_powerpc.deb
/etc/init.d/dropbear start

Notes
As you can see I have'nt setup apt yet, all here is like 10 minutes of my work tongue
Also it might seem crazy to install base-system over installer, but it did work better this way. To install base system into new root use

Code:

debootstrap --arch powerpc suffolk /new http://www.emdebian.org/slind/target/
cp /etc/resolv.conf /new/tmp

and for Using

Code:

mount -t proc proc /mnt/HD_a2/slind/new/proc
chroot /mnt/HD_a2/slind/new /bin/sh

• DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
• NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#2 2006-09-08 10:35:32

qn1234
Member
Registered: 2006-08-18
Posts: 94

Re: Debian how-to

Excellent.  It seems to work fine for me.  Thanks for the code.

--
Quang

Offline

 

#3 2006-10-08 10:24:29

tksm
Member
Registered: 2006-09-27
Posts: 16

Re: Debian how-to

cant get
gunzip -c slind-installer-nfsroot-powerpc.tar.gz | tar -xf-
to work, need some help

Offline

 

#4 2006-10-08 14:31:52

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Debian how-to

gunzip is symlink to gzip, you also need to add path, like this:

Code:

/mnt/HD_a2/gunzip -c slind-installer-nfsroot-powerpc.tar.gz | /mnt/HD_a2/tar -xf-

• DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
• NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#5 2006-10-08 18:11:30

tksm
Member
Registered: 2006-09-27
Posts: 16

Re: Debian how-to

haha, wow, i shoulda seen that one comming a mile away, got it working now

Offline

 

#6 2007-03-06 21:19:47

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Debian how-to

I did update wiki page with proper debian chroot howto
http://dsmg600.info/howto:chroot_debian


• DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
• NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#7 2007-04-22 19:31:03

hogger
New member
Registered: 2007-04-22
Posts: 1

Re: Debian how-to

I've used debian a lot, and love the idea of running debian on my g600. Does this take away the need for all the specially-compiled apps found on this forum?

Once someone chroots to a debian install on the HD does that mean what it would seem to mean -- simply apt-get anything you want and it just works?

For instance, I'd like a dhcp server, and there's not one in the dsmg600.info downloads list, but surely there's a debian one.

Thanks very much for the work on this sala.

Offline

 

#8 2007-04-23 10:05:33

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Debian how-to

Yes you can install new programs using apt-get, but you probably fail (I haven't tried it myself, I only report what I have heard form others)   setting up dhcp server because of kernel limitations (and you can't apt-get new kernel). In this case your options is to setup a serial port and start using custom firmware, which removes limitations in question, or to use loader.o to boot custom kernel without flashing.
All information about these tasks are posted to wiki (and forum).


• DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
• NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#9 2007-05-12 17:46:21

lucas72
Member
Registered: 2007-05-11
Posts: 8

Re: Debian how-to

Hi guys, some prblms here.... hmm

from http://dsmg600.info/howto:telnet

   1.       mkdir /mnt/HD_a2/work && cd /mnt/HD_a2/work
   2.       ln -s /mnt/HD_a2/bzip2 /mnt/HD_a2/bzcat
   3.       /mnt/HD_a2/bzcat debootstrap-0.3.3.1_uclibc_powerpc.tar.bz2 | /mnt/HD_a2/tar -xvf -
   4.       export DEBOOTSTRAP_DIR=`pwd`/usr/lib/debootstrap
   5.       Extract busybox-1.00.tgz and add extracted bin and sbin directory to a PATH. For example export PATH=$PATH:/mnt/HD_a2/bin and export PATH=$PATH:/mnt/HD_a2/sbin [Where should busybox-1.00.tgz should extracted? That file as far as I see contain only "busybox-1.00.tar" that contain the file "busybox-1.00"]
   6.       ./usr/sbin/debootstrap –arch powerpc sid /mnt/HD_a2/debian http://ftp.nl.debian.org/debian [what this command does?]
   7.       cp /etc/resolv.conf /mnt/HD_a2/debian/etc/resolv.conf [dir 'etc' under '/mnt/HD_a2/debian/' doesnt exist, normal? I added manually]
   8.       mount -t proc proc /mnt/HD_a2/debian/proc
   9.       cd /
  10.      chroot /mnt/HD_a2/debian [chroot doesnt work for me "-ash: chroot: not found"]
  11.      apt-get update [apt-get: not found]
  12.      apt-get install locales
  13.      dpkg-reconfigure locales
  14.      passwd root
  15.      apt-get install dropbear
  16.      apt-get install hotplug

Last edited by lucas72 (2007-05-12 17:47:20)

Offline

 

#10 2007-05-12 21:57:58

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Debian how-to

All your problem start with busybox-1.00.tgz because you failed to extract it correctly. It is tgz (tar+gz) archive meaning it contains gz archive and tar archive. As you have tar file there - then just extract it once again. And it doesn't  matter where as long as you can add extracted bin and sbin to the path.

If you would consider to update to the latest custom firmware then you can skip busybox part because all needed tools are already in firmware. But before you update your DSM-G600 with custom firmware you should read all related warnings!

./usr/sbin/debootstrap –arch powerpc sid /mnt/HD_a2/debian http://ftp.nl.debian.org/debian downloads and installs latest debian sid to your DSM-G600 hard disk.


• DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
• NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#11 2007-05-13 03:46:42

lucas72
Member
Registered: 2007-05-11
Posts: 8

Re: Debian how-to

Thank you very much Sala, I was having some problem with my winrar under windowz .... he was showing me wrong contents for .TGZ files. Now I've both BIN and SBIN under /mnt/HD_a2..... problem is that now I got:

# cd /
# chroot /mnt/HD_a2/debian
chroot: cannot execute /mnt/HD_a2/ash: No such file or directory

Luc

Offline

 

#12 2007-05-13 10:50:29

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Debian how-to

most times chroot /mnt/HD_a2/debian should work but you can try chroot /mnt/HD_a2/debian /bin/sh


• DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
• NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#13 2007-05-13 19:41:19

lucas72
Member
Registered: 2007-05-11
Posts: 8

Re: Debian how-to

Nothing changed.... hmm

# chroot /mnt/HD_a2/debian /bin/sh
chroot: cannot execute /bin/sh: No such file or directory

There could be some strange thing with firmware 1.02eu ?! Version is B2

Offline

 

#14 2007-05-13 20:49:56

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Debian how-to

This probably means that you did fail again with some steps before. Verify that debian is installed to debian directory.


• DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
• NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#15 2007-05-14 02:22:39

lucas72
Member
Registered: 2007-05-11
Posts: 8

Re: Debian how-to

ok sala I'll never be the fastest cut & past-er of the world but I can do this job! lol

I wont' tell u the time I spent last two days on such small box!! lol

No seriuosly, I think I'm missing something here.... roll

Offline

 

#16 2007-05-14 09:15:13

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Debian how-to

In /mnt/HD_a2/debian directory you should see debian installation with regular directory tree (for example /etc /bin /sbin /lib /usr). If you do not have it then you probably did fail in debootstrap step (if everything works well you should see there some apt-geting and package installations, very similar to regular debian).
Also debootstrap stores a log file of its failures and successes, unfortunately I cant remember where it's stored by default. It might be some where in debootstrap or usr directory.


• DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
• NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#17 2007-05-15 02:18:32

lucas72
Member
Registered: 2007-05-11
Posts: 8

Re: Debian how-to

There's a price for who understand what's the hell is going on here......

If I dont' manually create /mnt/HD_a2/debian:

# ./usr/sbin/debootstrap -arch powerpc sid /mnt/HD_a2/debian http://ftp.nl.debian.org/debian
E: No such script: /mnt/HD_a2/debian

...if I do create the above dir:

# ./usr/sbin/debootstrap -arch powerpc sid /mnt/HD_a2/debian http://ftp.de.debian.org/debian
#

almost nothing happen it return to the prompt and create only the below [empty] dirs:

/debian/var/lib/apt/lists/partial/
/debian/var/cache/apt/archives/partial/


PRICE:  lol  wink

http://www.spesaonline.com/SOL/images/products/big/8002250800012.jpg


...latest news...

# ./usr/sbin/debootstrap -verbose -arch powerpc sid /mnt/HD_a2/debian http://ftp.nl.debian.org/debian
E: No such script: sid

Last edited by lucas72 (2007-05-15 02:23:00)

Offline

 

#18 2007-05-15 09:26:50

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Debian how-to

./usr/sbin/debootstrap --arch powerpc sid /mnt/HD_a2/debian http://ftp.nl.debian.org/debian
Before arch there is two - characters, like -- Unfortunately Wiki just eats them up and I did forget to mention it here before big_smile
Also look up this debootstrap.log


• DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
• NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#19 2007-05-15 12:30:01

lucas72
Member
Registered: 2007-05-11
Posts: 8

Re: Debian how-to

I tried also with --arch but I receive a "segmentation fault"....... yikes

Offline

 

#20 2007-05-15 12:54:04

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Debian how-to

Still look for debootstrap.log


• DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
• NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#21 2007-05-19 00:23:03

foogy
Member
Registered: 2007-02-06
Posts: 9

Re: Debian how-to

I have some problems too.
This is what my debootstap.log looks like

# cat debootstrap.log
/bin/sh: Can't open tr
/bin/sh: Can't open sort
/bin/sh: Can't open printf
/bin/sh: Can't open sed
/bin/sh: Can't open sed
/bin/sh: Can't open sed

Offline

 

#22 2007-05-19 00:35:56

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Debian how-to

foogy wrote:

I have some problems too.
This is what my debootstap.log looks like

# cat debootstrap.log
/bin/sh: Can't open tr
/bin/sh: Can't open sort
/bin/sh: Can't open printf
/bin/sh: Can't open sed
/bin/sh: Can't open sed
/bin/sh: Can't open sed

You obliviously did skip/fail exporting custom busybox bin and sbin to the PATH


• DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
• NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#23 2007-05-19 11:09:47

foogy
Member
Registered: 2007-02-06
Posts: 9

Re: Debian how-to

ah... off course!!

Had to export the PATH like this
export PATH=/mnt/HD_a2/bin/:/mnt/HD_a2/sbin:$PATH   
not like this
export PATH=$PATH:/mnt/HD_a2/bin/:/mnt/HD_a2/sbin

now the file looks like this
# cat /mnt/HD_a2/debian/debootstrap/debootstrap.log
Segmentation fault
Segmentation fault

Offline

 

#24 2007-05-19 13:47:24

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Debian how-to

Hm, damn, I think that custom busybox binary don't work. Try to run /mnt/HD_a2/bin/busybox --help and then try to run printf, after exporting PATH


• DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
• NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#25 2007-05-19 17:42:13

foogy
Member
Registered: 2007-02-06
Posts: 9

Re: Debian how-to

printf seems to work?!

==============================================
# /mnt/HD_a2/bin/busybox --help
BusyBox v1.00 (2007.02.12-15:40+0000) multi-call binary

Usage: busybox [function] [arguments]...
   or: [function] [arguments]...

        BusyBox is a multi-call binary that combines many common Unix
        utilities into a single executable.  Most people will create a
        link to busybox for each function they wish to use, and BusyBox
        will act like whatever it was invoked as.

Currently defined functions:
        [, ar, arping, ash, autoip, awk, basename, bunzip2, busybox, bzcat,
        cat, chgrp, chmod, chown, chroot, clear, cmp, cp, crond, crontab,
        cut, date, df, dmesg, dumpleases, echo, egrep, env, expr, false,
        fgrep, find, free, freeramdisk, fsck.minix, goweb, grep, gunzip,
        gzip, head, hexdump, hostname, hwclock, id, ifconfig, init, insmod,
        kill, killall, length, ln, login, losetup, ls, lsmod, md5sum,
        mkdir, mkfs.minix, mknod, mkswap, modprobe, more, mv, netstat,
        pidof, ping, pipe_progress, pivot_root, poweroff, printf, ps,
        pwd, rdate, reboot, reset, rm, rmmod, route, sed, sh, sleep, sort,
        swapoff, swapon, sync, tail, tar, telnetd, test, top, touch, tr,
        true, udhcpc, udhcpd, uname, uniq, uptime, vi, wc, yes, zcat

# printf
BusyBox v1.00 (2007.02.12-15:40+0000) multi-call binary

Usage: printf FORMAT [ARGUMENT...]

#
===================================================

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB