Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am about to do a release upgrade on a 10.04 server to 12.04. I am going to need to do this over SSH, is it advisable to do this in a byobu / screen session in case of any unforeseen disconnects? or will doing this in a screen session bring in an extra layer of improbability?

Thanks.

share|improve this question
add comment

2 Answers

If you are afraid to lose your SSH connection during the process, you can just type a & at the end of your command. E.g.: sudo apt-get dist-upgrade &. This gives you back your prompt. If now the SSH session gets interrupted but the remote machine is still connected to the internet, the upgrade will continue. Using screen (or byobu) won't hurt but won't add extra protection, either.

share|improve this answer
1  
& will put it in the background it will still get killed when the ssh session dies using nohup would fix this but kills interactivity, the upgrade needs questions answering about config file conflicts etc.... –  Shutupsquare Dec 13 '12 at 23:01
    
I don't think it will get killed when you are logged in as root. –  speter Dec 13 '12 at 23:41
    
Sorry dude root dies just like the rest of us. –  Shutupsquare Dec 14 '12 at 10:48
add comment
up vote 0 down vote accepted

Okay I have learnt the hard way!, I did a release upgrade over Byobu, It all goes well until later on in the upgrade when the byoubu package itself gets upgraded and then its game over you lose the session.

However

I had to do a few of these upgrades so I ran up a 10.04 LTS VM and this time put byobu on hold via dpkg

# Put byobu on hold with dpkg
sudo su -
echo "byobu hold" | dpkg --set-selections
#check it is on hold
dpkg -l | grep byobu
byobu    hold
exit

and ran the release upgrade again. The release upgrade honored the hold and left Byobu alone. afterwards when i was in my new 12.04 system I could release the hold

echo "byobu install" | dpkg --set-selections

and then just install the latest version of byobu

sudo apt-get update && sudo apt-get upgrade
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.