Thread: How can I rollback my upgrades?
hello,
i've done 'aptitude safe-upgrade' in ubuntu jaunty, after rebooted , no longer able access raid5 array (external sata via highpoint rocketraid card).
suspect it's related kernel upgrade below (from /var/log/aptitude):
how can rollback upgrades above?aptitude 0.4.11.11: log report
thu, oct 8 2009 12:41:12 -0400
important: log lists intended actions; actions fail due to
dpkg problems may not completed.
install 22 packages, , remove 0 packages.
508kb of disk space used
================================================== =============================
[upgrade] libglib2.0-0 2.20.1-0ubuntu2 -> 2.20.1-0ubuntu2.1
[upgrade] libglib2.0-data 2.20.1-0ubuntu2 -> 2.20.1-0ubuntu2.1
[upgrade] libglib2.0-dev 2.20.1-0ubuntu2 -> 2.20.1-0ubuntu2.1
[upgrade] libpam-smbpass 2:3.3.2-1ubuntu3.1 -> 2:3.3.2-1ubuntu3.2
[upgrade] libsmbclient 2:3.3.2-1ubuntu3.1 -> 2:3.3.2-1ubuntu3.2
[upgrade] libsmbclient-dev 2:3.3.2-1ubuntu3.1 -> 2:3.3.2-1ubuntu3.2
[upgrade] libwbclient0 2:3.3.2-1ubuntu3.1 -> 2:3.3.2-1ubuntu3.2
[upgrade] linux-headers-2.6.28-15 2.6.28-15.49 -> 2.6.28-15.52
[upgrade] linux-headers-2.6.28-15-server 2.6.28-15.49 -> 2.6.28-15.52
[upgrade] linux-image-2.6.28-15-generic 2.6.28-15.49 -> 2.6.28-15.52
[upgrade] linux-image-2.6.28-15-server 2.6.28-15.49 -> 2.6.28-15.52
[upgrade] linux-libc-dev 2.6.28-15.49 -> 2.6.28-15.52
[upgrade] samba 2:3.3.2-1ubuntu3.1 -> 2:3.3.2-1ubuntu3.2
[upgrade] samba-common 2:3.3.2-1ubuntu3.1 -> 2:3.3.2-1ubuntu3.2
[upgrade] samba-doc 2:3.3.2-1ubuntu3.1 -> 2:3.3.2-1ubuntu3.2
[upgrade] samba-tools 2:3.3.2-1ubuntu3.1 -> 2:3.3.2-1ubuntu3.2
[upgrade] smbclient 2:3.3.2-1ubuntu3.1 -> 2:3.3.2-1ubuntu3.2
[upgrade] smbfs 2:3.3.2-1ubuntu3.1 -> 2:3.3.2-1ubuntu3.2
[upgrade] tzdata 2009m-0ubuntu0.9.04 -> 2009n-0ubuntu0.9.04
[upgrade] wget 1.11.4-2ubuntu1 -> 1.11.4-2ubuntu1.1
[upgrade] winbind 2:3.3.2-1ubuntu3.1 -> 2:3.3.2-1ubuntu3.2
================================================== =============================
thank
kernels not removed after upgrade, can boot old kernel, unless minor revision upgrade.
this list installed kernels. if there 1 kernel listed, might have minor revision upgrade.code:dpkg -l | grep linux-image
[upgrade] linux-image-2.6.31-12-generic 2.6.31-12.40 -> 2.6.31-12.41
if see upgrades these:
[upgrade] linux-image-generic 2.6.31.11.22 -> 2.6.31.12.23
-11 kernel present , can boot one.
if don't have other kernels expect running 1 can 1 of following things:
and install kernel , boot one:code:aptitude search linux-image
install 1 of these or..code:p linux-image-2.6.28-11-generic - linux kernel image version 2.6.28 on x p linux-image-2.6.28-13-generic - linux kernel image version 2.6.28 on x p linux-image-2.6.28-14-generic - linux kernel image version 2.6.28 on x p linux-image-2.6.28-15-generic - linux kernel image version 2.6.28 on x
run apt-cache policy linux-image-generic , see if there version available in main repos, because upgrades -updates, force re-installation of kernel.
jaunty (i'm doing on karmic install, you'll see installed kernel not available you).
so install 2.6.28.11.15 version of linux-image-generic packagecode:linux-image-generic: installed: 2.6.31.12.23 candidate: 2.6.31.12.23 version table: *** 2.6.31.12.23 0 100 /var/lib/dpkg/status 2.6.28.15.20 0 550 http://security.ubuntu.com jaunty-security/main packages 550 http://nl.archive.ubuntu.com jaunty-updates/main packages 2.6.28.11.15 0 550 http://nl.archive.ubuntu.com jaunty/main packages
code:# remove -s, simulate option sudo aptitude -s install linux-image-generic=2.6.28.11.15 reading package lists... done building dependency tree reading state information... done reading extended state information initializing package states... done following packages downgraded: linux-image-generic following new packages installed: linux-image-2.6.28-11-generic 0 packages upgraded, 1 newly installed, 1 downgraded, 0 remove , 8 not upgraded. need 24.6mb of archives. after unpacking 95.7mb used. want continue? [y/n/?] y download/install/remove packages.
after need remove old kernel:
and need pin linux-image-generic package:code:rmkernel () { local cur_kernel=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g') local kernel_pkg="linux-(image|headers|ubuntu-modules|restricted-modules)" local meta_pkg="${kernel_pkg}-(generic|i386|server|common|rt|xen|ec2)" sudo aptitude purge $(dpkg -l | egrep $kernel_pkg | egrep -v "${cur_kernel}|${meta_pkg}" | awk '{print $2}') purge_pkg }
put rmkernel, pkg2pin , dpkg2pin code in .bashrc , source bashrc file (source ~/.bashrc) , can run commands:code:pkg2pin () { [ -z "$1" ] && return local pkg local msg msg="$(date +'%y%m%d:%h%m%s')" pkg in $@ pkg=$(dpkg -l "$pkg" 2>/dev/null) [ $? -ne 0 ] && continue pkg=$(echo -e "$pkg" | grep "^ii" |awk '{print $2" "$3}') echo -e "$pkg" | awk '{print "explanation: added on '$msg' pkg2pin or dpkg2pin\npackage: "$1"\npin: version "$2"\npin-priority: 1001\n"}' done | sudo tee -a /etc/apt/preferences } dpkg2pin () { [ -z "$1" ] && return local pkg pkg=$(dpkg -l | grep "^ii" |awk '{print $2}' | grep "$1") [ $? -ne 0 ] && return in $pkg pkg2pin $i done }
now kernel not upgraded anymore, unless remove /etc/apt/preferences file.code:rmkernel dpkg2pin linux-image-generic
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support Installation & Upgrades [ubuntu] How can I rollback my upgrades?
Ubuntu
Comments
Post a Comment