Live CD Recovery: Update Failure

Update Failure

If there was an update that made your system non-bootable and they have fixed it in the repositories, you can use the Live CD to run apt-get to get the new files to fix your system.

  1. Boot the Ubuntu Live CD.
  2. Press Ctrl-Alt-F1

  3. sudo mount /dev/sda1 /mnt

  4. sudo mount --bind /dev /mnt/dev

  5. sudo mount --bind /proc /mnt/proc

  6. sudo mount --bind /sys /mnt/sys

  7. sudo chroot /mnt

  8. apt update

  9. apt upgrade

If you have trouble accessing your network after chroot, you probably use DHCP and can work around this by adding OpenDNS name servers to your /etc/resolv.conf after you use chroot:

nameserver 208.67.222.222
nameserver 208.67.220.220

Live CD Recovery : Lost Password

Lost Password

Here is how you can use the Live CD to change the administrative password on your machine if you have lost/forgot the current password. Please note that you can usually boot into RecoveryMode and run the passwd command directly.

  1. Boot the Ubuntu Live CD.
  2. Press Ctrl-Alt-F1

  3. sudo mount /dev/sda1 /mnt

  4. If you created a custom partition layout when installing Ubuntu you have to find your root partition using the fdisk utility. See the section Finding your root partition.

  5. sudo chroot /mnt

You can now use the passwd command to reset a password.

Note: In the mount command, /dev/sda1 will need to be replaced with the partition where the root of the file system resides.

Network Manager shows eth0 and wlan0 unmanaged

After starting the OS, there is no internet connectivity. The network manager shows that eth0 and wlan0 are not managed.

Make sure that the eth0 and wlan0 are discovered. Run the following command.

ifconfig -a

If the ethernet and wlan can be seen in the output but no ip address is allocated to it, check if the dns nameserver exists.

sudo gedit /etc/resolv.conf

If this list is empty then add the following entries in it.

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 8.8.4.4

These point to the Google DNS.

Try to ping any website. Example:-

ping www.google.com

If the result is successful we have a working conncetion.

If ping fails, then the system doesn’t manage the network drivers.

For the system to manage the network devices, we have to make changes in the /etc/NetworkManager/NetworkManager.conf file

sudo gedit /etc/NetworkManager/NetworkManager.conf file

The displayed output will be in the format:-

[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

no-auto-default=XX:XX:XX:XX:XX:XX,

[ifupdown]
managed=false

Change the managed value from false to true

[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq

no-auto-default=XX:XX:XX:XX:XX:XX,

[ifupdown]
managed=true

Restart the network service

sudo service networking restart.

Boot Delay due to Wait for Network Configuration

This problem happens sometimes when ubuntu starts up. You can’t really boot to the interface sometimes.

Splash Screen with the 5 dots and a message saying:

waiting for network configuration

followed by:

waiting an additional 60 seconds for network configuration

Solution to this problem is following :

In /etc/network/interfaces this changes all interfaces (except lo) from auto to allow-hotplug. This way the boot is no more waiting for the interfaces to come up first.Example before (look at auto eth0):

auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet dhcp

Example after (look at allow-hotplug eth0):

auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp

 

Install Build-Essential

Informational list of build-essential packages

Other Packages Related to build-essential

  • dpkg-dev (>= 1.17.11)
    Debian package development tools
  • g++ (>= 4:5.2)
    GNU C++ compiler
  • gcc (>= 4:5.2)
    GNU C compiler
  • libc6-dev
    GNU C Library: Development Libraries and Header Files
    or libc-dev
    virtual package provided by libc6-dev
  • make
    utility for directing compilation
    also a virtual package provided by make-guile
    To Install the build-essential package:
    sudo apt-get update
    sudo apt-get install build-essential