Categories
gentoo problems

Reason: Failed on SHA256 verification on gentoo

One reason of

Reason: Failed on SHA256 verification

is that during creation of ebuilds some packages are fetched from external sources (for instance from adobe-flash site) and they sometimes publish new version of a package exactly under the same name.
Then next update results in a checksum error, because saved source from distfile directory is used.

To fix that you could:

rm -rf /usr/portage/www-plugins/adobe-flash/

or

fix it with
ebuild /usr/portage/www-plugins/adobe-flash/adobe-flash-11.2.202.411.ebuild clean prepare

Above situation should occure very rarely.

Categories
gentoo problems

How to install and configure TL-WN722N on gentoo

1. First make sure you have these options compiled into kernel

CONFIG_ATH_COMMON=m
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K_HTC=m

If you cannot find them within your config it means that some other dependencies are missing from your kernel.
You can find it more easily with “make xconfig” and selecting option “show all”
2. Most likely you will have to select:

CONFIG_CFG80211
CONFIG_CFG80211_WEXT

Without these two you will receive a lot of fancy errors like:

ioctl[SIOCSIWPMKSA]: Invalid argument

3. If you will see warning related to RFKILL you can fix them by compiling RFKILL into your kernel and emerge rfkill as well.

CONFIG_RFKILL=y
CONFIG_RFKILL_LEDS=y
CONFIG_RFKILL_INPUT=y
CONFIG_ATH9K_RFKILL=y

After that you can check status of your device by:

rfkill list all

and if it’s blocked just unblock it by

rfkill unblock wifi

Ok.. now iwconfig should show some info about your device.
The only thing left is to confiugre /etc/wpa_supplicant/wpa_supplicant.conf file

for most common WPA2 configuration it should contain :

network={
ssid="yourSSID"
proto=WPA2
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
priority=2
psk="yourpassword"
}

If you want to avoid having password in plaintext you can use command
wpa_passphrase yourSsid password

and then paste
psk=yourGeneratedHash

(note missing quotes!)

Now is time to check your configuration:

wpa_supplicant -iwlan0 -dd -Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf

If everything works do

ln -s /etc/init.d/net.lo /etc/init.d/net.wlan0

and add it to default runlevel

rc-update add  net.wlan0 boot

In case of problems check:

  1. Is your card visible by lsusb ?
  2. Do you have any errors in dmesg
  3. Did you rebooted after recompiling modles?

I didn’t have to download anything drivers from suspicious pages! So please do not do this!
Everything worked on a modern kernel 3.13.7

Other common samples of wpa_supplicant.conf configurations related to different router’s security settings can be found here:
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?style=printable&part=4&chap=4#doc_chap2

Categories
gentoo

How to update all kde packages without others on gentoo.

Try emerge -u $(qlist -IC kde-base/)
Categories
gentoo problems

hwclock: Cannot access the Hardware Clock via any known method.

Recently I was updating my comp of course there was a need to make some kernel changes (I switched to Intel i5-4570 ), but most of things went rather smoothly, but I had problems with time during dual boot.

hwclock: Open of /dev/rtc failed: No such file or directory
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.

Checking kernel settings wasn’t obvious to me, cause dual boot was working previously and I though I moved previous kernel config..

Anyway RTC support was not included in kernel.. now I have:

CONFIG_HPET_EMULATE_RTC=y
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_SYSTOHC=y
CONFIG_RTC_HCTOSYS_DEVICE=”rtc0″
# RTC interfaces
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
# I2C RTC drivers
# SPI RTC drivers
# Platform RTC drivers
CONFIG_RTC_DRV_CMOS=y
# on-CPU RTC drivers
# HID Sensor RTC drivers

Some of settings may be not needed for you, but that’s my conf.
After recompiling and installing kernel error is gone.

Categories
gentoo

Increasing limit of open files in linux

Sooner or later when doing some bigger system or just by messing with os you will meet that error:

Too many open files

You can solve it quickly by:

vi /etc/sysctl.conf
Append a config directive as follows:
fs.file-max = 200000
Save and close the file. Users need to log out and log back in again to changes take effect or just type the following command:
# sysctl -p
Verify your settings with command:
# cat /proc/sys/fs/file-max

 vi /etc/security/limits.conf
Set admin user (or for any other user) soft and hard limits as follows:
admin soft nofile 200000
admin hard nofile 200000

Done

Categories
gentoo problems

kdepimlibs compilation problem

Having folowing problem during update to kde-4.10 ?

/var/tmp/portage/kde-base/kdepimlibs-4.10.0/work/kdepimlibs-4.10.0/kldap/ldapconnection.cpp:268:80: error: ‘ldap_init’ was not declared in this scope
/var/tmp/portage/kde-base/kdepimlibs-4.10.0/work/kdepimlibs-4.10.0/kldap/ldapconnection.cpp: In member function ‘void KLDAP::LdapConnection::close()’:
/var/tmp/portage/kde-base/kdepimlibs-4.10.0/work/kdepimlibs-4.10.0/kldap/ldapconnection.cpp:359:27: error: ‘ldap_unbind’ was not declared in this scope

Add

CXXFLAGS=”$CXXFLAGS -DLDAP_DEPRECATED”

to /etc/make.config

Categories
gentoo

Smart cleaning of portage distfiles folder

Is as simple as

# eclean-dist -d
will clean all distfiles wihc are older than currently installed.

Eclean comes from package app-portage/gentoolkit and has couple other nice options -> read man.

Categories
gentoo problems

no dbus session-bus found

I tried set up a fresh install of gentoo under virtual box. Everything went smoothly with exception of error after entering credentials on kde logging screen.

[   533.067] (EE) [drm] drmOpen failed.
[   533.067] (EE) VBoxVideo(0): DRIScreenInit failed, disabling DRI.
[   533.067] (II) VBoxVideo(0): visual configurations initialized
[   533.068] (==) VBoxVideo(0): Backing store disabled
[   533.068] (II) VBoxVideo(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[   533.071] (==) VBoxVideo(0): DPMS enabled
[   533.073] (II) VBoxVideo(0): The VBox video extensions are now enabled.
[   533.073] (–) RandR disabled

[   543.133] 0: /usr/bin/X (xorg_backtrace+0x3b) [0x80e72fb]
[   543.133] 1: /usr/bin/X (0x8048000+0x5dbf5) [0x80a5bf5]
[   543.133] 2: (vdso) (__kernel_rt_sigreturn+0x0) [0xffffe40c]
[   543.133] 3: /usr/lib/xorg/modules/libfb.so (fbBlt+0xbe) [0xb72c392e]
[   543.134] 4: /usr/lib/xorg/modules/libfb.so (fbBltStip+0x73) [0xb72c46d3]
[   543.134] 5: /usr/lib/xorg/modules/libfb.so (fbGetImage+0x199) [0xb72c9a39]
[   543.134] 6: /usr/bin/X (0x8048000+0x15f0af) [0x81a70af]
[   543.134] 7: /usr/lib/xorg/modules/extensions/libglx.so (0xb74c0000+0x37d5b) [0xb74f7d5b]
[   543.134] 8: /usr/lib/xorg/modules/dri/swrast_dri.so (0xb4bfc000+0x10a5d) [0xb4c0ca5d]
[   543.134] 9: /usr/lib/xorg/modules/dri/swrast_dri.so (0xb4bfc000+0x10aa7) [0xb4c0caa7]
[   543.134] 10: /usr/lib/xorg/modules/extensions/libglx.so (0xb74c0000+0x37cbd) [0xb74f7cbd]
[   543.135] 11: /usr/lib/xorg/modules/extensions/libglx.so (0xb74c0000+0x34412) [0xb74f4412]
[   543.135] 12: /usr/lib/xorg/modules/extensions/libglx.so (0xb74c0000+0x3528a) [0xb74f528a]
[   543.135] 13: /usr/lib/xorg/modules/extensions/libglx.so (0xb74c0000+0x3727f) [0xb74f727f]
[   543.135] 14: /usr/bin/X (0x8048000+0x27e87) [0x806fe87]
[   543.135] 15: /usr/bin/X (0x8048000+0x1aec5) [0x8062ec5]
[   543.135] 16: /lib/libc.so.6 (__libc_start_main+0xe6) [0xb7560db6]
[   543.137] 17: /usr/bin/X (0x8048000+0x1aaa1) [0x8062aa1]
[   543.137] Segmentation fault at address (nil)
[   543.138]
Fatal server error:
[   543.138] Caught signal 11 (Segmentation fault). Server aborting
[   543.138]
[   543.138]

I have enabled 3d support in virtual box, but still I’m not sure whether we can expect working compositing under x in virtualized gentoo.
Don’t know whether exists better solution (let me know), but I’ve did was:

Creating file
/etc/X11/xorg.conf.d/disable-composite.conf
with below content:

Section “Extensions”
Option “Composite” “Disable”
EndSection

Categories
gentoo

How to quickly find duplicated files on linux?

Just a quick direction to program -> fdupes
(on gentoo emerge fdupes -av)

fdupes -r movies_dir1 movies_dir2 > duplicates.txt

Above commands creates hashes of all files within specifies directories (-r recursive) and outputs that list to duplicates.txt. Now you can investigate that list and delete duplicates manualy.

You can also tell fdupes to delete files automatically or to be prompted.

Categories
gentoo

Gentoo and webdav

Getting tired of using ftp to sync some resources. Clicking connect is very tiresome so..
emerge devfs2 -av
groupadd -r davfs2
useradd davfs2 -g davfs2

If your webdav resource is secured edit /etc/davfs2/secrets and add simple line
http://yourresurce/path user pass

These are credentials to remote webdav.

Try to mount drive from cmdline
mount.davfs http://http://yourresurce/path /mnt/webdav/path

If it works unmount for a second
mount -u /mnt/webdav/path

If it works you can add following line to /etc/fstab
http://yourresurce/path /mnt/webdav/path davfs uid=wlos,gid=users 1 2

Try now mount -a and voila! Your remote drive will be available automagically.

There are many other options you can provide.. try docs!