You are not logged in.

#1 2008-03-04 09:18:53

Llama
Member
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,301

How to gracefully manage upgrades?

Hi, everybody,

Are there recommended precautions before running pacman -Syu ? My installation is new, but I've been reading a lot of posts about how the system got messed up after an upgrade. Seems to be a price of the "bleeding edge". How am I supposed to manage my upgrades gracefully?

Offline

#2 2008-03-04 09:26:44

twiistedkaos
Member
Registered: 2006-05-20
Posts: 666

Re: How to gracefully manage upgrades?

Llama wrote:

Hi, everybody,

Are there recommended precautions before running pacman -Syu ? My installation is new, but I've been reading a lot of posts about how the system got messed up after an upgrade. Seems to be a price of the "bleeding edge". How am I supposed to manage my upgrades gracefully?

Useually upgrades go smoothly, every once in awhile, like all rolling release distros(Arch isn't really bleeding edge), a sneaky bug gets over looked and it messes with a few systems, usually within a few days one of the developers fix it before it becomes too big of an issue. pacman -Suy is perfectly safe as is, if something goes wrong, you always have backups of your previously installed packages and can downgrade.

Offline

#3 2008-03-04 09:31:15

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: How to gracefully manage upgrades?

Also make sure you read all messages that appear during upgrade. Sometimes you need to adjust some configuration files, and things like that.


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#4 2008-03-04 09:34:58

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,221
Website

Re: How to gracefully manage upgrades?

Watch the forums for any breakage related to your hardware/favorite apps. and wait until the problems are resolved before upgrading,

Personally I have never had a breakdown after a pacman -Syu only after absent minded tinkering.

Offline

#5 2008-03-04 09:36:11

Llama
Member
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,301

Re: How to gracefully manage upgrades?

if something goes wrong, you always have backups of your previously installed packages and can downgrade.

Do I? Could you be more specific about the backups?

Offline

#6 2008-03-04 09:42:53

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: How to gracefully manage upgrades?

They reside in /var/cache/pacman/pkg.
You can get rid of all of them with the command "pacman -Scc", or you can only remove the packages of the applications which are no longer installed on your system with "pacman -Sc". Therefore *DO NOT* run "pacman -Scc" if you want to be safer.

You can downgrade to an earlier version using the U flag in pacman, which allows you to install local packages. So if you have an earlier version of a package in /var/cache/pacman/pkg, and you want to install it, just do:

pacman -U /var/cache/pacman/pkg/package-version.tar.gz

That's it smile

Last edited by finferflu (2008-03-04 09:44:43)


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#7 2008-03-04 09:42:56

Llama
Member
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,301

Re: How to gracefully manage upgrades?

For instance, the upgraded kernel did me no good, but the fallback option in GRUB just died along with the rest of the system. If I'm going to upgrade the kernel in the future, I have to know how to retrace my steps.

Offline

#8 2008-03-04 09:44:34

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,554

Re: How to gracefully manage upgrades?

Llama wrote:

if something goes wrong, you always have backups of your previously installed packages and can downgrade.

Do I? Could you be more specific about the backups?

packages are cached in /var/cache/pacman/pkg/


All design goals must be phrased in such a way that it is hard to use them as slogans to justify stupidity.

Offline

#9 2008-03-04 09:47:23

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,554

Re: How to gracefully manage upgrades?

Llama wrote:

For instance, the upgraded kernel did me no good, but the fallback option in GRUB just died along with the rest of the system. If I'm going to upgrade the kernel in the future, I have to know how to retrace my steps.

when it comes to kernel, you have two easy solutions:
1. boot into your existing system from the install CD and fix the problem
2. create a kernel26-Llama known to work and keep it so you are sure you'll be always able to boot your machine


All design goals must be phrased in such a way that it is hard to use them as slogans to justify stupidity.

Offline

#10 2008-03-04 10:19:56

Llama
Member
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,301

Re: How to gracefully manage upgrades?

2. create a kernel26-Llama known to work and keep it so you are sure you'll be always able to boot your machine

Is there a how-to?

Offline

#11 2008-03-04 10:27:40

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: How to gracefully manage upgrades?

I think this is a good starting point: http://wiki.archlinux.org/index.php/Mki … _the_image


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#12 2008-03-04 10:36:52

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,554

Re: How to gracefully manage upgrades?

Llama wrote:

2. create a kernel26-Llama known to work and keep it so you are sure you'll be always able to boot your machine

Is there a how-to?

There is http://wiki.archlinux.org/index.php/Ker … n_with_ABS

Actually, it should be quite simple, just use kernel26 PKGBUILD+Files, rename your package and change the relevant files accordingly (PKGBUILD, .install, etc...) and that should do it. You may want to have a look on custom kernels in AUR as well to see some examples.


All design goals must be phrased in such a way that it is hard to use them as slogans to justify stupidity.

Offline

#13 2008-03-04 12:21:43

dunc
Member
From: Glasgow, UK
Registered: 2007-06-18
Posts: 557

Re: How to gracefully manage upgrades?

finferflu wrote:

They reside in /var/cache/pacman/pkg.
You can get rid of all of them with the command "pacman -Scc", or you can only remove the packages of the applications which are no longer installed on your system with "pacman -Sc". Therefore *DO NOT* run "pacman -Scc" if you want to be safer.

I always make a backup of var/cache/pacman/pkg before a pacman -Scc. Just to be sure.


0 Ok, 0:1

Offline

#14 2008-03-04 13:01:49

ibendiben
Member
Registered: 2007-10-10
Posts: 519
Website

Re: How to gracefully manage upgrades?

When installing/updating important packages (like kernel) it might be a smart idea to install them separately, when you install them along with kde/gnome/xfce for instance, there is a bigger chance for brakage. You could, in such cases, download all upates first with the pacman -Sw (downlaod only switch) and then install one by one, also be sure you always read all install messages carefully! Lasts me to say: learn man pacman (pacman manual) by head, it'll safe you a lot of time...;)

Offline

#15 2008-03-04 13:49:55

RDDO
Member
Registered: 2008-02-21
Posts: 12

Re: How to gracefully manage upgrades?

bangkok_manouel wrote:

1. boot into your existing system from the install CD and fix the problem

I guess my problem is related with the kernel upgrade, so how I can downgrade it?? I booted from the Install CD, but I'm still clueless of what to do

Last edited by RDDO (2008-03-04 13:58:01)

Offline

#16 2008-03-04 16:58:06

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,554

Re: How to gracefully manage upgrades?

RDDO wrote:
bangkok_manouel wrote:

1. boot into your existing system from the install CD and fix the problem

I guess my problem is related with the kernel upgrade, so how I can downgrade it?? I booted from the Install CD, but I'm still clueless of what to do

go to /var/cache/pacman/pkg and reinstall your previous kernel:
#pacman -U previous_kernel.pkg.tar.gz


All design goals must be phrased in such a way that it is hard to use them as slogans to justify stupidity.

Offline

#17 2008-03-05 04:56:50

ProfessorTomoe
Member
From: Garland, TX
Registered: 2008-02-12
Posts: 61

Re: How to gracefully manage upgrades?

This thread would be a good candidate for a sticky.

Offline

#18 2008-03-05 05:04:31

McQueen
Member
From: Arizona
Registered: 2006-03-20
Posts: 382

Re: How to gracefully manage upgrades?

It's all in the wiki. Just saying.


/path/to/Truth

Offline

#19 2008-09-09 13:52:55

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: How to gracefully manage upgrades?

To backup a known-working kernel, is it sufficient to

sudo cp /boot/kernel26{,-backup}.image

Or are there hard-coded paths in the kernel image, so one really has to use mkinitcpio to create a new copy?

Offline

#20 2008-09-09 15:45:08

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819

Re: How to gracefully manage upgrades?

Another great tip is to pacman -Syu often (once a day will largely suffice tongue). Rationale: the smaller the upgrades, the better it will go. You often see posts about users borking their systems with an upgrade, but it turns out they leave it be for 6 months or more. That's asking for problems.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#21 2008-09-09 16:01:51

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,725
Website

Re: How to gracefully manage upgrades?

Just check the output of pacman when you do an upgrade. Sometimes you will need to update a configuration file, but only rarely. Do not simply run an -Syu, then shut down the system without checking if you need to change anything.

Really though, you shouldn't worry too much (good to be prepared though). Upgrades are a good thing and shouldn't break your system. If there's something really wrong with an upgrade, you can, as described above, just downgrade the package and wait for the fixed package.

Offline

#22 2008-09-09 16:02:28

vogt
Member
From: Toronto, Canada
Registered: 2006-11-25
Posts: 389

Re: How to gracefully manage upgrades?

In addition to all of those roll back concepts, if your root was on lvm, then you could create a snapshot partition, and add an entry to grub to boot that one in case something breaks. That might be faster than having to move the old configuration files back.

Last edited by vogt (2008-09-09 16:03:47)

Offline

#23 2008-09-09 16:12:15

Onwards
Member
From: Pakistan
Registered: 2007-04-18
Posts: 108

Re: How to gracefully manage upgrades?

Profjim wrote:

To backup a known-working kernel, is it sufficient to

sudo cp /boot/kernel26{,-backup}.image

Or are there hard-coded paths in the kernel image, so one really has to use mkinitcpio to create a new copy?

Just copying a working kernel image isn't going to be OK, as each kernel is *tied* to its loadable modules, and the module-loader checks to see if the module it's loading is compiled with/for the current kernel [people call it version magic]. Nowadays (I mean in recent kernels) we also need to have a klibc version that should be recent enough (but we needn't worry too much as it's interface, IMO, doesn't change that frequently...).

So for kernel-downgrades, you should have previous working kernel26.pkg.tar.gz & kernel-headers.pkg.tar.gz in your cache, to be on the safe side.

P.S. Look up these wiki entries for further info abt. klibc.
http://en.wikipedia.org/wiki/Early_user_space
http://en.wikipedia.org/wiki/Klibc

Last edited by Onwards (2008-09-09 16:25:16)

Offline

#24 2008-09-09 16:18:44

Onwards
Member
From: Pakistan
Registered: 2007-04-18
Posts: 108

Re: How to gracefully manage upgrades?

vogt wrote:

In addition to all of those roll back concepts, if your root was on lvm, then you could create a snapshot partition, and add an entry to grub to boot that one in case something breaks. That might be faster than having to move the old configuration files back.

Let's hope that tux3 actually achieves what it's author wishes for it to be !! That would make snapshotting pretty trivial. I am personally _dying_ to use it.

Last edited by Onwards (2008-09-09 16:21:31)

Offline

Board footer

Powered by FluxBB