Tuesday, March 17, 2015

32GB restriction on microsd cards

Why there is a restriction on smartphone saying that it support microsd of size upto 32 GB.

Because specs says so::

Currently, microSD cards have a maximum capacity of 32GB as this is a limitation imposed by version 2 of the SD Specifications: “High Capacity SD Memory Card: More than 2GB (This version of specification limits capacity up to and including 32GB)”.

console access to VM


On the virtual machine, add ‘console=ttyS0‘ at the end of the kernel lines in the /boot/grub2/grub.cfg file(by executing the following grubby command):

# grubby --update-kernel=ALL --args="console=ttyS0"
 
NOTE: ssh to VM (or) use virt-manager and run the
above command. 

Now, reboot the virtual machine:
# reboot

Now,
virsh list --all 

virsh start <your vm name>

virsh start /etc/libvirt/qemu/YOUR_VM.xml

virsh list
// output
// say vm.example.com is the domain.

Now, connect to the virtual machine’s console (here vm.example.com):

# virsh console vm.example.com
(or)
#virsh console <ID number>

 

Friday, February 6, 2015

sharing folder host and guest


=========================
Sharing folders and files from Host to KVM guest(both linux);

install samba server on Host. (system-config-samba)


Do the configuration required using system-config-samba. (adding directory to share, user name , password). (in Host) use same system-config-samba.

// to set rw permission on all folders uncomment this in /etc/samba/smb.conf

setsebool -P samba_export_all_rw on


sudo service smb restart

=========================
Then, do mount from KVM guest.
mount -t cifs //192.168.122.1/workspace   /mnt/samba  -v

Note, here workspace should be last directory name of the past you shared.
For example in path /home/to/path/workspace.
=========================

to mount permanently using fstab add this entry :
 //192.168.122.1/workspace /home/gfuser/workspace/ cifs username=username,password=whatever_password,iocharset=utf8,sec=ntlm 0 0


then run ,
mount -a

for best practices , use this guide
https://wiki.ubuntu.com/MountWindowsSharesPermanently







dd for creating a file with specific size

dd for creating a file with specific size

trying to create file: first used random - didn't work. then tried, urandom, worked fine. for non-cryptographic uses like this :) use only urandom.

http://vinitsworld.blogspot.in/2008/10/difference-between-devrandom-and.html

renaming a file in git


want to rename a file in git ?

use
git mv