In <200211050809.JAA04...@te35.hq.eso.org> Alexis Huxley <Use-Author-Address-Header@[127.1]> writes:
> Since it is a flashdisk, with limited rewrite capabilities, I would like
> to load the whole of this hda1 partition into a ramdisk and use the
> ramdisk as the root fs, that way I only ever read from the flashdisk.
I've solved this. I have documented the procedure for internal purposes,
but Usenet seems as good a place to archive it - where someone else might
find it useful - as any, so it is included below.
A little preamble:
The procedure refers to something called 'VCM FEP' which is just
project nomenclature for an embedded PC running a single application.
This procedure documents the installation of that application, but it's
trivial to change this to install whatever you want.
Actually I used VmWare, and as such there is a gotcha to watch out for:
VmWare permits all sorts of ordering for bootable device searching;
which means that I didn't need to make a boot floppy at all. But for a
real PC it is probably *vital* to do so.
Finally, this document is (C) European Southern Observatory 2002, and
is distributed under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
Alexis
---------------------------------- cut here ----------------------------------
##################################################
# #
# VCM FEP OS Installation Guide #
# #
##################################################
Introduction
############
The purpose of this document is to guide you through
the installation of Debian 3.0 on a flashdisk-based
system in such a manner that:
1) the flashdisk is read-only
2) reading of the flashdisk is minimised.
Debian was chosen as the Linux distribution to use
because it has the finest package granularity,
consequently the smallest possible installation
of Debian is smaller than the smallest possible
installation of other major distributions.
The system will run a single application. The
installation of this is included as part of this
procedure, but could equally well be replaced
by the installation of another application.
The procedure can be used to create one single system
or to prepare a system which can be used for the
preparation of several flashdisks, which can then
be taken to a remote location and installed
without requiring the additional hardware needed
for development and preparation.
During the procedure two disks are required, which
will be split into four partitions. These partitions
will be used for the following purposes, and in
this document will be referred to by the following
nicknames:
1) large development area with network access
("development")
2) medium-sized production preparation area
with no network access ("preparation")
3) small production area with no network access
("production")
4) software archive and home directories
("space")
The necessity of (1) and (3) is hopefully clear.
(2) is identical to (3) but has enough space for
the overheads required for the basic installation
and the transient overheads required by the package
management system.
(2) cannot be used as the production system because
the entire partition - regardless of how full or empty
it is - is to be copied to memory to act as a RAM disk,
and this would leave no RAM to act as system memory.
The purpose of (4) is to ensure that the OS is kept
separate from user data. This will ease upgrades.
Procedure overview
==================
In overview, the procedure is as follows:
1) make a minimal installation to form the basis for
the "development" system
2) clone the "development" system to make the basis
for the "preparation" system
3) build a better kernel
4) tune the "development" system by adding stuff
5) tune the "preparation" system by removing stuff
6) install the application
7) configure the preparation system ready for production
8) clone the "preparation" system to make the
"production" system.
Prerequisites
=============
Prerequsite hardware
--------------------
VCM FEP with:
1) external SCSI harddisk (at least 4Gb)
2) internal IDE 128Mb flashdisk
3) external SCSI CD-ROM
4) external SCSI DAT (optional)
5) 128Mb RAM
6) US keyboard (preferred for Paranal)
or VmWare with:
1) virtual SCSI 4Gb harddisk (virtual device
node SCSI 0:0)
2) virtual IDE 128Mb harddisk (virtual device
node IDE 0:0)
(FN=this virtual disk should be replaced by
a flashdisk if the purpose is to prepare an
installation on flashdisk)
3) physical IDE CD-ROM (virtual device node IDE
0:1 using E: with raw access enabled)
(FN=This should be a SCSI CD-ROM but it is
not bootable if it is)
4) 128Mb RAM
Prerequisite software
---------------------
1) Debian 3.0 CDs #1-7 plus 'non-US' CD
Prerequisite information
------------------------
1) what is the hostname?
2) network configuration is hardcoded, from a DHCP
server or from a BOOTP server?
3) If the network configuration is hardcoded then
what are the host IP address, the netmask
the gateway IP address, DNS server IP addresses?
BIOS setup
==========
For a normal PC the boot order should be:
1) floppy
2) SCSI CD-ROM
3) SCSI harddisk
4) IDE flashdisk
and note that a boot floppy will be required.
For VmWare the boot order should be:
1) floppy
2) CD-ROM
3) IDE flashdisk
4) SCSI harddisk
and no boot floppy is required.
The development system
######################
The Debian Installation program
===============================
Insert CD#1 in the drive and power on the system.
At the 'boot: ' prompt, enter 'bf24' and press
ENTER.
Eventually, this launches the Debian Installation
program. The steps involved in the running of
this program are now covered individually.
Language Selection
------------------
At the 'Choose The Language' window, scroll down
to 'en' and press ENTER.
At the 'Choose Language Variant' window, scroll down
to 'English (United States)' (the default) and press
ENTER.
At the 'Release Notes' window, continue by pressing
ENTER.
Keyboard Configuration
----------------------
At the 'Debian GNU/Linux Installation Main Menu'
window, when prompted 'You must indicate what sort of
keyboard ...', select 'Next: Configure the Keyboard'
(the default) and press ENTER.
At the 'Select a keyboard' menu, select the
appropriate keyboard type from the list and press
ENTER.
Disk Partitioning
-----------------
At the 'Debian GNU/Linux Installation Main Menu'
window, when prompted 'A swap partition is strongly
recommended ...', select 'Next: Partition
a Hard Disk' (the default) and press ENTER.
At the 'Select Disk Drive' window, when prompted
'Select the drive to partition ...', select '/dev/sda'
(the default) and press ENTER.
At the 'LILO Limitations' window, when prompted
'LILO, The LInux LOader, when installed ...', just
press ENTER to continue.
At the 'Note on addition space for the ReiserFS
Journal' window, when prompted 'NOTE: ...' just press
ENTER to continue.
The system may then prompt 'No partition table ...
Do you wish to start with a zero table [y/N] ?' type
'y' (without ENTER).
The 'cfdisk' program is started.
Create the following partitions in the following
order, setting the FS type as specified:
sda1 Linux 2000Mb (development)
sda2 Linux swap 256Mb (development swap)
sda3 Linux 400Mb (production preparation)
sda4 Linux <rest> (archive & homes)
Select 'write' to write the new partition table to
the disk, type 'yes' and ENTER to confirm. Once the
partition has been written select 'Quit'.
In addition, press ALT-F2, at the 'Please press Enter
to activate this console' press ENTER, and then run:
cfdisk /dev/hda
and create the following partitions on the flashdisk:
hda1 Linux 96Mb (production)
Select 'write' to write the new partition table to
the disk, type 'yes' and ENTER to confirm. Once the
partition has been written select 'Quit'.
Changed partition tables, such as we now have, are not
correctly detected by the Debian Installation Program.
So at this point it is best to reboot:
# sync
# reboot
Swap Space
----------
Then repeat the initial stages of the Debian
Installation program (language and keyboard selection)
until you reach the 'Debian GNU/Linux Installation
Main Menu' window, and are prompted 'You have a swap
partition ...'. Select 'Next: Initialize and Activate
a Swap Partition' (the default) and press ENTER.
At the 'Scan for Bad Blocks?' window, when prompted
'Run a bad-block scan on /dev/sda2?', select 'No'
(the default) and press ENTER.
At the 'Are you Sure?' window, when prmpted 'You have
chosen to initialize /dev/sda2 ...', select 'Yes'
(the default) and press ENTER.
Root File System
----------------
At the 'Debian GNU/Linux Installation Main Menu'
window, when prompted 'There are Linux partitions
..', select 'Next: Initialize a Linux Partition'
(the default) and press ENTER.
At the 'Choose Filesystem Type' window, when prompted
'Ext2 is the traditional ....', select 'Ext2' (the
default) and press ENTER.
At the 'Select Partition' window, when prompted
'Please select the partition to initialise ...',
select '/dev/sda1' (the default) and press ENTER.
At the 'Scan for Bad Blocks?' window, when prompted
'The system can scan ...', select 'No' (the default)
and press ENTER.
At the 'Are you Sure?' window, when prompted 'You
have chosen to initialize /dev/sda1 ...', select 'Yes'
(the default) and press ENTER.
At the 'Mount as the Root Filesystem?' window, when
prompted 'You must mount your root ...', select 'Yes'
(the default) and press ENTER.
Installing Kernel and Modules
-----------------------------
At the 'Debian GNU/Linux Installation Main Menu'
window, when prompted 'You've mounted your root ...',
select 'Next: Install kernel and Driver Modules'
(the default) and press ENTER.
At
...
read more »