Thursday, May 16, 2013

Booting as root in Fedora using Grub

When Grub Screen show up the list of available OS, select fedora and hit ' e '

In the edit window find a line corresponding to loading kernal, in the end of same line add ' 1 ' or ' single '

Now save and run , generally by pressing ' F10 key '.

The Grub will boot you to single user mode which is "root". And the best part is it won't ask for root password

you can use the ' passwd ' command to reset the root password

How to mount Removable Storage in Fedora using Terminal

Do
   $sudo -i
Then do
   #cat /proc/partitions
or 
   # fdisk -l | grep -i ntfs
 you will get like this
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   211134463   105463808    7  HPFS/NTFS/exFAT
/dev/sda5       211136512   422582271   105722880    7  HPFS/NTFS/exFAT
/dev/sda6       422584320  1262489599   419952640    7  HPFS/NTFS/exFAT
/dev/sda7      1368815616  1465143295    48163840    7  HPFS/NTFS/exFAT


Now plug in the device and do "# fdisk -l | grep -i ntfs" again
you will get an output like this :

/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   211134463   105463808    7  HPFS/NTFS/exFAT
/dev/sda5       211136512   422582271   105722880    7  HPFS/NTFS/exFAT
/dev/sda6       422584320  1262489599   419952640    7  HPFS/NTFS/exFAT
/dev/sda7      1368815616  1465143295    48163840    7  HPFS/NTFS/exFAT
/dev/sdc1   *          63   488392127   244196032+   7  HPFS/NTFS/exFAT

you will see a new entry at bottom and that is your removal disk 

now run

   #mount /dev/sdc1  /mnt

where sdc1 is my device and /mnt is the folder I need to mount to

Monday, May 6, 2013

How to power off dedicated graphics card in Fedora or any Linux





This tutorial shows you 'How to power off dedicated graphics card in Fedora'  on new laptops and PCs having dual graphics.


Many a time Fedora uses only the Integrated graphics housed inside intel chipset.
But both dedicated ( ATI Radeon or Nvidia ) and integrated  (intel's) are always ON thus draining the power and overheating the machine all the time.

Steps :

  • Open Terminal and type

  1. sudo -i
       "sudo -i"  is used to grand root permission
Enter password when prompted

  • now run
  • cat /sys/kernel/debug/vgaswitcheroo/switch
    you will get output as
      0:IGD:+:Pwr:0000:00:02.0
      1:DIS:   :Pwr:0000:01:00.0

IGD = intel graphics card , internal
DIS = discrete gd , like ati radeon or nvidia

+ sign shows that only intel is using

Pwr shows both Graphics devices are powered on

  • now run
  • echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

echo writes OFF to switch script which then offs gd which is not in use
now again run
          cat /sys/kernel/debug/vgaswitcheroo/switch

    you will get output as
      0: IGD: + :Pwr:0000:00:02.0
      1: DIS:      :Off:0000:01:00.0
================================================================================

To make this permanent 
run in terminal

gedit /etc/rc.d/rc.local


and add this to the file

#! /bin/bash
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

save file 
and run in terminal

chmod +x /etc/rc.d/rc.local