[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Debian-only Netwinder! :-)



Using Jim Pick's bootable image [*], I replaced the RedHat stuff on
/dev/hda2 and now boot straight into Debian, even with the old
(1.3pl4) firmware.

  [*] ftp://ftp.jimpick.com/pub/debian/netwinder/bootable-image/


I have also locally rebuilt some Debian packages from source, such as
the Boa webserver, ProFTPD, cfingerd, cucipop, samba, exim, and
xemacs20.  This Netwinder is now my Internet server at home, connected
24 hours a day and providing FTP/WWW/DNS/Mail and file sharing
services to one other Debian machine and my wife's Win95 machine.

I have, however, paid much more attention to just getting these
packages compiled than doing it properly - so there are more than a
few hacks in there. However, if anyone is interested in such temporary
non-maintainer ad-hoc .DEB files, they can be found (on my Netwinder)
at:
        ftp://ftp.slett.net/pub/linux/netwinder/debs/
        http://www.slett.net/pub/linux/netwinder/debs/



Here are also a list of steps to go through to get the Debian image up 
in the first place.  There is room for creativity of course, but this
is a rought draft of what I did.

   - Copy the entire RedHat distribution off to another computer
     (which provides NFS and DHCP services), to make sure you still
     have a way out when things go wrong. (They will).  I copied these
     files to a directory named /misc/nwredhat on my Debian PC.

   - Modified "etc/fstab" within in the newly copied image, so
     that the NFS image becomes root when booting from it.  In my 
     case:

        209.101.58.139:/misc/nwredhat /         nfs     rw              0 0
        /dev/hda2               /mnt/hda2       ext2    defaults        1 1
        /dev/hda3               none            swap    sw              0 0
        /dev/hda4               /mnt/hda4       ext2    defaults        1 2
        none                    /proc           proc    defaults        0 0

   - Try booting from this image.  (Hold down the SHIFT key while
     the Netwinder starts, select DHCP, kernel from disk, root
     filesystem from NFS, IP address and directory).

     GOTCHA #1:  The IP address provided by the DHCP server must be the
                 same as in "/etc/sysconfig/network-scripts/ifcfg-eth0"!
                 Otherwise the NFS boot will hang at the point where the
                 network is being initialized (with a different IP addr).

                 In my case, I had 209.101.58.138 inside that script,
                 while receiving 209.101.58.141 from DHCP.  Dumb.

     GOTCHA #2:  Booting can only happen from eth0, not eth1.
                 I also learned that the hard way.


   - Once verified and working, un-gtar Jim Pick's bootable image
     in another NFS-exported directory (I used /misc/nwdebian) on the
     host computer, to provide for a similar NFS boot for Debian.
     (Oddly enough, it seems that the /tmp directory as well as 
     /dev/null and /dev/zero had the wrong permissions even in this
     image - just like they do in Corel's).

   - Do the "etc/fstab" thing above inside this image also, and make
     sure the address in "etc/init.d/network" was that same one the
     DHCP server would give.

   - Try booting into Debian via NFS.  If successful, tune some things
     things to your liking (such as /etc/resolv.conf, /etc/hostname,
     /etc/init.d/network), and after that /dev/hda2 is ready for
     replacement!

   - Delete the old RedHat system from the Netwinder's harddrive:
         umount /dev/hda2               # if mounted
         mkfs.ext2 /dev/hda2
         mount /dev/hda2 /mnt/hda2

   - Now copy the root filesystem onto /mnt/hda2.  Either 
     re-gunzip Jim Pick's image and re-apply any changes you made, 
     or copy from /  (but make sure to avoid e.g. the contents inside 
     /proc).  Another way is to create another mountpoint, e.g.:

        mkdir /mnt/nfsroot
        mount 209.101.58.139:/misc/nwdebian /mnt/nfsroot
        cp -a /mnt/nfsroot/* /mnt/hda2/

     Also do not forget to change /mnt/hda2/etc/fstab to use 
     /dev/hda2 as root device.

     GOTCHA #3:  Make sure that /mnt/hda2/etc/mtab is empty!
                 Issue the command:
                        : > /mnt/hda2/etc/mtab

                 Otherwise, "remounting" during the startup
                 procedure will fail miserably.


   - Reboot again.  If everything goes right, you will now be
     faced with a Debian login prompt.  In Jim Pick's image,
     the 'root' password is empty.

   - Add packages with 'dselect' as usual.

     GOTCHA #4:  Make sure that the 'setserial' package is
                 not selected (even though it is marked as
                 'required'); or else insert the line "exit 0"
                 near the top of "/etc/rc.boot/0setserial" once
                 the package has been installed.  "setserial"
                 seems to cause the Netwinder to hang.

   - Find out what you are missing.  Probably a number of things,
     especially network-centric ones.  Among other things, 
     /usr/sbin/rpc.nfsd and /usr/sbin/rpc.mountd (which provide
     NFS server capability) are not in the Debian image, or in
     the 'netstd' package where they are supposed to be.  Being
     evil, I just copied these from the old RedHat image.  And
     as mentioned, Samba, Bind, ProFTPD, Boa (httpd), Exim, 
     CuciPOP, and cfingerd I rebuilt from Debian sources.


It's getting fun! 

(Say, when was Netscape and WordPerfect going to be out for this
thing?)

-tor


Reply to: