How to put mesh on a HD
I spent a lot of time trying different methods of
doing this and I think this is about the best
compromise other than creating your own custom
mesh version and trying to support all the
drivers and new upgrades.
Why? So it's easy to make changes to the scripts
for testing via ssh and be able to save those
changes to HD. You can also set up file sharing
or other large programs and test them. Logging
for system crashes or ethernet packet sniffing
debug is also possible this way.
It's pretty easy, the steps are:
1. Create a basic Linux HD install from Mandrake
(or RedHat, or almost any other distro) with a
huge /home partition (simple partition method).
2. Copy the root partition from the Mesh CD to
/home (which is actually hda6)
3. Boot the mesh partition (hda6) from now on.
The only problems I have had with this is the
X based GUI functions don't work. If you know why
please let me know.
References used for this were:
http://www.keeper.org.uk/cdrom_distro_howto.htm
http://syslinux.zytor.com/iso.php
http://www.tcu-inc.com/mark/articles/Ramdisk.html
http://www.slackware.com/
WARNING: This process is for brave developer
type people. You can screw up your
hard drive, and delete important
files. You have been warned.
Start with a old 2 Gig or larger HD.
I used Mandrake 8.2 for this example, it just
happened to pop out of my CD case. You can use
RedHat if you have that laying around, it's
about the same. You only need the first CD.
HD is "master" (hda) on primary IDE, and CDROM
is "slave" on secondary IDE (hdd). Using a normal
386 compatible PII generic computer, 128MB RAM.
Boot your distro's CD and perform a minimal
install, don't install any packages, click
them all off, you won't need them.
Make sure you create a "simple" partition table
setup, where /home is hda6 and is as large as
possible. You can play around and reduce the
"/" root partition as low as 500MB to save some
space using "expert" install.
If your distro's /home isn't hda6 just remember
what it is for use with the rest of these
instructions.
I let it format my partitions in "Journalized
EXT3 fs" format (the Mandrake 8.2 default), it
doesn't matter but Journalized would handle a
power fail better.
If it asks for the other install CD's, tell it
you don't have them. It doesn't matter if you
set up the "network" or not at this point.
Get through the rest of the install, put in a
root password, create one user if you like.
IMPORTANT: Use LILO as a boot loader! Pick all
the defaults.
Install is done, reboot your system.
Log in as root, insert the latest Mesh CD.
(Mandrake automatically mounts it as /mnt/cdrom)
Next we will mount the root partition from the
CD then copy the root partition from the CD
to /home, copy the linux kernel to /boot, create
a lilo entry and reboot.
Some of this may change with newer distros of
the Mesh CD, just look for the proper files
on the CD. I used the build 21 rc3 distro.
As root, enter these commands at the prompt in
this order:
mkdir /mnt/meshcd
mount -o loop /mnt/cdrom/isolinux/initrd /mnt/meshcd
cp -a /mnt/meshcd/* /home/
cp /mnt/cdrom/isolinux/linux /boot/
Now edit lilo.conf to change the boot menu
vi /etc/lilo.conf
We add the new entry and label for "meshbox" as
you see below, it's a example of what part of
the lilo.conf file would look like.
image=/boot/vmlinuz
label=linux
root=/dev/hda1
initrd=/boot/initrd.img
read-only
image=/boot/linux
label=meshbox
root=/dev/hda6
append="max_loop=32 vga=788"
read-only
image=/boot/vmlinuz
label=failsafe
root=/dev/hda1
initrd=/boot/initrd.img
append="failsafe"
read-only
other=/dev/fd0
label=floppy
unsafe
Save that and then update your LILO boot.
lilo
(type that on the command line as root and
your HD lights will light up)
If you don't run lilo, it won't update from
the lilo.conf file.
reboot
-or-
poweroff
This time when it boots, select "meshbox"
and it should load and run, except for the GUI.
If you want it to boot "meshbox" as default
just edit /etc/lilo.conf (on the Mandrake boot
side) and change this line:
default=meshbox
Some things will be a little strange to use
because it still thinks it's operating from
a CF chip and ramdisk. A script could be written
to fix any problems with this.
You now have the entire hard drive to play with,
load in file sharing programs, add drivers for
special hardware or create new users. You can
use ssh and scp to update the box over ethernet.
Please share back with the group any discoveries,
successes, fixes, scripts or kernel modules you
make!
First thing you probably want to do is change
the root password and let it remember commands
you have typed at the console:
passwd
rm /root/.bash_history
exit (then log back in)
If you want to turn on logging, uncomment the
lines dealing with "syslog" and "messages" in:
/etc/syslog.conf
(then reboot)
To mount a CD or floppy:
mount /mnt/cdrom
mount /mnt/floppy
Those mounts don't work! Why not? The proper
entries are in /etc/fstab for them. You will
have to use another computer and scp any files
over for now.
Stop it from checking in with wiana.org while
you mess with all this:
rm /etc/AUTHORITY
When you modify any of the meshbox start up
scripts they will be saved to disk.
To add commands after boot, see
/etc/rc.d/rc.local
modules are loaded by
/etc/rc.d/rc.modules and
/hj has a lot of scripts in it.
/etc/rc.d/rc.M is where it starts.
Compiling modules to add to this may be a
lot of work, you will need to find the source
for the kernel for this specific build. Build
them for i386 for best results on many systems.
See the slackware URL above for more info, or:
http://kernel.org/
When in a shell terminal, you can use
shift-page-up and page-down to scroll more
than one screen worth of output, hit tab
to help complete commands and use the up
arrow to find and repeat commands you typed
before.
Things to do:
Figure out why /dev/fb0 isn't found by X (it's
in /dev) and why I get
Error opening /dev/fb0
: No such device
Fatal server error:
no screens found
Does LILO set up or not set up fb0?
I can boot with the mesh CD all this came from
and it starts X and loads everything GUI ok.
Reference for this X server
http://www.xfree86.org/current/Xfbdev.1.html