Tuesday, February 23, 2010

Recovering GRUB after reinstalling Windows


Use any LiveCD (or other route) to access a Grub command-line and fix the MBR:
  1. Boot into a LiveCD
  2. Open a terminal
  3. Open the GRUB Command-line utility by typing
sudo grub
  1. Find where Grub is. If this gives a few different answers then you will need to find the correct one, perhaps by trial-and-error.
find /boot/grub/stage1
  1. Tell GRUB which partition to tell the MBR your Grub is on by entering
root (hdA,B)
The coordinates A,B are where 'A' is the hard-drive number, starting at 0, and 'B' is the partition number, starting at 0. For example, if Ubuntu was installed on the second partition of the first hard-drive, the command should be
root (hd0,1)
  1. Tell GRUB which drive's MBR to fix
setup (hd0)
Replace 0 only in the extremely unlikely event that your bios does not use the first hard-drive as the boot device. Typically Ubuntu might be on any drive but the bios will almost always go to the first drive's MBR to find out where to find the boot-loader.
  1. Leave the GRUB Command line
quit
and reboot.

Sumit gupta
CSE Deptt.
NIT Durgapur

Saturday, January 30, 2010


Installing SKYPE on FEDORA

Installing skype on Fedora could be a little tricky. I found out fast after spending about fifteen minutes yum-ming for the package.
A colleague was having trouble installing skype on his machine after a fresh installation of fedora 10. To kill time, I tried to help him.
We visited Skype site looking for the correct RPMs. All we could find was RPMS for Fedora 6 and 7. So upgrading to 10 was a mistake!
Google never ceases to amaze me! After a few minutes of googling we landed onthis page. At the bottom of the page, skype repository links were given. Here is how to yum install skype.
step 1: create a file in /etc/yum.repos.d/ by the name skype.repo with the following contents
[skype]
name=Skype Repository
baseurl=http://download.skype.com/linux/repos/fedora/updates/i586/
gpgkey=http://www.skype.com/products/skype/linux/rpm-public-key.asc
enabled=1
gpgcheck=0
[skype]
name=Skype Repository
baseurl=http://download.skype.com/linux/repos/fedora/updates/i586/
gpgkey=http://www.skype.com/products/skype/linux/rpm-public-key.asc
enabled=1
gpgcheck=0
step 2: open  a terminal and issue the following command as root user
yum install skype


cheers!!!

Sumit gupta
CSE Deptt.
NIT Durgapur
MUKTI 2010
This is the time of the year when we at NIT Durgapur celebrate our FOSS festival called Mukti. Mukti is the FOSS festival of NIT Durgapur. With the sole aim of promoting Free Software, some contest, games, workshops, talks etc are conducted during Mukti. It brings together the FOSS enthusiasts, newbies and corporates together under the same roof.Like every year we will have a number of events and workshops to feed your hungry minds.So if you are somewhere near and want to have an awesome experience, come to NIT Durgapur, we are waiting for you.


Link: http://mkti.in
Twitter: http://twitter.com/mukti_nitd

Saturday, November 7, 2009

removing old kernel images in fedora 11

Upgrading system causes new kernel images to be installed and the old kernel images are left as is it for use in case any unexpected error is encountered. when you are satisfied that the new kernel image is booting and working properly you just might want to remove the old kernel images.
to do so you may try one of the two steps

1. become super user by "su - " and entering the superuser password then do " rpm -q kernel" for the list of kernels installed then doing "rpm -e kernel-version". this will automatically edit the grub boot loader.

2. as superuser delete the image file and the config file with the system map of the kernel you want to delete in /boot directory manually then do "nano /boot/grub/menu.lst" for deleting the kernel image entry in grub bootloader.

this might solve your problem.
cheers!!
Sumit gupta
CSE Deptt.
NIT Durgapur

Monday, October 26, 2009

Guide to fix audio/video vlc player issues in fedora

This tutorial is going to explain how to fix pulseaudio completely and the video/audio playback issues of VLC Media Player. Hope this helps. The time scheduling function is still a bit bugged and gives off audio issues I noticed. So unless you want 5 seconds of chopping, skipping, and garbling each time you start an audio app, we're not going to use it. Also, if you're fine with that, can live with the issue and like how it makes PulseAudio less CPU intensive, then skip the step where we disable time scheduling in this tutorial. (You can disable it later if needed after you're done)
So let's get started.

Fixing PulseAudio: We want no less than perfection.

Fresh off of an upgraded install I noticed many things were broken with the audio, so we're going to uninstall PulseAudio first.

In a terminal, type the following:

Code:
su -
yum remove pulseaudio
Restart your computer completely now.

Now that you're back, open a terminal and type the following:
Code:
su -
yum install pulseaudio alsa-plugins-pulseaudio pulseaudio-esound-compat pulseaudio-libs pulseaudio-libs-glib2 pulseaudio-module-zeroconf pulseaudio-libs-zeroconf xmms-pulse pulseaudio-module-gconf wine-pulseaudio xine-lib-pulseaudio pulseaudio-utils pulseaudio-module-bluetooth gst-mixer padevchooser paman paprefs pavucontrol pavumeter
This will reinstall PulseAudio and all the extras we need to work with.

[Skip this step if you can live with time-scheduling, skipping is not recommended]
Next, run the following as root: (or open "/etc/pulse/default.pa" manually as root)
Code:
gedit /etc/pulse/default.pa
and replace the line:
Quote:
load-module module-hal-detect
with:
Quote:
load-module module-hal-detect tsched=0
save your changes. This will disable time-scheduling.

Next, run the following as root: (or open "/etc/pulse/daemon.conf" manually as root)
Code:
gedit /etc/pulse/daemon.conf
then change the line:
Quote:
; realtime-scheduling = no
to
Quote:
realtime-scheduling = yes
also, change the line:
Quote:
; default-fragment-size-msec = 25
to
Quote:
default-fragment-size-msec = 10
save your changes.

Restart your computer completely again.

Now, open System > Preferences > Advanced Volume Control and make sure that PCM, Master, and the various PulseAudio devices under the "Device:" menu aren't muted and are raised to adequate volume levels.


Next, open Applications > Sound & Video > PulseAudio Device Chooser
and make sure the Default Server, Default Sink, and Default Source are all set to Default.


After that, in the device chooser, select the "Volume Control" option in the menu and go through each tab making sure none of the streams are muted.



Now, go to the Configuration tab and for Internal Audio - Profiles set it to the appropriate profile until you hear audio from an audio file. If you're hearing audio already then it is probably set to the proper profile already. Experiment with the profiles using an audio file of some sort, playing it. I used Michael Jackson's (R.I.P) Beat It.


The wrong profile means no audio will come from your sound card at all. Example: I didn't hear any sound because my profile was set to digital and not analogue, because analogue is what my sound card supports.

If you are not hearing any audio at all then you need to check the last 3 routines we just went through. (The advanced volume controls for mutes, Defaults of the Device Chooser, volume control in the device chooser for wrong settings)

You're done! Now you can finally enjoy your audio in Fedora.

sidenote: I also noticed the time-scheduling feature can also cause lagging in video playback; which is why I like it better disabled.

If you're still having PulseAudio issues then please open a support thread and ask for help. Now, I shall continue to the next part of my guide.


Fixing video playback issues with VLC Media Player

Before we start to fix VLC Media Player, I would like to ask you to Download this file as we're going to use it, for testing, later. I chose this file because it is going to give you a fair amount of problems playing it with the default settings.

We are going to fix the chopping, skipping and stutter of the audio with VLC Media Player that some of you been experiencing.

First, open VLC and go to Tools > Preferences. (CTRL+P for those who cant find it)
The options should already be set to simple; hit the Audio tab and change Output: Type to Pulseaudio audio output; As shown in the picture below.


Now, change the Show settings option to All and go to Input / Codecs > Access Modules > File; Change the caching value to 1500 (there are 1000 milliseconds in a second)

You can adjust this a little higher or lower later. As long as it's 1000 or above, it should be fine. (I ultimately ended up lowering mine to around 1300, personally)

Now, that video I had you download? Now it's time to test VLC. Open the video file in VLC and press play, watching it from beginning to end. You are watching it for things like glitches in the audio and the audio cutting off half way through the video. If everything is fine with the audio and video, you're done! If not, continue to the next part of this tutorial.
(If it's an audio issue still then you may want to check your settings or open a support thread)
You can try playing the video and skipping around back-and-forth to see if the audio crashes out, but it shouldn't with the settings in this tutorial.


If there is screen tearing in the video (slices in the video images) you may want to try changing the video output settings. (assuming your CPU/GPU is fast enough to handle the video)
In Tools > Preferences (Simple) go to the Video tab and change Display: Output to various options and play the video until the tearing stops. (experiment) I have mine set to OpenGL because I have OpenGL drivers installed for my video card.

(If it's an issue still after your experimentation, then you may want to open a support thread)

There are more things you can do in-depth, which can degrade video quality, but those are better left for a support thread.

Hope this guide has solved your audio and video issues.
Sumit gupta
CSE Deptt.
NIT Durgapur

Sunday, October 25, 2009

start installed Windows Vista from Linux using VirtualBox

As a majority of users, I bought a laptop with vista already on it. First things first, I installed linux fedora without even booting into windows and follow its installation process.
Then I thought I could use windows and start it from virtualbox (version 3 - open source edition for me) without having to leave linux!
Here is how I did become superuser by "su" amd follow the following steps:
  1. Install virtualbox package: “yum install virtualbox-ose
  2. Login into windows to finish the installation process (if windows is already set up, then skip this step)
    note: I installed windows with a full reboot on windows (and not from within virtualbox) simply because I could not make the installation process work within virtualbox
  3. Login back into linux and locate your windows partition:  ”sudo fdisk Disk /dev/sda: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x8663708e

       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1       18997   152590231+   7  HPFS/NTFS
    /dev/sda2           18997       34896   127711228    7  HPFS/NTFS
    /dev/sda3           34897       37444    20466810    5  Extended
    /dev/sda4           37445       38913    11791360    7  HPFS/NTFS
    /dev/sda5   *       34897       36680    14322688   83  Linux
    /dev/sda6           36680       37444     6143999+  83  Linux

  4. In  my case, windows partition is ‘dev/sda1′ (the one with NTFS filesystem format)
  5. We need to create a fake .vmdk file (file format used by virtualbox to emulate hard-disk) and make it point to our real disk. Run:   

    " Vboxmanage -convertSettings internalcommands createrawvmdk -filename 
    ~/.VirtualBox/vista_physical_partition.vmdk -rawdisk /dev/sda"


  6. change ownership of generated .vmdk file to your own user (so that you won’t need to run virtualbox as root to use this partition): chown ~/.VirtualBox/vista_physical_partition.vmdk
  7. At this point, If u try to start the virtual machine and load vista it will fail! A delicious blue-screen will appear , a solution that i found, on virtualbox website, it consists of modifying some windows registry entries so that windows won’t check HDD structure upon start-up and won’t fail if it changed.
  8. go to http://www.virtualbox.org/wiki/Migrate_Windows
  9. download  MergeIDE utility (in Hard Disk Support section) & save it in a usb key on into windows partition
  10. restart your computer, loading windows, log into it, unzip MergeIDE and execute “MergeIDE.reg” to modify your registry
  11. restart into linux
  12. Now start virtualbox: “svirtualbox” and create your virtual machine:

    1. click on New / Next / enter your virtualmachine name (ex: vista) & choose windows vista as OS type & click on Next
    2. For windows vista, you must allocate at least 512MB of ram (1.5Gb recommended), click on Next
    3. For hard-disk, click on “existing” / “add” and go to ~/.VirtualBox/vista_physical_partition-sda.vmdk / click on “select” / “next” / “Finish”
    4. Now we must further configure this virtualmachine, click on “Machine” / “Settings”
    5. Under “general” section, allocate at least 50Mb of ram for video (in “basic” tab), then click on “advanced” tab and ensure “Enable IO APIC” is checked and click on OK (you can look for more options such as enabling sound in corresponding sections)


  13. AT THIS POINT, I MUST GIVE AN IMPORTANT WARNING: our vmdk file points to entire disk, ie. when we will start our virtual machine, it will be like booting the entire computer => if you have dual boot, you will load grub: DO NOT RUN LINUX within itself! This could screw up your entire linux installation!!!!
    You would start the linux you’re currently running virtualbox on, therefore messing all your linux installation. => MAKE SURE TO LOAD WINDOWS ONLY
  14. start virtualbox, start your virtual machine and load Vista.
    If you’re lucky enough, Vista should start by now
  15. Log in into Vista using virtualbox.