GithubHelp home page GithubHelp logo

pbkwee / distrorejuve Goto Github PK

View Code? Open in Web Editor NEW
20.0 2.0 8.0 321 KB

Bash script to help upgrade older distros to newer versions, and crossgrade from 32 to 64 bits

License: Apache License 2.0

Shell 100.00%

distrorejuve's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

distrorejuve's Issues

Security repo needs to be modified for bullseye not buster?

Hi there again,

Also whilst checking over the code (whilst doing a manual dist-upgrade to bullseye I noticed that this attempts to deal with the move of the security repo for bullseye - but appears to do this when the new version is buster rather than bullseye which is when I had to make this change (buster was fine with the old line) - am I reading this right?

if ! grep -qai "^ *deb.* ${new_distro}[ /-]" /etc/apt/sources.list; then
  echo "deb http://http.us.debian.org/debian/ ${new_distro} main non-free contrib" >> /etc/apt/sources.list

  #Err:3 http://security.debian.org bullseye/updates Release
  #404  Not Found [IP: 199.232.10.132 80]
  if is_distro_name_newer "${new_distro}" "buster"; then
    echo "deb http://security.debian.org/debian-security ${new_distro}-security main" >> /etc/apt/sources.list
  else
    echo "deb http://security.debian.org/ ${new_distro}/updates main" >> /etc/apt/sources.list
  fi
  echo "$old_distro:$new_distro: apt sources now has $(cat /etc/apt/sources.list | egrep -v '^$|^#')" | awk '{print "dss:sources:dist_upgrade_x_to_y:" $0}'
fi

If so I'm guessing:

  if is_distro_name_newer "${new_distro}" "buster"; then

should be:

  if is_distro_name_newer "${new_distro}" "bullseye"; then

?

All the best,
Chris

Crossgrading from armhf to arm64

First of all - thanks for your work. It has helped me to crossgrade from a armhf to a arm64 board. :)

I've made a fork with some changes (mostly I changed i386 to armhf and amd64 to arm64), but sadly I can't send a patch to you because my changes were in-place. Maybe there is a way to add/detect the architecture and handle the crossgrading more easily. Currently the architecture is hardcoded in several command lines and replacing it with variables requires rewriting may of those lines.

Here is my fork, for reference: https://github.com/mad-ady/distrorejuve, and here is documentation about how the process went: https://forum.odroid.com/viewtopic.php?f=55&t=33861

I hope arm can be integrated in your tool in an elegant way :)

Script might be confused about buster and bookworm for upgrading?

Hi there,

I was doing some due diligence code review before trying this script out and got confused about how the --to-latest-debian worked, to me it reads like it's going to upgrade buster -> bullseye (which is right, Debian 10 to 11) then try and downgrade bullseye -> buster rather than going to bookworm (Debian 12):

elif [ "--to-latest-debian" = "${ACTION:-$1}" ] ; then
  print_info
  dist_upgrade_lenny_to_squeeze
  [ $? -ne 0 ] && ret=$(($ret+1))
  dist_upgrade_squeeze_to_wheezy
  [ $? -ne 0 ] && ret=$(($ret+1))
  dist_upgrade_wheezy_to_jessie
  [ $? -ne 0 ] && ret=$(($ret+1))
  dist_upgrade_jessie_to_stretch
  [ $? -ne 0 ] && ret=$(($ret+1))
  dist_upgrade_stretch_to_buster
  [ $? -ne 0 ] && ret=$(($ret+1))
  dist_upgrade_buster_to_bullseye
  [ $? -ne 0 ] && ret=$(($ret+1))
  dist_upgrade_bullseye_to_buster
  [ $? -ne 0 ] && ret=$(($ret+1))

In fact looking at this I'm wondering if it's mixing up buster and bookworm here?

function dist_upgrade_bullseye_to_buster() {
export old_distro=bullseye
export old_ver="inux 11"
export new_distro=buster
export new_ver="inux 12"
dist_upgrade_x_to_y
ret=$?
return $ret
}

Should that be this?

function dist_upgrade_bullseye_to_bookworm() {
export old_distro=bullseye
export old_ver="inux 11"
export new_distro=bookworm
export new_ver="inux 12"
dist_upgrade_x_to_y
ret=$?
return $ret
}

Am I interpreting that right?

All the best,
Chris

License

Thanks for your work! Can you provide an license that you're releasing this under?

--to-64bit and Ubuntu

Help says about this switch:

Only tested so far with Debian not Ubuntu.

But this article suggests Ubuntu is supported also.

Is Ubuntu actually supported or not?

Thanks!

man-db triggers slows down crossgrade, perhaps disable for most of it?

Hi there,

Whilst watching my i386 to amd64 crossgrade I noticed a fair bit of time spent with:

Processing triggers for man-db:i386 (2.9.4-2) ...

Turns out this is controlled by the presence of the file /var/lib/man-db/auto-update and so it might be possible to speed up the crossgrade by checking if that file is present and, if so, moving it out of the way and remembering to recreate it towards the end (or should the process abort) so it does get run at least once prior to the end of the crossgrade.

What do you think?

All the best,
Chris

atop becomes upset at crossgrade due to arch specific files

Hi there,

Whilst watching the script crossgrade my Debian 11 Bullseye VM I noticed these errors:

Setting up atop (2.6.0-2) ...
File /var/log/atop/atop_20230702_oldformat_oldformat created with atop compiled for other CPU architecture
dpkg: error processing package atop (--configure):
 installed atop package post-installation script subprocess returned error exit status 3

In the end to stop these continual errors I had to move /var/log/atop out of the way and then create it as an empty directory.

Hope this helps & thanks for this script!

All the best,
Chris

Fail2ban breaks on jessie -> stretch

/etc/fail2ban/jail.d/defaults-debian.conf gets thrown into the mix on debian upgrades and breaks fail2ban

Feb 25 09:53:13 new fail2ban-client[3628]: WARNING 'filter' not defined in 'sshd'. Using default one: ''
Feb 25 09:53:13 new fail2ban-client[3628]: WARNING No filter set for jail sshd
Feb 25 09:53:13 new fail2ban-client[3628]: WARNING 'filter' not defined in 'sshd'. Using default one: ''
Feb 25 09:53:13 new fail2ban-client[3628]: ERROR Failed during configuration: Bad value substitution: option 'action' in section 'sshd' contains an interpolation key 'port' which is not a valid option name. Raw value: '%(action_)s'
Feb 25 09:53:1

Also seems to add in an extra port line for pam-generic in jail.conf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.