NetAdminTools.com
 
SignalQ Sites:
NetAdminTools - Coprolite - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - FixRambler
Categories:
GNU/Linux | Homebrew designs | Perl | Ruby | Administration | Backup/Recovery | Bugs/Fixes | Certification | Database | Email | File/Print | Hardware | Information Grab Bag | Interoperability | GNU/Linux ABCs | Monitoring | Name Resolution | Network Services | Networking | Remote Control | Security | Desktop | Web | BSD | Solaris | GIAGD | ERP | REALbasic

Last 30 Days | Last 60 Days | Last 90 Days | All Articles | RSS



Categories:
·GNU/Linux
·Homebrew designs
·Perl
·Ruby
·Administration
·Backup/Recovery
·Bugs/Fixes
·Certification
·Database
·Email
·File/Print
·Hardware
·Information Grab Bag
·Interoperability
·GNU/Linux ABCs
·Monitoring
·Name Resolution
·Network Services
·Networking
·Remote Control
·Security
·Desktop
·Web
·BSD
·Solaris
·GIAGD
·ERP
·REALbasic
·All Categories


Modifying a Red Hat 8.0 Install Diskette
Topic:GNU/Linux   Date: 2002-12-24
Printer Friendly: Print

spacerspacer
<<  <   >  >>

Subject

In this article I struggled with a Barracuda ST15150N drive that had problems with Tagged Command Queueing. Well, it is nice to have an install diskette that works with a serial console and works with the ST15150N. This article will guide you through the modification of a stock RedHat install boot disk. I will start with the diskette image created in this article. If you don't want to use the serial port console, then just use the regular boot.img file from the Red Hat 8.0 CD.

First, we need to create the proper modules. Use the kernel source that comes with Red Hat.

[linux-2.4]# make mrproper
[linux-2.4]# cp configs/kernel-2.4.18-i386-BOOT.config ./.config
[linux-2.4]# make oldconfig
[linux-2.4]# make xconfig

For this drive and Adaptec card, the old driver seems to work better with tagged command queueing disabled, so set this in the scsi/low level drivers area on the aic7xxx_old driver. After you are done, edit Makefile in the root of your source tree (/usr/src/linux-2.4) so that the fourth line is EXTRAVERSION = -14BOOT. This will match the version on your modules with the kernel version on the boot disk. This assumes you are using the original kernel source off of the Red Hat 8.0 CD. This should work otherwise for a variety of reasons, but there are a lot of hard coded parts of the Red Hat install diskette. Many programs and settings that are usually separate are munged together (like loader or init vs. insmod and linuxrc). It is best to just go with it and make your modules *exactly* the same. Now, let's build the kernel and modules:

[linux-2.4]# make dep clean bzImage modules

We will put our newly compiled aic7xxx_old module into the modules.cgz file, wich is a compressed cpio archive. The trick is that we need to uncompress initrd.img to get at modules.cgz, and then we need to wrap it all back up again. To make it simpler, we will keep the name as aic78xxx:

[tmp]# mdir
Volume in drive A has no label
Volume Serial Number is 3D7E-5686
Directory for A:/
LDLINUX  SYS      7112 09-10-2002  16:31
SYSLINUX CFG       800 12-18-2002   5:27
SYSLINUX PNG      7164 09-10-2002  16:31
INITRD   IMG    518862 09-10-2002  16:31
VMLINUZ         852324 09-10-2002  16:31
SPLASH   LSS     12070 09-10-2002  16:31
BOOT     MSG       342 09-10-2002  16:31
GENERAL  MSG       957 09-10-2002  16:31
OPTIONS  MSG       730 09-10-2002  16:31
PARAM    MSG       869 09-10-2002  16:31
RESCUE   MSG       508 09-10-2002  16:31
SNAKE    MSG       549 09-10-2002  16:31
12 files           1 402 287 bytes
59 904 bytes free
[tmp]# mount -t vfat /dev/fd0 /mnt
[tmp]# cp /mnt/initrd.img /tmp/
cp: overwrite `/tmp/initrd.img'? y
[tmp]# gzip -dc /tmp/initrd.img > /tmp/initrd.unc.img
[tmp]# mkdir /tmp/imagemount
[tmp]# mount -o loop /tmp/initrd.unc.img /tmp/imagemount
[tmp]# gzip -dc /tmp/imagemount/modules/modules.cgz > /tmp/modules.cpio
[tmp]# mkdir /tmp/modules
[tmp]# cd /tmp/modules
[tmp]# cpio -idumv < ../modules.cpio
2.4.18-14BOOT/aic7xxx.o
2.4.18-14BOOT/megaraid.o
2.4.18-14BOOT/ncr53c8xx.o
2.4.18-14BOOT/scsi_mod.o
2.4.18-14BOOT/sd_mod.o
2.4.18-14BOOT/sr_mod.o
2.4.18-14BOOT/sym53c8xx.o
2.4.18-14BOOT/usb-storage.o
934 blocks
[modules]# cd 2.4.18-14BOOT
[2.4.18-14BOOT]# rm aic7xxx.o
rm: remove regular file `aic7xxx.o'? y
[2.4.18-14BOOT]# cp /usr/src/linux-2.4/drivers/scsi/aic7xxx_old.o ./aic7xxx.o
[2.4.18-14BOOT]# cd ..
[modules]# find . -type f | cpio -ocO /tmp/newmods.cpio
912 blocks
[modules]# cd ..
[tmp]# gzip -c newmods.cpio > imagemount/modules/modules.cgz
[tmp]# umount /tmp/imagemount
[tmp]# gzip -c initrd.unc.img > initrd.img
[tmp]# cp initrd.img /mnt
cp: overwrite `/mnt/initrd.img'? y
[tmp]# umount /mnt

We now have a diskette that will install Red Hat 8.0 just swimmingly on a system with an old Adaptec 2940 and an ST15150N via the serial port. To get the system to boot again after the install, I used the kernel from this article, since I like it so much. Just use the diskette created above, but type linux rescue to get access to the file system. Copy the vmlinuz and System.map over, modify your boot loader stuff, and all is good.


People:
Places:
Things:
Times:





Please read our Terms of Use and our Privacy Policy
Microsoft, Windows, Windows XP, Windows 2003, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. NetAdminTools.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds, and refers to the Linux kernel. The operating system of most distributions that contain the Linux kernel is GNU/Linux. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2010 NetAdminTools.com