The boot kernel can be stripped of information that is not needed
to operate in single user mode.
1. Create a new vuifile for use in generating a stripped kernel.
2. Save the section below, between the "----" lines, to a file named
"/etc/conf/cf.d/vuifile.strip":
-----------------------------------------------------------
MEMORY {
below_loadsite: origin = 0x00000000, length = 0xF0010000
KV_loadsite: origin = 0xF0010000, length = 0x007F0000
above_loadsite: origin = 0xF0800000, length = 0x0F7FFFFF
}
SECTIONS {
.text: {} > KV_loadsite
.data ALIGN(0x1000): {} > KV_loadsite
.bss ALIGN(0x1000): {} > KV_loadsite
}
---------------------------------------------------------------
3. In single-user mode, unmount and re-mount the boot filesystem
so you can write to it:
btmnt -w
4. Move the original kernel to a new location:
mv /stand/unix /stand/unix.good
5. Strip the symbols and comment strings from the kernel:
cd /etc/conf/cf.d
idld -s vuifile.strip -o /stand/unix /stand/unix.good
mcs -d /stand/unix
This will create a new kernel in /stand/unix that is typically
about 20% smaller than the original.
A kernel size of approx 3.2 MB can be compressed and fitted
onto a floppy diskette.
6. Create a boot disk with "mkdev fd"
7. Move the stripped kernel aside and put the original back in place:
mv /stand/unix /stand/unix.stripped
mv /stand/unix.good /stand/unix
8. Re-mount the boot filesystem read-only:
btmnt -r
9. Now try booting from the new boot floppy.
NOTE:
To see the version of a driver you would run:
# mcs -p Driver.o
|