Follow Technical Article 104767, "Recover OpenServer 5 root filesystem after
crash if backups, boot/root exist". In addition, take these
steps:
1. During the process of creating the "root" floppy you can
add the following additional files to your emergency root
filesystem when prompted for access to other filesystems and
utilities on your server:
/dev/u /dev/ru
/dev/u[0-9] /dev/ru[0-9]
When prompted to add additional files to your diskette answer
"Y" and enter the following commands:
cd /dev
ls u ru *u[0-9]*
If device drivers for your filesystems are not there, they
can be copied with the following command:
ls u ru *u[0-9]* | cpio -pdlmuv /mnt/dev
In addition, you may wish to copy other useful utilities onto the
Emergency Recovery floppies. For example:
ls u ru *u[0-9]* | cpio -pdlmuv /mnt/dev
cd /mnt/usr/lib
mkdir -p terminfo/a
cd terminfo/a
cp /usr/lib/terminfo/a/ansi .
cd /mnt/usr/bin
cp /usr/bin/vi .
cd /mnt/bin
cp /bin/hd .
exit
Alternatively, you could also modify /usr/lib/mkdev/fd to include
the files you require, or remove unwanted files such as those
DTFS and S51K references if your Emergency Recovery does not
require them. This would be useful if you need to have more space
available on your Emergency Recovery floppies.
2. During the creation of the boot floppy disk, if the kernel is
too big to be compressed to fit onto the floppy disk, you will
be notified and the process aborted. You may need to generate a
smaller kernel by removing some devices unnecessary for Emergency
Recovery, for example, the removal of the network interface card
from the TCP/IP stack in "netconfig."
3. When booting with the Emergency Recovery floppies, you will not be
able to create any additional disks other than the root disk.
If you run "fdisk -f /dev/rhd10", for example, even though the
files are there, you will get the following error message:
fdisk: cannot open /dev/rhd10 for reading: No such device or
address(error 6)
Once you have restored your root disk, you will be able to boot
into Single-User Mode, and re-add your additional disks using
"mkdev hd."
4. Once the server has restored the license information, your
server may need to be re-entered into Single-User Mode using the
command:
scoadmin license
If your existing license shows as "Expired", re-enter the license
and reboot the server.
5. If during the boot in Multi-User mode the server complains with
the error message:
Error Incorrect SCO isam runtime system installed : 3
This error message is caused by this corrupt or missing file:
/usr/lib/isam/locks (Should have 644 root root)
Enter the following command to fix the Calendar Server, if used:
/usr/bin/isverify -I
NOTES:
At the shell prompt of the Emergency Recovery disks the keyboard
mappings will be set to the US keyboard.
When restoring using "cpio" remember not to use "-L" to follow
symbolic links, otherwise the binary files will be restored and not
the symbolic links that these files are linked to.
Is it not recommended to use "tar" to backup your server.
NOTES:
Can I create my Emergency Floppies to CD rather than floppy?
------------------------------------------------------------
OpenServer 507 _does_ already have the mkdev fd option to create a
Emergency-CD !
**** IMPORTANT - There is a still a 2.88MB Limit using this option so
it WILL NOT overcome the issue of a unix kernel being
too large to fit onto a floppy. This option is ideal
if there is no legacy floppy as USB is not supported
here!
**** LARGE KERNEL - See http://www.sco.com/ta/114161
- Try copying in a smaller kernel temporarily in:
# cd /
# btmnt -w
# cd /stand
# cp unix unix.sco
# cp [unix.install -or- unix.safe -or unix.old]
unix
Try to create the Emergency Floppies again
# cd /stand
# cp unix.sco unix
# cd /
# btmnt -r
- An older kernel though may not have information
such as additional disks added via "mkdev hd" or
"mkdev cpqciss" or the later "mkdev hpsas", so
you may need to remove components temporarily
such as:
a) Remove the network card from "netconfig"
b) or the HP EFS package
c) or disable kernel drivers
in /etc/conf/sdevice.d but changing the Y to N
and then relinking the kernel.
Examples: One which will fit: 2731145 Jan 30 11:59 unix.safe
Too large: 3930762 Mar 29 14:19 unix
See the 507 /usr/lib/mkdev/fd script and note the comment:
# hidden: 5. bootable CD (requires mkisofs, cdrecord) ...
So run "mkdev fd" and on the following menu:
Emergency Boot and Root floppy filesystems option
-------------------------------------------------
Choices for type of floppy filesystem.
1. 96tpi, double sided, 15 sectors per track (1.2M 5.25 inch)
2. 135tpi, double sided, 18 sectors per track (1.44M 3.5 inch)
3. 135tpi, double sided, 36 sectors per track (2.88M 3.5 inch)
4. 135tpi, double sided, 21 sectors per track (1.68M 3.5 inch)
Just press "5" and although not shown it will trigger the creation of
a bootable CD, including mkisofs image creation and cdrecord burning
when you select Single Boot&Root creation and System Specific Boot
(unless the boot kernel can't fit).
If you don't have a recordable CDROM installed, when prompted to enter
a CD to record to, from another console:
# cd /etc/bootroot.d
and you'll find all the files there, in case you wanted to burn the
ISO image using a Windows package, say, Nero on Windows, you'd need to
use the ISO image which is temporarily created as:
/etc/bootroot.d/bootcd.iso
But please note, that at the end of the mkdev fd script a function
called 'cleanup' is called and this will remove the $WORK directory,
which is defined to be /etc/bootroot.d, and as the iso image is in
there, you need to copy it to /tmp before the removal of $WORK.
If you wished to change the 'fd' script to cater for this then it can
be easily done.
Simply, add a remark (#) in the following sections of cleanup and
write_cd to stop the rm of the $WORK folder and to even try to use
cdrecord:
cleanup() {
trap '' 1 2 3 15
umount $mnt 2>/dev/null
#rm -rf $WORK
exit $1
and:
write_cd()
{
ISOROOT=$WORK/bootcd
ISO_OUT=$WORK/bootcd.iso
rm -rf $ISOROOT $ISO_OUT
mkdir $ISOROOT
ln $dev.marry $ISOROOT/boot.image
sprompt "$MSG22 $MSG23a$cdnum\n$MSG21" || cleanup $OK
logger "mkisofs"
mkisofs -R -V "Emergency CD" -b boot.image $ISOROOT >$ISO_OUT
#cdrecord -v dev=$cdnum,0,0 $ISO_OUT
sprompt "$MSG21" || cleanup $OK
rm_cd_nodes
}
The 2.88MB Limitation
---------------------
The 2.88MB limitation applies to the bootimage which is used to make
the CD bootable. The specification used for this is the
El'Torito specification which basically supports three different
method for booting off a CD:
1) floppy emulation
- allows 1.2MB, 1.44MB and 2.88MB floppy image size
2) hard disk emulation
- acts like booting off virtual hard disk via BIOS calls
3) no emulation
- boots an image directly off the CD tree
As you can see there are methods to allow for larger boot images, but
as SCO OpenServer 5.0.x only supports the 'floppy emulation' boot
method, it's not possible to go beyond the 2.88MB limit.
But you can certainly use the rest of the CD to put additional files
into the ISO9660 filesystem, which otherwise would be empty, so you
have nearly the full size of the media to place extra stuff to the CD.
Please note that you need to mount this extra stuff just as you would
mount a CD in normal operation mode, since this extra stuff is in the
ISO9660 filesystem but not in the ramdisk which is included in the
bootimage (and which will be installed automatically when booting this
CD).
So you can modify the "mkdev fd" script to either always place a set
of additional files into the cdroot directory (do that before mkisofs
is called) or you add another prompt to the write_cd() function that
will pause the creation and then you can copy files into the cdroot
directory from another console.
NOTE:
Please note that USB devices are currently not supported in the unix
kernel on the Emergency media.
SEE ALSO:
Technical Article 104767, "Recover OpenServer 5 root filesystem after crash
if backups, boot/root exist."
Technical Article 105909, "How do I create an emergency root disk with the
vi editor installed on SCO OpenServer 5?"
Technical Article 110334, "How to recover from a lost or corrupted /usr/lib/libc.so.1
on OpenServer 5."
Technical Article 110964, "How do I mount my CD-ROM while being booted from my SCO
OpenServer emergency boot and root floppy diskettes?"
Technical Article 110488, "My filesystem is corrupt even after running fsck.
What can I do before restoring from backup or consulting a data
recovery service?"
Technical Article 105642, "My system panics when I try to boot off the boot
floppy and root to hard drive."
Technical Article 104885, "No space on ram disk" error when restoring root
filesystem."
Technical Article 104781, "fsck(ADM) is reporting read errors on block 0 of
my root device."
Technical Article 104907, "What are some of the basic utilities to verify
system integrity?"
Technical Article 110094, "I get cpio WARNING errors while creating the generic
set of emergency floppies on OpenServer 5.0.5."
Technical Article 104822, "Out of inodes" error when creating boot/root floppy
on SCO OpenServer 5."
Technical Article 105745, "While running the command "mkdev hd 0 1" I corrupt
my root hard drive on OSR5."
Technical Article 105094, "How can I break out of the install routine to a
shell prompt?"
Technical Article 125056, "Get "Stage1 boot failure: error loading hd(40)/boot"
after installation of SCO Openserver 5.0.7."
|