I had someone ask me about a comment I made on slashdot. This weekend, I finally got around to updating my dead-rat 4.0 486 to debian. I know from previous experience, that debian requires 12Megs RAm to start - and all I had was 8Megs - no option of upgrading, because the motherboard can't take it. So, to install, I mounted the 486 (herein, remote machine) on my laptop as /feynman, and recursively removed everything on remote, then recursively copied the most important files to the remote machine. I can't remmeber what I copied, but it was things like /usr, /dev, /usr/local, /sbin, /bin, /var, etc, but removing the largest trees that I knew I would not need, such as /usr/share/doc, /var/cache/apt/archives, and java stuff, and mozilla* and netscape*, etc (I only have a 2 gig disk to play with). This then got me an incompete distribution of debian on the machine. I edited the /etc/host /etc/network/interfaces /etc/fstab etc files to get them back to a state that they should be in. I couldn't log in anymore, because login and sshd were trying to use the now non-existant old glibc, so couldn't run lilo. This was good, because I was about to stuff up. So I rebooted, the old 2.2 linux kernel came up, couldn't mount the disks, because I had bad entries in /etc/fstab, so went into emergency mode. This was fine - I edited everything correctly, ran lilo, got the machine working (a bit of a simplification - this took about a day, because I kept forgetting to do things - I suggest you backu pthe old /etc before you start, so you can reproduce the fstab, etc entries.). Note that, if you are replacing such an old distribution this way, you will always have the problems caused by the old glibc - so you wont be able to log in and reboot the machine. No worries though - you did enable alt-sysreq in the kernel, did you not? alt-sysreq s, alt-sysreq u then old-sysreq b will solve all your probelms :) I then followed the steps outlined in the email below, so I could run apt-get on the laptop, using the laptop's CPU and copious RAM, to install stuff over nfs on the remote machine's disk. Note that, because the 486 will eventually become a firewall, and I am not using it for 22 hours of the day, and it produces no heat and takes no electricity (relatively), I run noflushd on it, to spin the disks down, turn off cron, because I don't need any of that, and disabled the fan in the power supply. The whole thing runs cool, and makes no noise most of the time :) From tconnors@SPAM Tue Nov 12 11:06:57 2002 Date: Tue, 12 Nov 2002 11:01:42 +1100 (EST) From: Tim Connors To: Paul Holbrook Cc: Tim Connors Subject: Re: re your slashdot post - install over nfs/chroot? On Mon, 11 Nov 2002, Paul Holbrook wrote: > I read with great interest, but not enough comprehension, your note on > Slashdot in the lightweight linux thread: > > I forgot to mention, the way I do an apt-get install/upgrade/remove, etc > is to run apt-get on my 650MHz laptop, in a chroot environment over nfs, > with /proc and /dev/ just --bind mounts to the local system (so programs > don't barf on not having permissions to write to device nodes, and not > having /proc files) :) > > > I don't quite understand all the steps here; in particular, I don't > understand the reference to the "--bind mounts" for /proc and /dev. OK - a lot of programs need /proc files when installing - but they don't really need those files. All install files need /dev/null, and you get heaps of permission denied messages (or perhaps it could just be me - I just realised that I probably have "nodev" or similar as one of my mount options - I can't remember). So what I did was to "mount --bind /dev/ /feynman/dev" and "mount --bind /proc /feynman/proc" to reproduce these over the top of my mount to feynman (Can you tell I am a physicist? One of my other boxes is bohr, and next choice will be Shroedinger (can't speel that - need to use tab-completion) :). Since my apt cache repository is on my laptop (because it periodically gets connected to the net), I also bind mount its repositiory over the top of feynman's ie "mount --bind /var/cache/apt /feynman/var/cache/apt" Note that this all requires >=2.4 kernels, because they were the first to implement bind mounts. Then once I do that, it is simply a matter of "chroot /feynman /bin/bash", am I am away! Of course, I hacked my login scripts that colourise my prompt depending on who and where I am, so that it also detects whether I am chrooted, becuase more than once, I forgot that I was or wasn't working on feynman, and deleted the wrong things :) Hope that helps. -- TimC -- http://astronomy.swin.edu.au/staff/tconnors/ But it does move! -- Galileo Galilei