Can we put this in the documentation? This is useful information.
-----Original Message----- From: Dan [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2003 10:51 AM To: [EMAIL PROTECTED] Subject: Re: [Sisuite-users] Removing requirement to ping imageserver --- Brian Elliott Finley <[EMAIL PROTECTED]> wrote: Hi Brian, Dann, list Thanks very much for the patches, I eventually got everything done! I have included a full list of every step taken at the end of this email, I'm convinced I've done this the hard way but it does all work ;) If there's an easier way, I would just rather not know! > I'm fine with the idea, but have modified the message a bit, and have > reduced the number of ping attempts to seven. I figure, if we're not > actually going to fail, but are going to proceed anyway, it's just an > informative thing to give someone a "happy it's working" feeling, so if > it hasn't succeeded in 7 pings, let's not delay the install any longer. > > > Here's the fresh code snippet: > > while [ "$PING_EXIT_STATUS" != "0" ] > do > echo "PING ATTEMPT $PING_COUNT: " > ping -c 1 $IMAGESERVER; PING_EXIT_STATUS=$?; PING_COUNT=$(( > $PING_COUNT + 1 )) > if [ "$PING_COUNT" = "7" ]; then > echo > echo " WARNING: Cannot ping the image server \"$IMAGESERVER\"" > echo " Despite this seemingly depressing result, I > will attempt" > echo " to proceed with the install. Your imageserver > may be" > echo " configured to not respond to pings, but it > wouldn't hurt" > echo " to double check that your networking equipment > is" > echo " working properly!" > echo > sleep 5 ^^^^^^^^ You need to set: PING_EXIT_STATUS=0 here or the pings just go on and on... > fi > done > > if [ "$PING_EXIT_STATUS" = "0" ]; then > echo > echo " We have connectivity to the Image Server!" > fi OK so here are full instructions for taking apart a Systemimager boot cd - making an initrd change and recreating a bootable ISO: All this done on RH9 as root, in /root 1) Mount a systemimager CD : mount /mnt/cdrom 2) Make a directory to work in : mkdir systemimager 3) cd systemimager 4) cp /mnt/cdrom/boot/siboot.img ./ 5) Make a loopback mountpoint for siboot.img : mkdir ./siboot_mnt 6) Mount the siboot.img file : mount -o loop siboot.img ./siboot_mnt 7) Copy out the initrd.img to CWD : cp siboot_mnt/initrd.img ./initrd.gz 8) Uncompress the initrd file : gunzip initrd.gz 9) Make a loopback mountpoint for initrd : mkdir ./initrd_mnt 10) Mount the initrd : mount -o loop initrd initrd_mnt/ 11) Make a directory you can copy the loopback device files to: mkdir initrd_copy 12) Copy the files to this directory : cp -a initrd_mnt/* initrd_copy/ 13) mkdir initrd_copy/lib initrd_copy/proc initrd_copy/tmp 14) mount --bind initrd_copy/lib initrd_copy/dev 15) mount --bind initrd_copy/proc initrd_copy/new_root 16) mount --bind initrd_copy/tmp initrd_copy/root 17) Apply your patch! In this case its a : vim initrd_copy/etc/init.d/rcS to fix PING_EXIT_STATUS 18) Reset permissions on all changed files : chown -R 20800:64 initrd_copy/ 19) Make a cramfs filesystem of your changes : mkcramfs initrd_copy/ initrd 20) Make a temporary mountpoint, mount the initrd and check your changes!!! mkdir tmp_mount;mount -o loop initrd tmp_mount cat tmp_mount/etc/init.d/rcS | grep <changes> 21) umount tmp_mount/ 22) You now have a working cramfs initrd. gzip and rename it and chmod it: gzip initrd; mv initrd.gz initrd.img;chmod 755 initrd.img 23) Now we need to make a bootable filesystem from this: 24) mkdir iso 25) dd if=/dev/zero of=iso/siboot.img bs=1k count=2880 26) /sbin/mkdosfs iso/siboot.img 27) syslinux -s iso/siboot.img 28) mkdir iso/siboot_mount 29) mount -t msdos -o loop iso/siboot.img iso/siboot_mount/ 30) cp initrd.img iso/siboot_mount/ 31) cp -a siboot_mnt/* iso/siboot_mount/ Answer "No" to overwriting initrd.img and ldlinux.sys 32) If you want to modify the default systemimager message text: vim iso/siboot_mount/message.txt 33) mkdir -p iso/iso_build_dir/boot; umount iso/siboot_mount/ 34) cp iso/siboot.img iso/iso_build_dir/boot/ 35) cd iso/iso_build_dir 36) mkisofs -b boot/siboot.img -c boot/boot.catalog -o image.iso . 37) cd ../../;umount siboot_mnt; umount initrd_mnt; umount /mnt/cdrom 38) cd 39) umount systemimager/initrd_copy/dev/ 40) umount systemimager/initrd_copy/new_root/ 41) umount systemimager/initrd_copy/root/ 42) burn ISO! I hope this saves someone else some hassle one day ;) ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://mail.messenger.yahoo.co.uk ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Sisuite-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/sisuite-users ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Sisuite-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/sisuite-users
