** WARNING - this document was never finished, do not try to use this ** to install gentoo on your raq! A couple months ago I got this idea that I was going to make Gentoo run on my raq 4 server because the sun/red hat distro on them is about the least secure distro I have ever seen. And that's not because it was all that bad to start with, but there haven't been regular updates for it for ages. The first thing to do was find a 2.4 kernel. I was able to locate what I needed at ftp://ftp-eng.cobalt.com/pub/users/thockin/2.4/ I switched over to 2.4.19C7_III and the raq still ran great on it. I then took the drive out of the cobalt system and threw it into another box, resized the main partition to be only 100 megs instead of 1 gig and used it as my /boot. I then created the swap partition and the rest as / I got the system up and running and was just about to start making it do something useful when the harddrive died. So what's different this time? The switch to gentoo was too easy last time, so I'm going to attempt it all remotely this time. First thing to do on the box is stop all the services. I commented out the swatch process in /etc/crontab so they wouldn't start up again and then shut down all services, and used chkconfig to remove them from runlevel 3. [root /root]# ps faux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.1 1120 472 ? S 2003 0:05 init root 2 0.0 0.0 0 0 ? SW 2003 0:00 [keventd] root 3 0.0 0.0 0 0 ? SWN 2003 0:00 [ksoftirqd_CPU0] root 4 0.0 0.0 0 0 ? SW 2003 0:00 [kswapd] root 5 0.0 0.0 0 0 ? SW 2003 0:00 [bdflush] root 6 0.0 0.0 0 0 ? SW 2003 0:01 [kupdated] root 7 0.0 0.0 0 0 ? SW 2003 0:00 [pagebufd] root 8 0.0 0.0 0 0 ? SW 2003 0:00 [pagebuf_io_CPU0] root 9 0.0 0.0 0 0 ? SW< 2003 0:00 [mdrecoveryd] root 1181 0.0 0.0 296 128 ? S 2003 0:39 /sbin/lcdsleep root 1220 0.0 0.1 1136 460 ? S 2003 0:00 /sbin/getty ttyS0 115200 root 32412 0.0 0.2 2168 964 ? S Jan19 0:00 sshd root 31527 0.0 0.4 5624 1684 ? S 14:15 0:00 \_ sshd root 31529 0.0 0.2 1712 948 pts/0 S 14:15 0:00 \_ -sh root 2625 0.0 0.1 2304 652 pts/0 R 15:30 0:00 \_ ps faux Next thing I did was unmount everything but / umount /home umount /var swapoff /dev/hda6 A little cleanup: mkdir -p /var/lock/subsys /var/log /var/empty /var/lib rm /tmp # get rid of the symlink to /home/tmp mkdir /tmp chmod 1777 /tmp At this point you may want to do /etc/rc.d/init.d/sshd restart to make sure it's going to start, and try sshing to it from remotely. Here's the current partition table: [root /root]# fdisk -l /dev/hda Disk /dev/hda: 255 heads, 63 sectors, 2498 cylinders Units = cylinders of 16065 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 1 128 1028128+ 83 Linux /dev/hda2 129 153 200812+ 5 Extended /dev/hda3 154 202 393592+ 83 Linux /dev/hda4 203 2498 18442620 83 Linux /dev/hda5 129 133 40131 83 Linux /dev/hda6 134 153 160618+ 82 Linux swap The cobalt's initrd boot system limits us somewhat in respect to what we can do with the thing. It will always look to /dev/hda1/boot for the kernel. The part I'm not sure about is whether we'll be able to get away with having it use another partition for our root drive. So here's the plan. We will make a partition near the end of the drive, say 500 megs in size. We'll copy root there and adjust /etc/fstab so that it has the / entry as /dev/hda3. If we can reboot and get it to use /dev/hda3 as the root partition, we can then resize /dev/hda1 to use the rest of the drive, and start the gentoo install on it. I've used fdisk to create partition 3 using the last 64 blocks, or 500 megs. I'm going to install e2fsprogs. We'll need them for resize2fs. wget ftp://sunsite.ualberta.ca:21/pub/unix/Linux/gentoo/distfiles/e2fsprogs-1.34.tar.gz tar zxvf e2fsprogs-1.34.tar.gz cd e2fsprogs-1.34 ./configure --prefix=/ --disable-nls # you'll have to reinstall gettext to /usr with nls first if you need it make make install [root /root]# rm -rf e2fsprogs-1.34* Well, that worked. We probably could have done this in the first place instead of mucking around with gettext. Ok, back to business. Filesystem Type Size Used Avail Use% Mounted on /dev/hda1 ext2 972M 669M 252M 73% / We need to trim our root partition to fit into 500 megs. rm /root/*.rpm # (the kernel files I downloaded) rm -rf /usr/jre1.2 # (bleh) rm -rf /usr/doc # (who needs those?) rm -rf /usr/bin/post* (adios amigos) [root /usr]# df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/hda1 ext2 972M 464M 457M 51% / Ok, we're ready. mke2fs /dev/hda3 mkdir /mnt/newroot mount /dev/hda3 /mnt/newroot cp -av /[^mp]* /mnt/newroot/ # copy everything but mnt and proc