Ubuntu 15.04 hanging boot-up issue

No Comments

Last weekend I reinstalled my Linux system (and not because I want to rename it as Pyg!) which is a very bad decision as it is the same time that my pitiful internet connection fails to transmit any data beyond a few bytes. The new install to Ubuntu 15.04 (Vivid Verve) gave me the confidence to start using btrfs which is being touted as the next generation file system for linux systems. Bad move and very short-sighted on my part. 🙁

The btrfs is supposed to provide enhancements to ext4 file system since it (btrfs) is built from the ground up but with the useful features already present in ext4. The ext4 filesystem is basically being viewed as an aging hack on a hack since it builds on ext3 which is a tack-on improvement for ext2. Btrfs might be delivering on some of its promised features but those who use it should still be wary of it as it is still not considered as ready for “production” or real-world use[1]. I wish I knew this before I chose it as the filesystem for my home directory. 🙁

For those that will have the misfortune of encountering it, the gist of my predicament follows (which is based on how I remember it):

  • I upgraded my system using dist-upgrade.
  • I encountered a severe freeze which left me with no choice but to reach for the power button.
  • System bootup hangs. The last entry goes something like this:
  • A start job is running for /home… (10s /no limit)

  • Eventually the bootup hangs and it drops the control to an emergency shell.

It was unnerving for me since a reinstall means I would need to re-download the upgrade packages on my #@$@#$ Smart LTE connection. The light-bulb moment for me was that /home is the only partition in the sequence that is using btrfs. The working theory is something borked during the forced shutdown which should have been handled by the journalling features. Thanks to an alternate albeit slow alternative connection, I was able to google enough to do the following:

  • Boot the machine and press F12 after the BIOS/UEFI prompt.
  • Selected the menu option for Ubuntu Advance options.
  • Selected the option for “(recovery)”
  • Selected the “drop to root shell” option.
  • Remounted the root system in r/w mode. I dont think this is needed but this is what I have done and it won’t hurt anyhow.
  • # mount -o remount,rw /

  • Did a btrfs file system check on the home partition
  • # btrfsck /dev/sda4

  • When nothing popped out, I went for the repair option.
  • # btrfsck --repair /dev/sda4

The repair option is always accompanied by a cautionary warning as it can delete information so having a proper backup is recommended. In my situation that is like adding salt to the injury. When I ran the repair option it reported that the cache and super generation areas do not match and that it cleared the space cache. After doing so I ran another btrfsck on the partition and rebooted the system which thankfully landed me on a working system with no (identified) data loss.

The moral of the story is to select btrfs only for the filesystems that you can afford to lose data; or have a good backup scheme. Using it for /tmp is going to be an overkill but to each to his own. Now Im thinking if I want to convert my home partition back to ext4. 😀

ciao!

[1] https://www.wikivs.com/wiki/Btrfs_vs_ext4

Using SMART BRO (USB Internet) Plug-it in Linux

8 Comments

This guide is created to show how to use the SmartBro USB Internet dongle in Ubuntu Linux. The dongle comes with the Windows installer that enables the SmartBro application to be installed in most computers. From within that application the user is able to send and reeive SMS, and connect/disconnect their Internet subscription. It allows more operations like access to the Smart portal but for the duration of this guide only the SMS send/receive and Internet configuration is covered. The instructions should be portable to the plug-it kits of the other telcos.

From my experience, Ubuntu has easily supported the USB dongles and tethering devices as early as Karmic Koala. I no longer have my Sony Ericsson K618i that I just connect via a USB cable to my MSI Wind U100 Netbook so this is what I will use for the guide. My netbook is sporting Natty Narwhal during the time the screenshots are taken.

sm00

Lets get cracking. Caveat though that I had to recreate some activities in two different locations so don’t mind the clock too much.

Configuring data connectivity

  • Boot into Ubuntu and connect the dongle. Wait for a few second while the system recognizes the device.
  • From the system tray, click on the network-manager applet and enable the “Enable Mobile Broadband” option. Select the “Edit Connections…” entry, and add a new entry under the “Mobile Broadband” tab.
  • As can be seen below, Ubuntu has already detected the chipset of the USB dongle. Click on the Forward button.
  • Select the provider (which in this case is Smart). Click on the Forward button.
  • On the billing plan dialog, accept the default selection and click on the Forward button.
  • Confirm the summary of the selected settings by clicking the Apply button.
  • Visit back the settings of the created connection and ensure that there is no username and password in the Mobile Broadband settings page. Save any changes made and dismiss the wizard to go back to the desktop.
  • Click on the network-manager applet and click on the mobile internet entry created above.
  • If everything goes well and the signal is strong enough the user should be greeted with an established connection message.
  • Click on the network-manager to validate the type of connection.

Configuring SMS capability

The setup above can fail if the SIM card used is of the prepaid type and there is no credit loaded on the account. SMART imposes a Php10/30mins rate but there are promos that can be activated by sending some keywords via the SIM account. This implies that the SMS send and received facility should be accessed. Fortunately the wammu project provides this capability.

  • Install the wammu application by invoking the command below:
  • sudo apt-get update && sudo apt-get install wammu -y

  • Start the wammu application. If the wammu application doesn’t find its configuration files then it will trigger a wizard for first time-configuration.
  • wammu-first

  • Click on the Next button to start the Wizard and select the following options in the succeeding windows:
  • – Configuration Style: Guided Configuration
    – Configuration type: USB Cable (as the unit is plugged in a USB port)
    – Phone Type: None of the above (unless future versions provide an option for the chipset)

    – Connection Type: AT based
    – Driver to use: Generic AT over serial line or it’s emulation
    – Phone device: /dev/ttyUSB0

    The above part is trial and error. If the test doesn’t succeed select the next option. If it succeeds then information about the model of the dongle will be shown. In my experience it is almost always /dev/ttyUSB0 but then I do have another device that emulates a serial connection via USB.

    – Complete the remainder of the next dialog windows using the default option.

  • Once the wammu phone configuration is done, start accessing the USB dongle by invoking the Phone->Connect menu item.
  • Once the dongle is active, test the connectivity by receiving existing messages.
  • After the operation succesfully completes, select the Messages item in the left treebox to view all retrieved messages.
  • Next is to try the SMS sending capability under the Create menu. The editor is dated compared to the built-in provider interface but it would suffice. In the screenshot below, the bucket promo of Always On is being triggered.
  • Check the Sent folder if the message was successfully sent.
  • After a few seconds/minutes, retrieve the messages again to check the result of the promo registration.

And that is basically it. The instruction in this guide, with minor tweaks, should be applicable to any of the USB dongle. Enjoy your USB Internet dongle in Linux. 🙂

ciao!

Social Media Auto Publish Powered By : XYZScripts.com