[FSF Associate Member] View Annang Sowah's profile on LinkedIn
Showing posts with label Mount. Show all posts
Showing posts with label Mount. Show all posts

Thursday, 6 November 2014

[SOLVED] Mount and make a Linux Root Partition/Filesystem writable with EASE in seconds.

Pheeeeew! what a relief I have now :(


Background: This evening I was installing the new Android Studio IDE which required my setting of some JAVA OS-level environmental variables i.e. JAVA_HOME. This I did in the bashrc file in my user home directory and later realized that I messed up the very important bashrc file which was needed for login initializations  on my beloved Ubuntu desktop pc.
I hence couldn't log into my computer and decided to share how I fixed it in simple steps!

Recommendation: The solution below helps you have access to the file system to fix issues related to fstab, boot partition mishaps, GUI crash fixes etc.


1. From my Linux box I logged to the recovery mode(admin console) which was   successful.

2. I had the challenge of writing to or editing my "embattled" bashrc file because the whole file system was in a read-only mode - even with my logged-on administrator privileges.

3. I had to make my root file system writable by remounting it with the appropriate flags as snapped below:




mount -o remount,rw /                                                                        

4. With this done, I proceeded to undo whatever changes I made to my system
    earlier i.e. to delete a line I added to my bashrc file which triggered the mess.
    I had to edit the bashrc file as a privileged user using pico a special text
    editor on linux. You can use other great text editors if available on-system
    e.g. vi,vim, nano etc.
 





sudo pico /home/ ...user... /.bashrc                                                                     
or  just
pico /home/..user.../.bashrc                                                                                 



5. I now proceeded to fix the wrong entries I made in the bashrc file opened below












6. I saved my entries and got to the graphical login console by starting the xwindow linux GUI .




startx

7. That's all, best of luck :)

Friday, 21 March 2014

[SOLVED] NTFS Disk Mount Issues on Linux on a "Dual-Booted" Computer.

Good day, Fellas!

Background: I made an installation of Windows Server 2012 on an NTFS partition I originally allocated from an existing Ubuntu Linux 13.10 disk (dual-booting means getting a computer host 2 Operating Systems).
Upon accessing the NTFS disk from  the Ubuntu Linux OS I had an error message that implied that the disk has an unclean file system or is in an unsafe state.Below is the error thrown when the host Ubuntu Linux OS attempts to mount the NTFS partition.
















Fig.1  Error encountered whiles accessing NTFS partition

Cause: This is caused by a recent tweak of the Microsoft OS(Windows 8, Windows Server 2012) simply called Fast-Startup ( which involved the saving of device(RAM, CPU, Disk) boot metadata(e.g. registry boot parameters) on files during shutdown, to be accessed at the next startup to shorten boot-time) which puts a "lock" on the NTFS partitioning hence posing a difficulty when opening disk.

Solution: 
FROM WINDOWS:  From your windows OS environment,  access the Power Options under control panel. Move down to the shutdown settings panel where you can disable the Fast-Startup by dis-selecting the "Turn on Fast startup".

FROM LINUX: We would use the software package called ntfs-3g which has a powerful binary called ntfsfix. Lets first install the package using the super-user priviledge and command below.

# sudo apt-get install ntfs-3g

Lets next confirm if the installation has been successful by checking the man pages(i.e. utility  manual pages) for ntfsfix 

# man ntfsfix













Fig.2  NTFSFIX utility manual on Linux.

Now, lets proceed to run the utility to fix the issue snapped above by simply :) running

# sudo ntfsfix /dev/sda3
Where sda3 is the ntfs partition of the disk that you have difficulties opening.
















Fig.3  NTFSFIX utility run  on Linux without errors.

Verify if the partition is accessible - as I have done below.










Fig.4  Partition is now fully accessible.


Issue solved, hopefully :)