October 25

Linux: How to disable/enable journaling on an ext4 filesystem

At times, to meet performance requirements, you would want to disable file system journaling. Given below are steps to do so for an ext4 file system (e.g. /dev/sda1). These steps have been tested on RHEL 5.7). All commands are to be executed with root privileges:

STEP 1: Unmount the file system partition whose journaling you wish to disable

Use the following command to unmount the partition on /dev/sda1 (let’s say it’s /opt):

umount /opt

NOTE: The command used above is umount and not unmount.

STEP 2: Disable journaling for the file system

Use the following command to disable journaling for an ext4 file system:

tune4fs -O ^has_journal /dev/sda1

 

STEP 3: Perform a file system check

Use the following command to perform a file system check. This is not strictly required, but is recommended for checking file system integrity after disabling journaling:

e4fsck –f /dev/sda1

STEP 4: Reboot

You may use the following command to reboot the Linux OS:

shutdown –r now

STEP 5: Verify that the file system has journaling disabled and the partition is mounted

After the host has rebooted, you may use the following commands to check if journaling is disabled for the filesystem and the partition is mounted:

dmesg | grep EXT4

Expected output similar to: EXT4-fs (dm-3): mounted filesystem without journal

df -h
By: G Sature
Category: Linux | Comments Off on Linux: How to disable/enable journaling on an ext4 filesystem
October 11

Ubuntu Touch: Nexus 4 – No cellular internet/data

For  T-Mobile / tmobile users:

As of 10/11/2014 Ubuntu Touch RTM 14.09 still loads ipv6 by default.  T-mobile is using ipv4

Go to to the terminal application in Ubuntu Touch
Enter your password if needed
Enter the following:

cd /usr/share/ofono/scripts/
./deactivate-context
./set-context-property 0 Protocol ip
./activate-context

check your ip with:
ifconig

By: Mike
Category: Linux | Comments Off on Ubuntu Touch: Nexus 4 – No cellular internet/data
October 10

Linux: apt-get failing because of a broken package with an overwrite error

Problem:

apt-get -f install
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following extra packages will be installed:
libnfc5
The following NEW packages will be installed:
libnfc5
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
Need to get 77.2 kB of archives.
After this operation, 213 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://http.kali.org/kali/ kali/main libnfc5 i386 1.7.0-3kali1 [77.2 kB]
Fetched 77.2 kB in 0s (141 kB/s)
(Reading database … 289995 files and directories currently installed.)
Unpacking libnfc5:i386 (from …/libnfc5_1.7.0-3kali1_i386.deb) …
dpkg: error processing /var/cache/apt/archives/libnfc5_1.7.0-3kali1_i386.deb (–unpack):
trying to overwrite ‘/lib/udev/rules.d/42-pn53x.rules’, which is also in package libnfc3 1.6.0~svn1469-2kali1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libnfc5_1.7.0-3kali1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Solution:

dpkg -i –force-overwrite /var/cache/apt/archives/libnfc5_1.7.0-3kali1_i386.deb

apt-get -f install

 

 

Thank you D. Lartey for posting a similar solution which helped me resolve this one.

Category: Linux | Comments Off on Linux: apt-get failing because of a broken package with an overwrite error