Loading ...
Sorry, an error occurred while loading the content.

Debian on linkstation

Expand Messages
  • C. Scott Ananian
    The quickest way to get real applications running on your linkstation is to install Debian on it. That will get you a compact but fully-functioning system,
    Message 1 of 22 , Dec 9, 2004
    • 0 Attachment
      The quickest way to get 'real' applications running on your linkstation is
      to install Debian on it. That will get you a compact but
      fully-functioning system, and installing new applications is very easy.
      If you want, you can install a GUI and everything.

      James Stewart has talked about this option before; here's an
      (abbreviated) account of how I did it. Perhaps someone with more time
      could flesh this out into a proper guide.
      ------------
      1. Get root on the LinkStation. Create a share using the standard
      web interface; let's call it 'Linux'. We're
      going to create a slightly-expanded version of the basic
      LinkStation install in 'Linux' (you could perform these
      modifications directly to the linkstation root filesystem, but
      I prefer to leave that as close to 'stock' as possible).
      We'll use the bootstrap to install a 'proper' copy of Debian
      in a 'Debian' subdirectory of the 'Linux' share.

      As root:
      # ls /mnt
      You should see your 'Linux' directories.

      # tar cl / | tar -C /mnt/Linux -xv
      This will transfer the standard linkstation filesystem to 'Linux'.

      2. Download 'binary.zip' from http://kurobox.com/downloads
      Unzip it on your local computer and move the tar.gz files from
      inside it to the linkstation. Easiest way to do that is to move
      them to the linkstation's 'share' folder. Unpack these; for each
      file.tar.gz, do
      # tar -C /mnt/Linux -xf /mnt/share/file.tar.gz

      3. Install chroot; chroot into new root partition.
      The chroot binaries are in the 'Files' section of this group.
      Move chroot.tgz to the 'share' folder, and
      # tar -C /mnt/Linux/usr/sbin -xf /mnt/share/chroot.tgz
      Now move to your new bootstrap filesystem!
      # /mnt/Linux/usr/sbin/chroot /mnt/Linux /bin/bash

      4. Remount stuff inside chroot:
      # mount -t proc boot-proc /proc
      # mount /dev/ram0 /mnt2/ram
      # mount /dev/pts
      # mount /proc/bus/usb
      # mkdir -p /mnt/spool/tmp

      Now you've got a slightly-more functional unix system, with a compiler
      and other good stuff. If it only had 'wget' and 'zcat', it would be
      enough to install the debian bootstrap system...

      5. Install wget, and zcat (gzip).
      On an existing Debian system, do:
      $ apt-get source wget gzip debootstrap
      This will create folders 'wget-1.9.1', 'gzip-1.3.5', and 'debootstrap-0.2.45'.
      The version numbers might be slightly different for you, it shouldn't
      matter too much. But hang on a sec, we want the original gzip
      sources, not the patched Debian ones (or else we'll need to install
      automake on our bootstrap system, which we don't want to do):
      $ /bin/rm -rf gzip-1.3.5
      $ tar xzf gzip_1.3.5.orig.tar.gz
      Also download the debootstrap binary .deb for powerpc from:
      http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_0.2.45_powerpc.deb
      And extract the 'data.tar.gz' file from it:
      $ ar -xf debootstrap_0.2.45_powerpc.deb

      Tar these up:
      $ tar czf deboot_src.tgz debootstrap-0.2.45 data.tar.gz gzip-1.3.5 wget-1.9.1
      and move this to the 'share' folder.
      *** IF YOU DON'T HAVE ACCESS TO A DEBIAN SYSTEM, I'VE UPLOADED deboot_src.tgz
      *** TO THE GROUP 'FILES' SECTION FOR YOU.

      Now we're a little stuck here, because we can't actually see the
      'share' folder from our chroot-ed bootstrap system. Open a new window
      and log in as root again, then
      # mv /mnt/share/deboot_src.tgz /mnt/Linux/root
      Close that window and go back to your first one. As root:
      # cd /root/wget-1.9.1/
      # ./configure --prefix=/usr && make && make install
      # cd /root/gzip-1.3.5/
      # ./configure --prefix=/usr && make && make install

      6. Now we're going to compile debootstrap and ease into the
      instructions at
      http://www.debian.org/releases/stable/powerpc/ch-preparing.en.html#s-linux-upgrade
      We're at the tail end of section 3.7.2 at the moment:

      # tar -C / -xzf /root/data.tar.gz

      7. We're almost there, but the 'pkgdetails' file from the debootstrap
      .deb is broken (wrong library version), so let's fix it:

      # cd /root/debootstrap-0.2.45/
      # make pkgdetails
      # cd /usr/lib/debootstrap/
      # mv pkgdetails pkgdetails.OLD
      # mv /root/debootstrap-0.2.45/pkgdetails .

      8. Check to make sure there is something sensible in /etc/resolv.conf.
      If you've configured your LinkStation to use DHCP there might already be
      something sensible there. But if every line starts with a '#', then
      you need to set up a name server:
      # echo nameserver 128.30.67.10 >> /etc/resolv.conf

      That's a nameserver at MIT. It should work for you, even if it's not ideal.

      9. Check that your PATH includes /usr/sbin and /sbin:
      # echo $PATH
      If you don't see /usr/sbin in the results of that command, do
      # export PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
      In fact, it won't hurt to do the above command even if you *do*
      already have /sbin in your path.

      10. OK! Let's install Debian! This is section 3.7.3 of the Debian
      installation manual referenced above (you may also want to 'man
      debootstrap' on an existing debian system and refer to the example):

      # mkdir /Debian
      # /usr/sbin/debootstrap --arch powerpc woody /Debian http://http.us.debian.org/debian
      Now this is section 3.7.5:
      # cp /etc/hosts /Debian/etc/
      # cp /etc/fstab /Debian/etc/
      # mount -t proc chroot-proc /Debian/proc
      # chroot /Debian /bin/bash
      (You can skip 3.7.5.1-3.7.5.3)
      This is section 3.7.5.4:
      # /usr/sbin/base-config
      Refer to
      http://www.debian.org/releases/stable/powerpc/ch-init-config.en.html#s-base-config
      Although if I remember correction section 8.5, 8.6, 8.9, and 8.10 are skipped.
      You can skip 'Select and install packages' for now (although it
      doesn't hurt to try it if you like).
      Finish with 'finish configuring the base system'
      (You can skip sections 3.7.5.5, 3.7.6, 3.7.7, and 3.8 of the debian
      installation guide.)

      ----------
      TA-DA!
      You've got a functioning Debian system!

      # apt-get install ssh
      # /etc/init.d/ssh restart

      will start up ssh for you, and then you can log into the debian system
      directly. Installing new software is easy with apt-get. Use
      'apt-cache search' to find a package, for example:
      # apt-cache search bittorrent
      and 'apt-get install' to install it.
      # apt-get install bittorrent

      For example, I started by installing:

      # apt-get install emacs21-nox ipcheck bittorrent bittornado screen
      # apt-get install bzip2 lynx mime-support gcc xbase-clients apache2 libsasl2-modules ca-certificates

      Then I set NO_START to 0 in /etc/default/apache2 and changed '80' to
      '8008' (so as not to conflict with the built-in web server) in
      /etc/apache2/ports.conf. I also added
      'ServerName xxxxx.dyndns.org'
      to the <VirtualHost> section of /etc/apache2/sites-available/default
      (Editing these files using emacs).
      Then
      # /etc/init.d/apache2 restart
      started apache.

      Perhaps someone else can give a step-by-step to install vnc and a nice
      gui. It's not hard.
      -- C. Scott Ananian
      2004-12-09

      kibo SUMAC FSF Waco, Texas AES operative Minister AVBLIMP Pakistan
      Register to vote! http://www.yourvotematters.org/VerifiedVoting
      ( http://cscott.net/ )
    • James Stewart
      This is great! I was previously trying to get debootstrap to work but kept running into problems with stuff missing, So I ended up downloading a small debian
      Message 2 of 22 , Dec 9, 2004
      • 0 Attachment
        This is great! I was previously trying to get
        debootstrap to work but kept running into problems
        with stuff missing, So I ended up downloading a small
        debian distro from a Japanese site.

        That distro had a few modifications dealing with
        sending commands to the Atmel AVR processor to do
        things like control the LEDs (I think) and to power
        the thing off, and who know what else. Did you have
        to do anything like this to deal with any such issues?

        --- "C. Scott Ananian"
        <cananian@...> wrote:

        > The quickest way to get 'real' applications running
        > on your linkstation is to install Debian on it.
        > That will get you a compact but fully-functioning
        > system, and installing new applications is very
        > easy. If you want, you can install a GUI and
        > everything.
        >
        > Perhaps someone with more time
        > could flesh this out into a proper guide.

        I would love to do this. I guess I need to get my LS
        back up and running soon (even if I have to kludge in
        a different power supply).

        Here is a question about hardware specifics between
        PPC processors: The Debian distro was compiled for
        MacIntoshes which generally run a much more advanced
        and powerful PPC processor. Obviously these binaries
        seem to run on the '603 PPC that is in our
        LinkStations. My question is if there would be any
        significant advantage to using the source based Gentoo
        Linux (as a few others have done) and compiling
        perhaps more optimized code for our PPC other than
        running these binaries that were meant for vastly
        different hardware?



        __________________________________
        Do you Yahoo!?
        Yahoo! Mail - 250MB free storage. Do more. Manage less.
        http://info.mail.yahoo.com/mail_250
      • C. Scott Ananian
        ... no, because i left the original installation running underneath. I just launch ssh and my own customizations in the debian chroot. ... The PowerPC family
        Message 3 of 22 , Dec 9, 2004
        • 0 Attachment
          On Thu, 9 Dec 2004, James Stewart wrote:

          > That distro had a few modifications dealing with
          > sending commands to the Atmel AVR processor to do
          > things like control the LEDs (I think) and to power
          > the thing off, and who know what else. Did you have
          > to do anything like this to deal with any such issues?

          no, because i left the original installation running underneath.
          I just launch ssh and my own customizations in the debian chroot.

          > Here is a question about hardware specifics between
          > PPC processors: The Debian distro was compiled for
          > MacIntoshes which generally run a much more advanced
          > and powerful PPC processor. Obviously these binaries
          > seem to run on the '603 PPC that is in our
          > LinkStations. My question is if there would be any
          > significant advantage to using the source based Gentoo
          > Linux (as a few others have done) and compiling
          > perhaps more optimized code for our PPC other than
          > running these binaries that were meant for vastly
          > different hardware?

          The PowerPC family is architecturally-compatible, so you should not see
          any incompatibilities. The 64-bit binaries (ppc64) are different, this is
          usually only used on high-powered servers. See
          http://penguinppc.org/ppc64/
          for a little more info.

          I wouldn't expect to see Altivec, etc, support on the LinkStation, but
          apps with this sort of code are probably rare.
          --scott

          kibo MKNAOMI SSBN 743 RNC RUCKUS SSBN 731 Kennedy Moscow blowfish
          Register to vote! http://www.yourvotematters.org/VerifiedVoting
          ( http://cscott.net/ )
        • James Stewart
          ... Oh, I missed that part. This is how I was running my Debian too. I did however build a Debian-only system on a different hard drive using the Japanese
          Message 4 of 22 , Dec 10, 2004
          • 0 Attachment
            --- "C. Scott Ananian"
            <cananian@...> wrote:

            > On Thu, 9 Dec 2004, James Stewart wrote:
            >
            > > That distro had a few modifications dealing with
            > > sending commands to the Atmel AVR processor to do
            > > things like control the LEDs (I think) and to
            > power
            > > the thing off, and who know what else. Did you
            > have
            > > to do anything like this to deal with any such
            > issues?
            >
            > no, because i left the original installation running
            > underneath.
            > I just launch ssh and my own customizations in the
            > debian chroot.

            Oh, I missed that part. This is how I was running my
            Debian too. I did however build a Debian-only system
            on a different hard drive using the Japanese
            distribution, which booted directly and worked fine,
            but I did notice some (actually the Debian Apt tools
            discovered them) differences in some of the start-up
            and shut-down scripts where commands were being sent
            to the AVR. Fortunately we have a list of what these
            commands do (in the "files" section of this group), so
            it's mostly a no-brainer.

            > > My question is if there would be any significant
            > > advantage to using the source based Gentoo
            > > Linux (as a few others have done) and compiling
            > > perhaps more optimized code for our PPC other than
            > > running these binaries that were meant for vastly
            > > different hardware?
            >
            > The PowerPC family is architecturally-compatible, so
            > you should not see any incompatibilities.

            These binaries have been running, but I was wondering
            if they would be much better (smaller/faster) if they
            were compiled for the Linkstation. In other words,
            I'm trying to determine if there is any advantage to
            going to Gentoo over Debian. So far I haven't found
            any other than many people (including me) find Debian
            convoluted at times. I can certainly cite many
            advantages of Debian over Gentoo however.




            __________________________________
            Do you Yahoo!?
            Dress up your holiday email, Hollywood style. Learn more.
            http://celebrity.mail.yahoo.com
          • C. Scott Ananian
            ... Gentoo has a reputation for super-optimizing, but I don t think there s much optimizing to do here. The LinkStation doesn t have any fancy architectural
            Message 5 of 22 , Dec 10, 2004
            • 0 Attachment
              On Fri, 10 Dec 2004, James Stewart wrote:

              >> The PowerPC family is architecturally-compatible, so
              >> you should not see any incompatibilities.
              >
              > These binaries have been running, but I was wondering
              > if they would be much better (smaller/faster) if they
              > were compiled for the Linkstation. In other words,
              > I'm trying to determine if there is any advantage to
              > going to Gentoo over Debian. So far I haven't found

              Gentoo has a reputation for super-optimizing, but I don't think there's
              much optimizing to do here. The LinkStation doesn't have any fancy
              architectural features to take advantage of -- it's just a pretty
              straight-forward PowerPC implementation. No MMX type stuff, nor
              StrongARM/Thumb-type stuff.

              But then again, I have Debian installed on all my other machines, too.
              --scott

              Mossad ESSENCE Nazi Morwenstow MKSEARCH KMPLEBE AEROPLANE planning
              Register to vote! http://www.yourvotematters.org/VerifiedVoting
              ( http://cscott.net/ )
            • C. Scott Ananian
              ... Just create your new root in a special share ( /mnt/Debian ) and use mount --bind /mnt /mnt/Debian/mnt to make the shares visible in your chroot. --scott
              Message 6 of 22 , Dec 13, 2004
              • 0 Attachment
                On Wed, 8 Dec 2004, Wilson wrote:

                > I have something in my mind suddenly....can we use a
                > USB flash disk? I'm thinking if the debian is on a
                > USB flash disk, it may be nice and fast too, so we can
                > do another root on USB and don't need to create our
                > new root on /dev/hda3.

                Just create your new root in a special share ( /mnt/Debian ) and use
                'mount --bind /mnt /mnt/Debian/mnt' to make the shares visible in your
                chroot.
                --scott

                HTAUTOMAT ESSENCE Philadelphia Hussein plastique Richard Tomlinson
                Register to vote! http://www.yourvotematters.org/VerifiedVoting
                ( http://cscott.net/ )
              • ar_blanc
                Hi. Thank s. Very good. Excelent. ... . . ... And now, just a question for the beginner i am. Can i remove every things in /mnt/Linux except Debian directory?
                Message 7 of 22 , Jan 9, 2005
                • 0 Attachment
                  Hi.

                  Thank's. Very good. Excelent.

                  > 1. Get root on the LinkStation. Create a share using the standard
                  > web interface; let's call it 'Linux'. We're
                  > going to create a slightly-expanded version of the basic
                  > LinkStation install in 'Linux' (you could perform these
                  > modifications directly to the linkstation root filesystem, but
                  > I prefer to leave that as close to 'stock' as possible).
                  > We'll use the bootstrap to install a 'proper' copy of Debian
                  > in a 'Debian' subdirectory of the 'Linux' share.
                  >

                  .
                  .

                  > ----------
                  > TA-DA!
                  > You've got a functioning Debian system!

                  And now, just a question for the beginner i am.

                  Can i remove every things in /mnt/Linux except Debian directory?

                  What is to do after reboot?
                  # chroot /mnt/Linux/Debian /bin/bash
                  # restart apache, ...

                  Is that right for a beginning?

                  Regards.
                • Marshall D. Lewis
                  I installed gentoo on my linkstation over the weekend, and attached a usb hub to it. I now have 3 usb drives hanging off of it and working fine. Just thought
                  Message 8 of 22 , Jan 17, 2005
                  • 0 Attachment
                    I installed gentoo on my linkstation over the weekend, and attached a
                    usb hub to it. I now have 3 usb drives hanging off of it and working
                    fine. Just thought I'd let everyone know.

                    --
                    Marshall

                    --- In LinkStation_General@yahoogroups.com, Wilson <sonsondei@y...> wrote:
                    > > My dream here is to compile and install a kernel
                    > > that
                    > > has support (via modules) for everything you might
                    > > want to plug into a USB port, any file systems, and
                    > > any common network options so you can use things
                    > > like
                    > > other network interfaces, USB sound cards, CD/DVD
                    > > burners, serial/parellel adapters, more printers,
                    > > cameras, drive arrays, keyboards, mice & USB video
                    > > etc. with the Linkstation if you so desire.
                    >
                    >
                    > This is my dream too...having it connected to a USB
                    > hub, put USB serial console to see and manage the
                    > thing offline, put USB card reader to read different
                    > medias and share to web right away, put a fat32 USB
                    > disk or flash for friends to come and download files
                    > right away and they can use in MS windows...put USB
                    > network adapter to set up firewall and routing...
                    >
                    > My LS is bought mainly for playing and development..I
                    > don't mind to boot and clean up the parition and try
                    > again and again..since I have other servers to store
                    > my actual data. But my first project is to understand
                    > the things and scripts in /www to customize a better
                    > web admin tool for my elder brother who I first bought
                    > the LS120 for his company to use in HK, that's how I
                    > know this product and why I bought mine and compiled
                    > the samba 3.x for him to use chinese filename via
                    > WinXP.
                    >
                    > After it, I'll begin to work on the kernel (maybe)
                    > since hacking the actual flash is too risky and may
                    > not be recoverable if anything happens.
                    >
                    >
                    > W
                    >
                    >
                    >
                    > __________________________________
                    > Do you Yahoo!?
                    > Yahoo! Mail - 250MB free storage. Do more. Manage less.
                    > http://info.mail.yahoo.com/mail_250
                  • Hans-Göran Puke
                    Congratulations, Marshall! Would you mind telling us how you did the Gentoo installation? Or even better, write a how-to document about it? Are you running the
                    Message 9 of 22 , Jan 19, 2005
                    • 0 Attachment
                      Congratulations, Marshall!
                      Would you mind telling us how you did the Gentoo installation?
                      Or even better, write a how-to document about it?
                      Are you running the Gentoo kernel or are you still using the supplied
                      kernel? In essence, is your system a mix between the MontaVista linux
                      supplied with the box and Gentoo, or is it 100% Gentoo?

                      Myself, I am running a mix of MontaVista and Debian. Have yet to
                      figure out if and how I should make the move to completely eliminate
                      MontaVista...

                      --
                      H-G

                      --- In LinkStation_General@yahoogroups.com, "Marshall D. Lewis"
                      <marshall@n...> wrote:
                      >
                      > I installed gentoo on my linkstation over the weekend, and attached a
                      > usb hub to it. I now have 3 usb drives hanging off of it and working
                      > fine. Just thought I'd let everyone know.
                      >
                      > --
                      > Marshall
                    • Marshall D. Lewis
                      I found the Gentoo installation and instructions at: http://www.kurobox.com/online/tiki-index.php?page=projectsGenToo Gentoo completely replaces the os files
                      Message 10 of 22 , Jan 19, 2005
                      • 0 Attachment
                        I found the Gentoo installation and instructions at:

                        http://www.kurobox.com/online/tiki-index.php?page=projectsGenToo

                        Gentoo completely replaces the os files that come with the linkstation,
                        but it is still using the supplied kernel. In order to get Gentoo
                        installed, I first had to turn my linkstation into a kurobox:

                        http://www.kurobox.com/online/tiki-index.php?page=Turn+your+Linkstation
                        +into+a+Kuro+Box

                        Overall then Gentoo installation has been pretty smooth, although I have
                        noticed some problems with random usb lockups. I'm still trying to
                        debug that though, I think I may have been pushing it a bit when I
                        attached a dvd-writer :) I wasn't actually trying to write dvds, I was
                        hoping I'd get a faster transfer rate copying data from a dvd to a usb
                        harddrive with the dvd-writer directly attached... to save anyone else
                        from attempting that, you don't. I was getting about half the rate that
                        I saw when copying via samba, and about a quarter the rate I'd see with
                        ftp.

                        Anyway, check out the forums on kurobox.com for more info on the Gentoo
                        install, and I'm more then happy to answer any questions or tell you
                        about the problems that I've run into.

                        --
                        Marshall



                        On Wed, 2005-01-19 at 14:40 +0000, Hans-Göran Puke wrote:
                        >
                        > Congratulations, Marshall!
                        > Would you mind telling us how you did the Gentoo installation?
                        > Or even better, write a how-to document about it?
                        > Are you running the Gentoo kernel or are you still using the supplied
                        > kernel? In essence, is your system a mix between the MontaVista linux
                        > supplied with the box and Gentoo, or is it 100% Gentoo?
                        >
                        > Myself, I am running a mix of MontaVista and Debian. Have yet to
                        > figure out if and how I should make the move to completely eliminate
                        > MontaVista...
                        >
                        > --
                        > H-G
                        >
                      Your message has been successfully submitted and would be delivered to recipients shortly.