[gentoo-user] Dhclient and buggy ISP
Hey I have a following with Telia ISP and their dhcp-server... I'm using dhclient to get dynamic IP from ISP and also to update DDNS. When dhclient does DHCPDISCOVER the ISP will issue a new lease for 43200 sec after a normal DHCPOFFER, DHCPREQUEST and DHCPACK cycle; and the interface gets bound to the given address. Now when the dhclient does a subsequent DHCPREQUEST, server will issue DHCP with a declining lease-time ending at the same time as original 43200s lease. By releasing the lease and doing a new DHCPDISCOVER the lease time is reset to 43200s. The ISP how ever keeps track of the MAC and will always issue the same IP. When the lease-time of 43200 runs out the default gw stops responding and the internet connection dies. The only way to then get it to work is to manually start a new discover cycle (ifdown - ifup). I would like to configure the interface so, that there would not be an interuption in network traffic! Because the IP doesn't change, I would like to configure the WAN interface to stay up with the IP all the time and get dhclient to do DHCPDISCOVER to the ISP to update ISP-firewall to let the traffic through for the next 43200 sec. If the IP changes for some reason, I would like the dhclient to update the WAN interface. Would there be a ready way in Gentoo to achieve this? Or anyway :'D Ps. I hate my ISP :( Pps. I have other problems too... -- -Matti
Re: [gentoo-user] Qt-creator, libQtcSsh and Botan - angst.....
> On 07 Feb 2016, at 08:48, Andrew Lowewrote: > > Hi all, >Has anyone managed to build the latest, V3.6, of Qt-creator? I'm > attempting to do so and am getting a problem related to libQtcSsh.so and > something called Botan. Reeading in more depth in the error, it appears > that it can't find basic_string, for example: > > * > > /var/tmp/portage/dev-qt/qt-creator-3.6.0/work/qt-creator-opensource-src-3.6.0/lib64/qtcreator/libQtcSsh.so: > undefined reference to > `Botan::User_Interface::User_Interface(std::__cxx11::basic_string std::char_traits, std::allocator > const&) Well this is a linker error. This means that you are linking without -lbotan flag or the installed version of libbotan.so is incompatible with qt-creator-3.6.0 You can fix this by compiling qt-creator without out botan or upgrading dev-libs/botan to a version required by qt-creator. If you have the correct version of botan installed then it might be that the linker is unable to find libbotan.so Based on the error messages it is probably a version mismatch, because there is only one kind of undefined reference. -- -Matti
Re: [gentoo-user] Re: All sorts of digest verification failures
> On Nov 15, 2015, at 12:43, Peter Humphrey <pe...@prh.myzen.co.uk> wrote: > > On Sunday 15 Nov 2015 12:22:39 Matti Nykyri wrote: >>> On Nov 15, 2015, at 11:59, Alan Mackenzie <a...@muc.de> wrote: > --->8 >>> Three days later. I'm still getting this error message, but with a >>> nasty >>> twist in the tail. emerge -puND @world reports (amongst others) the >>> >>> following update: >>> [ebuild R] sys-apps/busybox-1.23.1-r1 USE="-pam*" >>> >>> , and the error message I get on actually trying to start the update is >>> >>> !!! Digest verification failed: >>> !!! /usr/portage/sys-apps/busybox/busybox-.ebuild >>> !!! Reason: Filesize does not match recorded size >>> !!! Got: 8493 >>> !!! Expected: 8580 >>> >>> . Why is the build system looking at the digest for version when >>> it >>> should be rebuilding version 1.23.1-r1? >> >> Well it's not. It just checks all the manifests and complains about >> errors. It doesn't affect the building of 1.23.1-r1. > > I'm getting the same thing as Alan, and have been for several days. > >> If I were you I'ld download the latest portage snapshot. That should take >> care of any remaining issues. Is your portage upto date? > > My portage is sync'd daily, so it shouldn't need a whole new snapshot. Sunc doesn't necessarily sync everything and if some random files are out of sync you either need to update them manually or get a new snapshot. I doubt the server/mirror is messed up, but you could try changing that. Downloading a new snapshot isn't that big a deal and that should definitely fix everything, so why not try that first? You may also inspect each package and remanifest those that have problems (ebuild manifest). If you are certain that nobody has been fingering your ebuilds. -- -M
Re: [gentoo-user] Re: All sorts of digest verification failures
> On Nov 15, 2015, at 11:59, Alan Mackenziewrote: > >> On Thu, Nov 12, 2015 at 06:45:44PM +0200, Alan McKinnon wrote: >>> On 12/11/2015 18:42, Grant Edwards wrote: On 2015-11-12, wrote: Grant Edwards wrote: > > After an emerge --sync that appeared to work with no problems, my > "emerge -auvND world" command is reporting that the Changelong files > are broken for about 2/3 of the packages it wants to update: > > [ ] > >> The dev are doing some $MAGIC to reinstate ChangeLogs and the first run >> is expected to take a while (i.e. several hours). I suppose you can >> expect some breakage till it finishes. > >> It's being discussed and tracked on gentoo-dev, you can drop a mail >> there with specifics to let the devs know what's happening. > > Three days later. I'm still getting this error message, but with a nasty > twist in the tail. emerge -puND @world reports (amongst others) the > following update: > >[ebuild R] sys-apps/busybox-1.23.1-r1 USE="-pam*" > > , and the error message I get on actually trying to start the update is > >!!! Digest verification failed: >!!! /usr/portage/sys-apps/busybox/busybox-.ebuild >!!! Reason: Filesize does not match recorded size >!!! Got: 8493 >!!! Expected: 8580 > > . Why is the build system looking at the digest for version when it > should be rebuilding version 1.23.1-r1? Well it's not. It just checks all the manifests and complains about errors. It doesn't affect the building of 1.23.1-r1. If I were you I'ld download the latest portage snapshot. That should take care of any remaining issues. Is your portage upto date? -- -M
Re: [gentoo-user] Re: All sorts of digest verification failures
> On Nov 15, 2015, at 13:01, Alan Mackenziewrote: > >> Well it's not. It just checks all the manifests and complains about >> errors. It doesn't affect the building of 1.23.1-r1. Ok. I must be using some different switch then. > Ah, OK. But it causes emerge to bail out, so never gets round to > building 1.23.1-r1. > >> If I were you I'ld download the latest portage snapshot. That should >> take care of any remaining issues. Is your portage upto date? > > I'd just synched my portage tree immediately before attempting the build. > I'll try again tomorrow, in the hope everything will have been sorted out > by then. Syncing and getting a new snapshot is a bit different. With a snapshot you get a new clean start. Download it and unpack. After that check that your portage package is upto date (emerge -av portage). -- -Matti
Re: [gentoo-user] Re: All sorts of digest verification failures
> On Nov 15, 2015, at 21:33, Alan Mackenziewrote: > > Hello, Matti. > > I deleted my /usr/portage (with the exception of > /usr/portage/distfiles), and ran emerge --sync again. I get precisely > the same error message, still. I rsync with rsync.europe.gentoo.org and with me the manifest with busybox is in order. Size for .ebuild is 8493 and the Manifest has the same size. Also the hashes match. I hope you get it right :) -- -Matti
Re: [gentoo-user] Heads up: Video mode and booting with KVM switch
On Fri, Nov 13, 2015 at 03:54:02PM -0500, Walter Dnes wrote: > I have 3 machines kicking around. One is a Dell Inspiron 530 from > June 2008 that simply refuses to die. The others are more recent. > On my desk (actually a re-purposed kitchen table) I only have room for 1 > 24 inch monitor, 1 big Unicomp "IBM-like clickety-clack" USB keyboard > http://www.pckeyboard.com/mm5/merchant.mvc?Screen=PROD_code=UNI041A > and 1 trackball. > > I got an IOGear 4-port USB KVM. It has a remote clicker to switch > between the 4 ports; no icky escape/control sequences. Because it's > hardware-controlled, there are no drivers required. It works great > with one exception, which is a linux kernel problem, not a switch > problem. The problem I've found occurs when booting a machine that is > not currently selected by the KVM switch. I found the BIOS settings to > eliminate the... > > Keyboard failure > Select F1 to continue; F2 to enter SETUP > > ...message. The linux kernel problem is that it doesn't detect the > display when that particular machine is not selected at bootup > (du), and assumes 1024x768 console and graphics video. If the > machine is selected by the switch at bootup, things work properly. > > But don't panic. Even if I boot into 1024x768 text mode, and default > to 1024x768 graphics, running "xrandr -s 1920x1080" gets me 1920x1080 > X Window display. The available modes for your display may be > different. Just run "xrandr" for a list of available modes. Don't panic! There is a simple solution to this... Kernel developers have foreseen this problem already! In your situation your graphics hardware is not getting the EDID of your display, decause it is physically not connected to the monitor when you boot up. See /Documentation/EDID for details. Set DRM_LOAD_EDID_FIRMWARE=y You can use x11-misc/read-edid to fetch edid from your monitor: get-edid > your_edid.bin. Or you can use modedebug in xorg.conf and get edid from Xorg.0.log Save the edid from your monitor to /lib/firmware/edid/ and include in your kernel commandline "drm_kms_helper.edid_firmware=edid/your_edid.bin". You can also set your video mode in comman line "video=DVI-I-1:1024x768@85". The names for your connectors are found in "/sys/class/drm/*/status". https://wiki.archlinux.org/index.php/Kernel_mode_setting These work with kernel mode setting. If you are using some proprietary driver, see the documentation of that driver. At least with nvidia you can set your custom edid in xorg.conf "Option CustomEDID DFP-0:/your_edid.bin" and force monitors to be detected as connected at all times "Option ConnectedMonitor DFP". -- -M
Re: [gentoo-user] martian source with unknown IP and MAC
On Aug 17, 2015, at 20:46, Grant emailgr...@gmail.com wrote: I received a suspicious prompt while browsing a financial account of mine on my laptop so I restarted my modem but did not DHCP to it. I immediately received a series of type 08 00 martian sources logged to dmesg on my laptop from a 10.x.x.x source while my local network runs on 192.168.x.x only, and the logged MAC address does not match that of any systems on my LAN including the modem and I don't run wifi. Is that martian source suspicious? Use tcpdump to study your traffic. My ISP runs their DHCP server in 10.x.x.x space so my firewalls dmesg is full on martian source warnings because the DHCP traffic in the network. My firewall has a public ip and in that public network the DHCP server runs in 10.x.x.x. -- -Matti
Re: [gentoo-user] Best way for good video performance in virtual machines
On Jun 25, 2015, at 11:47, Ralf ralf+gen...@ramses-pyramidenbau.de wrote: On 06/25/2015 01:29 AM, R0b0t1 wrote: What will the Qt application be doing? Any of those setups should be sufficient for a typical GUI program. Highest performance would probably be passing a discrete card to the guest... not particularly the smartest move, but it would account for every usecase. Barring that, #2 should have the least amount of overhead, as X11 does the drawing on the system running the server (so host's GPU instead of guest's virtual GPU). Well, the QT Application will have to show WebViews using WebKit which contain Flash content. Do NOT ask why, just accept it (so do I...) :-D Does qemu actually support passing a whole graphics card? Never tried it. Yes it does. For examlpe if you have a windows client and pass the card to it the client can utilize directx and you get nearly native 3d performance in the games within the client. In that case the client owns the graphics card and the has to have another one should it require one... -- -Matti
Re: [gentoo-user] [OT] How to add library to dynamically linked executable?
On Jun 22, 2015, at 19:13, Grant Edwards grant.b.edwa...@gmail.com wrote: Is there any way to add a library to the list of libraries required by an ELF dynamically linked executable? I have an executable (let's call it foo) which was written and built by somebody else [I don't have sources]. It requires the librt to run on one particular platform, but librt isn't in the exeuctable's list of libraries. [I'll skip the story of how it ended up this way. It will be fixed with the next version of that application.] # foo foo: can't resolve symbol 'shm_open' If I run it like this, it's fine: # LD_PRELOAD=/lib/librt.so.0 foo Is there any way to fix the ELF executable file to add librt.so.0 to its list of libraries? I'm aware I can create a shell script that does this: #!/bin/sh export LD_PRELOAD=/lib/librt.so.0 exec foo What I'm wondering about is whether there is a way to fix the ELF executable file itself so as to add librt.so.0 to its list of shared libraries. I've found chrpath(1), but it only changes the search path used to look for libraires, not the list of libraries themselves. The question you have has multiple solutions to it... Doing it as it should be done is only possible if you have all the needed object files at hand. A ready made tool that just adds a shared library to an executable does not exist. But i believe you have a hexeditor, that is able to do it ;) I have tryed many of these options and it is quite tricky if you don't have the ELF object-files. There are various tools for you available objcopy etc... One option is to make a library that load two libraries e.g. librt and another library needed by the executable. Then hexedit your executable to load the new library you created and it will load the two libraries needed. Also you can write a c program that modifies the elf executable, but i don't think you need to for this problem. -- -Matti
Re: [gentoo-user] Blank screen after hibernation with radeon driver
On Jun 21, 2015, at 2:16, Fernando Rodriguez frodriguez.develo...@outlook.com wrote: On Saturday, June 20, 2015 10:15:37 AM Matti Nykyri wrote: On Jun 20, 2015, at 5:16, Fernando Rodriguez frodriguez.develo...@outlook.com wrote: Hello, After switching from fglrx to the radeon driver I get a blank screen after resuming from hibernation. I can ssh in but I can't restart xorg. This happens with pm-utils and also with systemd. Suspend works fine with both. My video card is: VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Kabini [Radeon HD 8210] Any suggestions? Ssh in and run commands: export DISPLAY=:0 xrandr Or xrandr --output --mode etc with right arguments If that doesn't help, use top and perf top to see what is going on. Does restarting X fix te issue? I can't restart X, it hangs when I try, xrandr also hangs. Even kill -9 doesn't kill it. The logs sometimes don't show anything at all but today it's show this consistently: un 20 18:19:08 navi kernel: [drm:cik_ring_test] *ERROR* radeon: ring 1 test failed (scratch(0x3010C)=0xCAFEDEAD) Jun 20 18:19:08 navi kernel: ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300) Jun 20 18:19:08 navi kernel: ata1.00: configured for UDMA/133 Jun 20 18:19:08 navi kernel: [drm:cik_ring_test] *ERROR* radeon: ring 2 test failed (scratch(0x3010C)=0xCAFEDEAD) Jun 20 18:19:08 navi kernel: [drm] ring test on 3 succeeded in 4 usecs Jun 20 18:19:08 navi kernel: [drm] ring test on 4 succeeded in 4 usecs Jun 20 18:19:08 navi kernel: [drm] ring test on 5 succeeded in 1 usecs Jun 20 18:19:08 navi kernel: [drm] UVD initialized successfully. Jun 20 18:19:08 navi kernel: [drm] ring test on 6 succeeded in 812 usecs Jun 20 18:19:08 navi kernel: [drm] ring test on 7 succeeded in 3 usecs Jun 20 18:19:08 navi kernel: [drm] VCE initialized successfully. Jun 20 18:19:08 navi kernel: [drm] ib test on ring 0 succeeded in 0 usecs Jun 20 18:19:08 navi kernel: [drm] ib test on ring 3 succeeded in 0 usecs Jun 20 18:19:08 navi kernel: [drm] ib test on ring 4 succeeded in 0 usecs Jun 20 18:19:08 navi kernel: [drm] ib test on ring 5 succeeded Jun 20 18:19:08 navi kernel: [drm] ib test on ring 6 succeeded Jun 20 18:19:08 navi kernel: [drm] ib test on ring 7 succeeded Jun 20 18:19:08 navi kernel: [drm:radeon_dp_link_train_cr] *ERROR* displayport link status failed Jun 20 18:19:08 navi kernel: [drm:radeon_dp_link_train_cr] *ERROR* clock recovery failed Jun 20 18:19:08 navi kernel: [drm:radeon_dp_link_train_cr] *ERROR* displayport link status failed Jun 20 18:19:08 navi kernel: [drm:radeon_dp_link_train_cr] *ERROR* clock recovery failed On one occassion there where about 20 backtraces on the log. That log is gone but it had a message basically saying (I don't remember the exact words) that something went wrong and the kernel recovered but a reboot was still needed. I'll post if it comes up again. Also relevant that I've been getting this and similar errors on my logs for a few days (probably since I switched to the radeon driver), all the i2c devices are on the video card: Jun 20 16:46:30 navi kernel: i2c i2c-7: sendbytes: error -110 Jun 20 16:46:41 navi kernel: i2c i2c-7: sendbytes: error -110 Jun 20 16:47:01 navi kernel: i2c i2c-7: sendbytes: error -110 Jun 20 16:47:11 navi kernel: i2c i2c-7: sendbytes: error -110 Jun 20 16:47:31 navi kernel: i2c i2c-7: sendbytes: error -110 What is the output of: perf top Do you have kernel debugging symbols compiled in? If then do kernel function trace. See what an strace to X shows. -- -Matti
Re: [gentoo-user] Portage.provided
On Jun 20, 2015, at 12:43, Franz Fellner alpine.art...@gmail.com wrote: Matti Nykyri wrote: How to get portage off my back? I have the following in /etc/portage/package.provided: For me package.provided didn't work wither. Until I noticed that I missed profile in te path. mv /etc/portage/package.provided /etc/portage/profile/package.provided and it should do what you expect Yeap. Sorry. Too fast reading of man pages :) Now it works after I moved the file. sys-kernel/gentoo-sources-4.0.5 sys-kernel/gentoo-sources-4 sys-kernel/gentoo-sources However when I run emerge -DuvaN world: These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] sys-kernel/gentoo-sources-4.0.5:4.0.5::gentoo USE=-build -deblob -experimental -symlink 0 KiB Total: 1 package (1 new), Size of downloads: 0 KiB Would you like to merge these packages? [Yes/No] What should I do? -- -Matti
Re: [gentoo-user] Blank screen after hibernation with radeon driver
On Jun 20, 2015, at 5:16, Fernando Rodriguez frodriguez.develo...@outlook.com wrote: Hello, After switching from fglrx to the radeon driver I get a blank screen after resuming from hibernation. I can ssh in but I can't restart xorg. This happens with pm-utils and also with systemd. Suspend works fine with both. My video card is: VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Kabini [Radeon HD 8210] Any suggestions? Ssh in and run commands: export DISPLAY=:0 xrandr Or xrandr --output --mode etc with right arguments If that doesn't help, use top and perf top to see what is going on. Does restarting X fix te issue? -- -Matti
[gentoo-user] Portage.provided
How to get portage off my back? I have the following in /etc/portage/package.provided: sys-kernel/gentoo-sources-4.0.5 sys-kernel/gentoo-sources-4 sys-kernel/gentoo-sources However when I run emerge -DuvaN world: These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] sys-kernel/gentoo-sources-4.0.5:4.0.5::gentoo USE=-build -deblob -experimental -symlink 0 KiB Total: 1 package (1 new), Size of downloads: 0 KiB Would you like to merge these packages? [Yes/No] What should I do? -- -Matti
Re: [gentoo-user] Half error message on attempting to access You Tube from Firefox
On Apr 27, 2015, at 3:24, Stroller strol...@stellar.eclipse.co.uk wrote: On Sun, 26 April 2015, at 3:49 pm, Alan Mackenzie a...@muc.de wrote: The following USE flags were used in my building of firefox 31.6.0: USE=bindist dbus jit minimal startup-notification -custom-cflags -custom-optimization -debug -gstreamer -hardened (-pgo) -pulseaudio (-selinux) -system-cairo -system-icu -system-jpeg -system-libvpx -system-sqlite {-test} -wifi `euses system-libvpx` says use the system-wide media-libs/libvpx and if we look up media-libs/libvpx then its description explains that its about the WebM VP8 codec. It would be better if it explained that this is a _video_ codec, but Gentoo's USE flag and package descriptions have always been rubbish. I would perhaps try rebuilding with USE=system-libvpx and checking the https://www.youtube.com/html5 page again. Personally, I would probably also try a later version of Firefox. I appreciate that 31.x is the latest stable version, but I doubt newer versions are actually unstable in any way, and if I google youtube html5 firefox I find that Google will enforce the use of HTML5 video on YouTube for all Firefox users who use Firefox 33 or newer, FYI: Firefox 35 uses the HTML5 video player in Youtube by default and Firefox 37 Released With Native HTML5 YouTube Playback A little bit OT, but does anyone know how to satisfy Firefox's need for audio device. If I have no asound.conf Firefox will use hw0,0 for audio output. If I set asound to: pcm.!default { type hw card 0 device 0 } ctl.!default { type control card 0 device 0 } Sorry. Wrote this from memory so there might be a typo somewhere. With these settings Firefox don't playback anything... Other applications and flash plugin works perfectly. How could I get firefox to use hw0,3 or hw1,3 for HTML5 audio playback? -- -Matti
Re: [gentoo-user] Re: Machine completely broken; Ncursed!
On Apr 12, 2015, at 20:23, »Q« boxc...@gmx.net wrote: On Sun, 12 Apr 2015 11:12:38 +0200 J. Roeleveld jo...@antarean.org wrote: On Saturday, April 11, 2015 08:42:20 PM Alan Grimes wrote: PYTHON_TARGETS=${PYTHON_TARGETS} python2_7 python3_4 PYTHON_SINGLE_TARGET=python2_7 These are set in your profile, please do not override this. In other words, please remove these 2 lines. I'm not the OP. (I spend less time than him on maintaining my system.) Should those variables really not be set in make.conf? I added them to make.conf some time back because portage complained about them, and if I comment them out, it complains again, like so: $ emerge -puDv --changed-use @world These are the packages that would be merged, in order: Calculating dependencies | !!! Problem resolving dependencies for sys-apps/util-linux from @system ... done! !!! The ebuild selected to satisfy sys-apps/util-linux has unmet requirements. - sys-apps/util-linux-2.25.2-r2::gentoo USE=ncurses nls pam (policykit) python suid tty-helpers udev unicode -caps -cramfs -fdformat (-selinux) -slang -static-libs -systemd -test ABI_X86=64 -32 -x32 PYTHON_SINGLE_TARGET=-python2_7 -python3_3 -python3_4 PYTHON_TARGETS=-python2_7 -python3_3 -python3_4 The following REQUIRED_USE flag constraints are unsatisfied: python? ( exactly-one-of ( python_single_target_python3_3 python_single_target_python3_4 python_single_target_python2_7 ) ) The above constraints are a subset of the following complete expression: python? ( exactly-one-of ( python_single_target_python3_3 python_single_target_python3_4 python_single_target_python2_7 ) python_single_target_python3_3? ( python_targets_python3_3 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python2_7? ( python_targets_python2_7 ) ) (dependency required by @system [set]) (dependency required by @world [argument]) This is because you have set the python use flag in your make.conf (or package.use). Remove the python useflag and the problem goes away. It is not set by the profile but by you. Do you really need it? -- -Matti
Re: [gentoo-user] cups and html
On Apr 8, 2015, at 18:27, hw h...@gartencenter-vaehning.de wrote: Hi, is there something special I need to do or to install to be able pipe html output from a cgi script to cups to have it printed as the output would be shown by a web browser? The output might differ some amount from the browser view. Is there a/another good way to print such output automatically without manually loading it into a web browser and printing it from there? Filter the file through html2ps. Ps-files can be natvely printed with CUPS. I think you can also insert such a filter to CUPS and then it will be able to print html natively -- -Matti
Re: [gentoo-user] System date/time goes to GMT when PC wakes from hibernate
On Mon, Apr 06, 2015 at 06:13:41PM -0400, Fernando Rodriguez wrote: ...into my /etc/hibernate/hibernate.conf. This copies over the BIOS time to the kernel system date. It works, but I'd really like to know why it's necessary in the first place. There's an option CONFIG_RTC_HCTOSYS on the kernel to do it automatically. I think it uses utc so if you use localtime it may mess it up. This also came up recently on this list but I can't remember what the problem was so you may want to look there. Don't store hwclock in localtime. It is a hack and you are asking for trouble. Just store it in UTC. That way the worst mishap is that it gets 1 second to a wrong direction if you happen to hit a leap second. With localtime you will always have a change for worse 2 times a year when summer time kicks in. -- -Matti
Re: [gentoo-user] gentoo announces total website makeover :-)
On Apr 1, 2015, at 2:46, Andrew Savchenko birc...@gentoo.org wrote: On Wed, 1 Apr 2015 01:37:06 +0200 waben...@gmail.com wrote: This really made my day. :-) https://www.gentoo.org/news/2015/03/31/website-update.html The best design ever! So nice and readable font, so yummy background, very fast page load. Many thanks for Web project team for hard work! Nice. The load time is really fast :) Send the floppies to me. Can't wait to get installing ;) -- -Matti
Re: [gentoo-user] gentoo announces total website makeover :-)
On Apr 1, 2015, at 12:58, Peter Humphrey pe...@prh.myzen.co.uk wrote: On Wednesday 01 April 2015 10:51:25 Neil Bothwick wrote: On Wed, 01 Apr 2015 10:40:29 +0100, Peter Humphrey wrote: Magnetic or punched? Ooh, the temptation! What's the best way of cleaning tea from a monitor? :) Actually, I've just been looking at the spoof site again. Someone has put an awful lot of work into it (I suspect Nighthawk). It'd be a pity if were all thrown away after today. An absolutely magnificent effort - well done, team! How can I play the great new game on the site? Firefox just tries to search the page when I press A or Q? Am I using an unsupported browser? Should I try WorldWideWeb-browser? Is it in portage? -- -Matti
Re: [gentoo-user] gentoo announces total website makeover :-)
On Apr 1, 2015, at 18:29, Heiko Baums li...@baums-on-web.de wrote: Am 01.04.2015 um 17:19 schrieb Matti Nykyri: How can I play the great new game on the site? Firefox just tries to search the page when I press A or Q? Am I using an unsupported browser? Should I try WorldWideWeb-browser? Is it in portage? In Firefox go to Settings - Advanced and turn off Start searching while typing. (Translated from the German version by a non-native speaker, so it can actually be named differently in the English version.) Thanks. -- -Matti
Re: [gentoo-user] Please explain X fonts?
On Mar 27, 2015, at 4:15, Walter Dnes waltd...@waltdnes.org wrote: #!/bin/bash [[ -f ~/.Xresources ]] xrdb -merge ~/.Xresources /usr/bin/xterm -bg black -fg cyan -geometry 50x9+0+0 -fn lucidasanstypewriter-12 /usr/bin/xterm -bg black -fg cyan -geometry +0+0 -fn lucidasanstypewriter-12 exec /usr/bin/icewm ~/.icewm.log 21 Some time ago, somebody decided to deprecate iso8859-1 fonts. And when I run startx, the text console comes up with Why not use some new TTF? Put the config to ~/Xdefaults: XTerm*faceName: Liberation Mono XTerm*faceSize: 12 xterms come up with some dinky little font. It's bad enough on a 24 in 1920x1080 monitor. On an 11 1366x768 netbook, it's unreadable. When I do a control-right-click on an xterm to manipulate fonts, the xterm crashes. X server abjusts font sizes according to the DPI value. The DPI value it calculates might be wrong though: bad EDID most likely. Set the DPI value in you Xorg.conf file to make the fonts in constant size. One of the nice things about having multiple machines, is that I still had another machine with the old fonts. For a few years, I've preserved a copy of /usr/share/fonts from that machine as fonts_do_not_delete. So each time fonts are updated on my machines, I rename /usr/share/fonts to /usr/share/fonts.borken and copy the fonts_do_not_delete directory as /usr/share/fonts. CONFIG_PROTECT the directory or make the fonts immutable so they don't get removed. chattr +i OK, so whats supposed to be the right way to get working xterms with lucidasanstypewriter-12? -- -Matti
Re: [gentoo-user] CSV or mysql table as spreadsheet-like web page
On Mar 24, 2015, at 17:21, hw h...@gartencenter-vaehning.de wrote: Hi, how would you go about creating a web page from either a CSV file or a table in a mysql database which presents the data to a user and lets them edit some of the data, preferably with the ability to use formulas like you can in a spreadsheet to do some calculations on the fly? A php script that does that kind of table drawing is really easy :) Editing the content is harder... You have to think how you wan't to do it. Htlm has its limitations :/ Once editing the data is finished, it should all be saved to a table in a database or as a CSV file. Design it so that you know for certain which cells the user has edited so you don't need to overwrite the entire table even if the table has changed in between. Many things depend on the size of your table. Raw non-relational database is really easy to interface even with html. Excel can do a table with 2^16 rows and few hundred columns. With mysql you can easily do like a million rows :) design the database so that it has a separate value for the user typed cell content and another for the displayable result of the content. Is there some php script or the like which can do this or get me started? Well i would never use HTML for real work, it is for free-time (facebook etc). Qt has has a really good frontend for working with mysql table. It is fast and supports getting rows asynchronously in the background and in the specified range. With a qt frontend the gui looks much better and unified than with a web-browser. -- -Matti
Re: [gentoo-user] Re: How to poweroff the system from user?
On Mar 23, 2015, at 14:13, Nikos Chantziaras rea...@gmail.com wrote: On 23/03/15 11:46, Peter Humphrey wrote: The consensus seems to be that there's no point in trying to prevent a user from rebooting the machine, and I'm happy to go along with that. The remaining question is: why is the user not allowed to halt it? Because there's no keyboard shortcut for halt. Only for reboot :-) Well you can set init to run halt on ctrl-alt-up arrow -keypress. -- -Matti
Re: [gentoo-user] How to poweroff the system from user?
On Mar 22, 2015, at 9:11, Alexander Kapshuk alexander.kaps...@gmail.com wrote: On Sun, Mar 22, 2015 at 9:06 AM, German gentger...@gmail.com wrote: On Sun, 22 Mar 2015 08:49:54 +0200 Matti Nykyri matti.nyk...@iki.fi wrote: On Mar 22, 2015, at 8:32, German gentger...@gmail.com wrote: /sbin/poweroff says Must be a superuser :( Did you read any of the previous messages? They told you that you have to have consolekit and polkit installed and configured for this to work! Yes, I've read them. However no one explianed how this has to be accomplished with polkit and consolekit. Read http://wiki.gentoo.org/wiki/Polkit and all the links and prerequisites (consolekit and dbus) and polkit man page. Also the use of sudo is another choice. Sudo is just a package? Yes, it is. qsearch sudo|sed 1q app-admin/sudo Allows users or groups to run commands as other users If you want every user to be able to shutdown just run this command: chmod 6755 /sbin/poweroff -- -Matti
Re: [gentoo-user] How to poweroff the system from user?
On Mar 22, 2015, at 9:31, Fernando Rodriguez frodriguez.develo...@outlook.com wrote: On Sunday, March 22, 2015 3:06:59 AM German wrote: On Sun, 22 Mar 2015 08:49:54 +0200 Matti Nykyri matti.nyk...@iki.fi wrote: On Mar 22, 2015, at 8:32, German gentger...@gmail.com wrote: /sbin/poweroff says Must be a superuser :( Did you read any of the previous messages? They told you that you have to have consolekit and polkit installed and configured for this to work! Yes, I've read them. However no one explianed how this has to be accomplished with polkit and consolekit. Actually systemd's poweroff should be on /usr/bin or /bin but if you got it there you shouldn't have got the command not found error so something is messed up with your system. Post the output to the folling ls -l /usr/bin/poweroff ls -l /bin/poweroff ls -l /sbin/poweroff ls -l /usr/sbin/poweroff Only one of them should list something and it should be a symlink to systemctl. From previous messages by the OP I recall that he is using OpenRC. -- -Matti
Re: [gentoo-user] How to poweroff the system from user?
On Mar 22, 2015, at 9:30, German gentger...@gmail.com wrote: On Sun, 22 Mar 2015 03:19:50 -0400 Fernando Rodriguez frodriguez.develo...@outlook.com wrote: On Sunday, March 22, 2015 3:06:59 AM German wrote: On Sun, 22 Mar 2015 08:49:54 +0200 Matti Nykyri matti.nyk...@iki.fi wrote: On Mar 22, 2015, at 8:32, German gentger...@gmail.com wrote: /sbin/poweroff says Must be a superuser :( Did you read any of the previous messages? They told you that you have to have consolekit and polkit installed and configured for this to work! Yes, I've read them. However no one explianed how this has to be accomplished with polkit and consolekit. You don't need those. It sounds like you somehow got both sysvinit and systemd installed. The message you're getting is from sysvinit. poweroff should be a symlink to systemctl. Try: systemctl poweroff You may need to unmerge sysvinit and anything else related to openrc and then re-emerge systemd. With systemd it should either shutdown or ask you for the root password (if you're not logged in locally or there's other users logged Thanks, I decide to go with sudo on this one. However when I try to run it, it says: Username is not in the sudoers file. Where is this file located and how can I add the user to it? Thanks man sudo And man sudoers The file is in /etc/sudoers -- -Matti
Re: [gentoo-user] Re: How to poweroff the system from user?
On Mar 22, 2015, at 17:58, Philip Webb purs...@ca.inter.net wrote: 150322 Peter Humphrey wrote: On Sunday 22 March 2015 13:04:44 Nikos Chantziaras wrote: I can reboot the system when I am a user by Ctrl+Alt+Delete. The user can reboot the system, but can't shut down ? Strange The thinking is that you can unplug the machine or press the hardware reset or power button or flip the PSU switch ... Preventing a ctrl+alt+del reboot does not add anything to security. Security doesn't apply to users with physical access to the machine. However, this is just a default. You can easily disable reboot on ctrl+alt+del by editing /etc/inittab and commenting-out this line: ca:12345:ctrlaltdel:/sbin/shutdown -r now Testing my single-user box with the above line in inittab , I find that if I enter 'A-^Del' , I exit X to the raw terminal ; another 'A-^Del' then reboots the box. If I enter 'shutdown -r now' as user, I get shutdown: you must be root to do that!. 'cd /sbin ; ls -l shutdown' shows '-rwxr-xr-x 1 root root 23192 May 17 2014 shutdown', so that behaviour arises from the shutdown script, not the permissions. The 1st effect is explained in ~/.fluxbox/keys by # exit fluxbox Control Mod1 Delete :Exit However, the 2nd effect is not explained so easily : 'A-^Del' reboots when entered at a raw terminal, but 'shutdown -r now' does not, yet the former is defined as the latter by the line above in my /etc/inittab . The cause seems to be that 'A-^Del' is intercepted by 'init' (Process 1), which is owned by root, but 'shutdown -r now' is heard by Process 910 -- 'bash' running in the raw terminal, which was started by 'init' -- , which is owned by my user. So the behaviour is explained, but following my earlier msg, which advised to follow proper Unix principles, I should comment the 'A-^Del' line in inittab : if the raw terminal can't react to 'su', it won't react to 'A-^Del' either, so there's no justification in terms of escaping from an emergency. When you press ctrl-alt-delete kernel recieves it and sends it to the program that has grabbed the keyboard. If this program doesn't trap the sequence it goes to the parent program. Like if you are running a terminal in X it first goes to the shell then terminal and then to X-server. Now usually X traps that and performs what ever action is configured. If you set X not to trap the key press it goes all the way down back to the kernel. When kernel receives it it generates hang-up signal and sends it to the PID 1 aka init. And then executes the command in inittab. ca:12345:ctrlaltdel:/bin/echo shutdown And then: kill -HUP 1 Will print shutdown to your console. If you write a small program that traps ctrl-alt-del and run that in terminal, the server will not reboot :) pressing the reset button is far worse, since there's no clean shutdown, unmounting filesystems after flushing caches, etc. Yes : that's forced only when the keyboard ceases to respond. Because of that, the default of allowing ctrl+alt+del for local users makes more sense than disabling it. That doesn't follow : if you have multiple users, you don't want some rogue user rebooting randomly ; it makes sense only as a convenience on a single-user system. It seems to be the default behaviour of 'inittab' -- there no comment saying I set it myself, which I would have added -- , which is not appropriate for Gentoo systems in general, some of which are undoubtedly multi-user. On a multi-user system only the user sitting on the local terminal can press ctrl-alt-del and reboot the machine as he could also hit the server with a sledge hammer :) -- -Matti
Re: [gentoo-user] How to poweroff the system from user?
On Mar 22, 2015, at 8:32, German gentger...@gmail.com wrote: /sbin/poweroff says Must be a superuser :( Did you read any of the previous messages? They told you that you have to have consolekit and polkit installed and configured for this to work! Also the use of sudo is another choice. If you want every user to be able to shutdown just run this command: chmod 6755 /sbin/poweroff -- -Matti
[gentoo-user] Nouveau KMS Xorg-setup with multiple screens
Hello I have problems. I'm migrating from nvidia proprietary driver to nouveau driver because I wan't utilize KMS. The server is connected to two separate displays in separate rooms. The first display is showing tv programs and mostly runs @50Hz frame rate. The second is displaying movies and hence runs at 23.97Hz. The programs sync to VBLANK! Nobody can stand the tearing of video without it! With nvidia and UMD I had two screens and everything worked perfectly. So with this setup it's necessary to have two screens, right? Is it possible to have 2 screens with KMS and nouveau driver? -- Matti
Re: [gentoo-user] RTL-tm NICs (Was RTL8192CU)
On Mar 21, 2015, at 12:06, German gentger...@gmail.com wrote: http://www.newegg.com/Product/Product.aspx?Item=N82E16833704045 I saw some recommendations on this one from people using linux The manufacturer doesn't support Linux officially. I would not buy a USB NIC unless that was the only choice! The chipset was not mentioned on the manufacturers site but searching the net shows it is AR9271 and the module is ath9k_htc. On top of that you need to download atheros firmware and install that to your kernel. It has WPS setup. Some drivers with this have huge security hole that even if you disable WPS it remains on. If WPS is on there is practically no security in you WiFi network. In that case using a VPN is the only choice. I would not recommend it, but I have no personal experience with the particular chipset. Although I don't recommend WiFi either ;) ...without a proper VPN. -- -Matti
Re: [gentoo-user] RTL-tm NICs (Was RTL8192CU)
On Mar 19, 2015, at 20:46, Ralf ralf+gen...@ramses-pyramidenbau.de wrote: Hi, I had a rtl8192ce in my laptop. Nothing but problems with Linux. Don't know why, but the signal strength always was much better when using Windows. I've had nothing but problems with RTL-chipsets. But if you buy ~10$ NICs they just don't work like 400$ ones. No more Realtek WiFi cards for me. +1 -- -Matti
Re: [gentoo-user] Overlay for wickr
On Mon, Mar 16, 2015 at 08:49:18AM +0200, Matti Nykyri wrote: On Mar 16, 2015, at 8:28, Mick michaelkintz...@gmail.com wrote: I've looked at zugaina too and didn't find anything, hence I asked here. I'll file a bug at some point, unless anyone beats me to it. Writing an ebuild to do the install is like 5 min job :) I'm now in a train only with a phone, but when i get home i can write you one. Just my opinion... I would never ever trust non open source encryption software. Everyting published isn't true :) Ok... No I'm happily back home after circling around the World ;) Doing the ebuild was a bit more tricky... The program has bad bugs :( The wickr executable is linked against icu-52, but in the archive the libraries are libicui18n-53 - had to make symbolic link Also the symboltable in wickr had to be altered. And the ebuild: - Clip --- EAPI=5 inherit eutils DESCRIPTION=Wickr Top-Secret Messenger HOMEPAGE=https://www.wickr.com/downloads/; SRC_URI=x86? ( http://mywickr.info/download.php?p=332 - ${P}_i386.deb ) amd64? ( http://mywickr.info/download.php?p=364 - ${P}_amd64.deb ) LICENCE= SLOT=0 KEYWORDS=~amd64 ~x86 IUSE=x86 amd64 RDEPEND=sys-libs/glibc sys-devel/gcc sys-apps/util-linux media-sound/pulseaudio src_unpack() { mkdir ${S} cd ${S} ar x ${DISTDIR}/${A} } src_install() { cd ${D} tar --same-owner --preserve-permissions -xof ${S}/data.tar.xz if use x86 ; then MY_OFFSET=332312 elif use amd64 ; then MY_OFFSET=393763 fi echo 3 | dd of=usr/bin/wickr bs=1 count=1 seek=${MY_OFFSET} conv=notrunc cd usr/lib/wickr ln -s libicui18n.so.53 libicui18n.so.52 } - Clip --- After correcting those the software segfaults in libQt5core.so that is provided in the archive... So you probably need Qt5 installed. -- -Matti
Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]
On Mar 17, 2015, at 19:33, German gentger...@gmail.com wrote: On Tue, 17 Mar 2015 19:16:42 +0200 Matti Nykyri matti.nyk...@iki.fi wrote: On Mar 17, 2015, at 18:11, German gentger...@gmail.com wrote: Don't hit your head to a brick wall. A small strace to the login process reveals that login set things as you tell it to in /etc/login.defs In this file change the line: TTYPERM 0600 To: TTYPERM 0620 And your problem is fixed. Sorry, this didn't fix it Yes. Sorry. The mode was wrong: TTYPERM 660 Will fix it, if your screen is setgid tty and ttyX is gid tty. If not then: TTYPERM 666 Will fix it, but also your tty will be world readable. If you don't consider that too big security risk, then just go Neither 660 nor 666 fixed it. Sorry :( If you have: TTYPERM 0666 And logout and login. What mode and ownership do you have in you tty (/dev/ttyX)? -- -Matti
Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]
On Mar 17, 2015, at 18:11, German gentger...@gmail.com wrote: Don't hit your head to a brick wall. A small strace to the login process reveals that login set things as you tell it to in /etc/login.defs In this file change the line: TTYPERM 0600 To: TTYPERM 0620 And your problem is fixed. Sorry, this didn't fix it Yes. Sorry. The mode was wrong: TTYPERM 660 Will fix it, if your screen is setgid tty and ttyX is gid tty. If not then: TTYPERM 666 Will fix it, but also your tty will be world readable. If you don't consider that too big security risk, then just go ahead. -- -Matti
Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]
On Mar 17, 2015, at 21:52, German gentger...@gmail.com wrote: On Tue, 17 Mar 2015 20:39:46 +0200 Matti Nykyri matti.nyk...@iki.fi wrote: On Mar 17, 2015, at 19:33, German gentger...@gmail.com wrote: On Tue, 17 Mar 2015 19:16:42 +0200 Matti Nykyri matti.nyk...@iki.fi wrote: On Mar 17, 2015, at 18:11, German gentger...@gmail.com wrote: Don't hit your head to a brick wall. A small strace to the login process reveals that login set things as you tell it to in /etc/login.defs In this file change the line: TTYPERM 0600 To: TTYPERM 0620 And your problem is fixed. Sorry, this didn't fix it Yes. Sorry. The mode was wrong: TTYPERM 660 Will fix it, if your screen is setgid tty and ttyX is gid tty. If not then: TTYPERM 666 Will fix it, but also your tty will be world readable. If you don't consider that too big security risk, then just go Neither 660 nor 666 fixed it. Sorry :( If you have: TTYPERM 0666 And logout and login. What mode and ownership do you have in you tty (/dev/ttyX)? Ok, Matti, 0666 worked, now I can run screen as a user. Thanks. Do you think I have to try to run it 0660? Will it be less security risk? Well 0666 = 666. The reason it now worked is because you logged out and then back in. This is becaus login program only reads the /etc/login.defs-file when you login. With mode 0666 every user on your computer can read everything (every character) you have in your screen (so not much privacy). If you set: TTYGROUP utmp TTYPERM 0660 And have: -rwxr-sr-x root utmp /usr/bin/screen Everything will also work and you have more privacy. When /bin/login us run it changes ownership of the tty to the user who logs in. Su -l does not do this. That is why the screen doesn't work. ConsoleKit is the program that is responsible for many of these permission changes. Do you have that installed? -- -Matti
Re: [gentoo-user] PORTDIR_OVERLAY in make.conf has no effect anymore?
On Mar 16, 2015, at 12:07, Helmut Jarausch jarau...@igpm.rwth-aachen.de wrote: Hi, since a few days when I configured /etc/repos.conf the setting of PORTDIR_OVERLAY in /etc/portage/make.conf seems to get ignored. I have some overlays here (installed by layman) but I don't wont all of these to be considered for updating when I say emerge -auv .. Previously, I could manage which overlays were considered by setting the PORTDIR_OVERLAY in /etc/portage/make.conf This doesn't work anymore. What did I miss? http://wiki.gentoo.org/wiki/Project:Portage/Sync I think there was also a news item about it. -- -Matti
Re: [gentoo-user] Overlay for wickr
On Mar 16, 2015, at 8:28, Mick michaelkintz...@gmail.com wrote: I've looked at zugaina too and didn't find anything, hence I asked here. I'll file a bug at some point, unless anyone beats me to it. Writing an ebuild to do the install is like 5 min job :) I'm now in a train only with a phone, but when i get home i can write you one. Just my opinion... I would never ever trust non open source encryption software. Everyting published isn't true :) -- -Matti
Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]
On Mar 14, 2015, at 21:23, Alan McKinnon alan.mckin...@gmail.com wrote: There is a use-case for doing it (but I highly doubt the OP is using it) Yes. I was just thinking if the OP has a miss configuration in /etc/security/access.conf and can't login as himself on a local console. And that way is forced to use root login and then su. -- -Matti
Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]
On Mar 14, 2015, at 12:47, German gentger...@gmail.com wrote: On Sat, 14 Mar 2015 10:33:59 + Neil Bothwick n...@digimed.co.uk wrote: On Sat, 14 Mar 2015 06:08:34 -0400, German wrote: Forget about chmod 770. Better do a chmod g+rw. :-) Tried it, it also doesn't stay permanently. OK, no solution :( The correct solution is a udev rule, but it appears that something may be overriding that when you login. I have the same udev rule. Yes, something is overriding it. A kludgy solution is to add the chmod command to ~/.bash_profile. Don't hit your head to a brick wall. A small strace to the login process reveals that login set things as you tell it to in /etc/login.defs In this file change the line: TTYPERM 0600 To: TTYPERM 0620 And your problem is fixed. The problem has nothing to do with udev. If you don't like a volatile /dev just remove udev and create everything you wan't by hand (not recommended ;) Another thing i'm puzzled by is, why do you wan't to login as root and the su to someone else? I usually do it the other way around... -- -Matti
Re: [gentoo-user] {OT} offline backups
On Mar 4, 2015, at 21:50, Grant emailgr...@gmail.com wrote: I have several encrypted backup repositories online and I'd like to somehow mirror that offline. I currently have about 20G of data to back up. Any ideas? Rewritable Blu-Ray? - Grant tape. Used tape drives are cheap. DLT and LTO is as reliable as granite. My goal here is to have something in case all of my online backup repositories (in various geographical locations) get hacked. That's the only plausible scenario I can think of that would result in me losing my data and I'd like to protect against it. Would any kind of disconnectable external drive be appropriate for this? Would tape be the best choice? - Grant
Re: [gentoo-user] {OT} offline backups
On Mar 4, 2015, at 21:50, Grant emailgr...@gmail.com wrote: DLT and LTO is as reliable as granite. Would tape be the best choice? Yes. I would use tape. -- -Matti
Re: [gentoo-user] RTL8723BE and RTL8111/8168/8411
On Mar 3, 2015, at 11:24, German gentger...@gmail.com wrote: Should it concern wifi module as well? Neil, please help me out with finding these modules in kernel config menus. Can't locate them Do as Neil told you and search them with / and lspci -k I have the same NIC as you do: RTL8111/8168/8411. It is under 1 GB ethernet controllers. The module name is r8169. However I've had multiple issues with the in-kernel drivers as windows driver leaves in out-of-spec state when booting. This i only an issue if you multiboot. I would only recommend compiling r8169 as a module. The r8169 is if I remember correctly meat for a different NIC, but will work with 8168. There is another option though and the portage provides ebuilds for it. You can use Realtek provided module which works much better for this buggy NIC. The package is net-misc/r8168. Just emerge that and you are fine :) This matter has been already addressed in the list so you could search the archives. I have grown much hatred toward Realtek during these past few years... As for RTL8723BE wifi NIC I don't know the module. It should be quite easy to find. -- -Matti
Re: [gentoo-user] How to get inside of my faulty install?
On Mar 1, 2015, at 6:58, German gentger...@gmail.com wrote: Now I need to get to /boot partition of my faulty install and edit gummiboot .conf file. Can someone walk me through on how to accomplish this? ( step-by-step commands ). Of course I have a rescuecd at my disposal. Thanks! Boot into the rescuecd Open your first disk with gdisk or parted: gdisk /dev/sda List partitions (penter in gdisk and print in parted) Find a partition of the type EF00. That is your UEFI boot partition. Mark down the number of that partition. The number most likely 1. If you didn't find EF00 partition search the next disk (sdb). Mount your boot partition (in my setup it is sda1): mkdir /uefipartition mount -t vfat /dev/sda1 /uefipartition nano /uefipartition/loader/entries/gentoo.conf Just edit and save and you are done. If you have everything setup as in the wiki (http://wiki.gentoo.org/wiki/Gummiboot) this will work. Neil gave the same instructions... This is just a bit more detailed. I like to always keep grub installed because it is like swiss army knife for booting. You can always get a shell and find your lost kernel image. Even if it is still in /usr/src... So you kind of like never render your system to an unbootable state. Nor would need to use rescue cd. And you can boot windows, memtest, chainload etc! -- -Matti
Re: [gentoo-user] About to attempt EFI install, which modules to compile?
On Feb 27, 2015, at 12:23, Alec Ten Harmsel a...@alectenharmsel.com wrote: On 02/27/2015 01:09 AM, Matti Nykyri wrote: On Feb 27, 2015, at 5:57, Matti Nykyri matti.nyk...@iki.fi wrote: Make a partition for gentoo and format it. Untar stage3 and portage snapshot to it (snapshot is faster than rsync). Chroot. Emerge portage and grub. I copied kernel from my old system to /boot. If you don't have this build a new one. Run grub2-mkconfig -o /boot/grub/grub.cfg (mkdir if it doesn't exists. (http://wiki.gentoo.org/wiki/GRUB2) Manually modify grub.cfg so that the root drive will match the setup of the new system. (Something like this /dev/sdb2 - /dev/sda2 and hd1,2 - hd0,2) If you're using grub2, you should not be manually editing grub.cfg, just /etc/default/grub and running grub2-mkconfig. The computer I'm on right now boots with EFI, and I've never had to manually touch grub.cfg. I don't usually use any LiveCD. I just prepare the HDD of the new system in an old box. The old system had no efi and different hard drive setup. In that scenario it is necessary to manually intervene. Grub can not guess correctly... -- -Matti
Re: [gentoo-user] Gummiboot ( Error loading \vmlinuz :Not found)
On Feb 28, 2015, at 11:50, German gentger...@gmail.com wrote: title Gentoo Linux linux /vmlinuz options root=/dev/sda3 Verify that you have the file vmlinuz in the root of /dev/sda3 What is you problem? Does EFI find anything to boot? Is gummiboot failing to find kernel? Or is kernel failing to boot or find root disk? What is the content of the UEFI partition's (0xEF00) /EFI-directory and /EFI/BOOT-directory? -- -Matti
Re: [gentoo-user] Deleted kdevelop ebuilds
On Feb 27, 2015, at 9:07, Fernando Rodriguez frodriguez.develo...@outlook.com wrote: Why does a good ebuild gets replaced with a broken one? Is there any way to make sure that packages that I'm using don't get removed from the portage tree or at least that the package doesn't get downgraded automatically. Right now if I install an unstable package by keywording a specific version and it gets deleted you get downgraded the next time you run emerge -vauDN so you have no simple way of going back to your working configuration since the ebuild is gone. I would do it like this: Make an overlay of your own and copy the wanted ebuild there. Mask the package and unmask the version you copied to the overlay. Of course there are also other ways You can download an old portage snapshot to get the deleted ebuild back. -- -Matti
Re: [gentoo-user] About to attempt EFI install, which modules to compile?
On Feb 27, 2015, at 5:57, Matti Nykyri matti.nyk...@iki.fi wrote: Make a partition for gentoo and format it. Untar stage3 and portage snapshot to it (snapshot is faster than rsync). Chroot. Emerge portage and grub. I copied kernel from my old system to /boot. If you don't have this build a new one. Run grub2-mkconfig -o /boot/grub/grub.cfg (mkdir if it doesn't exists. (http://wiki.gentoo.org/wiki/GRUB2) Manually modify grub.cfg so that the root drive will match the setup of the new system. (Something like this /dev/sdb2 - /dev/sda2 and hd1,2 - hd0,2) Many asus mb's have bug in efi and require BOOTX64.EFI to be lower case = bootx64.efi so rename it as necessary. My mb had that bug and a rename was needed even though fat should be case insensitive. Also disable secure boot. It's only for windows... -- -Matti
Re: [gentoo-user] About to attempt EFI install, which modules to compile?
On Feb 27, 2015, at 5:02, German gentger...@gmail.com wrote: Hi people. I am about to try today an EFI gentoo install with sysrecuecd. It is all more or less clear to me in the install docs, however I am not sure how to gather info about my hardware, which modules should be compiled when installing kernel manually. Is there a way to gather this info? What command should be issued to accomplish that? Also, I am sort of reluctant to compile kernel manually. Is this possible to use genkernel to install system in EFI mode or I must to use manual compilation? Thank you for your advice and suggestions. Just did my first EFI install this week... So not a virgin anymore ;) I had an old system so I attached the new drive to that for partitioning and install. You use gpt with uefi. You need to reserve one partition for UEFI. Set the type to EF00 and boot flag enabled (parted or gdisk can do this). Format to fat32. Make a partition for gentoo and format it. Untar stage3 and portage snapshot to it (snapshot is faster than rsync). Chroot. Emerge portage and grub. I copied kernel from my old system to /boot. If you don't have this build a new one. Run grub2-mkconfig -o /boot/grub/grub.cfg (mkdir if it doesn't exists. (http://wiki.gentoo.org/wiki/GRUB2) Install grub: grub2-install --target=x86_64-uefi /to/your/partition Then copy /boot/efi/EFI/gentoo/grubx64.efi to /boot/efi/EFI/BOOT/BOOTX64.EFI Many asus mb's have bug in efi and require BOOTX64.EFI to be lower case = bootx64.efi so rename it as necessary. My mb had that bug and a rename was needed even though fat should be case insensitive. After this you can boot your new system and continue with the install :) Further reading: https://help.ubuntu.com/community/UEFIBooting -- -Matti
Re: [gentoo-user] syslog-ng: how to read the log files
On Feb 24, 2015, at 2:50, Peter Humphrey pe...@prh.myzen.co.uk wrote: Thank Goodness! Someone who knows enough to trim out the bits of the message he's not replying to. Why do you others make me page-down eight times to find what you've written in reply to the last three lines of the preceding message? +1 -- -Matti
Re: [gentoo-user] Memory leak
On Feb 22, 2015, at 12:53, Frank Steinmetzger war...@gmx.de wrote: On Sun, Feb 22, 2015 at 11:05:59AM +0100, Alain Didierjean wrote: My so called memory, located somewhere in what's left of my old brain. I can't remember nor figure out how to set kdm keymap to azerty. Help welcome, I set mine in an xorg config file to get qwertz not only in KDM but all of X by default: cat /etc/X11/xorg.conf.d/input.conf Section InputDevice Identifier Keyboard0 Driver kbd Option XkbRules xorg Option XkbModel pc102 Option XkbLayout de Option XkbVariantdeadkeys EndSection The right place for this in a modern X11 is evdev (event device). The other input devices are deprecated in favor of evdev. There is an old news item with regard to this in the portage. You might find it from some archive. Any how the X11 is the right place to set the keymap. Then it is set system wise and affects all display-managers you might have. -- -Matti
Re: [gentoo-user] rebuilds during emerge
On Feb 18, 2015, at 11:50, Harry Putnam rea...@newsguy.com wrote: Is there something I need to do when I see emerge -vUNDp @world like this? emerge -vuNDp @world (wrapped for mail) [snipped some 43 other pkgs] [The following line beginning with `[ebuild ...' (wrapped) is just to allow any reader to understand they are at the end of pkgs ouput] , | [ebuild U ] sys-apps/shadow-4.2.1-r1 [4.2.1] USE=cracklib nls pam | -acl -audit (-selinux) -skey -xattr LINGUAS=-cs% -da% -de% -es% | -fi% -fr% -hu% -id% -it% -ja% -ko% -pl% -pt_BR% -ru% -sv% -tr% | -zh_CN% -zh_TW% 0 KiB | | Total: 44 packages (39 upgrades, 1 in new slot, 4 reinstalls), Size of | downloads: 255789 KiB | | The following packages are causing rebuilds: | | (x11-base/xorg-server-1.17.1:0/1.17.1::gentoo, ebuild scheduled for merge) causes rebuilds for: | (x11-drivers/xf86-input-keyboard-1.8.0:0/0::gentoo, ebuild scheduled for merge) | (x11-drivers/xf86-input-evdev-2.9.1:0/0::gentoo, ebuild scheduled for merge) | (x11-drivers/xf86-video-virtualbox-4.3.20:0/0::gentoo, ebuild scheduled for merge) | (x11-drivers/xf86-input-mouse-1.9.1:0/0::gentoo, ebuild scheduled for merge) ` Do those last 5 need some special attention? No. Emerge is just letting you know that because you are updating xorg-server the following packages are rebuilt agains the new version of xorg. If you scroll up the list, you will see that x11-drivers/xf86... packages are marked with R. -- -Matti
Re: [gentoo-user] syslog-ng: how to read the log files
On Feb 17, 2015, at 20:26, lee l...@yagibdah.de wrote: Hi, how do you read the log files when using syslog-ng? The log file seem to be some sort of binary that doesn't display too well in less, and there doesn't seem to be any way to read them. This was discussed earlier on this list... Actually what syslog-ng produces is plain text. There seemed to be a bug that creates some binary (i.e. unreadable characters) and that causes less to consider files to be binary and show them incorrectly. To work around you can use -r flag with less, or replace/remove unreadable chars from log, or delete the log file. -- -Matti
Re: [gentoo-user] alternative to dvbcut
On Jan 10, 2015, at 20:38, lee l...@yagibdah.de wrote: Hi, since dvbcut isn't available in Gentoo and doesn't compile either, what's the alternative? Well I would use ffmpeg. Dvbcut is just a frontend for ffmpeg. Ffmpeg is a true swiss army knife for any video manipulation... You can do almost anything with it. Stream selection cutting is really easy with ffmpeg: ffmpeg -i stream.ts -acodec copy -scodec copy -vcodec copy -ss 60 -t 120 output.mkv You can use -map to select desired stream. This kind of multiplexing is really fast! -- -Matti
[gentoo-user] VM running windows as a guest
Hi I am new to virtualization and would like to receive few notes on things before starting. I clearly see that a lot of you guys are quite pro's with that. I would like to run gentoo and windows on my workstation at the same time so that i could get rid of rebooting my system when switching. Ideal solution would be to have X-windows in vt7 and windows 7 in vt8. Is that possible? Based on what i have learned i think my best solution is to run gentoo as host using KVM and qemu for the windows guest. I have the windows installed on my hard-drive. Can I use that image for the guest if I run it in HVM mode? To run serious applications in windows I probably need paravirtualization. Can I modify the old windows image or is it better to begin with a fresh install to get virtio drivers to the windows? Here just few thoughts that i have in mind... -- Matti
Re: [gentoo-user] another old box to update
On Jan 7, 2015, at 14:47, Alan McKinnon alan.mckin...@gmail.com wrote: On 07/01/2015 13:52, Stefan G. Weichinger wrote: I am in the process of upgrading an old (~2010) gentoo server. The customer never wanted updates ... and now he wants ... *sigh* Don't waste your time (you are already experiencing the full reason why). Backup data and configs, reinstall Gentoo, restore data and configs. I had a similar challenge. But it is quite easy to overcome. After the backups just untar the latest stage3 to your root filesystem. Then sync portage and emerge world with a empty tree and keep-going flags. It should get it done mostly. Few packages might fail to merge, but after the world update the list should be fairly short and manageable. You might need to emerge -C few packages, but it's ok. After the system is up-to date restore your backups. -- -Matti
Re: [gentoo-user] ceph on gentoo?
On Dec 26, 2014, at 10:15, Stefan G. Weichinger li...@xunil.at wrote: Am 26.12.2014 um 09:11 schrieb Dale: I didn't get any here either. Unless Gmail filtered it which should be disabled. me = 3rd one not getting them. Without gmail (but other antispam-measures ...). +1
Re: [gentoo-user] Getting rid of gcc-4.7.3...how?
On Dec 20, 2014, at 17:56, meino.cra...@gmx.de wrote: Dale rdalek1...@gmail.com [14-12-20 02:47]: meino.cra...@gmx.de wrote: Dale rdalek1...@gmail.com [14-12-19 17:08]: Mick wrote: Meino, to avoid misunderstandings: 1. Emerge the new gcc package. 2. Use gcc-config to change to the new gcc version. 3. Run 'env-update source /etc/profile'. 4. Run fix_libtool_files.sh, although I would think that this is redundant these days. 5. Unmerge the old gcc version. I don't recall ever running fix_libtool_files.sh after switching gcc versions. Usually when I see a gcc upgrade, I emerge it, switch to it and the usual profile thing, run emerge -e world JUST to be safe, then unmerge the old gcc. That's all I usually do here. I have skipped the emerge -e world a time or two. Am I just lucky, not likely as some may know, or does emerge -e world catch it or what? Now I'm curious. Dale :-) :-) Hi Dale, I started compiling the new gcc this morning about ~7:00 AM...just a few minutes ago stage3 finishes. Now ... before doing anything else... I am makeing a backup of all that, so...if anything fails...I am able to reinstall the status quo. I will keep you informed, what happens to my little embedded system... Best Meino That's the thing about slow systems, you want to do it right the first time because it takes to much time to repeat something. Heck, I have a 4 core AMD CPU with 16GBs of ram here and I still would rather do it right the first time. If you have something slow that takes days to do something, you really want plan A to work. I'm also wondering if there have been changes to emerge that could make a difference. I run the latest unstable non * version. I sorta like having all the new improvements. I'm just not sure if that affects the issue here is all. Dale :-) :-) Hi, after a few more non-booting-systems and backup-reinstalls I think I know whats the reason is...but by I dont know how to get out of it: The system becomes inaccessible if I do an env-update and reboot. Reason for that are binaries, in which the path to the old gcc is hardcoded. With the sdcard mounted I checked that with my PC: I did a grep -r '\/usr\/lib\/gcc\/armv7a-hardfloat-linux-gnueabi\/4.7.3' on ALL files of the sdcard and found thousands of hardcoded links to the old gcc inside binaries... The new gcc installed but not doing env-update implies that any further compilation will link to the old gcc. Doing env-update implies a system which will not survive the next reboot. What now? If i understand your situation correctly, do: gcc-config to set the new version env-update logout login emerge --deep --update world emerge --depclean revdep-rebuild This will take a long time but will get your system working again. If you don't wan't to do that you can of course tweak the libraries with binary tools. That is easy if you know what you are doing. To prevent this in the future always before world update, update gcc and glibc first if tere is a new version available. Gcc-config is crusial after you have installed a bew version of gcc. -- -Matti
Re: [gentoo-user] Getting rid of gcc-4.7.3...how?
On Dec 20, 2014, at 21:04, meino.cra...@gmx.de wrote: Hi Matti, not exactly... The sequence you show looks like this in my case: gcc-config to set the new version env-update reboot logina attempt: impossible...system does not respond anymore Did I miss something or why do you reboot in that phase? -- -Matti
Re: [gentoo-user] How to install a pkg without all dependencies?
On Dec 18, 2014, at 20:18, Harry Putnam rea...@newsguy.com wrote: I installed emacs outside portage from bzr sources. I'd sooner track emacs development my way. I vaguely remember some way to tell portage about that... but not enough to do it... As Poison instructed: package.provided or then get emacs-.ebuild that uses the bzr and installs straight from emacs trunk. You can easily find one or write your own ebuild. It's really straight forward. -- -Matti
Re: [gentoo-user] virtual/emacs-24
On Dec 19, 2014, at 2:06, Harry Putnam rea...@newsguy.com wrote: Can anyone say what that package actually does? virtual/emacs-24 installs a directory emacs-24 under /var/db/virtual/ and it takes around 10sec. This dir is only used by portage to figure out what you have in your system. Run: equery g --depth=2 emacs-w3m And you'll probably understand better what virtuals do. -- -Matti
Re: [gentoo-user] convert VOB to ISO
On Dec 17, 2014, at 9:57, Joseph syscon...@gmail.com wrote: How to convert VOB to ISO? I want to burn it to DVD I'm using XFCE and was looking for a GUI application but I can not find one, I've tired DeVeDe but it didn't work. What you need is DVD-author. These are rare now a days. Here is a list: http://en.m.wikipedia.org/wiki/List_of_DVD_authoring_applications I've been using Q DVD Author successfully for few times in 2011, but DVD-authoring wasn't at least back then fully automatic stuff. And also dvd's are becoming obsolete. You just create the menu structure and then the authoring program produces iso-image (videots.ifo/vts_0-0.vob). The 'DVD-language' kind of primitive (qbasic/any script). -- -Matti
Re: [gentoo-user] Laptop Overheat
On Dec 17, 2014, at 8:37, Stefan G. Weichinger li...@xunil.at wrote: When I compile bigger packages on my small ThinkPad X220 I sometimes put it into the fridge ;-) This effectively cools it down rather quickly ... and I ssh in via wifi. Not to be tried at home ;-) This is hilarious ;D -- -Matti
Re: [gentoo-user] Laptop Overheat
On Dec 17, 2014, at 12:56, Dale rdalek1...@gmail.com wrote: Alan McKinnon wrote: On 17/12/2014 11:03, Dale wrote: Stefan G. Weichinger wrote: Am 17.12.2014 um 07:33 schrieb J. Roeleveld: Try cleaning the vents. Also, most couches have a tendency to compress when something like a laptop is on it. Effectively blocking all airflow. If the temperature goes to 99C when on top of a table, return the laptop to the shop as it is clearly not working properly. When I compile bigger packages on my small ThinkPad X220 I sometimes put it into the fridge ;-) This effectively cools it down rather quickly ... and I ssh in via wifi. Not to be tried at home ;-) You don't have a fridge at home? ROFL Sorry, I couldn't pass that one up. ;-) At one time, I thought about putting a rig that ran sorta warm in my freezer. So you trade heat damage for water damage? Hm, I'd be thinking it's time for new computer that DoesCoolingRight(tm) It was a hand me down. Since everything in there is well below freezing, it shouldn't get water damage. Now when I take it out of the freezer, that could get interesting and cause the issue you are raising which is why I never did it either. Because the temperature of the laptop in the freezer will always be above dew point it will never get wet. When you take it out though it's temperature will most likely be below dew point of the ambient air so water will condensate unless the access of water is blocked by a plastic bag for example. -- -Matti
Re: [gentoo-user] question/feature request: First fetch, then compile...
On Dec 17, 2014, at 14:13, Neil Bothwick n...@digimed.co.uk wrote: On Wed, 17 Dec 2014 10:52:44 +0100, meino.cra...@gmx.de wrote: Yes, thats it: First download all stuff THEN start compiling. If I were you, I would setup your pc to do cross-compiling of your arietta's packages and build them into binpkg's. This could be all stored on the pc and accessed via nfs for example. Then the first dependency calculation would be done on the pc to build the packages and the second on arietta using only binary packages. You should keep /etc/portage, /var/lib/portage and /usr/portage on the PC and not modifiable from the arietta. This way you only need to install the run time dependencies to the aritte. And install from bin pkg is really fast. Another alternative would be to use a USB to ethernet adaptor on the embedded board and connect it directory to your router. This also sounds good. Or setup server which has the usb and is always on. -- -Matti
Re: [gentoo-user] [half OT] WLAN totally beginners question
On Dec 7, 2014, at 21:10, meino.cra...@gmx.de wrote: Hi, I am just starting to do the first steps in configuring WLAN. The problem is: This topic seems to be rich of terms, which I dont know yet how to evaluate: AP, WAP, WEP, FSK...and dozens more. Since my use case is very limited I want to configure just that without being urged to achieve my master degree of WLANism after studying everything this topic consists of only to recognize that I only need to know about...say...2% of it. Background: I have two little Linux boards (Arietta G25) with a RT5370 Wireless Adapter each. I want to make both able to communicate with each other beside being able to use the ethernet-over-USB connection to enable the communication with/to my PC Usually it's better to answer to question and not challenge the original goals of the poster. Despite of that I want to ask why you need WiFi? Why not just route the traffic from one arietta to the other through the usb? Arietta A eth0 - usb - pc - usb - Arietta B eth0 A lot easier setup. Nothing extra needed. Just route command on PC!? -- -Matti
Re: [gentoo-user] samba and window 7 NTFS
On Dec 4, 2014, at 22:21, Neil Bothwick n...@digimed.co.uk wrote: On Thu, 04 Dec 2014 19:15:07 +, thegeezer wrote: In order to format the USB stick to NTFS I need this option in kernel as well, am I correct? yes You're probably better off not using the in-kernel NTFS and using ntfs-3g instead, which also includes mkfs.ntfs. You can't format a filesystem with just a kernel driver. Same opinoin here. The in-kernel driver is only good for reading files and directories. If anything else is needed use ntfs3g. -- -Matti
Re: [gentoo-user] Shutdown, Gentoo and the Arietta.G25
On Dec 1, 2014, at 23:03, Fernando Rodriguez frodriguez.develo...@outlook.com wrote: On Monday, December 01, 2014 7:34:35 PM meino.cra...@gmx.de wrote: Dale rdalek1...@gmail.com [14-12-01 19:16]: meino.cra...@gmx.de wrote: Hi, another sigh from an Arietta adventure... I sintalled Gentoo on an Arietta G25 (http://www.acmesystems.it/arietta). For this I used Robert Nelsons Kernel for armv5tel platforms, which boots fine (using at91bootstrap, no U-Boot). But: Shutdown (as recommmended by acmesystems shutdown -h -H now) REBOOTS the system instead of powering it down. The hardware is not to blame: Using the original Debian rootfs and the kernel 3.16.1 (Robert Nelsons kernel is 3.17.3.) the powerdown works fine. Firstly I blamed the kernel...but when using the 3.16.1 kernel and the Gentoo rootfs the problem remains. Then I copied the Gentoo shutdown to the Debian rootfs, boot that and tries to shutdown the Debian Linux with it. shutdown cries no /dev/initctl adn shutdowns the system only for rebooting it. Ok...seems to be the shutdown executable. I copied the Debian shutdown to Gentoo and tries that: The systems reboots. Slowly but surely I begin to think, that I dont understand anything at all of It would be relly good news, that... man shutdown on the Debian image informs me, that the manpages were not installed (embedded system...). Shutdown --version gives a short help of the usual options...but nothing more. What is the difference here? Isn't it, that all shutdown applications only send some instructions to the kernel and the kernel is the main actor in bringing the system down? Is there any shutdown guru ;) out there, who is able to shed some light into this problem ? :) Thank you very much in advance for any torch send into my direction! Best regards, Meino Just shooting in the dark here, try -h and -H but not at the same time? Maybe having both is clashing in some weird way??? Dale :-) :-) Hi Dale, The Trouble shooting FAQ*) by acmesystems explicitely say shutdown -h -H now (and it works with the Debian rootfs)...but I will try the other shutdowns and will see, what happens, Best regards, Meino *) http://www.acmesystems.it/qa Looking at the code for sysvinit, all shutdown does is set some environment variables and switch runlevel. The actual shutdown is done by halt and it's done through the reboot system call with RB_POWER_OFF. So, since you said the Gentoo system doesn't work even with Debian's kernel and the shutdown, then it must be that either Debian has a different halt, or more likely your Gentoo system calls halt with different options. So check your inittab on Gentoo and make sure it calls halt in the same way. Hi meino The thing is as Fernando pointed out: Kernel powers off the hardware and a system call is used to instruct kernel to do so. Test your system. Perform a system call to shutdown the board. As you perform this system call the arietta will instantly eighter boot or shutdown. See system call man page to see the list of available system calls. This way you can make sure the system works as expected... When you have found the right system call, then you need to make init call that system call as the last command in run level 0. -- -Matti
Re: [gentoo-user] headphone does not work in windows After logging to linux
On Nov 21, 2014, at 17:37, behrouz khosravi bz.khosr...@gmail.com wrote: On Nov 21, 2014 6:50 PM, Ivan T. Ivanov iiva...@mm-sol.com wrote: On Fri, 2014-11-21 at 18:38 +0330, behrouz khosravi wrote: Well I have no problem with it in linux. It always works in linux but I think there is a problem with alsa or some other linux related part. Because I have enabled the after post sound in bios. When I power in on the headphone work. Then I login to linux and when I reboot to login to windows, the bios post sound does not come from headphone. So the question is about BIOS beep after some sort of self test, and not the audio in general? Out of curiosity. Once it is working, is it still work if you reboot several(2) times to Windows? Ivan Actually I wanted to point out that something is happening in linux and the windows is a victim this time! Booting several times into windows is ok and no sign of that problem. With those symptoms you can not tell which element is not following the spec. Problem can be within linux driver, windows driver, card firmware or in bios. -- -Matti
Re: [gentoo-user] headphone does not work in windows After logging to linux
On Nov 21, 2014, at 14:08, behrouz khosravi bz.khosr...@gmail.com wrote: Hi. My problem is that when I log off from gentoo and login to windows, my headphone does not work in windows. Has anyone encountered the same problem? Do you reboot in the between or are you running somekind of virtual machine? Usb headphones or what? What sound driver? I've had problems with NIC between reboots. They were cleared by removing power cord for multiple minutes while rebooting. I got rid of the problem when i updated NIC's driver (bug in driver). -- -Matti
Re: [gentoo-user] headphone does not work in windows After logging to linux
On Nov 21, 2014, at 16:15, behrouz khosravi bz.khosr...@gmail.com wrote: Do you reboot in the between or are you running somekind of virtual machine? Usb headphones or what? What sound driver? I've had problems with NIC between reboots. They were cleared by removing power cord for multiple minutes while rebooting. I got rid of the problem when i updated NIC's driver (bug in driver). -- -Matti No. It happen every time I boot into linux. Gentoo or Arch. removing power helps but is annoying. its not usb, but I dont know what is called! the ordinary type! Its a realtek chip . The bug that you mentioned is related to linux driver or windows driver? I have realtek R6168/6111/6169 NIC. It works in Linux with realtek's driver not with the one included in kernel. Windows fails to initialize the NIC properly when I reboot from linux to windows. When NIC is reset by recycling power windows will be able to initialize it. Downgrading windows (7 64bit) dirver to an ancient one fixed the problem. The up-to-date realtek driver didn't work correctly. lspci -v You can check what driver kernel uses for you audio. Also the bug can be in alsa. The ways of alsa quite complicated... You are using alsa right? What error message does alsa give when you try to play audio?
Re: [gentoo-user] question about binhost's
On Nov 17, 2014, at 23:46, Alan McKinnon alan.mckin...@gmail.com wrote: On 17/11/2014 23:32, thegeezer wrote: On 17/11/14 21:01, Michael Mair-Keimberger wrote: Hi list, I was setting up an binhost recently and i couldn't found any information how to keep old builds. Usually, for example a newer version of tcpdump gets build, the old build will be deleted. Only different slots were keeped. However, I want to keep these old builds but I haven't found an option for that. Is it even possible to keep these? If not, anyone know why? if it's not possible there must be a reason and i couldn't think of anyone... um, these _are_ kept until you run # eclean packages unless i'm missing something ? No, you're not missing something. The OP seems to be non-English-first- language and the question is poorly worded to a native speaker. He's saying that emerge overwrites the previous installed version when it rebuilds a package and he wants to keep it. The solution to that is binpkgs. You are talking about what happens to binpkg you already have, he is asking how to get binpkgs in the first place You also have a tool called 'quickpkg'. With that you can make binpkgs out of packages already installed on your system without recompiling. This might be a good tool for you if you have not made them in the first place. so you can still emerge -K old-apps/package for an example, in my /usr/portage/packages/app-shells on my laptop i have # ls -lah total 6.8M drwx-- 2 root root 4.0K Oct 14 21:02 . drwx-- 76 root root 4.0K Nov 17 10:51 .. -rw--- 1 root root 1.2M Sep 5 10:43 bash-4.2_p45.tbz2 -rw-r--r-- 1 root root 1.2M Sep 26 20:52 bash-4.2_p48-r1.tbz2 -rw-r--r-- 1 root root 1.2M Oct 1 14:33 bash-4.2_p50.tbz2 -rw-r--r-- 1 root root 1.2M Oct 2 22:22 bash-4.2_p51.tbz2 -rw-r--r-- 1 root root 1.2M Oct 6 10:09 bash-4.2_p52.tbz2 -rw-r--r-- 1 root root 1.2M Oct 9 23:50 bash-4.2_p53.tbz2 -rw-r--r-- 1 root root 8.4K Oct 14 21:02 push-1.6.tbz2 -- -Matti
[gentoo-user] Bounces on gentoo-user
Hi Are any of you guys getting bounces from list? Does it mean that my message didn't go to the list? Or it didn't go to one of the recipients on the list? Or is this some other error? I've getting these every once in a while for few weeks now. Any actions required? Below you'll find the bounced message attached. -- Matti Begin forwarded message: From: gentoo-user+bounces-159671-matti.nykyri=iki...@lists.gentoo.org Date: November 4, 2014 at 13:36:34 GMT+2 To: undisclosed-recipients:; This message has no content.
Re: [gentoo-user] using python 2.7
On Nov 5, 2014, at 2:01, Dale rdalek1...@gmail.com wrote: Paige Thompson wrote: Sorry for the dumb message, I figured out how to use eselect python (the syntax is a little weird and not very well documented.) This fixed my issue as near as I can tell. For future reference, make sure nothing depends on whatever version of python you want to remove before you remove it. If you don't, it could get very interesting in a really bad way. Python is one of those packages that you have to watch out for gotchas on. It sometimes comes back and bites you. Luckily it is not poisonous :) -- -Matti
Re: [gentoo-user] Re: OT Best way to compress files with digits
On Nov 1, 2014, at 23:56, David W Noon dwn...@ntlworld.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sat, 01 Nov 2014 22:47:15 +0200, Alan Mckinnon (alan.mckin...@gmail.com) wrote about Re: [gentoo-user] Re: OT Best way to compress files with digits (in 545546d3.3030...@gmail.com): On 01/11/2014 19:59, meino.cra...@gmx.de wrote: [snip] Ah! By the way...I was astonished to read, that the digits of PI are called random on the one hand and on the other hand there is a formula [1] to calculate a certain digit of PI without calculation of the previous digits... Calculated random? Are nature constants the purest form of PRNGs ??? ;) (Quantum physics is everywhere... ;;)) [1]: http://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula The sequence of digits that make up pi are a random sequence - you can analyze the order any way you want and you'll find no inherent pattern. Actually, the sequence of digits is most definitely *not* random. If the sequence of digits is written any other way then the value is not Pi. Hence the sequence is unique, not random. I think what you are grasping for is that the frequency of distinct digits tends to be uniform: 0's occur as often as 1's as often ... as 9's. Note that the as often as operator is really approximate for finite sub-sequences, but is asymptotically accurate. Moreover, this is the same in any number base: the binary representation has 0's occurring as often as 1's; the ternary representation has 0's occurring as often as 1' and as often as 2's; etc., etc. Such numbers are called normal. It was a poor choice of name, but we are stuck with it. I would have called them digit soup numbers - -- an oblique reference to alphabet soup. Well all the digit of pi can be compressed to the following: =pi(); If you have the infinite series that calculates the digits :) However, any given digit in the sequence is 100% predictable, as you just showed :-) Randomness has got to be the second most mind-boggling thing out there, first being quantumness (that's not a waord, I just made it up. You you should get the meaning OK from context ;-) ) I would say that probability theory is more mind boggling, as it underpins much of quantum theory. But, as someone who majored in probability theory, I might be biased. [Incidentally, there is a small statistical joke in that last sentence.] Getting back to Meino's original request, one of the optimum compression algorithms for this would be custom Huffman encoding. To do this the algorithm requires that all the data (i.e. digits) be read and a frequency table built. The only problem is that to read all the digits of Pi could take rather a long time. ... :-) That would take infinite time :) - -- Regards, Dave [RLU #314465] *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* dwn...@ntlworld.com (David W Noon) *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -BEGIN PGP SIGNATURE- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlRVVyQACgkQRQ2Fs59Psv/9qwCeKwuLz/7RGEV06X+RdDQryDe+ /xwAoK1qMgb9RZXkQByBUMqB8eqs20bG =XUPB -END PGP SIGNATURE-
Re: [gentoo-user] etiquette for stabilization request
On Nov 2, 2014, at 17:10, gottl...@nyu.edu wrote: I am running firefox-24.8.0, which is highest stable (highest testing is 33.0). Several sites, in particular mail.google.com, report that This version of Firefox is no longer supported. Please upgrade to a supported browser. Does that warrant a stabilization request. I have never filed one before and do not have a feeling of what is considered justification. I should add that other than generating the above complaints, firefox is working fine (including with mail.google.com). You could also run roundcube etc to circumvent the problem. Also then google wouldn't read all your mails :) -- -Matti
Re: [gentoo-user] Re: OT Best way to compress files with digits
On Nov 1, 2014, at 19:26, Alan McKinnon alan.mckin...@gmail.com wrote: On 01/11/2014 19:15, James wrote: meino.cramer at gmx.de writes: I have a lot of files with digits of PI. The digits are the characters of 0-9. Currently they are ZIPped, which I think is not the best way to do that. Hello Meino, It's a bit of effort, but the world's recognized authority on algorithms is Don Knuth. [1] He's old now, but his pioneering attempt at categorizing most algorithms: The art of computer programming and his MMIX alogrithm implementations (kinda like assembler) are certainly part of many first-step research efforts on algorithms and their implementations. It's not a cookbook; more of a scholarly (high_brow) reference, just to supplement all the good postings by your peers on gentoo user. Alan may loan you his copy? (ha ha ha)? hth, James [1] http://www-cs-faculty.stanford.edu/~uno/ ha ha, fat chance :-) When Alan does eventually get his hands on his very own personal copy[1], it will be lent to nobody. There are just some things a man never lends out: his bike, his firearm, his wife. And Knuth :-) Why not lend your wife? ;) Back on topic: You're 100% right - to learn about algorithms in general, Knuth is the man. Essential reading for anyone taking CS seriously -- Alan McKinnon alan.mckin...@gmail.com
Re: [gentoo-user] alternative kernels
On Oct 27, 2014, at 3:54, waben...@gmail.com wrote: Am Sonntag, 26.10.2014 um 21:35 schrieb Alec Ten Harmsel a...@alectenharmsel.com: On 10/26/2014 07:41 PM, Canek Peláez Valdés wrote: Keep it up, my dear Volker. You are really good for a few laughs. No. Neither of you should keep it up. You made a small comment about systemd being so fast that rebooting doesn't matter. I tried to downplay that by stating that my laptop is so old it doesn't matter, trying to steer the discussion away from systemd. Nonetheless, a systemd flame war was started anyways. I have not been on this mailing list for long, and I'm far from a long-time user of Gentoo, but both of you guys need to give it a rest. I'm extremely tired of it. I'm one of the youngest users on this list; if anyone is flaming, it should be me - the young still-in-college hotshot who thinks he knows everything. Alec +1 +1
Re: [gentoo-user] Re: An alternative keyboard layout is lost
On Oct 18, 2014, at 21:04, Gevisz gev...@gmail.com wrote: On Sat, 18 Oct 2014 13:10:15 +0300 gevisz gev...@gmail.com wrote: I have found out that my problem with xfce4 keyboard plugin reduces to the fact that now I cannot choose Russian Winkeys alternative keyboard: there is no such option in the corresponding keyboard layout settings. So, I have to choose Osetinian Winkeys alternative keyboard as it is appears to be the next best choice: only one extra unnecessary letter ӕ in place of э and the letter э is set in another easy to remember position. Oh, no. I was wrong! Because, in the Osetinian Winkeys keyboard layout, I cannot find letter ё. And this issue significantly slows down my work! But everything worked perfect before emerging xfce4-weather-plugin with patches and libidn! Well you should configure keyboard layouts through evdev. If you update xorg-server you will need to remerge x11-drivers. So configure evdev as suggested by previous emails and then remerge x11-drivers. -- -M
Re: [gentoo-user] Headless question: Harvesting the results...software needed.
On Oct 1, 2014, at 5:54, meino.cra...@gmx.de wrote: Matti Nykyri matti.nyk...@iki.fi [14-10-01 00:26]: On Tue, Sep 30, 2014 at 08:12:38PM +0200, meino.cra...@gmx.de wrote: Matti Nykyri matti.nyk...@iki.fi [14-09-30 19:44]: On Sep 30, 2014, at 17:12, Alec Ten Harmsel a...@alectenharmsel.com wrote: On 09/30/2014 10:05 AM, meino.cra...@gmx.de wrote: Suppose the GPS would already be attached to the board and works... Is there any free available software and data for strict offline useage (which does NOT calls to home), which is able to map GPS data to a street/land map? I need both: The maps themselves and the logic to read GPS coordinates and map movements and ways to those maps. Is something like that available for free or should I directly ask the NSA/CIA/FBI/...? Thank you very much in advance for any help! Best regards, mcc The only project I know of that has openly available map data is OpenStreetMap (openstreetmap.org). I know they have an API, and they probably (not sure) have maps available for download. afaik the only way to combine various map data out of the box is to use a GIS package like QGIS. You can write software to do this using the proj4 library for an embedded box, not sure if anything for your specific use case already exists and is open source. Alec Sorry iphone send mail even if you don't wanna :/ What you are considering doing is quite a challenge. What kind of coordinates does your gps module give you? The gps system works with cartesian x y z coordinates. Then these are usually displayed to the user in WGS-84. This is a quite hard mathematical problem (differential elliptical problem). Usually is done by your gps receiver and is approximated. GIS libraries have these functions built inside. Distances are easier and faster to calculate in cartesian coordinates. You need to calculate distance because coordinates from gps will never coincide with any address. Open street maps provides a very good start, but addresses have great differences in different countries. For example google misses addresses quite much depending on where you are searching. Getting the address right requires good locality from the program. Addresses and roads are vector maps. The fastest way to get address is to have the vector map of the world and then calculate distance to the closest address. The database will be huge :) Maps are usually raster pictures which have some projection. When you display them you can use 3d or 2d visual. In 3d (like google earth) you draw a sphere (or oblate spheroid) and draw textures on top of is to the right coordinates. In 3d everything needs to be converted to cartesian coordinates. Or in 2d you decide a projection and then convert the projection of your maps to this projection. After that it is just easy drawing. GIS libraries contain all the needed tools for these operations. There are a few of them with open source license. I have been doing some work with opengl 3d drawing maps. Good luck your project is quite big but it is sure very much fun :) -- -Matti YEAH! Matti is back! I saw your previous mail and thought: Oh boy...Clint Eastwood is very talkative compared to /him/. ;;;))) Trashed the phone... and now back to the good old fashion terminal connection. I am not /that/ serious this evening...sorry... With all the help from this forum this evening I got by far more working results as I have thought... But back to your mail: The GPS module I plan to use is this one (by Adafruit, Lady Ada): https://learn.adafruit.com/adafruit-ultimate-gps/overview From there (see link list on the left) you can also download the manuals (pdf). Nice... MicroTek chipset. Quite easy to use. I will not use this thing as a driving assistant or navi (is this common speaking outside germany also...or is it one of those pseudo english german words like handy for cell phone...dont laugh! This time /I am/ serious! :) ) Its more like a GPS data logger. I plan to copy the gathered data on my PC later and I will try to draw them onto a map. May be the results proof later, that I am able to walk through walls and hovering over the face of the waters...;) Ok. This is easy... You just need some maps... openstreetmaps are good for that. From the MT3339 you get NMEA messages and WGS-84 coordinates. I would suggest displaying your results in 2D. For germany Lambert conformal conic projection is good choice. In this projection all angles are true and sreight lines are great circle routes. Just convert the maps to this projection and convert your coordinates to Lambert false easting and false northing and you will have cartesian coordinates that are easy to draw. Even excel is able to draw this in real time :) I don't see where you need the address resolution. May be the UV-mappinga abillity of this 3D renderig program will help -- I am using
Re: [gentoo-user] Headless question: Harvesting the results...software needed.
On Oct 1, 2014, at 16:40, meino.cra...@gmx.de wrote: Mick michaelkintz...@gmail.com [14-10-01 15:34]: On Wednesday 01 Oct 2014 14:26:33 meino.cra...@gmx.de wrote: After 24 h my DSL line is forced to disconnect by the provider and the download fails. Grrmmmpppfff... Will wget -c URL work in this case? -- Regards, Mick Hi Mick, yesno... ;) or it depends... There is anoter problem...the data files will be updated each day as far as I understand that... So you get two parts of data which will or will not fit together. Nice :)
Re: [gentoo-user] Headless question: Harvesting the results...software needed.
On Sep 30, 2014, at 17:12, Alec Ten Harmsel a...@alectenharmsel.com wrote: On 09/30/2014 10:05 AM, meino.cra...@gmx.de wrote: Suppose the GPS would already be attached to the board and works... Is there any free available software and data for strict offline useage (which does NOT calls to home), which is able to map GPS data to a street/land map? I need both: The maps themselves and the logic to read GPS coordinates and map movements and ways to those maps. Is something like that available for free or should I directly ask the NSA/CIA/FBI/...? Thank you very much in advance for any help! Best regards, mcc The only project I know of that has openly available map data is OpenStreetMap (openstreetmap.org). I know they have an API, and they probably (not sure) have maps available for download. afaik the only way to combine various map data out of the box is to use a GIS package like QGIS. You can write software to do this using the proj4 library for an embedded box, not sure if anything for your specific use case already exists and is open source. Alec
Re: [gentoo-user] Headless question: Harvesting the results...software needed.
On Sep 30, 2014, at 17:12, Alec Ten Harmsel a...@alectenharmsel.com wrote: On 09/30/2014 10:05 AM, meino.cra...@gmx.de wrote: Suppose the GPS would already be attached to the board and works... Is there any free available software and data for strict offline useage (which does NOT calls to home), which is able to map GPS data to a street/land map? I need both: The maps themselves and the logic to read GPS coordinates and map movements and ways to those maps. Is something like that available for free or should I directly ask the NSA/CIA/FBI/...? Thank you very much in advance for any help! Best regards, mcc The only project I know of that has openly available map data is OpenStreetMap (openstreetmap.org). I know they have an API, and they probably (not sure) have maps available for download. afaik the only way to combine various map data out of the box is to use a GIS package like QGIS. You can write software to do this using the proj4 library for an embedded box, not sure if anything for your specific use case already exists and is open source. Alec Sorry iphone send mail even if you don't wanna :/ What you are considering doing is quite a challenge. What kind of coordinates does your gps module give you? The gps system works with cartesian x y z coordinates. Then these are usually displayed to the user in WGS-84. This is a quite hard mathematical problem (differential elliptical problem). Usually is done by your gps receiver and is approximated. GIS libraries have these functions built inside. Distances are easier and faster to calculate in cartesian coordinates. You need to calculate distance because coordinates from gps will never coincide with any address. Open street maps provides a very good start, but addresses have great differences in different countries. For example google misses addresses quite much depending on where you are searching. Getting the address right requires good locality from the program. Addresses and roads are vector maps. The fastest way to get address is to have the vector map of the world and then calculate distance to the closest address. The database will be huge :) Maps are usually raster pictures which have some projection. When you display them you can use 3d or 2d visual. In 3d (like google earth) you draw a sphere (or oblate spheroid) and draw textures on top of is to the right coordinates. In 3d everything needs to be converted to cartesian coordinates. Or in 2d you decide a projection and then convert the projection of your maps to this projection. After that it is just easy drawing. GIS libraries contain all the needed tools for these operations. There are a few of them with open source license. I have been doing some work with opengl 3d drawing maps. Good luck your project is quite big but it is sure very much fun :) -- -Matti
Re: [gentoo-user] Headless question: Harvesting the results...software needed.
On Sep 30, 2014, at 20:36, J. Roeleveld jo...@antarean.org wrote: On 30 September 2014 16:12:31 CEST, Alec Ten Harmsel a...@alectenharmsel.com wrote: On 09/30/2014 10:05 AM, meino.cra...@gmx.de wrote: Suppose the GPS would already be attached to the board and works... Is there any free available software and data for strict offline useage (which does NOT calls to home), which is able to map GPS data to a street/land map? I need both: The maps themselves and the logic to read GPS coordinates and map movements and ways to those maps. Is something like that available for free or should I directly ask the NSA/CIA/FBI/...? Thank you very much in advance for any help! Best regards, mcc The only project I know of that has openly available map data is OpenStreetMap (openstreetmap.org). I know they have an API, and they probably (not sure) have maps available for download. afaik the only way to combine various map data out of the box is to use a GIS package like QGIS. You can write software to do this using the proj4 library for an embedded box, not sure if anything for your specific use case already exists and is open source. Alec Openstreetmap is a good bet. You might also have some luck if you look into PostGIS. It is an extension to postgresql, which might be overkill, but you might be able to use that in yiur Google searches. If borders would be nice and straight, it would be easy. Unfortunately they are not. Yes. For example the land border of Finland is around 2000 km long and only it contains 52000 coordinates ;) -- -Matti
Re: [gentoo-user] Headless question: Harvesting the results...software needed.
On Tue, Sep 30, 2014 at 08:12:38PM +0200, meino.cra...@gmx.de wrote: Matti Nykyri matti.nyk...@iki.fi [14-09-30 19:44]: On Sep 30, 2014, at 17:12, Alec Ten Harmsel a...@alectenharmsel.com wrote: On 09/30/2014 10:05 AM, meino.cra...@gmx.de wrote: Suppose the GPS would already be attached to the board and works... Is there any free available software and data for strict offline useage (which does NOT calls to home), which is able to map GPS data to a street/land map? I need both: The maps themselves and the logic to read GPS coordinates and map movements and ways to those maps. Is something like that available for free or should I directly ask the NSA/CIA/FBI/...? Thank you very much in advance for any help! Best regards, mcc The only project I know of that has openly available map data is OpenStreetMap (openstreetmap.org). I know they have an API, and they probably (not sure) have maps available for download. afaik the only way to combine various map data out of the box is to use a GIS package like QGIS. You can write software to do this using the proj4 library for an embedded box, not sure if anything for your specific use case already exists and is open source. Alec Sorry iphone send mail even if you don't wanna :/ What you are considering doing is quite a challenge. What kind of coordinates does your gps module give you? The gps system works with cartesian x y z coordinates. Then these are usually displayed to the user in WGS-84. This is a quite hard mathematical problem (differential elliptical problem). Usually is done by your gps receiver and is approximated. GIS libraries have these functions built inside. Distances are easier and faster to calculate in cartesian coordinates. You need to calculate distance because coordinates from gps will never coincide with any address. Open street maps provides a very good start, but addresses have great differences in different countries. For example google misses addresses quite much depending on where you are searching. Getting the address right requires good locality from the program. Addresses and roads are vector maps. The fastest way to get address is to have the vector map of the world and then calculate distance to the closest address. The database will be huge :) Maps are usually raster pictures which have some projection. When you display them you can use 3d or 2d visual. In 3d (like google earth) you draw a sphere (or oblate spheroid) and draw textures on top of is to the right coordinates. In 3d everything needs to be converted to cartesian coordinates. Or in 2d you decide a projection and then convert the projection of your maps to this projection. After that it is just easy drawing. GIS libraries contain all the needed tools for these operations. There are a few of them with open source license. I have been doing some work with opengl 3d drawing maps. Good luck your project is quite big but it is sure very much fun :) -- -Matti YEAH! Matti is back! I saw your previous mail and thought: Oh boy...Clint Eastwood is very talkative compared to /him/. ;;;))) Trashed the phone... and now back to the good old fashion terminal connection. I am not /that/ serious this evening...sorry... With all the help from this forum this evening I got by far more working results as I have thought... But back to your mail: The GPS module I plan to use is this one (by Adafruit, Lady Ada): https://learn.adafruit.com/adafruit-ultimate-gps/overview From there (see link list on the left) you can also download the manuals (pdf). Nice... MicroTek chipset. Quite easy to use. I will not use this thing as a driving assistant or navi (is this common speaking outside germany also...or is it one of those pseudo english german words like handy for cell phone...dont laugh! This time /I am/ serious! :) ) Its more like a GPS data logger. I plan to copy the gathered data on my PC later and I will try to draw them onto a map. May be the results proof later, that I am able to walk through walls and hovering over the face of the waters...;) Ok. This is easy... You just need some maps... openstreetmaps are good for that. From the MT3339 you get NMEA messages and WGS-84 coordinates. I would suggest displaying your results in 2D. For germany Lambert conformal conic projection is good choice. In this projection all angles are true and sreight lines are great circle routes. Just convert the maps to this projection and convert your coordinates to Lambert false easting and false northing and you will have cartesian coordinates that are easy to draw. Even excel is able to draw this in real time :) I don't see where you need the address resolution. May be the UV-mappinga abillity of this 3D renderig program will help -- I am using it for other purposes
Re: [gentoo-user] making bootable USB
On Sep 2, 2014, at 8:55, Joseph syscon...@gmail.com wrote: On 09/02/14 06:36, Mick wrote: On Tuesday 02 Sep 2014 01:26:05 Joseph wrote: On 09/02/14 01:08, Neil Bothwick wrote: On Mon, 1 Sep 2014 17:42:47 -0600, Joseph wrote: I just tried usb_instal.sh script from systemrescuecd-x86-4.3.0.iso and my box boots just fine. So why do I have problem using unetbootin and generating bootable USB manually. unetbootin uses some $MAGIC that doesn't work with all ISOs. isohybrid seems to work with everything and is much simpler to use too. I just tried it as root: isohybrid install-amd64-minimal-20140828.iso dd if=/home/joseph/Downloads/install-amd64-minimal-20140828.iso of=/dev/sda bs=4096 sync And the USB still can not boot it :-/ This is rather strange. What do you see when you run fdisk -l /dev/sda *after* you have completed dd and sync as you show above? -- Regards, Mick Yes, indeed I find it very strange as well. I just re-run the dd on my faster box. dd if=/home/joseph/Downloads/install-amd64-minimal-20140828.iso of=/dev/sdb bs=4096 48640+0 records in 48640+0 records out 199229440 bytes (199 MB) copied, 318.573 s, 625 kB/s sync fdisk -l /dev/sdb Disk /dev/sdb: 960 MiB, 1006632960 bytes, 1966080 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x1047d058 DeviceBoot Start End Blocks Id System /dev/sdb1 *0389119 194560 17 Hidden HPFS/NTFS -- Joseph Hi, Just wanna say few words to clarify few things about bootstraping. If you know what you are doing, this all is very simple. What you need for a working system is a working root filesystem that contains all the scripts, modules and executables. A minimal cd contains this. You could also use stage3 tar ball. Then you need a working kernel image and possibly a initrd. There is a working kernel on minimal cd. All begins with boot loader. That loader is loaded by BIOS first. Then boot loader starts executing and loads kernel with right parameters. Kernel takes over and loads rootfs and so on. On normal disk (USB, sata, ATA, SCSI (and DVD i think)) you have a normal MBR (first 512 bytes of disk) which BIOS loads to 0x07C0 address in memory and starts executing. So just install boot loader (like grub) to the beginning of the disk and it will boot. With right commands/config you can load the kernel correctly and boot. CD is different. BIOS can't read ISO file system. For CD boot you will need to create image of a floppy-disk and install your boot loader into that image. The boot loader has to have drivers to read the real ISO file system so that it can load the kernel into memory and boot. Because of this a plain cd isoimage is unbootable although all necessary stuff is there. It is easily arranged so that it becomes a bootable USB disk. -- -Matti
Re: [gentoo-user] resolv.conf is different after every reboot
On Jul 27, 2014, at 13:33, Grand Duet grand.d...@gmail.com wrote: 2014-07-27 12:29 GMT+03:00 Neil Bothwick n...@digimed.co.uk: On Sun, 27 Jul 2014 12:21:23 +0300, Grand Duet wrote: In short: the contents of the file /etc/resolv.conf is unpredictably different from one reboot to another. It is either # Generated by net-scripts for interface lo domain mynetwork That's what you get when lo comes up. or # Generated by net-scripts for interface eth0 nameserver My.First.DNS-Server.IP nameserver My.Second.DNS-Server.IP nameserver 8.8.8.8 That's what replaces it when eth0 comes up. It looks like eth0 is not being brought up fully It sounds logical. But how can I fix it? Can carrier_timeout_eth0= setting in /etc/conf.d/net file help? If so, how much seconds should I use? what do your logs say? Could you, please, be more precise where to look for logs. It might be worth putting logger commands in preup(), postup() and failup() in conf.d/net. Currently, I have no such functions in my /etc/conf.d/net file. Shall I copy them there from /usr/share/doc/netifrc-0.2.2/net.example Could you, please, be more specific on these logger commands too. I tried to chmod this file to be unwrittable even for root but after a reboot it have been overwritten anyway. You can't stop root overwriting a file, root laughs in the face of file permissions. BTW, I'm not sure if it's still relevant, but I don't think you ever posted the contents of /etc/resolvconf.conf, if it exists. I do not have such file. Of course, if you do not mean /etc/resolv.conf But I have posted its content above. Depending on your filesystem a temporary solution to your problem is to setup /etc/resolv.conf correctly and then: chattr +i /etc/resolv.conf After that the content of the file will not change. -- -Matti
Re: [gentoo-user] resolv.conf is different after every reboot
On Jul 27, 2014, at 16:39, Grand Duet grand.d...@gmail.com wrote: 2014-07-27 16:10 GMT+03:00 Matti Nykyri matti.nyk...@iki.fi: On Jul 27, 2014, at 13:33, Grand Duet grand.d...@gmail.com wrote: 2014-07-27 12:29 GMT+03:00 Neil Bothwick n...@digimed.co.uk: On Sun, 27 Jul 2014 12:21:23 +0300, Grand Duet wrote: In short: the contents of the file /etc/resolv.conf is unpredictably different from one reboot to another. It is either # Generated by net-scripts for interface lo domain mynetwork That's what you get when lo comes up. or # Generated by net-scripts for interface eth0 nameserver My.First.DNS-Server.IP nameserver My.Second.DNS-Server.IP nameserver 8.8.8.8 That's what replaces it when eth0 comes up. It looks like eth0 is not being brought up fully It sounds logical. But how can I fix it? Can carrier_timeout_eth0= setting in /etc/conf.d/net file help? If so, how much seconds should I use? what do your logs say? Could you, please, be more precise where to look for logs. It might be worth putting logger commands in preup(), postup() and failup() in conf.d/net. Currently, I have no such functions in my /etc/conf.d/net file. Shall I copy them there from /usr/share/doc/netifrc-0.2.2/net.example Could you, please, be more specific on these logger commands too. I tried to chmod this file to be unwrittable even for root but after a reboot it have been overwritten anyway. You can't stop root overwriting a file, root laughs in the face of file permissions. BTW, I'm not sure if it's still relevant, but I don't think you ever posted the contents of /etc/resolvconf.conf, if it exists. I do not have such file. Of course, if you do not mean /etc/resolv.conf But I have posted its content above. Depending on your filesystem a temporary solution to your problem is to setup /etc/resolv.conf correctly and then: chattr +i /etc/resolv.conf After that the content of the file will not change. Thank you. I will try it if deleting the line dns_domain_lo=mynetwork from my /etc/conf.d/net file will not work. But does chattr +i differ from chmod a-w ? (The latter did not work for me. I use ext4 file system.) Yes it does. Ext-filesystem supports immutable bit which is enforced by kernel so even root can't modify the file in any way. -i unsets the bit. -- -Matti
Re: [gentoo-user] Zsh completion
On Jul 4, 2014, at 13:55, Nikita Tropin posixivis...@gmail.com wrote: Question is old enough but... Try to click Ctrl-/ to undo. Ok. Thanks. I'll try that. But still if I could disable that particular feature that would be the best option! 2014-06-08 11:41 GMT+03:00 Matti Nykyri matti.nyk...@iki.fi: Hi I use zsh and have quite perfect completion setup with it. There is just one very annoying feature that I have failed to switch off. With paths when I type this: cd /archives/NE tab zsh produces: cd /achieves2/NEW/ The archives directory does not contain NEW directory and archives2 does. I would want that zsh wouldn't modify anything but the current level path I'm writing. So in this case it should of shown empty cuz there are no options to choose from. This happens of course with any similar directory case. The annoyance is that I know where I'm going and the right NEW directory in this case is under /archives/movies/NEW and not the one under /archives2/. So I have to clear some of the text which is slow :( Would anyone know how to correct this¿? I have tried various options of approximation... Actually I don't like the approximation at all and have tried to fully disable it... -- Matti -- Regards, Nikita
Re: [gentoo-user] Re: Re: Re: OT: Mapping random numbers (PRNG)
On Sun, Jun 29, 2014 at 02:38:51PM +0200, Kai Krakow wrote: Matti Nykyri matti.nyk...@iki.fi schrieb: That is why the possibility for 0 and 1 (after modulo 62) is twice as large compared to all other values (2-61). Ah, now I get it. By definition random means that the probability for every value should be the same. So if you have 62 options and even distribution of probability the probability for each of them is 1/62. Still, the increased probability for single elements should hit different elements each time. So for large sets it will distribute - however, I now get why it's not completely random by definition. Usually when you need random data the quality needs to be good! Key, passwords etc. For example if an attacker knows that your random number generator same or the next index with double probability, he will most likely crack each character with half the tries. So for each character in your password the time is split in half. Again 8 character password becomes 2^8 times easier to break compared to truely random data. This is just an example though. Try counting how of often new_index = index and new_index = (index + 1) % 62 and new_index = (index + 2) % 62. With your algorithm the last one should be significantly less then the first two in large sample. I will try that. It looks like a good approach. Ok. I wrote a little library that takes random data and mathematically accurately splits it into wanted data. It is attached to the mail. You only need to specify the random source and the maximum number you wish to see in your set. So with 5 you get everything from 0 to 5 (in total of 6 elements). The library takes care of buffering. And most importantly keeps probabilities equal :) -- -Matti VERSION=v0.1 prefix=/usr/local CC=$(CROSS_COMPILE)g++ LD=$(CROSS_COMPILE)ld SYS=posix DEF=-DRNG_VERSION=\$(VERSION)\ OPT=-O2 XCFLAGS=-fPIC -DPIC -march=nocona #XCFLAGS=-fPIC -DPIC -DDEBUG -march=nocona XLDFLAGS=$(XCFLAGS) -Wl,--as-needed -Wl,-O1 -Wl,-soname=librng.so CPPFLAGS=-Wall -std=gnu++98 $(XCFLAGS) $(INC) $(DEF) $(OPT) LDFLAGS=-Wall -shared $(XLDFLAGS) TESTLDFLAGS=-Wall #TESTLDFLAGS=-Wall -lrng bindir=$(prefix)/bin libdir=$(prefix)/lib BINDIR=$(DESTDIR)$(bindir) LIBDIR=$(DESTDIR)$(libdir) SLIBS=$(LIBS) EXT=$(EXT_$(SYS)) LIBS=librng.so all: $(LIBS) rng install:$(LIBS) -mkdir -p $(BINDIR) $(LIBDIR) cp rng$(EXT) $(BINDIR) clean: rm -f *.o *.so rng$(EXT) rng: rng.o $(CC) $(TESTLDFLAGS) -o $@$(EXT) $@.o librng.o rng.o: rng.cpp librng.so: librng.o $(CC) $(LDFLAGS) -o $@$(EXT) librng.o librng.o: librng.cpp //#define BUFFER_SIZE 4096 //64 bits is 8 bytes: number of uint64_t in buffer //#define NUM_SETS (4096 / 8) //#define NUM_BITS 64 #include inttypes.h struct BinaryData { uint64_t data; int8_t bits; }; class BitContainer { public: BitContainer(); ~BitContainer(); bool has(int8_t bits); uint64_t get(int8_t bits); int8_t set(uint64_t data, int8_t bits); void fill(uint64_t *data); static void cpy(struct BinaryData *dest, struct BinaryData *src, int8_t bits); private: void xfer(); static void added(int8_t stored, int8_t bits); struct BinaryData pri; struct BinaryData sec; }; class Rng { public: Rng(char* device, uint64_t max); ~Rng(); const uint64_t setMax(const uint64_t max); uint64_t getMax(); int setDevice(const char* device); uint64_t getRnd(); static uint64_t getMask(int8_t bits); static int8_t calculateBits(uint64_t level); private: void fillBuffer(); void readBuffer(); void getBits(uint64_t *data, int8_t *avail, uint64_t *out); void saveBits(uint64_t save); void processBits(uint64_t max, uint64_t level, uint64_t data); void error(const char* str); int iRndFD; size_t lCursor; size_t lBuffer; uint64_t* pStart; uint64_t* pNext; uint64_t* pEnd; BitContainer sRnd; uint64_t lMax; uint64_t lOutMask; int8_t cOutBits; };#include fcntl.h #include unistd.h #include sys/mman.h #include librng.h #ifdef DEBUG #include stdio.h #include stdlib.h long* results = 0; long* results2 = 0; unsigned long dMax = 0; int pushed[64]; long readData = 0; long readBuff = 0; long readBits = 0; long validBits = 0; long bitsPushed = 0; long readExtra = 0; int bits = 0; unsigned long totalBits = 0; unsigned long used = 0; unsigned long wasted = 0; unsigned long power(int exp) { unsigned long x = 1; for (int i = 0; i exp; i++) x *= 2; return x; } void dump_results() { fprintf(stderr, Rounds for each number:\n); for (unsigned long i = 0; i dMax; i++) fprintf(stderr, %li = %li\t, i, results[i]); fprintf(stderr, \n); fprintf(stderr, Rounds for each initial number:\n); for (unsigned long i = 0; i power(bits); i++) fprintf(stderr, %li = %li\t, i, results2[i]); fprintf(stderr, \n); fprintf(stderr, Rounds for extra bits: total pushed: \t%li\n
Re: [gentoo-user] Re: Re: OT: Mapping random numbers (PRNG)
On Jun 29, 2014, at 0:28, Kai Krakow hurikha...@gmail.com wrote: Matti Nykyri matti.nyk...@iki.fi schrieb: On Jun 27, 2014, at 0:00, Kai Krakow hurikha...@gmail.com wrote: Matti Nykyri matti.nyk...@iki.fi schrieb: If you are looking a mathematically perfect solution there is a simple one even if your list is not in the power of 2! Take 6 bits at a time of the random data. If the result is 62 or 63 you will discard the data and get the next 6 bits. This selectively modifies the random data but keeps the probabilities in correct balance. Now the probability for index of 0-61 is 1/62 because the probability to get 62-63 out of 64 if 0. Why not do just something like this? index = 0; while (true) { index = (index + get_6bit_random()) % 62; output char_array[index]; } Done, no bits wasted. Should have perfect distribution also. We also don't have to throw away random data just to stay within unaligned boundaries. The unalignment is being taken over into the next loop so the error corrects itself over time (it becomes distributed over the whole set). Distribution will not be perfect. The same original problem persists. Probability for index 0 to 1 will be 2/64 and for 2 to 61 it will be 1/64. Now the addition changes this so that index 0 to 1 reflects to previous character and not the original index. The distribution of like 10GB of data should be quite even but not on a small scale. The next char will depend on previous char. It is 100% more likely that the next char is the same or one index above the previous char then any of the other ones in the series. So it is likely that you will have long sets of same character. I cannot follow your reasoning here - but I'd like to learn. Actually, I ran this multiple times and never saw long sets of the same character, even no short sets of the same character. The 0 or 1 is always rolled over into the next random addition. I would only get sets of the same character if rand() returned zero multiple times after each other - which wouldn't be really random. ;-) In your example that isn't true. You will get the same character if 6bit random number is 0 or if it is 62! This is what makes the flaw! You will also get the next character if random number is 1 or 63. That is why the possibility for 0 and 1 (after modulo 62) is twice as large compared to all other values (2-61). By definition random means that the probability for every value should be the same. So if you have 62 options and even distribution of probability the probability for each of them is 1/62. Keep in mind: The last index will be reused whenever you'd enter the function - it won't reset to zero. But still that primitive implementation had a flaw: It will tend to select characters beyond the current offset, if it is = 1/2 into the complete set, otherwise it will prefer selecting characters before the offset. If you modify the sequence so that if looks random it is pseudo random. In my tests I counted how ofter new_index index and new_index index, and it had a clear bias for the first. So I added swapping of the selected index with offset=0 in the set. Now the characters will be swapped and start to distribute that flaw. The distribution, however, didn't change. Try counting how of often new_index = index and new_index = (index + 1) % 62 and new_index = (index + 2) % 62. With your algorithm the last one should be significantly less then the first two in large sample. Of course I'm no mathematician, I don't know how I'd calculate the probabilities for my implementation because it is sort of a recursive function (for get_rand()) when looking at it over time: int get_rand() { static int index = 0; return (index = (index + get_6bit_rand()) % 62); } char get_char() { int index = get_rand(); char tmp = chars[index]; chars[index] = chars[0]; return (chars[0] = tmp); } However, get_char() should return evenly distributes results. What this shows, is, that while distribution is even among the result set, the implementation may still be flawed because results could be predictable for a subset of results. Or in other words: Simply looking at the distribution of results is not an indicator for randomness. I could change get_rand() in the following way: int get_rand() { static int index = 0; return (index = (index + 1) % 62); } Results would be distributed even, but clearly it is not random. -- Replies to list only preferred.
Re: [gentoo-user] Re: OT: Mapping random numbers (PRNG)
On Jun 28, 2014, at 0:13, Matti Nykyri matti.nyk...@iki.fi wrote: On Jun 27, 2014, at 0:00, Kai Krakow hurikha...@gmail.com wrote: Matti Nykyri matti.nyk...@iki.fi schrieb: If you are looking a mathematically perfect solution there is a simple one even if your list is not in the power of 2! Take 6 bits at a time of the random data. If the result is 62 or 63 you will discard the data and get the next 6 bits. This selectively modifies the random data but keeps the probabilities in correct balance. Now the probability for index of 0-61 is 1/62 because the probability to get 62-63 out of 64 if 0. Why not do just something like this? index = 0; while (true) { index = (index + get_6bit_random()) % 62; output char_array[index]; } Done, no bits wasted. Should have perfect distribution also. We also don't have to throw away random data just to stay within unaligned boundaries. The unalignment is being taken over into the next loop so the error corrects itself over time (it becomes distributed over the whole set). Distribution will not be perfect. The same original problem persists. Probability for index 0 to 1 will be 2/64 and for 2 to 61 it will be 1/64. Now the addition changes this so that index 0 to 1 reflects to previous character and not the original index. The distribution of like 10GB of data should be quite even but not on a small scale. The next char will depend on previous char. It is 100% more likely that the next char is the same or one index above the previous char then any of the other ones in the series. So it is likely that you will have long sets of same character. Random means that for next char the probability is always even, 1/62. And like mentioned in Dilbert it is impossible to say that something is random but possible to say that it isn't. If wasting 6bit of data seems large, do this: index = get_6bit_random(); while (index 61) { index = 1; index |= get_1bit_random(); index = 0x3F; } return index; It will waste 1 bit at a time until result is less than 62. This will slightly change probabilities though :/ Sorry this example is really flawed :( If next6bit is over 61 there are only two possible values for it: 62 or 63 - that is 0x3E and 0x3F. So you see that only one bit changes. But that bit is random! So least significant bit is random and does not need to be discarded :) index = get_6bit_random(); while (index 61) { index = 5; index |= get_5bit_random(); index = 0x3F; } return index;
Re: [gentoo-user] Re: OT: Mapping random numbers (PRNG)
On Jun 27, 2014, at 11:55, thegeezer thegee...@thegeezer.net wrote: On 06/26/2014 11:07 PM, Kai Krakow wrote: It is worth noting that my approach has the tendency of generating random characters in sequence. sorry but had to share this http://dilbert.com/strips/comic/2001-10-25/ This is a good one :) have really been thinking this same comic previosly when writing to this thread...
Re: [gentoo-user] Re: OT: Mapping random numbers (PRNG)
On Jun 27, 2014, at 0:00, Kai Krakow hurikha...@gmail.com wrote: Matti Nykyri matti.nyk...@iki.fi schrieb: If you are looking a mathematically perfect solution there is a simple one even if your list is not in the power of 2! Take 6 bits at a time of the random data. If the result is 62 or 63 you will discard the data and get the next 6 bits. This selectively modifies the random data but keeps the probabilities in correct balance. Now the probability for index of 0-61 is 1/62 because the probability to get 62-63 out of 64 if 0. Why not do just something like this? index = 0; while (true) { index = (index + get_6bit_random()) % 62; output char_array[index]; } Done, no bits wasted. Should have perfect distribution also. We also don't have to throw away random data just to stay within unaligned boundaries. The unalignment is being taken over into the next loop so the error corrects itself over time (it becomes distributed over the whole set). Distribution will not be perfect. The same original problem persists. Probability for index 0 to 1 will be 2/64 and for 2 to 61 it will be 1/64. Now the addition changes this so that index 0 to 1 reflects to previous character and not the original index. The distribution of like 10GB of data should be quite even but not on a small scale. The next char will depend on previous char. It is 100% more likely that the next char is the same or one index above the previous char then any of the other ones in the series. So it is likely that you will have long sets of same character. Random means that for next char the probability is always even, 1/62. And like mentioned in Dilbert it is impossible to say that something is random but possible to say that it isn't. If wasting 6bit of data seems large, do this: index = get_6bit_random(); while (index 61) { index = 1; index |= get_1bit_random(); index = 0x3F; } return index; It will waste 1 bit at a time until result is less than 62. This will slightly change probabilities though :/
Re: [gentoo-user] Ifplugd breaks services
On Jun 8, 2014, at 21:19, Neil Bothwick n...@digimed.co.uk wrote: On Sun, 8 Jun 2014 20:44:47 +0300, Matti Nykyri wrote: Have you tried changing rc_depend_strict in /etc/rc.conf? Setting rc_depend_strict to NO, fixes the problem :) With that set to YES all the services are killed. So I'll stick with NO. Still I think that all services stopped should be restarted by default. Yes, it does seem like a bug, or at least an undocumented feature. Actually found the true reason for the services not starting. When you stop samba it fails to terminate 2 instances of nbmd. So when you try to start samba it fails. But it will start normally on the second go. Both of these failures will fall within samba or openrc. flamebaitOr you could switch to systemd which I suspect could be made to handle this situation better./flamebait :) I rather not ;) You're already using some Lennartware so you're already on the slippery slope :-O
[gentoo-user] Zsh completion
Hi I use zsh and have quite perfect completion setup with it. There is just one very annoying feature that I have failed to switch off. With paths when I type this: cd /archives/NE tab zsh produces: cd /achieves2/NEW/ The archives directory does not contain NEW directory and archives2 does. I would want that zsh wouldn't modify anything but the current level path I'm writing. So in this case it should of shown empty cuz there are no options to choose from. This happens of course with any similar directory case. The annoyance is that I know where I'm going and the right NEW directory in this case is under /archives/movies/NEW and not the one under /archives2/. So I have to clear some of the text which is slow :( Would anyone know how to correct this¿? I have tried various options of approximation... Actually I don't like the approximation at all and have tried to fully disable it... -- Matti
[gentoo-user] Ifplugd breaks services
Hi I also have other problems in my life. One of them is on one of my gentoo server. This server has two network cards one serves intranet and the other internet. The on that is on the internet is attached to a cable modem. The modem is buggy and some times reboots it self losing the link so I have ifplugd there get new address via dhcp immediately. Intranet card is configured not to use ifplugd. I'm using OpenRC. The problems are related to iptables and samba. Samba: when ifplugd runs down the internet card samba is killed. This shouldn't happen. Samba is configured only to use intranet card. Samba always fails to start when ifplugd starts the internet card. Manual starting is required. Iptables: the system uses new nic names (enp7s0 etc). Iptables has them correctly in the rules and in rules save. However when ifplugd cycles the internet nic all the nic names in the in-kernel rules change to eth0 an eth1. I need to zap iptables and then start it to reset the rules. Any suggestions where to start? Or just disable ifplugd? -- Matti
Re: [gentoo-user] Ifplugd breaks services
On Sun, Jun 08, 2014 at 11:25:53AM +0100, Mick wrote: On Sunday 08 Jun 2014 10:25:40 Matti Nykyri wrote: Hi I also have other problems in my life. One of them is on one of my gentoo server. This server has two network cards one serves intranet and the other internet. The on that is on the internet is attached to a cable modem. The modem is buggy and some times reboots it self losing the link so I have ifplugd there get new address via dhcp immediately. Intranet card is configured not to use ifplugd. I'm using OpenRC. Are you sure of this? How have you configured your intranet card to not be acted upon by ifplugd? From what I see, ifplugd will pick up any interface in /etc/init.d: EXEC=/etc/init.d/net.$1 Actually it's not ifplugd's fault. It is just the one that restarts services... The restarting is the thing that breaks stuff: server% [13:44] /var/log$ sudo iptables -v -L -t nat Chain POSTROUTING (policy ACCEPT 10142 packets, 743K bytes) pkts bytes target prot opt in out source destination 8307 616K MASQUERADE all -- anyenp0s10 anywhere anywhere server% [13:45] /var/log$ sudo /etc/init.d/net.enp0s10 stop * Stopping NIS Server ... [ ok ] * samba - stop: smbd ... [ ok ] * samba - stop: nmbd ... * start-stop-daemon: 2 process(es) refused to stop [ !! ] * Unmounting network filesystems ...[ ok ] * Stopping chrooted named ... * Umounting chroot dirs ... * umounting /chroot/dns/usr/share/GeoIP ... [ ok ] * umounting /chroot/dns/etc/bind ...[ ok ] * umounting /chroot/dns/var/log/named ... [ ok ] * umounting /chroot/dns/var/bind ...[ ok ] * Stopping dhcpd ...[ ok ] * Bringing down interface enp0s10 * Stopping dhclient on enp0s10 ...[ ok ] * Stopping ifplugd on enp0s10 ... [ ok ] server% [13:45] /var/log$ sudo iptables -v -L -t nat Chain POSTROUTING (policy ACCEPT 10147 packets, 743K bytes) pkts bytes target prot opt in out source destination 8309 617K MASQUERADE all -- anyenp0s10 anywhere anywhere server% [13:45] /var/log$ sudo /etc/init.d/net.enp0s10 start * Bringing up interface enp0s10 * Changing MAC address of enp0s10 ... [ ok ] * changed to 00:80:23:7A:8A:A4 * Starting ifplugd on enp0s10 ... [ ok ] * Backgrounding ... * WARNING: net.enp0s10 has started, but is inactive server% [13:45] /var/log$ sudo iptables -v -L -t nat Chain POSTROUTING (policy ACCEPT 10147 packets, 743K bytes) pkts bytes target prot opt in out source destination 8309 617K MASQUERADE all -- anyenp0s10 anywhere anywhere It takes around 40 seconds for dhclient to address from ISP (net-misc/dhcp-4.2.5_p1) After it gets the address iptables is changed: server% [13:45] /var/log$ sudo iptables -v -L -t nat Chain POSTROUTING (policy ACCEPT 2 packets, 152 bytes) pkts bytes target prot opt in out source destination 0 0 MASQUERADE all -- anyeth1anywhere anywhere server% [13:48] /var/log$ ps aux | grep dhclient root 22011 0.0 0.2 16200 7108 ?Ss 13:46 0:00 /sbin/dhclient -e PEER_NTP=no -e IF_METRIC=3 -q -1 -pf /var/run/dhclient-enp0s10.pid enp0s10 server% [13:48] /var/log$ ls /etc/init.d/net* lrwxrwxrwx 1 root root 6 Oct 4 2011 /etc/init.d/net.enp0s10 - net.lo* lrwxrwxrwx 1 root root 6 Oct 4 2011 /etc/init.d/net.enp5s12 - net.lo* -rwxr-xr-x 1 root root 17412 Jan 2 23:42 /etc/init.d/net.lo* The problems are related to iptables and samba. Samba: when ifplugd runs down the internet card samba is killed. This shouldn't happen. Samba is configured only to use intranet card. Samba always fails to start when ifplugd starts the internet card. Manual starting is required. Iptables: the system uses new nic names (enp7s0 etc). Iptables has them correctly in the rules and in rules save. However when ifplugd cycles the internet nic all the nic names in the in-kernel rules change to eth0 an eth1. I need to zap iptables and then start it to reset the rules. This does not happen here. When ifplugd restarts a NIC it always comes back with the new consistent naming. Do you have some udev rules defined which are picked up on the second time that the ifplugd brings up the card, but not the first? No I don't. And as stated when dhclient sets
Re: [gentoo-user] Ifplugd breaks services
On Jun 8, 2014, at 19:15, Neil Bothwick n...@digimed.co.uk wrote: On Sun, 8 Jun 2014 15:01:02 +0300, Matti Nykyri wrote: Actually it's not ifplugd's fault. It is just the one that restarts services... The restarting is the thing that breaks stuff: Are you running ifplugd directly or letting openrc deal with this? The latter is the recommended way for openrc, leave ifplugd installed but don't add it to a runlevel. Does the problem persist if you do this? Ifplugd package doesn't have anything installed in init.d/ so it's not added to any runlevel. Have you tried changing rc_depend_strict in /etc/rc.conf? Setting rc_depend_strict to NO, fixes the problem :) With that set to YES all the services are killed. So I'll stick with NO. Still I think that all services stopped should be restarted by default. flamebaitOr you could switch to systemd which I suspect could be made to handle this situation better./flamebait :) I rather not ;) -- -Matti
Re: [gentoo-user] OT: Mapping random numbers (PRNG)
On Sat, Jun 07, 2014 at 12:03:29AM +0300, Matti Nykyri wrote: On Thu, Jun 05, 2014 at 10:58:51PM -0500, Canek Peláez Valdés wrote: On Thu, Jun 5, 2014 at 9:56 PM, meino.cra...@gmx.de wrote: Hi, I am experimenting with the C code of the ISAAC pseudo random number generator (http://burtleburtle.net/bob/rand/isaacafa.html). Currently the implementation creates (on my embedded linux) 32 bit hexadecimal output. So it's a 32 bit integer. From this I want to create random numbers in the range of [a-Za-z0-9] *without violating randomness* and (if possible) without throwing away bits of the output. You mean *characters* int the range [A-Za-z0-9]? Well this isn't as simple problem as it sounds. A random 32 bit integer has 32 bits of randomness. If you take a divison reminder of 62 from this integer you will get only 5,95419631039 bits of randomness (log(62)/log(2)). So you are wasting 81,4% of your random data. Which is quite much and usually random data is quite expensive. You can save your precious random data by taking only 6 bit from your 32 bit integer and dividing it by 62. Then you will be wasting only 0,8% of random data. Another problem is alignment, but that is about mathematical correctness. How can I do this mathemtically (in concern of the quality of output) correct? The easiest thing to do would be: The easiest is not mathematically correct though. Random data will stay random only if you select and modify it so that randomness is preserved. If you take devison reminder of 62 from 32 bit integer there are 69 273 667 possibilities of the reminder to be 3 or less. For the reminder to 4 or more the number of possibilities is 69 273 666. In mathematically ideal case the probability for every index of the list should be same: 1/62 = 1,61290322581%. But the modulo 62 modifies this probability: for index 0-3 the probability is 69 273 667/2^32 = 1,61290324759%. And for indexes 4-61 the probability will be 69 273 666/2^32 = 1,6129032243%. If you wish not to waste those random bits the probabilities will get worse. With 6 bits of random the probability for index 0-1 will be 2/64 and for 2-63 it will be 1/64. This is a very significant change because first and second index will appear twice as much as the rest. If you add 2 characters to your list you will perfect alignment and you can take 6 bits of data without it modifying probabilities. If you are looking a mathematically perfect solution there is a simple one even if your list is not in the power of 2! Take 6 bits at a time of the random data. If the result is 62 or 63 you will discard the data and get the next 6 bits. This selectively modifies the random data but keeps the probabilities in correct balance. Now the probability for index of 0-61 is 1/62 because the probability to get 62-63 out of 64 if 0. --- #include time.h #include stdio.h #include stdlib.h #define N (26+26+10) static char S[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' }; int next_character() { // Use the correct call for ISAAC instead of rand() unsigned int idx = rand() % N; return S[idx]; } so modify the next_char function: char next_character() { static unsigned int rand = 0; //(sizeof(int) = 32) static char bit_avail = 0; char result = 0; char move_bits = 0; char bits_moved = 0; do { if (!bits_avail) { // Use the correct call for ISAAC instead of rand() rand = rand(); bit_avail = 32; } move_bits = bits_avail = 6 ? 6 : bits_avail; result = move_bits; result = (result | rand (0xFF (8 - move_bits))) 0x3F; bits_avail -= move_bits; bits_moved += move_bits; rand = move_bits; } while (bits_moved != 6 result 61); return result; } Well actually it looks simpler if you break this like this: unsigned char get_6bits () { static unsigned int rand = 0; //(sizeof(int) = 32) static char bits_avail = 0; unsigned char result = 0; //get 2 bits 3 times: 32 is devidable by 2 for (int i = 0; i 3; i++) { // --std=c99 //Fill buffer if it is empty! if (!bits_avail || bits_avail 0 ) { //if bits_avail 0 it is an error