Category Archives: Linux Adventures
Well, it doesnt have to be your mmc. It could be anything thats connected to your system.
How to: Make an .iso file from the terminal
Stuff I did:
Ubuntu software center, Google etc. to find a terminal application that would let me do it. Found “cat” from ubuntuforums. Well, i tried it out. Didnt know what it did exactly and i thought i just wrote everything in a file to another file
sudo cat /dev/mmcblk0 > my-iso.iso
This will create an .iso for all practical purposes i suppose. But for a normal user like me, i dont suppose you can transfer it to another os and use it for anything. the default archive manager doesnt open it either.
Found out about “dd” while Google-ing.
sudo dd if=/dev/mmcblk0 of=my-iso.iso
This does the exact thing as cat. But dd is the way everyone does it i suppose.
mkisofs is what came to myhelp at long last.
mkisofs -0 my-iso.iso /media/mmcname/
This did the trick. It created an iso of all the contents of “mmcname”. The only thing is however, it works only for directories i believe.
The main question why would you need a swap file when you can opt for a swap partition while installing…? Well people like me who normally screw up their hard disks with multiple partitions and formats normally end up not being able to create any more primary or logical extensions to the existing partitions and hence is unable to make a dedicated swap partition. This, or you forgot to set it up. Having a swap is good even when you are not going to use even half your RAM. You might never need it, but if you need it, this is how you do it.
Any way, we at hirir, have solution!!
Problem: Need swap space but cant (dont want to) make a swap partition.
Solution: Make a swap file.
Step 1: Decide location
Well, decide on a location to fix your swap partition. Ive decided on “/home/swap”
Step 2: Become root!
This is becoming a habit now.
Step 3: Type into terminal: fallocate -l 4g /home/swap/4g.swap
This will create a file by the name 4g.swap in /home/swap. The file name is immaterial. Im just trying to indicate that Im making a 4GB swap. -l 4g specifies the length of the file 4g.swap. Suffixes like m g t p e are also possible. ie, mb,gb,tb and so on.
Step 4: Type into terminal: chmod 600 /home/swap/4g.swap
Here we are making it non world readable. Just to make sure no-one reads stuff from it.
Step 5: Type into terminal all over:
Type into terminal: cat /proc/meminfo and see the swap there and cry out “Yippeee”
Step 6: Make it all permanent
To make it all permanent, we edit /etc/fstab
To do that type into terminal
gksudo gedit /etc/fstab
And add into it, at the end, the following line:
/home/swap/4g.swap none swap sw 0 0
Type “free” into terminal and you will see swap space that you’ve just allocated.
Reboot and from then on you may hibernate your system. :) which is why I did all this.
Upgraded to Ubuntu 11.10 last month. And i intended to post this back then. But of-course time got the better of me. I kept thinking yesterday was tomorrow. Anyway, lets get on to the issue.
Issue: Transparency in terminal shows the desktop background rather than the window underneath.
The image above was found in a post by SoulMazer in UbuntuForums.
What i did: Endless Googling for it and looking around in Ubuntu forums is what i did. I even asked the tech guru here for a solution. Tech guru seemed to think it was the Nvidia driver problem. I didnt know where to get it from, so left if for a week. Ubuntu forums kept telling me its the compiz problem.
Solution: Paste in terminal: gconftool-2 -s ‘/apps/metacity/general/compositing_manager’ –type bool true
What you have done is enable composting in metacity. This worked for me after the first restart. Hope it does for you too!
One of the first things you would want to do after you install Ubuntu (i suppose any Linux distro) is to reset/set root password. Yes you can get around all this using “sudo” command. But it will be a real pain one you start doing a lot of things that need authorization.
Just type “su” into your terminal window and you can become root provided you know the password. In most cases this will not be known to you. Here’s how you can set it..
Step 1: Applications>Accessories>Terminal (or you can press Ctrl+Alt+T).
You will be prompted with your_name@your_computer_name:~$ . This means you are working in “/home/your_name” and you are you and not root. :) Never mind.
Step 2: Type sudo passwd root. It should look like this:
$ sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
And if everything goes well,
passwd: password updated successfully
Thats it. once you type “sudo passwd root” and hit enter, it will ask for your password. Type in the password you want to use for root. I dont have to tell you not to forget it. Retype it and we are done. Yes you wont see anything there while you type. Thats how it is. You will get used to it as we go along.
This works for resetting the password too at a future time. I guess if you are in sudoers list, you can reset anyones password. Instead of “root” after “sudo passwd”, type in the username. Try it out. Reset your brothers password and let me watch him kill you. ;)
I suggest you read the very last line in this post before you read through the entirety of the post, because it might not be what you are looking for..
Issue: Earphone plugged in. Audio from both the headset and the system speaker on my HP Dv6 2171ee..
Simple solution: Change connector option from Sound Preferences window.
If this doesn’t work for you too here is,
Things i did:
Take Applications>Accessories>Terminal and paste this there.
wget http://www.alsa-project.org/alsa-info.sh -O alsa-info.sh && bash alsa-info.sh
This will give you a link. Open it, find your codec information. Just search with in the page “HDA-Intel Codec information !!”..this should help you if the codec is either “Realtek ALC888” or “IDT 92HD75B3X5”
sudo add-apt-repository ppa:ubuntu-audio-dev/ppa; sudo apt-get update;sudo apt-get dist-upgrade; sudo apt-get install linux-sound-base alsa-base alsa-utils gdm ubuntu-desktop linux-image-`uname -r` linux-alsa-driver-modules-$(uname -r) libasound2; sudo apt-get -y –reinstall install linux-sound-base alsa-base alsa-utils gdm ubuntu-desktop linux-image-`uname -r` linux-alsa-driver-modules-$(uname -r) libasound2; killall pulseaudio; rm -r ~/.pulse*
This did it for most.. Obviously not enough for my lap..
Ill let you know what i did next though..
1. In terminal, type the following, to let you edit alsa-base.conf .
gksudo gedit /etc/modprobe.d/alsa-base.conf
2. Now, add this to the end of the file
options snd-hda-intel model=
4. Open the alsa-base.conf file again and add after the “options snd-hda intel model=” “3stack-hp” now if it is not HP, add from the list available on the forum..(If i was going to direct you to the forum anyway, why read through all this?? hmm… I’m thinking along those lines now..)
5. Now try and change the connector options from the sound preferences window.
This worked for me.. It does mute my system speakers. Only problem is, I’ve to change this every time i plug in the headset..
sorry to report…but Ubuntu 10.04 has decided not to detect my mouse pad, Bluetooth mouse, usb mouse or any mice for that matter…
shall report back with a solution…
Ubuntu 10.10 up and running!! and here i am blogging from it..its downloading updates 250MBs of it…i don’t think ill upgrade to the latest version though…i felt too heavy…too many features…:)
Need to learn a lot…and i intend to do so..
thanks to all those who followed me through my adventure…there has been many causalities..no deaths fortunately..;)
PS:the mouse pad settings in here is waaaaay too sensitive!!
Now, im not making this up.neither am i trying to scare you people from using a Linux distro…its probably me and my bad luck acting up…
Ubuntu came with wubi…i saw it work properly in Pretty’s laptop…i mean i installed it in hers..i installed 11.04 into hers..i had a 10.10 that i got from NIT Campus when i went for FOSS MEET some time back…i put it in mine..decided to install through wubi and forget about all the other crap..
Put cd, open wubi, select drive, install….10 mins later the wubi screen disappeared..while i wondered what happened, the non linuxy me tried to install using wubi again…i said a version already exists..i thougt…oh…ok…if i restart, it will ask me whether to boot windows or Ubuntu…
But noooooooooooo…that would mean not screwing me!!
obviously, it didnt…i just booted windows..here i am writing this while uninstalling ubuntu through wubi and reinstalling it..be back soon…restarting now..;)