Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: upgrade to new distribution from command line

  1. #1
    Join Date
    Mar 2007
    Beans
    786

    upgrade to new distribution from command line

    If I load the GUI update-manager, it says "New distribution release '09.04' is available" and it has an "upgrade" button.

    but at the console
    Code:
    ant2ne@2ne-buntu:~$ sudo apt-get dist-upgrade
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Calculating upgrade... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    ant2ne@2ne-buntu:~$
    So I assume dist-upgrade upgrades my current distribution but doesn't upgrade me to the next distribution.

    How can I upgrade distributions via command line.

    I have one 8.04 box that I'm upgrading to 9.10 right now. I'd like to do it SSH, but I can pound it out via GUI for now.

    I have several 8.04lts servers that I'm going to want to upgrade to 10.4 and they don't have a GUI.
    Registered Linux User: 450747 Registered Ubuntu User: 16269

  2. #2
    Join Date
    Nov 2008
    Location
    Storybrooke
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: upgrade to new distribution from command line

    Quote Originally Posted by ant2ne View Post
    If I load the GUI update-manager, it says "New distribution release '09.04' is available" and it has an "upgrade" button.

    but at the console
    Code:
    ant2ne@2ne-buntu:~$ sudo apt-get dist-upgrade
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Calculating upgrade... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    ant2ne@2ne-buntu:~$
    So I assume dist-upgrade upgrades my current distribution but doesn't upgrade me to the next distribution.

    How can I upgrade distributions via command line.

    I have one 8.04 box that I'm upgrading to 9.10 right now. I'd like to do it SSH, but I can pound it out via GUI for now.

    I have several 8.04lts servers that I'm going to want to upgrade to 10.4 and they don't have a GUI.
    run this
    Code:
    sudo nano /etc/apt/sources.list
    change all distributions to karmic (from hardy)
    then save it (press ctrl+x, select save)
    then run this
    Code:
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get dist-upgrade
    Ubuntu Forums Moderation Staff
    Okay then. We're relying on mirror dust and fairies but now we have a plan which is progress - Emma

  3. #3
    Join Date
    Jan 2006
    Beans
    688

    Re: upgrade to new distribution from command line

    Maybe you simply forgot apt-get update before dist upgrade?

  4. #4
    Join Date
    Mar 2007
    Beans
    786

    Re: upgrade to new distribution from command line

    Quote Originally Posted by Liolikas View Post
    Maybe you simply forgot apt-get update before dist upgrade?
    Code:
    ant2ne@2ne-buntu:~$ sudo apt-get update
    [sudo] password for ant2ne: 
    Hit http://security.ubuntu.com intrepid-security Release.gpg
    Ign http://security.ubuntu.com intrepid-security/main Translation-en_US
    Hit http://us.archive.ubuntu.com intrepid Release.gpg
    Ign http://us.archive.ubuntu.com intrepid/main Translation-en_US
    Ign http://security.ubuntu.com intrepid-security/restricted Translation-en_US
    Ign http://security.ubuntu.com intrepid-security/universe Translation-en_US
    Ign http://security.ubuntu.com intrepid-security/multiverse Translation-en_US
    Hit http://security.ubuntu.com intrepid-security Release
    Ign http://us.archive.ubuntu.com intrepid/restricted Translation-en_US
    Ign http://us.archive.ubuntu.com intrepid/universe Translation-en_US
    Ign http://us.archive.ubuntu.com intrepid/multiverse Translation-en_US
    Hit http://us.archive.ubuntu.com intrepid-updates Release.gpg
    Ign http://us.archive.ubuntu.com intrepid-updates/main Translation-en_US
    Ign http://us.archive.ubuntu.com intrepid-updates/restricted Translation-en_US
    Ign http://us.archive.ubuntu.com intrepid-updates/universe Translation-en_US
    Ign http://us.archive.ubuntu.com intrepid-updates/multiverse Translation-en_US
    Hit http://us.archive.ubuntu.com intrepid Release
    Hit http://us.archive.ubuntu.com intrepid-updates Release           
    Hit http://security.ubuntu.com intrepid-security/main Packages      
    Hit http://us.archive.ubuntu.com intrepid/main Packages             
    Hit http://security.ubuntu.com intrepid-security/restricted Packages
    Hit http://security.ubuntu.com intrepid-security/main Sources
    Hit http://security.ubuntu.com intrepid-security/restricted Sources
    Hit http://security.ubuntu.com intrepid-security/universe Packages
    Hit http://security.ubuntu.com intrepid-security/universe Sources
    Hit http://security.ubuntu.com intrepid-security/multiverse Packages
    Hit http://security.ubuntu.com intrepid-security/multiverse Sources
    Hit http://us.archive.ubuntu.com intrepid/restricted Packages
    Hit http://us.archive.ubuntu.com intrepid/main Sources
    Hit http://us.archive.ubuntu.com intrepid/restricted Sources
    Hit http://us.archive.ubuntu.com intrepid/universe Packages
    Hit http://us.archive.ubuntu.com intrepid/universe Sources
    Hit http://us.archive.ubuntu.com intrepid/multiverse Packages
    Hit http://us.archive.ubuntu.com intrepid/multiverse Sources
    Hit http://us.archive.ubuntu.com intrepid-updates/main Packages
    Hit http://us.archive.ubuntu.com intrepid-updates/restricted Packages
    Hit http://us.archive.ubuntu.com intrepid-updates/main Sources
    Hit http://us.archive.ubuntu.com intrepid-updates/restricted Sources
    Hit http://us.archive.ubuntu.com intrepid-updates/universe Packages
    Hit http://us.archive.ubuntu.com intrepid-updates/universe Sources
    Hit http://us.archive.ubuntu.com intrepid-updates/multiverse Packages
    Hit http://us.archive.ubuntu.com intrepid-updates/multiverse Sources
    Reading package lists... Done
    ant2ne@2ne-buntu:~$ uname -r
    2.6.27-15-generic
    ant2ne@2ne-buntu:~$ sudo apt-get dist-upgrade
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Calculating upgrade... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    ant2ne@2ne-buntu:~$
    Nope. Just didn't feel like spamming the thread
    Registered Linux User: 450747 Registered Ubuntu User: 16269

  5. #5
    Join Date
    Mar 2007
    Beans
    786

    Re: upgrade to new distribution from command line

    Quote Originally Posted by carlee View Post
    run this
    Code:
    sudo nano /etc/apt/sources.list
    change all distributions to karmic (from hardy)
    then save it (press ctrl+x, select save)
    then run this
    Code:
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get dist-upgrade
    I'm trying this RIGHT now!

    change all distributions to karmic (from hardy)
    shouldn't there be a replace string command that could substituted this data? It would make an easier script
    Last edited by ant2ne; November 15th, 2009 at 06:52 PM.
    Registered Linux User: 450747 Registered Ubuntu User: 16269

  6. #6
    Join Date
    Jan 2007
    Beans
    6,542
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: upgrade to new distribution from command line

    Changing your sources file as mentioned by carlee is not an officially recommended method of upgrading, as it doesn't actually invoke the very clever Ubuntu distribution upgrader.

    The server method is:
    Code:
    sudo apt-get update
    sudo apt-get install update-manager-core
    sudo do-release-upgrade
    ...i've never used it, but I don't see why it shouldn't work on a desktop.

    Using sudo apt-get dist-upgrade doesn't upgrade your distribution. It's just a slightly more edgy alternative to the normal sudo apt-get upgrade. The difference between the two is that upgrade will never remove a package due to a dependency issue, whereas dist-upgrade will. Dist-upgrade is a potential source of b0rkage because of that.
    Last edited by Paqman; November 15th, 2009 at 06:52 PM.

  7. #7
    Join Date
    Mar 2007
    Beans
    786

    Re: upgrade to new distribution from command line

    Quote Originally Posted by ant2ne View Post
    I'm trying this RIGHT now!
    Yup it b0rked on me. The upgrading to 9.10 did not detect my partitioning scheme. I have 1 disk with partitions...
    Code:
    Disk 1
    /swap sda1
    / sda2
    /home sda5
    /data sda6
    Disk 2
    /backup sdb1
    ...It only detected the 2 disks and crashed unable to find the / or the /home. I popped in the 9.10 disk to do a clean install and the installer didn't detect the partitions either. It only found the entire disks. I popped in the 9.04 install disk and it did discover my partitions. I kicked off the install only / was to be formatted and the rest of the partitions are mounted on the correct locations without data loss

    Well, I've upgraded from 8.04 to 9.04. I would like to be at 9.10. Any idea what went wrong? And advice? I guess I'll open a new thread. ;-(
    Registered Linux User: 450747 Registered Ubuntu User: 16269

  8. #8
    Join Date
    Jan 2008
    Location
    Coventry, England
    Beans
    484
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: upgrade to new distribution from command line

    [Deleted: ooops. I was talking nonsense!]

  9. #9
    Join Date
    Jan 2007
    Beans
    6,542
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: upgrade to new distribution from command line

    Quote Originally Posted by ant2ne View Post
    Any idea what went wrong?
    Yep, you were given some bad advice. Changing your sources list is an oldskool Linux way of doing upgrades, and not recommended on Ubuntu.

    And advice?
    Either just use Update Manager, or try the CLI method I posted.

  10. #10
    Join Date
    Aug 2009
    Location
    United States
    Beans
    4,459
    Distro
    Ubuntu Development Release

    Re: upgrade to new distribution from command line

    Did not know you could skip a version and upgrade. Always thought you had to
    go from 8.04 to 8.10 to 9.04 ect. ect. ect.
    I have learned something. Thank you folks.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •