Sunday, 21 February 2016

Updating and upgrading friends GNU/Linux system without internet

If you ever get stuck in a situation where you have to update / upgrade a system or server but you can not plug it directly to the network then here is easy solution for this problem.
just follow these steps:-
  1. First Insert live-cd/usb of GNU/Linux (in this case ubuntu 14.04) in your system . 
     (warning: Install synaptic package manager before doing all these steps in your target friends computer, otherwise later due to dependency error you won't be able to do it.)
  2. press ctrl+alt+delete for opening the terminal ,and run

    sudo apt-get update

    sudo apt-get install synaptic
  3. Open /var/cache/apt/archives and save the contents in safe directory (for example on Desktop, use sudo for it -sometime you need to be little wild superuser for even copying task :)
  4. Update your system(live cd/usb) using update manger
  5. Install some softwares if you wish :-),

    Ie ,if you want ubuntu-restricted-extras Install ubuntu-restricted-extras ,

    run sudo apt-get install ubuntu-restricted-extras in terminal
  6. Install aptoncdInstall aptoncd 

  7. Launch aptoncd and press create button, It will create an iso file
    from here either you can create iso file which you can transfer to friends computer via usb stick or you can burn them to a dvd / cd disk.
  8. Goto your friends home/office with Generated iso and directory made for step3
  9. Copy the directory and iso file to the desktop , Open the terminal and move to that directory

    cd /path/to/directory
  10. Run sudo dpkg -i *.deb ,It will install synaptic
  11. Open the synaptic and clickEdit->add cdrom It will display a dialog box , Don't click on it.
  12. Return to terminal and run

    sudo mkdir /media/cdrom

    sudo mount -o loop /path/to/iso /media/cdrom
  13. Now press ok button on the dialog generated from synaptic in step11 , 
  14. Press Mark all upgrades , Apply buttons ,respectively 

  15. Your friends GNU/Linux system is updated , Now sit back and relax for few minutes.