After having my first looks at the new RedHat 6.1 release, I must say that it's nothing short of excellent. The new GUI installer is very impressive (although disk driud is inflexable as ever - I have always had a personal dislike of it). Sure there are some hiccups, and I'm tending to agree with someone else who posted a message stating an opinion that he feels that in the end it was rushed out the door just a bit too soon in order to meet the early October deadline. But overall it's a brilliant job. Well done RedHat, it's just getting better all the time. While this particular ramble started off as a brief reply to a seemingly innocent question in the cartman mailing list, I've cross-posted it into redhat-devel as it is likely to be of some interest to people there too. My intention here is not to focus so much on the installation itself, but on technical aspects of the distribution. I have a few comments, take them or leave them, about the RedHat 6.1 ISO release *image*, together with some general pointers for others about how they might go about recreating and burning these things. Two shell scripts are included (attached). WARNING: there are some important changes to be aware of in this new RedHat release with respect to creating modified installation images based on it. I've discovered a few things that have some important ramifications for anyone who produces their own customised RedHat CDROMs. For anyone who wants more documentation about burning CDROMs, see the following: - CD-Writing HOWTO - CD-Recordable FAQ at http://www.fadden.com/cdrfaq/ - RedHat-CD mini-HOWTO. Aside #1: There's a few tricks involved with using cdrecord with an IDE cdrom burner. The HOWTOs don't explain it very well... you have to boot a kernel that has ide-scsi either in it, or booted with an initrd that contains and loads the ide-scsi module. (Use an initrd with the default redhat kernel). You then have to pass parameters to the kernel at bootup (ie, via lilo/loadlin/lilo.conf) to actually turn it on. (Example in /etc/lilo.conf - append="hdc=ide-scsi"). A bit cumbersome, but it works well once it has been set up right. Aside #2: Last year I wrote my own redhat-CD mini-howto, but other things got in the way and I never finished it to the point of tidying it up and releasing it publically. Now that I've moved jobs I no longer have it up on my old web page and so far I've been too busy to put up a new one. Anyway, someone else has beated me to it now, good on'em - they've earned a Bcc of this message for their efforts :) On Fri Oct 08 1999 at 22:29, MrB wrote: > Subject: Re: making cd [rearranged in cronological order] > > -----Original Message----- > > From: MrB [mailto:[EMAIL PROTECTED]] > > Sent: Friday, October 08, 1999 8:33 AM > > To: [EMAIL PROTECTED] > > Subject: making cd > > > > Do any of you know the best way to go about making a Redhat 6.1 install > > CD? > > Thanks > > Brad This question seems somewhat off-topic for the cartman list, more suitable as a general question / FAQ in redhat-list. But as it turns out, there's heaps to say as things have changed. > "McGonnell, Jason" wrote: > > > Download the .iso file in the /iso directory on ftp.redhat.com or > > a mirror. Then burn the iso to a CD using a Windows program like > > EZ CD Creator. Huh? Use a windoze program? Bah! What on earth for? I'd have to install windows to do it, what a pain and a total waste of time :) [Actually, one day I want to put together a games box for myself, and I guess it will end up having wundoze on it as duel-boot. Mind you, quake3 [demo] just *rocks* under linux! If this trend keeps up then I mightn't even need to do that. -- ok, ok, off-topic...] > Using the iso file 6.1-i386.iso from the copy of linux they have at > cdrom.com what are the options i need to set in nero to burn it?? It's almost trivial to burn an iso image onto a CDROM using linux. I've never heard of nero, see the man page (if it has one) or its docs. I would recommend cdrecord - it's in the main RedHat/RPMS/ distribution directory; its man page is pretty straight-forward. This has worked flawlessly for me for a long time. (I've had hassles with scsi bus resets by the scsi driver, but that's another story). To _create_ an iso image, try mkisofs or mkhybrid (again, both can be found either in the powertools or the main distribution). They both have good documentation and both do a good job. Now for my observations/questions/suggestions for the good folk at RedHat... I'm not sure why the mini HOWTOs aren't included on the main distribution image in the /doc/HOWTO/ directory (eg, in HOWTO/mini). Pity that. Even better would be that they were all there in their easily-browsable html rather than plain text version. Why are you still using the TRANS.TBL rockridge format for the release ISOs? What possible advantage is there to having these ugly files? Nobody uses (err, needs) them, not any more. (Convince me otherwise!) In fact, the TRANS.TBL files are a right PITA! If you use an exact copy of the original ISO image and then modify it with any update packages, when you run genhdlist on the result, it barfs because there's one of these ugly monsters lurking in the /RedHat/RPMS/ directory. So you have do to this when the official ISO is copied onto your hard drive for modification: find . -name TRANS.TBL -exec rm -f {} \; Please RedHat, no more ugly TRANS.TBL files! Please? [A little later...] Well ok, genhdlist *used* to coredump if it found any corrupted rpms or files that weren't rpms. But apparently not any more. Hmm, the TRANS.TBL files are still useless clutter. Same for the /rr_moved/ directory too... mkisofs can be tweaked to omit them, the 8-directory-deep limit is not exceeded anyway (which is why it is an empty directory in the release image). mkisofs can create images that contain *both* rockridge and joliet extensions. Why have m$-like .htm files rather than .html? Sticking with the x.3 format really isn't necessary... Joliet + RR is enough to make it very useable under both windows and most flavours of unix, and who would be using dos to read them anyway? Besides, the 8.3 format rule is already broken for most of the doc files. True, these suggestions are breaking the ISO "standard" if they are omitted, but I have been produced customised RedHat CDROMS in the recent past that have had wide distribution (to uni students), and never had a single complaint in this regard. ... Except from disappointed Mac lo^H^Husers... it's the only OS that I've found that has trouble with the resulting image - and even then the TRANS.TBL files don't help. [Poor old MacOS, microslop doesn't seem to want to let Apple make it very functional. Funny that.] I've been routinely burning ISOs for both linux and windows with mkisofs using something very similar to this without any hassles whatsoever... BOOTIMG=images/boot.img ( [ -d $SOURCEDIR/RedHat/RPMS ] && $SOURCEDIR/RedHat/base/genhdlist $(pwd) ) mkisofs -a -r -N -L -d -D -J \ -V $VOLID \ -A $APPID \ -P $PUBLID \ -p $PREPID \ -o $OUTIMG \ -b $BOOTIMG \ -c $BOOTCAT \ -x lost+found \ $SOURCEDIR See the attached shell script(s) for a full working example. This might need a tiny bit of tweaking for specific purposes, but the result is a very clean-looking image on the CDROM filesystem. The resulting disks are quite usable with linux, windows, (dec/tru64) alpha, solaris, and probably others. Mac users loose, but that applies to their general inablility to understand joliet and RR CDs anyway, nothing specific to redhat/linux. Question: Is it possible to have, as standard, genhdlist moved into the /RedHat/base/ directory? (And also the other goodies now to be found in /misc/src/anaconda/utils/ - what do they do? What happened to dmphdlist?) That way it becomes possible to do rm -rf misc/ with impunity and still be able to create useful updated/customised images. Ahh, ok, let me retract this somewhat. The /misc/ directory used to occupy upwards of 50Mb of otherwise useless baggage (which is why I regularly removed it). I've just done a `du -s' on that directory for the new Cartman release, and it's down to just over 14Mb. The issue of removing this directory has suddenly become almost mute... what did you guys do to make this possible? Anaconda is _that_ good? Wow... Oops! Ok, this has changed... $ RedHat/base/genhdlist RedHat/base/genhdlist: error in loading shared libraries: librpm.so.0: cannot open shared object file: No such file or directory Uh-oh, that's Not Good News. $ ldd genhdlist librpm.so.0 => not found libc.so.6 => /lib/libc.so.6 (0x40019000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) Is it wise to have genhdlist dynamically linked rather than static like it has always been? Further investigation shows that libz.so.1, libdb.so.2 and libbz2.so.0 are also needed for librpm.so.0. Ouch, from now on my script will have to become something like this... ( [ -d $SOURCEDIR/RedHat/RPMS ] && cd $SOURCEDIR && LD_LIBRARY_PATH=$SOURCEDIR/RedHat/instimage/usr/lib \ $SOURCEDIR/RedHat/base/genhdlist $(pwd) ) That's unfortunate, really ugly. Other comments... Thanks for the sanity in the /dosutils/autoboot.bat file with the initrd parameter finally pointing to a sane location. (Previously it has tended to point to an initrd located deep in the /misc directory. Removing /misc/ broke autoboot unless the .bat file was changed). Why put the boot.cat file (created by mkisofs for bootable CDs) in the base directory of the cdrom? Ugly and useless... why not hide it somewhere else? (/RedHat/base/ seems like as good a place as any). Actually, with a new "-m boot.cat" parameter to mkisofs, it looks like it is possible to hide this file altogether. (Untested). What's the .buildlog file doing there in the base directory? Also useless. Why not move the /misc/ directory tree into /RedHat/ - it seems to belong in there, out of the way, and alongside the other things it needs/builds. Hey, doing all that turns the base directory of the CDROM into just this, very clean and tidy: $ ls -F1 COPYING README RPM-GPG-KEY RedHat/ autorun* doc/ dosutils/ images/ Add an "extras" directory and away you go. (I put rpms for things like ssh and some of the powertools in there, very handy for cdrom and kickstart installs to have everything available in the same place). Hey, after all there's 650Mb to play with! But oops, the default redhat 6.1 image is just about 650Mb already :) Sorry, this has turned into a long ramble written over a couple of days), but there's some worthwhile information and comments in all this. I suspect that there's more gremlins lurking about in there that I (and others) have yet to discover... Attached: - script for creating ISO images for CDROMs with mkisofs - script for copying CROMS or burning ISO images Use At Your Own Risk. Hope this is useful for people. Cheers Tony -=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=- Tony Nugent <[EMAIL PROTECTED]> Systems Administrator GrowZone OnLine (a project of) GrowZone Development Network POBox475 Toowoomba Oueensland Australia 4350 Ph: 07 4632 8344 -=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-
#!/bin/sh # # create an iso image of a RedHat CDROM # Tony Nugent <[EMAIL PROTECTED]> # modified for RedHat 6.1 # October 1999 # This is somewhat of a hack, but it works for me # Use at your own risk, I accept no liabilities for what this does. ##################################### #variables - customise as necessary myname=$(basename $0) SOURCEDIR="$1" REDHATVER="RedHat 6.1" THEDATE="`date '+%a %d %b %Y'`" # # an alternative to these is to set up a .mkisofsrc file APPID="$REDHATVER"' with updates and extras, created '"$THEDATE" VOLID="$REDHATVER"' with updates' PUBLID='I did this' PREPID='Tony Nugent <[EMAIL PROTECTED]>' # make an El Torito bootable CD BOOTIMG="images/boot.img" BOOTCAT="RedHat/base/boot.cat" # # ISO target file OUTIMG="redhat61.iso" # include all files and .dot files, but no emacs ~ backup files # extensions: Joliet, RockRidge with no TRANS.TBL or /rr_moved/ OPTIONS="-a -r -N -L -d -D -J" # # reverse these lines if you want a log file LOGFILE="/dev/null" LOGFILE="$OUTIMG.log" ##################################### # functions # # only for testing this script... #mkisofs () { echo "mkisofs $*" ; } # script testing only # nasty_exit () { cat << EOF ${myname}: create a RedHat ISO image for a CDROM using mkisofs Usage: ${myname} source_dir [output_file] EOF exit 1 } # showopts () { cat << EOF mkisofs $OPTIONS -V $VOLID -A $APPID -P $PUBLID -p $PREPID -o $OUTIMG -b $BOOTIMG -c $BOOTCAT -x lost+found $SOURCEDIR EOF } # makeiso () { showopts mkisofs $OPTIONS \ -V "$VOLID" \ -A "$APPID" \ -P "$PUBLID" \ -p "$PREPID" \ -o "$OUTIMG" \ -b "$BOOTIMG" \ -c "$BOOTCAT" \ -x lost+found \ $SOURCEDIR } # cleanout () { uglyfiles="boot.cat TRANS.TBL" echo "Removing any: $uglyfiles" for critter in $uglyfiles ; do find . -name $critter -exec rm -f {} \; done [ -d rr_moved ] && rmdir rr_moved # consider doing either of these things (untested): # [ -d misc ] && rm -rf misc/ # [ -d misc ] && mv misc RedHat/ } # makehdlist () { # sanity check [ ! -x RedHat/base/genhdlist ] && { [ -x misc/src/anaconda/utils/genhdlist ] && { cp -a misc/src/anaconda/utils/genhdlist RedHat/base } || { echo "Oops, genhdlist is missing" && exit 1 } } # echo "Generating new RedHat/base/hdlist file..." LD_LIBRARY_PATH=$(pwd)/RedHat/instimage/usr/lib \ RedHat/base/genhdlist $(pwd) || { echo "Oops, genhdlist failed" && exit 1 } } # ################################### # main [ -z $1 ] && echo "Error: missing source directory" && nasty_exit [ ! -d $1 ] && echo "$1 is not a directory: $1" && nasty_exit [ ! -d $1/RedHat/RPMS ] && echo "$1 doesn't look like a RedHat distribution tree" && nasty_exit [ ! -z $2 ] && OUTIMG="$2" echo -e "$myname: creating a $REDHATVER ISO image as $OUTIMG\n" ( cd $SOURCEDIR cleanout makehdlist ) || exit 1 makeiso 2>&1 | tee -a $LOGFILE # end
#!/bin/sh # # burn an iso image to a CDROM using cdrecord # Tony Nugent <[EMAIL PROTECTED]> # Revised: October 1999 # This is a quick'n'dirty hack, but it works for me # Use at your own risk, I accept no liabilities for what this does. # # See the man page for cdrecord # This script could do with a LOT of improvements, # eg: help output, pass parameters to set `speed', and so on. # ##################################### #variables - customise as necessary PATH=$PATH:/usr/local/bin speed="4" dev="00,01,00" # ##################################### # functions burnit () { cdrecord $options \ -v \ speed=$speed \ dev="$dev" \ -eject \ -data $imagefile } ################################### # main [ -z $1 ] && echo "Error: please supply the name of the image to burn!" && exit 1 [ ! -e $1 ] && echo "Error: missing file: $1" && echo "Error: please supply the name of the ISO image to burn!" && exit 1 # assume we have the name of a *valid* iso image... imagefile=$1 # dummy run? [ ! -z $2 ] && { [ "$2" = "dummy" ] && options="-dummy" } # this is needed if reading from another ISO image, eg from another cdrom [ $1 = "/dev/cdrom" ] && options="$options -isosize" # do it... burnit