dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse


Our Discord Notification Server invitation link is https://discord.gg/jB2qmRrxyD

Author Topic: Cloning,Testing, Installing, etc for the requisite glibc upgrade  (Read 35 times)

Offline Chip (OP)

  • Server Admin
  • Hero Member
  • *****
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 7330
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Today at 04:42:10 AM
  • Deeply Confused Learner
  • Profession: IT Engineer now retired
📎 ?? - Click on this arrow to view all attachments
ListAttBBC  |  v6.3  |  2026-08-17  |  Andrew.human & Claude.ai
#FileSizeDownloadsInfoDL
00fix_sql.sh731 B0ℹ️⬇️
01clone3.sh406 B0ℹ️⬇️
02clone1.sh2.9 KB0ℹ️⬇️
03clone1#2.sh1 KB0ℹ️⬇️
04Clone.sh-Claude.ia-final-cut-FAIL.sh.txt0 B0ℹ️⬇️
05Clone.sh-Claude.ia-final-cut3-FAIL.sh.txt4.5 KB0ℹ️⬇️
06Clone.sh-Claude.ia-final-cut2-FAIL.sh.txt8 KB0ℹ️⬇️
07.bashrc5.4 KB0ℹ️⬇️
08.nanorc804 B0ℹ️⬇️
09repo.zip4.3 MB0ℹ️⬇️
10ISEmedia - ISE_v9.0 GLIBC PREREQ -- VM guest -- the Clone and the drama.md29 KB0ℹ️⬇️
11ISEmedia_Clone_Session_Log.pdf115.2 KB4ℹ️⬇️
12ISE v9.0 and Clone VM checkpoint.md7.8 KB0ℹ️⬇️
13Claude Clone.pdf4.4 MB6ℹ️⬇️
14BEFORE THE GRAND MAKE -- Pages 1-69 of --glibc 2.17 upgrade plan for torch compatibility--.pdf2.1 MB1ℹ️⬇️
15checkpoint as_at_just_before_the_Grand_MAKE.md5.1 KB0ℹ️⬇️


This post/message is up to and including just prior to the GRAM (FINAL) MAKE, where we pause, take logs, shutdown the clone save save the disk image ( a directory)

This is the conversation at the end of the cloning:

https://claude.ai/share/c8e5cd56-4467-429d-82d6-10bc17bdaf54

----------> The actual testing:

1. Since our kernel lives in firmware then it's pointless to try to update it:

Code: [Select]
echo "exclude=kernel*" >> /etc/yum.conf
2. Perform the yum installs after getting your repos in good order ("yum clean all", attenpt a "list" or "reiinstall" etc):

Code: [Select]
yum groupinstall "Development Tools"
yum install glibc-headers kernel-headers bison gawk texinfo

3. Once that finishes, worth the quick verify before touching glibc source:

Code: [Select]
yum list installed | grep -E 'gcc|glibc|kernel-headers|bison|gawk|texinfo'
gcc --version
uname -r

Bottom line: toolchain's in good shape, exclude is confirmed working, and you've got a better compiler option sitting unused. Ready to pull glibc 2.17 source next?

4. re. devtoolset-2-gcc 4.8.2 — already installed and sitting right there as a newer alternative. This is genuinely useful: Red Hat's Software Collections devtoolset packages are specifically meant to give you a newer compiler on old RHEL/CentOS without touching the system gcc, side by side. Worth building glibc using scl enable devtoolset-2 bash first rather than the stock 4.4.7 — meaningfully lowers the odds of a compiler-related build failure and costs nothing extra since it's already there, so LET'S USE IT: 

Code: [Select]
scl enable devtoolset-2 bash
gcc --version    # should now show 4.8.2

scl enable devtoolset-2 bash
gcc --version

5. Next: pull glibc 2.17 source and set up an out-of-tree build (glibc explicitly requires building outside its own source dir):

* includes the "configure"

Code: [Select]
mkdir -p /usr/local/src/glibc-build && cd /usr/local/src
wget http://ftp.gnu.org/gnu/glibc/glibc-2.17.tar.gz
tar xzf glibc-2.17.tar.gz
cd glibc-build
../glibc-2.17/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

U might get: configure: error: support for --no-whole-archive is needed so check:

Code: [Select]
which ld
ld --version

\ld --help | grep whole-archive

ls /opt/rh/devtoolset-2/root/usr/bin/ld
/opt/rh/devtoolset-2/root/usr/bin/ld --version

So it's very likely the colourify wrapper corrupting configure's test after all. Quick, definitive check:

Code: [Select]
\ld --help | grep whole-archive
Clone  root@forum:14:15:41/usr/local/src/glibc-build unalias ld
 Clone  root@forum:14:42:13/usr/local/src/glibc-build type ld
     ld is /opt/rh/devtoolset-2/root/usr/bin/ld
 Clone  root@forum:14:42:21/usr/local/src/glibc-build


Then go back an rerun the configure < same error > ""grep -B5 -A15 "no-whole-archive" config.log"

THis led us to upgrafde the Assembler and I stop here - see the rest in print !~ BYE

THIS IS ONLY A GUIDE ! -- Perform the folluwing:

A. Configure Clone VM:

B. D/L https://vault.centos.org/6.10/isos/x86_64/CentOS-6.10-x86_64-minimal.iso

C., Add an new VM: Install OS later > "CentOS 6 64-bit", 2 CPUs, 2GB RAM, I/O ctl=SCSI, Choose a single (unsplit) extent (contiguous) of 32 GB disk space and then save to E:\VMware\VMs\

D. Change via Settings (start VMware with the Administrator option): Change CD/DVD - see "Advanced" and set to "IDE" then go back and finally point to the ISO you downladed in A.

e. Boot into that install/upgrade, skip the ISO checking and u r off !

Issues:

1. Replace /etc/yum/repos.d/CentOS-Base.repo with:

Code: [Select]
[C6.10-base]
name=CentOS-6.10 - Base
baseurl=http://vault.centos.org/6.10/os/$basearch/
#baseurl=http://centos.org
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[C6.10-updates]
name=CentOS-6.10 - Updates
baseurl=http://vault.centos.org/6.10/updates/$basearch/
#baseurl=http://centos.org
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[C6.10-extras]
name=CentOS-6.10 - Extras
baseurl=http://vault.centos.org/6.10/extras/$basearch/
#baseurl=http://centos.org
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[C6.10-contrib]
name=CentOS-6.10 - Contrib
baseurl=http://vault.centos.org/6.10/contrib/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never

[C6.10-centosplus]
name=CentOS-6.10 - CentOSPlus
baseurl=http://vault.centos.org/6.10/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never

2. Replace ~/.bashrc with:

Code: [Select]
# .bashrc

#export ENV_TAG=Live
#export ENV_TAG=Dev
 export ENV_TAG=Clone

# ---------------------------------------------------------
# STYLES
#  0  Reset all
#  1  Bold / bright
#  2  Dim
#  3  Italic
#  4  Underline
#  5  Blink
#  7  Reverse (swap fg/bg)
#  8  Hidden
#  9  Strikethrough
#
# FOREGROUND COLORS              BACKGROUND COLORS
#  30  Black    (90 bright)       40  Black    (100 bright)
#  31  Red      (91 bright)       41  Red      (101 bright)
#  32  Green    (92 bright)       42  Green    (102 bright)
#  33  Yellow   (93 bright)       43  Yellow   (103 bright)
#  34  Blue     (94 bright)       44  Blue     (104 bright)
#  35  Magenta  (95 bright)       45  Magenta  (105 bright)
#  36  Cyan     (96 bright)       46  Cyan     (106 bright)
#  37  White    (97 bright)       47  White    (107 bright)
#  39  Default                    49  Default
#
# EXTENDED (if terminal supports)
#  256-color:   \e[38;5;<0-255>m (fg)   \e[48;5;<0-255>m (bg)
#  Truecolor:   \e[38;2;<r>;<g>;<b>m (fg)   \e[48;2;<r>;<g>;<b>m (bg)
# ---------------------------------------------------------

# PS1 order is BG-colour/ENV_TAG-colour||user@host||":"||pwd|||"#"
if [ "$ENV_TAG" = "Live" ]; then

# PS1='\[\e[41;1;37m\] Live \[\e[0m\] \[\e[32m\]\u@\h\[\e[0m\]:\[\e[36m\]\w\[\e[0m\]\$ '
# Red background, white text, green user@:host, cyan working directory
  PS1='\[\e[41;1;37m\] Live \[\e[0m\] \[\e[32m\]\u@\h\[\e[0m\]:\[\e[36m\]\w\[\e[0m\]'
elif [ "$ENV_TAG" = "Dev" ]; then
# Magenta background, white text, white host@:user, cyan working directory
  PS1='\[\e[45;1;37m\] Dev \[\e[0m\] \[\e[37m\]\u@\h\[\e[0m\]:\[\e[36m\]\w\[\e[0m\]'
elif [ "$ENV_TAG" = "Clone" ]; then
# Blue background, white text, magenta host@:user, cyan working directory
  PS1='\[\e[44;1;37m\] Clone \[\e[0m\] \[\e[32m\]\u@\h\[\e[0m\]:\[\e[35m\]\t\[\e[36m\]\w\[\e[0m\] '
else
  PS1='Unrecognied ENV_TAG '
fi

export PYTHONDONTWRITEBYTECODE=1
export NCURSES_NO_UTF8_ACS=1

# User specific aliases and functions

#if [ "$ENV_TAG" = "Live" ]; then
# alias poweroff='echo NO WAY'
# alias reboot='echo NO WAY'
#else
##alias poweroff='echo NO WAY'
##alias reboot='echo NO WAY'
#fi

alias rm='rm -i'
alias cp='cp -bi'
alias mv='mv -i'

alias ee='nano'
alias lt='ls -alt'
alias lr='ls -altr'
alias ll='ls -al'
alias lS='ls -Sal'
alias cls='clear'
alias tuneweb='nano /etc/httpd/conf/httpd.conf'

alias px='ps auxfw'
alias netn='grc netstat -puatn'
alias nets='grc netstat -puat'

alias repo='cd /etc/yum.repos.d'
alias private='nano /var/www/html/private/index.html'

alias grep='grep --color=always'

alias sizes='du -Sh | sort -rh | head -25'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# log every command typed because i'm gettin' old !
if [ -n "${BASH_VERSION}" ]; then
    trap "caller >/dev/null || \
printf '%s\\n' \"\$(date '+%Y-%m-%dT%H:%M:%S%z')\
 \$(tty) \${BASH_COMMAND}\" 2>/dev/null >>~/.command_log" DEBUG
fi

alias log='cd /var/log'
alias sou='source ~/.bashrc'
alias brc='nano ~/.bashrc'

pushd()
{
  if [ $# -eq 0 ]; then
    DIR="${HOME}"
  else
    DIR="$1"
  fi

  builtin pushd "${DIR}" > /dev/null
  echo -n "DIRSTACK: "
  dirs
}

pushd_builtin()
{
  builtin pushd > /dev/null
  echo -n "DIRSTACK: "
  dirs
}

popd()
{
  builtin popd > /dev/null
  echo -n "DIRSTACK: "
  dirs
}

alias fid='find . -type d -ls'
alias fnd='find . -name'
alias lsf="ls -l | egrep -v '^d'"
#alias lsd="ls -l | egrep '^d'"
alias lsd="ls -dl */."


alias tips='cd /tips'
alias py='python'
alias py3='python3'

alias aws='nano /etc/awstats/awstats.forum.drugs-and-users.org.conf'
alias awsupd='/usr/bin/perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=forum.drugs-and-users.org -update'
alias sslerr='less /var/log/httpd/ssl_error_log'

alias push='git push origin master'

alias ep='nano /etc/postfix/main.cf'

alias mirror='sh /bin/mirror.sh'
alias mirrorts='sh /bin/mirror-ts.sh'
alias motd='nano /etc/motd'

export PATH="$HOME/.pyenv/bin:$PATH"

#if [ "$ENV_TAG" = "Live" ]; then
# eval "$(pyenv init -)"
# eval "$(pyenv virtualenv-init -)"
#else
##eval "$(pyenv init -)"
##eval "$(pyenv virtualenv-init -)"
#fi

alias priv='nano /var/www/html/private/index.html'
alias cdpriv='cd /var/www/html/private'

alias html='cd /var/www/html'
alias html20='cd /var/www/html/smf20'
alias html21='cd /var/www/html/smf21'

alias pak='cd /var/www/html/Packages'
alias src='cd /var/www/html/Sources'
alias the='cd /var/www/html/Themes/default'

alias pak20='cd /var/www/html/smf20/Packages'
alias src20='cd /var/www/html/smf20/Sources'
alias the20='cd /var/www/html/smf20/Themes/default'

alias pak21='cd /var/www/html/smf21/Packages'
alias src21='cd /var/www/html/smf21/Sources'
alias the21='cd /var/www/html/smf21/Themes/default'

alias ise='cd /var/www/html/The_ISE_Project'
alias isd='cd /var/www/html/ISE_Data'

alias ise20='cd /var/www/html/smf20/The_ISE_Project'
alias isd20='cd /var/www/html/smf20/ISE_Data'

alias maint='nano /var/www/html/Settings.php'
alias maint20='nano /var/www/html/smf20/Settings.php'
alias maint21='nano /var/www/html/smf21/Settings.php'

alias syslog='less /var/log/messages'
alias profile='nano ~/.bash_profile'

alias py='python3'
alias py3='python3'

alias rmback='rm -f *~'

alias colourify='/usr/local/bin/grc -es'

alias chownhtml='chown -R apache:apache /var/www/html'

alias pdf='cd /var/www/html/pdfjs'
alias pdfb='cd /var/www/html/pdfjs/backup'
alias pdf20='cd /var/www/html/smf20/pdfjs'
alias pdf21='cd /var/www/html/smf21/pdfjs'

alias bin='cd /bin'


3. Replace ~./nanorc with:

Code: [Select]
## Here is an example for Bourne shell scripts.
##

syntax "sh" "\.sh$"
icolor brightgreen "^[0-9A-Z_]+\(\)"
color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
color green "-[Ldefgruwx]\>"
color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>"
icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
color cyan "(^|[[:space:]])#.*$"
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
color ,green "[[:space:]]+$"

#include "/usr/share/nano/sh.nanorc"
include "/usr/share/nano/c.nanorc"
include "/usr/share/nano/perl.nanorc"
#include "/usr/share/nano/cpp.nanorc"


NB: This happens when a script gets edited/saved on Windows (Notepad, or copy-pasted through certain Windows terminals) then scp'ed to Linux and run as-is on Linux. Fix it on Clone directly:

Code: [Select]
sed -i 's/\r$//' clone1.sh
The clone job:

Code: [Select]
#!/bin/bash

set -e

LIVE_IP="128.199.200.202"   # direct IP — hostname resolution unreliable, see tonight's DNS/hosts issues
BACKUP_DIR="/root"

echo "[1/4] Dumping all databases on Live (run over SSH, output stays on Live)..."
echo ssh root@"$LIVE_IP" "mysqldump --all-databases --single-transaction --quick > $BACKUP_DIR/live_full_backup_\$(date +%F).sql"

echo "[2/4] Pulling the SQL dump from Live to this box..."
echo scp root@"$LIVE_IP":"$BACKUP_DIR"/live_full_backup_*.sql "$BACKUP_DIR"/

echo "[3/4] Pulling filesystem from Live (attachments excluded wholesale, added back next step)..."
rsync -zpaAPv --numeric-ids --progress -e ssh \
  --exclude="/dev/*" \
  --exclude="/proc/*" \
  --exclude="/boot/*" \
  --exclude="/sys/*" \
  --exclude="/tmp/*" \
  --exclude="/run/*" \
  --exclude="/mnt/*" \
  --exclude="/media/*" \
  --exclude="/lost+found" \
  --exclude="/swapfile" \
  --exclude="/var/lib/mysql/*" \
  --exclude="/root/*" \
  --exclude="/home/*" \
  --exclude="/Dev/*" \
  --exclude="/dev_mirror/*" \
  --exclude="/tips/*" \
  --exclude="/backup/*" \
  --exclude="/WEBMIN_BACKUPS/*" \
  --exclude="/git/*" \
  --exclude="/rexx/*" \
  --exclude="/awstats-7.5/" \
  --exclude="/samba/*" \
  --exclude="/1.8/*" \
  --exclude="/router/*" \
  --exclude="/var/lib/clamav/*" \
  --exclude="/var/lib/awstats/*" \
  --exclude="/var/spool/mail/*" \
  --exclude="/opt/metasploit-framework/.git/*" \
  --exclude="/usr/src/tensorflow/.git/*" \
  --exclude="/var/www/html/private/*" \
  --exclude="/var/www/html/ISE_Data/*" \
  --exclude="/var/www/html/backup/*" \
  --exclude="/SQL/*" \
  --exclude="/var/log/httpd/*" \
  --exclude="/etc/webmin/system-status/history/*" \
  --exclude="/var/lib/fail2ban/*" \
  --exclude="/etc/hosts" \
  --exclude="/etc/hpasswd" \
  --exclude="/usr/local/lib/python3.6/site-packages/torch/lib/*" \
  --exclude="/var/www/html/attachments/*" \
  --exclude="/var/www/html/attachments2/*" root@"$LIVE_IP":/ /

echo "[4/4] Pulling only the 20 newest attachments (from both dirs combined, found on Live over SSH)..."
ssh root@"$LIVE_IP" "find /var/www/html/attachments /var/www/html/attachments2 -type f -printf '%T@ %p\n' | sort -rn | head -20 | cut -d' ' -f2-" > /tmp/newest_attachments.txt

rsync -paPv --numeric-ids --files-from=/tmp/newest_attachments.txt --relative \
  -e ssh root@"$LIVE_IP":/ /

echo "[5/5] Regenerating swap (never reuse a copied swapfile — excluded from rsync above on purpose)..."
if [ -f /swapfile ]; then
  swapoff /swapfile 2>/dev/null || true
  rm -f /swapfile
fi
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
grep -q '^/swapfile' /etc/fstab || echo "/swapfile none swap sw 0 0" >> /etc/fstab

echo "Done. SQL dump is at $BACKUP_DIR/live_full_backup_*.sql — import it manually with:"
echo "  mysql < $BACKUP_DIR/live_full_backup_*.sql"

Fixing the yum repo:

a. save ther old "/etc/yum.repos.d'
b. unzip the repo.zip (attached)


DO NOT TRUST ANY OF THE PREVIOUS STEPS AS YOU WILL NEED TO GATHER DATA FROM ALL THE ATTaCHMENTS AS WELL




« Last Edit: Yesterday at 04:37:14 PM by Chip »
friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
Our Discord Server invitation link is https://discord.gg/jB2qmRrxyD

Tags:
 

Related Topics

  Subject / Started by Replies Last post
3 Replies
37838 Views
Last post September 24, 2015, 11:34:51 AM
by Jega
2 Replies
23029 Views
Last post November 05, 2015, 01:18:58 PM
by clinton
2 Replies
34635 Views
Last post October 16, 2017, 05:16:43 PM
by Chip
1 Replies
293 Views
Last post July 26, 2017, 04:54:52 AM
by gnossos
1 Replies
22057 Views
Last post May 05, 2026, 08:31:58 PM
by waseembakr
1 Replies
28951 Views
Last post October 16, 2018, 11:13:38 PM
by bignasty
0 Replies
21043 Views
Last post May 04, 2019, 02:53:23 PM
by Chip
0 Replies
20425 Views
Last post May 09, 2019, 03:15:03 PM
by Chip
0 Replies
23820 Views
Last post July 05, 2019, 06:16:54 AM
by Chip
0 Replies
19435 Views
Last post September 12, 2019, 04:59:16 PM
by Chip


dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse





TERMS AND CONDITIONS

In no event will d&u or any person involved in creating, producing, or distributing site information be liable for any direct, indirect, incidental, punitive, special or consequential damages arising out of the use of or inability to use d&u. You agree to indemnify and hold harmless d&u, its domain founders, sponsors, maintainers, server administrators, volunteers and contributors from and against all liability, claims, damages, costs and expenses, including legal fees, that arise directly or indirectly from the use of any part of the d&u site.


TO USE THIS WEBSITE YOU MUST AGREE TO THE TERMS AND CONDITIONS ABOVE


Founded December 2014
SimplePortal 2.3.6 © 2008-2014, SimplePortal