Compdigitec Labs

« | Home | »

Dynamically upgrade LiveCD packages

By admin | July 10, 2009

If you attempt to follow APCMAG’s dual boot tutorial with an older version of the Ubuntu Live CD, you may unknowingly install an old version of GRUB. This is fine if yournewer Ubuntu installation uses paritions that an older version of GRUB will recognize, but with new partitions like ext4 the old Ubuntu Live CD may cause problems.

Old Ubuntu Live CD

In orderto solve this problem, you need to dynamically upgrade the packages on your Live CD. However, you do not need to butn a new version of the CD or modify the CD. This is because a “LiveCD system” is just really a regular Ubuntu system loaded onto a CD and memory and then booted from. Note that upgraded LiveCD packages only last the current session – they are eased from memory after a restart.

  1. Boot the Live CD (or make sure you are in the Live CD environment).
  2. Open a terminal.
  3. Type in “sed ‘s/cdversion/newversion/’ /etc/apt/sources.list > /tmp/sources.list“. (Replace cdversion with the codename of the Ubuntu CD – e.g. hardy) (Replace newversion with the codename of the version of the packages you want to upgrade to – typically the latest Ubuntu version – e.g. jaunty)
  4. Type in “sudo /bin/cp /tmp/sources.list /etc/apt/sources.list
    ” No password is required.
  5. Type in “sudo apt-get update” to update packages.
  6. Now you can upgrade whatever packages you want to upgrade. For example, to upgrade GRUB, type in “sudo apt-get install grub“. To upgrade GParted, type in “sudo apt-get install gparted“. Simply replace “grub” or “gparted” with the package you want to upgrade.

If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!

Topics: Linux | 6 Comments »

6 Responses to “Dynamically upgrade LiveCD packages”

  1. Bruce Erlichman Says:
    August 5th, 2009 at 15:37

    Have booted from version 0.4.5 gparted on LiveCD and want to replace the older version of gparted on my Dell Mini 9 of with 0.4.5 version. Usual upgrade procedure only takes my up to 0.3.4. Does this article address my problem? Seems that it only holds for replacing whole OS, such as Hardy to Jaunty.
    Does cdversion refer to the OS or the package, gparted in my case?
    Much thanks.

  2. admin Says:
    August 5th, 2009 at 23:10


    The article is was designed to work only with Ubuntu (and possibly other Debian-based LiveCDs). You will not be able to dynamically upgrade your gparted Live CD but you can upgrade your grub using an older Ubuntu CD. In this regards, cdversion would be the version of Ubuntu that the old CD contains.

  3. Bruce Erlichman Says:
    August 7th, 2009 at 11:19

    Sorry, forgot to mention that I do, indeed, have Ubuntu on my Dell Mini 9. Does this make a difference? To clarify, can I use LiveCD to change version 3.4 of gparted currently on my Mini 9 to version 4.5? Then I wouldn’t need to boot from the LiveCD. Hope this is clear(er)


  4. admin Says:
    August 7th, 2009 at 12:01


    Yes, that is the intended behaviour. You would, as stated in the above article, boot from the Ubuntu LiveCD and then follow the above instructions. Then you would upgrade your grub package (sudo apt-get install grub) and then go and install grub again with “sudo grub” followed by “root (hdx,y)” (where x,y is the partition that you installed Ubuntu to) and “setup (hd0)”.

  5. Trustbet Says:
    March 15th, 2024 at 20:34

    … [Trackback]

    […] Information on that Topic: […]

  6. site Says:
    April 7th, 2024 at 07:10

    … [Trackback]

    […] Info on that Topic: […]