Here I write about various events I was involved in and ideas that inspired me. Recently, it is more of a linux blog because I have been doing a lot of work on it. However, off and on I write on various other things that my mind just can't let go easily.
Saturday, 31 March 2012
Thursday, 29 March 2012
System-wide accessible gems
As I was configuring my system for my friend's rails project, I found that when I install gems are root, they are available only to the root user and system-wide. When I install something as root, I expect it to be accessible system-wide. So, I dug into the issue and found that it was happening so because
Now, instead of getting installed in
/etc/gemrc
was configured to install gems for root user only. Getting system-wide installation of gems was achieved by commenting out the following line in /etc/gemrc
gem: --user-install
Now, instead of getting installed in
/root/.gem/ruby/1.9.1/gems/
gems were installed to /usr/lib/ruby/gems/1.9.1/gems/
and were available to all users. Previously installed gems had to be uninstalled and re-installed so that they were available to all users.Wednesday, 28 March 2012
Boot message: Unable to register miscdev on minor = 130
On my new Arch linux installation I was getting a line saying "
A comment on Archlinux forum clarified that it was caused because the kernel supports only one watchdog. The solution is two blacklist MEI driver. That can be done using the following line.
You read more about IMEI here.
Unable to register miscdev on minor=130 (err=-16)
". In /var/log/errors.log
, I was getting the following lines:Mar 28 19:37:16 localhost kernel: [13926.292770] watchdog: error registering /dev/watchdog (err=-16).
Mar 28 19:37:16 localhost kernel: [13926.292771] mei: unable to register watchdog device.
A comment on Archlinux forum clarified that it was caused because the kernel supports only one watchdog. The solution is two blacklist MEI driver. That can be done using the following line.
echo blacklist mei > /etc/modprobe.d/mei.conf
You read more about IMEI here.
Sunday, 25 March 2012
Reusing packages from one system in building a new one
While installing Arch linux on my new Dell Latitude, I wanted to reuse packages on my existing Arch installation on my old laptop. As soon as I was through with the initial install using the net install image, I put all packages from
Now, all I had to do was to tell pacman to look for packages in the repo folder in the USB stick. I achieved this by setting
Actually, you can also try creating a local repo. It is there in the pacman manual pages. However, this seemed easier and faster to me and worked on first go.
After this setting, when I tried installing
/var/cache/pacman/pkg
to a folder called repo
on a USB stick. From the command line I mounted the usb stick on my new installation to /mnt/usb.mount -t vfat /dev/sdb1 /mnt/usb
Now, all I had to do was to tell pacman to look for packages in the repo folder in the USB stick. I achieved this by setting
CacheDir
variable in pacman.conf
to /mnt/usb/repo
.#DBPath = /var/lib/pacman/
CacheDir = /mnt/usb/repo/
LogFile = /var/log/pacman.log
Actually, you can also try creating a local repo. It is there in the pacman manual pages. However, this seemed easier and faster to me and worked on first go.
After this setting, when I tried installing
Xorg
it told me that there is no extra.db and community.db; but I had those repos enabled and therefore it failed. I realized only core.db existed in my system and I had not synced the repo databases even once. I could have achieved that by pacman -Syu
; but for my internet connection to work I needed to install wvdial
and usb_modeswitch
as I use a 3G USB internet card. So, I just copied extra.db and community.db from my old system into the new one and things worked fine.
Subscribe to:
Posts (Atom)