Re: bash history

2024-08-01 Thread Karl Vogel
This is how I keep a long-term record of bash commands from different
sessions:
https://www.reddit.com/r/bash/comments/ak9c3r/

HTH

-- 
Karl Vogel  I don't speak for anyone but myself

Comment: I use a screwdriver a lot
Reply:   I'm all out of orange juice.  Will straight vodka work?
--Reddit "What tool helped you as an early sysadmin?"



Re: Markup in mail messages

2024-05-16 Thread Karl Vogel
>> On Thu, May 16, 2024 at 09:48:23AM -0400, to...@tuxteam.de wrote:

> Actually I've been tempted to teach my mail reader to transform HTML
> into some lightweight markup (yeah, you need a bit of heuristics for
> that ;-) -- say Org, but why not its poor sister Markdown.

  https://github.com/aaronsw/html2text/ might interest you.  It converts
  (relatively) sane HTML into Markdown.

  I put html2text.py into $HOME/lib and use this to call it:

#!/bin/sh
#

Re: Zutty fonts - zutty always uses the same font and fontsize

2024-05-01 Thread Karl Vogel
On Wed, May 01, 2024 at 08:32:31AM -0400, Sirius wrote:
> If Debian still packages it, look for rxvt instead, or use xterm. Both
> are well tried and well tested for when you want something.. dated. ;)

  I resemble that remark.  Xterm v390 was released on 19 Feb 2024, and
  building it from source is easy.

  https://invisible-island.net/archives/xterm/xterm-390.tgz{,.asc}

-- 
Karl Vogel  I don't speak for anyone but myself

My mind is like my browser: 19 open tabs, three of them are frozen, and
I have no clue where the music is coming from.



Re: Changing The PSI Definition

2024-01-27 Thread Karl Vogel
>> On Fri, Jan 26, 2024 at 07:42:30AM -0500, Dan Ritter wrote:

> Might be time for a new font. I like Inconsolata, but l1I!
> should never look similar, nor O0@ or S$. 

  My eyesight sucks like a black hole with daddy issues, so I like fonts
  that are a bit larger than most.  My favorites on xterm:

  * xft:Menlo-Regular:pixelsize=20:bold
  * xft:Bitstream Vera Sans Mono:pixelsize=21:bold
  * xft:Cascadia:pixelsize=22:bold
  * xft:FiraMono-Regular:pixelsize=22

  Your examples above are very readable with Menlo.  These aren't bad:

  * xft:Edlo:pixelsize=21:bold
  * xft:Inconsolata-Bold:pixelsize=25:bold
  * xft:Meslo LG S:pixelsize=20:bold
  * xft:Meslo LG S:pixelsize=21:bold
  * xft:UbuntuMono-B:pixelsize=25:bold

  I run two xterms side-by-side on a 23-inch monitor:

/usr/local/bin/xterm -geometry 80x40-0+0 -j -b 10 -sb \
  -si -sk -ls -u8 -sl 4000 -cr blue -bd black -bg white \
  -fa xft:Menlo-Regular:pixelsize=20:bold -title Remote

  For browsing (Firefox), my "prefs.js" file holds:

user_pref("browser.display.use_document_fonts", 0);
user_pref("font.default.x-western", "sans-serif");
user_pref("font.internaluseonly.changed", false);
user_pref("font.minimum-size.x-western", 18);
user_pref("font.name.monospace.x-western", "DejaVu Sans");
user_pref("font.name.sans-serif.x-western", "sans-serif");
user_pref("font.name.serif.x-western", "DejaVu Serif");
user_pref("font.size.fixed.x-western", 18);
user_pref("font.size.variable.x-western", 18);

-- 
Karl Vogel  I don't speak for anyone but myself

Slogan of 105.9, the classic rock radio station in Chicago:
"Of all the radio stations in Chicago...we're one of them."



Re: smartctl cannot access my storage, need syntax help

2024-01-24 Thread Karl Vogel
On Tue, Jan 23, 2024 at 06:05:29AM -0500, gene heskett wrote:
> On 1/23/24 00:30, Karl Vogel wrote:
> >>> On 1/22/24 11:31, gene heskett wrote:
> >
> > G> How does an 8T backup server sound for another $200 in hdwe?  Very
> > G> enticing and I do have the sheckel's.
> >
> > https://www.amazon.com/dp/B07CQJBSQL
> > Seagate Desktop 8TB external Hard Drive, 3.5 Inch, USB 3.0 STGY8000400
> > $168.18
> >
> > What if you buy two, use one for a complete backup and the other for
> > incrementals or differentials?  (I know, more than $200...)
> 
> My disastrous experience with the last pair of seagates preclude exploring
> that path, ever again.

Sorry, the Seagate was just an example -- I prefer Western Digital myself.
My only point was using one or two external drives for backups.

-- 
Karl Vogel  I don't speak for anyone but myself

And as we all know from experiments conducted during the Korean War, Diane,
sleep deprivation is a one-way ticket to temporary psychosis.
--FBI Special Agent Dale Cooper, "Twin Peaks"



Re: smartctl cannot access my storage, need syntax help

2024-01-22 Thread Karl Vogel
>> On 1/22/24 11:31, gene heskett wrote:

G> How does an 8T backup server sound for another $200 in hdwe?  Very
G> enticing and I do have the sheckel's.

https://www.amazon.com/dp/B07CQJBSQL
Seagate Desktop 8TB external Hard Drive, 3.5 Inch, USB 3.0 STGY8000400
$168.18

What if you buy two, use one for a complete backup and the other for
incrementals or differentials?  (I know, more than $200...)

-- 
Karl Vogel  I don't speak for anyone but myself

I yam Popeye of Borg.  You will be askimilgrated.



Re: Isolated Web Co Session crash Firefox-ESR

2023-12-06 Thread Karl Vogel
On Wed, Dec 06, 2023 at 06:04:36AM +0100, to...@tuxteam.de wrote:
> On Wed, Dec 06, 2023 at 02:42:32AM +0800, jeremy ardley wrote:
> 
> > I have discovered a magic bullet for solving running out of memory
> >   sudo sync; sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
> > Sadly it looks like I'll need to do this daily,
> 
> It's the browsers eating your memory. That's what they do.

  I've had problems with Firefox eating my swap on both Linux and FreeBSD.
  My fix has been to run the swap2ram script below hourly.

-- 
Karl Vogel  I don't speak for anyone but myself

Constipational carry.
  --NY Post 28 Nov "Suspect found hiding handgun in his rectum" comment #4

# --
#!/bin/ksh
# /dev/null
case "$?" in
0) ;;
*) die "You must be root to $action this." ;;
esac
}

# Make sure we have permission and a safe tempfile.
needroot
systype=$(uname -s | tr A-Z a-z)

tmp=$(mktemp -q "/tmp/$tag.XX")
case "$?" in
0)  test -f "$tmp" || die "$tmp: tempfile not created" ;;
*)  die "$tmp: mktemp failed" ;;
esac

# Real work starts here.  Check for OS-specific instructions.
case "$systype" in
freebsd)
( swapoff -a && swapon -a ) >> $tmp 2>&1
;;

linux)
mem=$(free  | awk '/Mem:/ {print $4}')
swap=$(free | awk '/Swap:/ {print $3}')

if test "$mem" -lt "$swap"; then
logmsg "not enough RAM to recover swap, nothing done"
else
( swapoff -a && swapon -a ) >> $tmp 2>&1
fi
;;
esac

# Cleanup.
test -s "$tmp" && logfile $tmp
rm $tmp
exit 0



Re: Work environment

2023-11-24 Thread Karl Vogel
On Fri, Nov 24, 2023 at 03:28:34AM -0500, Darac Marjal wrote:
> On 23/11/2023 04:34, William Torrez Corea wrote:
> > Why the people use two desktops and one laptop?

> Without any context, it's hard to answer.  But there are some possibilities:
> 
> * Regardless of any other factor, desktops are bigger than laptops, so
> there is room for more hard drives, optical drives, more PCI cards etc.

  It gives me a big monitor, a good mouse, and a keyboard that doesn't suck.

-- 
Karl Vogel  I don't speak for anyone but myself

Drunk Grizzlies Keep Getting Hit By Trains In Montana
  --"Cowboy State Daily" headline, 4 Nov 2023



Re: Too much log for sudo.

2023-10-12 Thread Karl Vogel
On Thu, Oct 12, 2023 at 11:22:00AM -0400, Erwan David wrote:
> I use a script to run borg backup. For it to be able to backup files that
> only root may read, i use sudo --preserv-env=BORG_REPO,BORG_PASSPHRASE.
> 
> However I see that in the logs the VALUE of the env variable is loggued. How
> to change this?

You can either run "sudo -E" to push the entire environment through without
echoing any values in the sudo log, or play some games by re-invoking the
script with a clean environment.  My environment with the BORG variables:

me% export BORG_REPO=/path/to/repo
me% export BORG_PASSPHRASE='horse battery'

me% env | sort
ATTRIBUTION=%f wrote:
BLOCKSIZE=1m
BORG_PASSPHRASE=horse battery
BORG_REPO=/path/to/repo
EDITOR=vim

[diaper-load of other variables]

XDG_CACHE_HOME=/home/vogelke/.cache
XDG_CONFIG_HOME=/home/vogelke/.config
XDG_DATA_HOME=/home/vogelke/.local/share
XDG_RUNTIME_DIR=/home/vogelke/.local/run
XDG_STATE_HOME=/home/vogelke/.local/state

Script to see if I'm running under a regular environment -- if so, restart
the same script with a bare minimum environment plus the BORG variables:

me% cat tst
#!/bin/bash
#

Re: Sunrise and Sunset from terminal

2023-09-29 Thread Karl Vogel
On Fri, Sep 29, 2023 at 12:48:56PM -0400, Bruno Kleinert wrote:
> Am Samstag, dem 23.09.2023 um 23:51 +0200 schrieb s...@gmx.com:
> > Is there a way to get sunrise and sunset time from command interpreter?
> > I want to use its output for a script!
> 
> in case you're looking for a possibility to execute commands at sunset
> and/or sunrise, I use remind for this (apt install remind) to trigger my
> roller blinds.  Pro: Does not rely on any external web service.

Remind is an incredibly useful program.  Give it your latitude and longitude,
and it can tell you sunrise and sunset times.  My coordinates:

  
https://www.google.com/search?q=dayton+ohio+latitude+longitude+degrees+minutes+seconds
  Dayton, OH, USA is located at GPS coordinates of
  39d 45m 32.2164s N and 84d 11m 29.7780s W.

Version of remind:

  me% remind -V 2>&1 | grep Copyright
  REMIND 04.02.04 (English version) Copyright 1992-2023 Dianne Skoll

Remind script:

  me% cat sunrise-sunset.rem
  ; Show sunrise/sunset
  SET $LatDeg  39
  SET $LatMin  45
  SET $LatSec  32
  SET $LongDeg 84
  SET $LongMin 11
  SET $LongSec 29
  MSG sunrise at [sunrise(trigdate())], sunset at [sunset(trigdate())]

Sunrise/sunset for today:

  me% remind -h sunrise-sunset.rem '*1' | sed -e '/^$/d'
  Reminders for Friday, 29th September, 2023 (today):
  sunrise at 07:30, sunset at 19:22

Sunrise/sunset for the next week:

  me% remind -h sunrise-sunset.rem '*7' | sed -e '/^$/d'
  Reminders for Friday, 29th September, 2023 (today):
  sunrise at 07:30, sunset at 19:22
  Reminders for Saturday, 30th September, 2023:
  sunrise at 07:31, sunset at 19:21
  Reminders for Sunday, 1st October, 2023:
  sunrise at 07:32, sunset at 19:19
  Reminders for Monday, 2nd October, 2023:
  sunrise at 07:33, sunset at 19:18
  Reminders for Tuesday, 3rd October, 2023:
  sunrise at 07:34, sunset at 19:15
  Reminders for Wednesday, 4th October, 2023:
  sunrise at 07:35, sunset at 19:15
  Reminders for Thursday, 5th October, 2023:
  sunrise at 07:36, sunset at 19:12

-- 
Karl Vogel  I don't speak for anyone but myself.

German: "Er hat da geparkt, wo ihm die Karre vom Arsch gefallen ist."
English: "He parked where the car fell off his ass."
--Reddit comment about stupid/illegal parking



Re: [a bit OT] Automate a (G o o g l e) search from a list of strings

2023-09-19 Thread Karl Vogel
On Tue, Sep 19, 2023 at 10:42:14AM -0400, steve wrote:
> I have a list of 200 keywords and would like for every one to launch a
> search on a specific website and put the result(s) in a file [...]

Take a list of words and turn it into a single Google query matching any
of them:

me% cat keywords
corsairs
buccaneers
privateers

Desired query:

https://www.google.com/search?q=corsairs+OR+buccaneers+OR+privateers

Script:

me% cat search
#!/bin/sh
export PATH=/usr/local/bin:/bin:/usr/bin
set -o nounset
umask 022

query=$(tr "[:space:]" "+" < keywords |
sed -e 's/ /+OR+/g' -e 's/+$//' -e 's/+/+OR+/g')

curl -s -L -o pirate.htm "https://www.google.com/search?q=${query};
ls -l pirate.htm
exit 0

Results:

me% ./search
-rw-r--r-- 1 vogelke 220487 19-Sep-2023 21:33:21 pirate.htm

If you want results in text form, lots of programs can do that:

me% lynx -cookies -accept_all_cookies -dump -width 80 pirate.htm
Tampa Bay Buccaneers: Buccaneers Home
www.buccaneers.com
The official source of the latest Bucs headlines, news, videos, photos,
tickets, rosters, stats, schedule and gameday information.
  
People also ask
What is the difference between a pirate and a corsair?
What kind of pirate is a corsair?
What were Spanish pirates called?
What is the history of corsairs?

Pirates, Privateers, Corsairs, Buccaneers: What's the Difference?
www.britannica.com > Demystified > Geography & Travel
Corsairs were essentially privateers, although the term corsair carried
an added religious connotation because the conflict was between Muslim
and Christian...

HTH.

-- 
Karl Vogel  I don't speak for the USAF or my company

Leonardo diCaprio in Titanic: Despite acting like a plank of wood,
he still can't float.  --"Top Ten Most Welcome Movie Deaths", Stylus Magazine



Re: door bell like sound effect

2023-08-30 Thread Karl Vogel
On Wed, Aug 30, 2023 at 07:55:14AM -0400, songbird wrote:
> Karl Vogel wrote:
> ...
> > If nothing else, it's faster to run "locate" and look for file extensions;
> > running "file" on that much crap took nearly 9 hours.
> 
> do you have SSDs or spinning rust?

  I have a 256-Gb SSD and two mirrored Western Digital Blue 1.8-Tb drives.
  About 2 million files are on SSD and the rest are on rust.

  I used "file" v5.45 built from source, which does a nice job but is IO-
  and CPU-intensive.

> when i just did this:
> # find / -type f | wc -l
> it took all of 24 seconds for the 2.4 million files found.

  Generating hashes for SSD files is faster than getting the filetype;
  it takes about 17 minutes for 3.6 million files (153 Gbytes).  I like
  the Blake-2 hash cuz it's fast as hell, among other things:

#!/bin/ksh
#> $work
  done

# Store hashes for SSD datasets.
# The hash file is sorted by filename to make comparisons easier.

logmsg "running b2sum"
fdbdir=$(date '+/var/fdb/%Y/%m%d')
sort -z $work | xargs -0r b2sum -l 128 > "$fdbdir/zroot.sum"
rm $work
exit 0

  Useful for finding changed files -- security, backups, etc.

> what script did you use?

#!/bin/ksh
# $work
logmsg finish

mv $work filetypes
exit 0

-- 
Karl Vogel  I don't speak for the USAF or my company

Assisted in daily preparation of large quantities of consumable items
in a fast-paced setting.  (Translation: Short-order cook)
--from a list of resume' blunders



Re: door bell like sound effect

2023-08-30 Thread Karl Vogel
Out of morbid curiosity (and boredom), I started wondering what types of
audio files I had on my systems.  I ran "file --mime-type" on 6.8 million
files, looked for "audio/whatever" and got the file extensions.

Extension  MIME-type
---
.8svx  audio/x-aiff
.aif   audio/x-aiff
.aifc  audio/x-aiff
.aiff  audio/x-aiff
.ape   audio/x-ape
.arm   audio/amr
.auaudio/basic
.flac  audio/flac
.m4a   audio/x-m4a
.mp3   audio/mpeg
.mpc   audio/x-musepack
.oga   audio/ogg
.ogg   audio/ogg
.opus  audio/ogg
.raaudio/x-pn-realaudio
.voc   audio/x-unknown
.wav   audio/x-wav

If nothing else, it's faster to run "locate" and look for file extensions;
running "file" on that much crap took nearly 9 hours.

-- 
Karl Vogel  I don't speak for anyone but myself

My doctor told me to stop having intimate dinners for four,
unless there are three other people.--Orson Welles



Re: door bell like sound effect

2023-08-29 Thread Karl Vogel
On Tue, Aug 29, 2023 at 10:53:39PM -0400, gene heskett wrote:
> And that is the problem, and why I read thru all those man ages trying to
> find a way to make it log what it did. Sadly no.

  Install and configure file auditing on Debian:
https://www.daemon.be/maarten/auditd.html

  Auditing can help you find anything trying to write to your sound device.
  Look at these manpages:
auditd.conf (5)
audit.rules (7)
audispd (8)
ausearch (8)
aureport (8)
auditctl (8)
augenrules (8)

  To find your sound cards and/or devices:
https://wiki.debian.org/Sound
https://wiki.debian.org/SoundCard
https://wiki.debian.org/PulseAudio

  I don't have a Debian system to play with, but in the (good|bad) old
  days, we had a /devices directory with all sorts of weirdness inside.
  If you have one of those, try
find /devices -print | grep sound

  That might point you to an actual device name.

-- 
Karl Vogel  I don't speak for anyone but myself.

Comment: One of my friends drank half a bottle of rum and refilled it
 with a bodily fluid of similar color.
Reply:   Your friend should see a doctor and drink more water.
   --seen on Reddit, 27 Aug 2023



Re: Using the bash shell: determine if the root user used 'sudo -i'

2023-08-26 Thread Karl Vogel
On Sat, Aug 26, 2023 at 12:09:57PM -0400, Tom Browder wrote:
> Excellent mind-reading, Greg! So to use your line I will put in that dir:
> "cd /required-dir || exit"
> 
> Thanks so much.  And thanks to all others who responded.

If you're running bash, the safest way to find your current working
directory is capturing the output from /bin/pwd.  Symlinked directories
can surprise you:

me$ cd

me$ ls -ldF today
lrwxr-xr-x  1 me mis   18 Aug 26 00:03 today@ -> notebook/2023/0826

me$ cd today

me$ pwd
/home/me/today

me$ /bin/pwd
/home/me/notebook/2023/0826

me$ echo $PWD
/home/me/today

If you want to know why you had an early exit:

me$ cat try
#!/usr/bin/env bash
# try: test logging.

export PATH=/usr/local/bin:/bin:/usr/bin
set -o nounset  # check for unbound variables.
tag=${0##*/}
umask 022

# Test file descriptor 2 for interactive or cron use.
test -t 2
case "$?" in
0) logmsg () { echo "$(date '+%F %T') $tag: $@"; } ;;
*) logmsg () { logger -t $tag "$@"; }  ;;
esac

warn () { logmsg "WARN: $@" ; }
die ()  { logmsg "FATAL: $@"; exit 1 ; }

# Real work starts here.
case "$#" in
0)  die "need a directory" ;;
*)  dir="$1" ;;
esac

test -d "$dir" || die "$dir: not a directory"
cd "$dir"  || die "$dir: cannot cd"
cwd=$(/bin/pwd)

logmsg "start working in $cwd"
exit 0

On FreeBSD, you can use "daemon" to run something detached from the
controlling terminal, which simulates running a cron job:

me$ ls -ldF /etc /var/authpf
drwxr-xr-x 27 root wheel  120 26-Aug-2023 07:55:02 /etc/
drwxrwx---  2 root authpf   2 05-Jul-2019 00:45:45 /var/authpf/

me$ ./try /etc
2023-08-26 18:31:54 try: start working in /etc

me$ daemon -f $PWD/try /etc
me$ daemon -f $PWD/try /var/authpf

me$ tail -2 /var/log/syslog
Aug 26 18:19:17 myhost try: start working in /etc
Aug 26 18:19:19 myhost try: FATAL: /var/authpf: cannot cd

Hope this helps.

--
Karl Vogel  I don't speak for anyone but myself.

Oh, my darlin' had bronchitis and she barfed up half a lung,
what came up looked quite amazing when she rolled it on her tongue.
   --sung to the tune of "My Darling Clementine"



Re: git setup

2023-08-21 Thread Karl Vogel
On Mon, Aug 21, 2023 at 11:01:21PM -0400, Russell L. Harris wrote:
> I write articles for publication.  I typically spend anywhere from
> several hours to many days on each article.  It is frustrating to work
> for an hour or two on a paragraph or a page and then accidentally to
> erase what I have written.

Heard that.

> The second repository is my backup; it resides on another machine.
> Several times a day, I SSH into the backup machine and pull the
> working repository.  It would be nice to be able to push from WORKING
> to BACKUP, eliminating the need to SSH.

I'd set up a post-commit hook on the production system.  Have it SSH to
your backup system and do a pull automatically whenever you commit a change.

I made an example project to try it:

me% mkdir example
me% cd example
me% git init

Test file:

me% date > testing
me% git add testing
me% git commit -m 'Testing a new file"

me% git log
d5fe2ce 2023-08-22 00:09:21 -0400 vogelke - Testing a new file

Here's a test script to connect from my backup system ("bkup") and simulate
pulling my working repo.  I have an SSH public/private key set up for
passwordless login:

me% cat try
#!/bin/sh
export PATH=/usr/local/bin:/bin:/usr/bin
ssh -q -c aes128-...@openssh.com -i $HOME/.ssh/bkup_ed25519 \
bkup "logger -t autopull git pull whatever"
exit 0

Here's the remote system log when I run this from the command line:

me@bkup% tail -1 /var/log/messages
Aug 22 00:24:44 bkup autopull[60592]: git pull whatever

I copied the test script ("try") to .git/hooks/post-commit and ran a commit:

me% git add try

me% date; git commit -m 'Added hook'
Tue Aug 22 00:31:27 EDT 2023
[master 42cb917] Added hook
 1 file changed, 6 insertions(+)
 create mode 100755 try

me% git log
42cb917 2023-08-22 00:31:27 -0400 vogelke - Added hook
d5fe2ce 2023-08-22 00:09:21 -0400 vogelke - Testing a new file

Here's the system log on the remote system showing my hook ran when the
commit was done:

me@bkup% tail -1 /var/log/messages
Aug 22 00:31:27 bkup autopull[80162]: git pull whatever

Replace the "logger ..." part of post-commit to run "git pull" or whatever.
Hope this helps.

-- 
Karl Vogel  I don't speak for the USAF or my company

There's no kill like overkill.
  --Reddit post about using .45 ACP rounds to dispose of old disk drives



Re: xterm font and other options

2023-08-21 Thread Karl Vogel
On Sun, Aug 20, 2023 at 10:38:34PM -0400, Max Nikulin wrote:
> On 20/08/2023 14:55, Karl Vogel wrote:
> >  #!/bin/sh
> ...
> >  #   -fa 'xft:...'   font size and weight
> ...
> >  ( $XTERM $geo $topts -fa "$FONT" -title "Remote" ) &
> 
> Xterm configuration options may be put to ~/.Xresources, e.g.
> 
> xterm*VT100.faceName: ...
> 
> I am curious if there are actual advantages of usage a wrapper script
> instead of xresources.

  For me, being able to select or change a font based on an environment
  variable is very convenient.

  The script I included is simplified because I didn't want the post to
  get too long.  My production version has other conveniences:

# Don't override COLUMNS and LINES if already set; when my eyes are
# tired, I use an xterm with characters two pixels larger:
##  FONT=xft:Cascadia:pixelsize=22:bold LINES=35 xt

: ${COLUMNS=80}
: ${LINES=40}

  I can check a font and set LINES, COLUMNS, or geometry on the fly without
  having to mess with any configuration options.

-- 
Karl Vogel  I don't speak for the USAF or my company

Tent poles are not for pole dancing.  Please find
alternative ways to disappoint your father.  --seen on boredpanda.com



Re: Looking for a good "default" font (small 'L' vs. capital 'i' problem)

2023-08-20 Thread Karl Vogel
On Sat, Aug 19, 2023 at 03:29:22PM -0400, Christoph K. wrote:
> 
> I'm unsatisfied with the default sans font in debian for use in the
> graphical user interface (in my case XFCE).

I use BSD and Linux, and my eyesight sucks.  For console work (23" monitor
that's about 2 feet away) I use an Xterm with one of the following fonts
(in order of preference):

* xft:Menlo-Regular:pixelsize=20:bold
* xft:Cascadia:pixelsize=22:bold
* xft:Bitstream Vera Sans Mono:pixelsize=21:bold

For browsing (Firefox), my "prefs.js" file holds:

user_pref("browser.display.use_document_fonts", 0);
user_pref("font.default.x-western", "sans-serif");
user_pref("font.internaluseonly.changed", false);
user_pref("font.minimum-size.x-western", 18);
user_pref("font.name.monospace.x-western", "DejaVu Sans");
user_pref("font.name.sans-serif.x-western", "sans-serif");
user_pref("font.name.serif.x-western", "DejaVu Serif");
user_pref("font.size.fixed.x-western", 18);
user_pref("font.size.variable.x-western", 18);

Others I've liked:

* xft:Edlo:pixelsize=21:bold
* xft:FiraMono-Regular:pixelsize=22:bold
* xft:Inconsolata-Bold:pixelsize=25:bold
* xft:Meslo LG S:pixelsize=20:bold
* xft:Meslo LG S:pixelsize=21:bold
* xft:UbuntuMono-B:pixelsize=25:bold

If you get your FONT setting from the environment, it's easy to experiment:

me% echo $FONT   
xft:Cascadia:pixelsize=20:bold

This script starts a new xterm with some tweaks to make it a little nicer:

#!/bin/sh
#https://invisible-island.net/archives/xterm/xterm-384.tgz
https://invisible-island.net/archives/xterm/xterm-384.tgz.asc

To build, unpack the source:

dest=/usr/local
export TERMINFO=/usr/local/share/terminfo

./configure  \
--disable-setgid \
--disable-setuid \
--enable-256-color   \
--enable-narrowproto \
--mandir=$dest/man   \
--with-x \
--with-own-terminfo=$TERMINFO
make
make check
make install

It comes with a nice terminfo file.  I've had problems with "tic" for
ncurses >= version 6, so I use the ncurses-5.9 version to compile it:

root# tic59 -V
ncurses 5.9.20110404

root# tic59 -s -o $TERMINFO terminfo

Hope this gives you some ideas.

-- 
Karl Vogel / vogelke AT pobox DOT com / I don't speak for anyone but myself

The Beatles: "I Get By with a Little Help From Depends"
--Re-released hits for an aging audience



Re: Recommendations for a UPS?

2023-08-01 Thread Karl Vogel
>> On Tue, 01 Aug 2023 03:47:28 -0400,
>> David  may have said:

> What everybody seems to be doing is catering to surge, when a low
> spike can do just as much damage.  Both need to be protected against,
> so any protective appliance selection has to consider that.

  Liebert protects against power surges, brownouts, blackouts or drops
  in voltage.  That's why they're a little more expensive.

--
Karl Vogel / vogelke AT pobox DOT com / I don't speak for anyone at the moment

Skills-wise they suck harder than a black hole with daddy issues.
--Review of Accenture Senior Management


Re: Recommendations for a UPS?

2023-08-01 Thread Karl Vogel
>> On Mon, 31 Jul 2023 13:24:36 -0400,
>> Tom Browder  may have said:

> All the reviews I've seen on Amazon for smaller capacity UPSs
> for APC and Tripp Lite are not that great (I usually concentrate
> on the one- and two-star reviews).

> Any recommenndations from fellow Debian folks?
> Thanks.

  I give a solid vote to Liebert.  I had a near-miss lightning strike
  a few nights ago, and all it did was make my display go out for about
  a second.  It came right back, session intact, didn't lose a thing.

--
Karl Vogel / vogelke AT pobox DOT com / I don't speak for anyone at the moment

Why Trick or Treating is Better than Sex #9:
  If you get tired, you can wait 10 minutes and go at it again.


Re: debian stretch wine

2022-11-30 Thread karl
mattias:
> Är verkligen wine 5.1x det lägsta för stretch?

  Enl.
https://packages.debian.org/search?keywords=wine=names=all=all

så har stretch v1.8.7, ska du ha 5.0.3 är den anpassad till bullseye.

> Går inte uppgradera då hälften av speglarna är döda

Finns det åtminstonde en spegel så går att uppgradera.
  Listan finns här:
https://www.debian.org/mirror/list

  Umeå verkar ha stretch:
http://ftp.acc.umu.se/debian/dists/stretch/

> Men går väll inte ta wine från debian 10 och köra in?

Normalt sett inte pga. beroenden.

  Du kan prova med att bygga från källkod, se längst ned på:
https://wiki.winehq.org/Download

Hälsningar,
/Karl Hammar




Re: Sv: Webbserver

2021-11-13 Thread karl
Ttl:
> Kan ni hjälpamig installera server på min debiamdator 

apt-get install lighttpd

Hälsningar,
/Karl Hammar



Re: mobilt 4g bredband

2021-11-05 Thread karl
Mattias:
> funkar sånt i buster?
...

 Borde, men det beror på vilken krets du har.
 Här är exempel på vad man kan få upp om man söker:

https://www.thinkpenguin.com/gnu-linux/usb-4g-lte-advanced-modem-gnulinux-tpe-usb4glte
https://www.hackster.io/munoz0raul/how-to-use-gsm-3g-4g-in-embedded-linux-systems-9047cf
https://www.toradex.com/blog/how-to-use-gsm-3g-4g-in-embedded-linux-systems
https://www.linuxquestions.org/questions/linux-networking-3/what-to-use-for-lte-4g-linux-4175546335/

Hälsningar,
/Karl Hammar




punkter (tidigare ang. irc)

2021-06-10 Thread karl
Hund:
...
> Det finns två scenarios för när man avslutar en mening med "...",
> när man är sarkastisk eller irriterad.
...

Det måste vara din egen tolkning.
Min stämmer väl med vad som skrivs på wikipedia:

https://sv.wikipedia.org/wiki/...

Hälsningar,
/Karl Hammar




Re: Re: Debian on ARM Chromebook: how to get touchpad working?

2017-11-05 Thread Karl Noss
Yes, I’ve tried installing xserver-xorg-input-synaptics, 
xserver-xorg-input-mtrack, and xf86-input-cmt 
(https://github.com/hugegreenbug/xf86-input-cmt) and none of them have made any 
difference.


Debian on ARM Chromebook: how to get touchpad working?

2017-11-05 Thread Karl Noss
I’m running stretch on an ASUS C201 
(https://wiki.debian.org/InstallingDebianOn/Asus/C201) and I’m totally lost as 
to how to make the touchpad work. I’m not sure if the system even sees the 
device.

I’d appreciate it if someone could help me debug this. Here is some info from 
my system:

root@meus:/# uname -a
Linux meus 4.9.0-4-armmp-lpae #1 SMP Debian 4.9.51-1 (2017-09-28) armv7l 
GNU/Linux
root@meus:/# xinput
⎡ Virtual core pointer  id=2[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointerid=4[slave  pointer  (2)]
⎣ Virtual core keyboard id=3[master keyboard (2)]
↳ Virtual 
core XTEST keyboard id=5[slave  keyboard (3)]
↳ cros_ec   id=6[slave  keyboard (3)]
↳ USB2.0 HD UVC WebCam  id=7[slave  keyboard (3)]
↳ gpio-keys id=11   [slave  keyboard (3)]
↳ VEYRON-I2S Headset Jack   id=12   [slave  keyboard (3)]
root@meus:/# libinput-list-devices 
Device:   cros_ec
Kernel:   /dev/input/event6
Group:1
Seat: seat0, default
Capabilities: keyboard 
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock:n/a
Left-handed:  n/a
Nat.scrolling:n/a
Middle emulation: n/a
Calibration:  n/a
Scroll methods:   none
Click methods:none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation: n/a

Device:   USB2.0 HD UVC WebCam
Kernel:   /dev/input/event5
Group:2
Seat: seat0, default
Capabilities: keyboard 
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock:n/a
Left-handed:  n/a
Nat.scrolling:n/a
Middle emulation: n/a
Calibration:  n/a
Scroll methods:   none
Click methods:none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation: n/a

Device:   gpio-keys
Kernel:   /dev/input/event0
Group:3
Seat: seat0, default
Capabilities: keyboard 
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock:n/a
Left-handed:  n/a
Nat.scrolling:n/a
Middle emulation: n/a
Calibration:  n/a
Scroll methods:   none
Click methods:none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation: n/a

Device:   VEYRON-I2S Headset Jack
Kernel:   /dev/input/event4
Group:4
Seat: seat0, default
Capabilities: keyboard 
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock:n/a
Left-handed:  n/a
Nat.scrolling:n/a
Middle emulation: n/a
Calibration:  n/a
Scroll methods:   none
Click methods:none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation: n/a




Re: Best practices for updating systems over extremely slow links

2016-10-28 Thread Karl E. Jorgensen
Hi

On Thu, Oct 27, 2016 at 03:45:21PM +, rbraun204 . wrote:
> I have a couple of debian boxes in very remote areas that are connected back 
> to
> our wan via a 56kbps satellite link.  Most of the time we have a constant
> stream of data coming/going to that machine so the link is saturated quite a
> bit.

Ouch. I guess that the data isn't for looking at cat videos then!

> I'm having all sorts of trouble getting apt to play nicely with the extremely
> slow link.  When I try to do an apt-get update,  it seems to work for a while,
>   then will start to download whichever list it's currently on all over 
> again. 
> I tried running apt-get update for about 24h and it would never completely
> download the amd64 main Packages.gz (around 7.5M).  It would just keep trying
> to start over and over again. Maybe sometimes it will work, but +50% of the
> time it will crap out.  Apt is configured to use a proxy server, aswell as
>  http::timeout is set to 300 via apt.conf
> 
> FWIW,  I can reliably rsync files over the sat link without issue.  It takes a
> while for sure,  getting about .75 - 1.5KB/s.   So the files do get there.  So
> it seems like whatever magic is baked into the rsync protocol to handle these
> slow links is working alot more reliably for me then the http gets that apt is
> using.  Running rsync with bwlimit will work all day I've found.

That's very odd. So TCP connections stay alive then.

> I'm currently trying to build a list of debs that the system wants using
> something like 
> 
> apt-get dist-upgrade --allow-unauthenticated -y --print-uris | grep -o '\
> 'http.*\' | tr "\'" " " > downloads
> 
> then wget'ing them locally and rsyncing them up the remote.  Seems to be
> working so far,  but the last failed apt-get update seemed to blow away the
> lists on the remote and I can no longer see any pending package upgrades on 
> the
> system.  
> 
> I've also tried tarring up /var/lib/apt/lists/* from a known working system 
> and
> rsyncing that up to the remote,  to try and update the lists manually I 
> guess. 
> But that didn't seem to work either.  After dropping the list files in 
> /var/lib
> /apt/lists and running apt-get dist-upgrade,  still showed no pending 
> updates. 
> So not sure why that would be.
> 
> So after all that,  here are my questions :)
> 
> 1.  Is there some crappy link tweaks I can use in apt to help apt with
> transferring data over a 1.5KB link?
> 
> 2.  In theory,  if I wanted to transfer the apt-get update data via rsync,
>  should I be able to tar up /var/lib/apt/lists/* and send that manually?  It
> didn't seem to work,  but I would imagine there's more going on behind the
> scenes.

if the sources.list are identical, yes: I believe that should work.

> 3.  Generally just curious what others have done when trying to keep systems 
> up
> to date in very remote places with limited pipes.
> 
> 
> Worst case scenario,  If we had to burn a cd full of debs monthly and ship it
> out to the remote I guess that would work.  We also have our own custom repos
> with software that gets updated aswell. But sometimes we would need to push
> those updates out asap.  Also,  there is only 1 machine at each remote,  so
> it's not an issue of running approx to save X machines all updating over the
> network at once.

Normally, I'd suggest looking into running a private mirror and
rsyncing it, but with only one machine at each location, that's
overkill.

I think you may want to look into apt-zip: This will decouple the
download from apt, allowing you to get the data xferred by whatever
method works (rsync?), and picking up the xferred file on the remote
location with apt...

Unfortunately, apt-zip has been discontinued - last appears in wheezy,
but it may still work or be made to work?  It seems aimed at your
exact use case...

Failing that I can imagine other (hand-crafted) solutions with these
components:

- make sure /etc/sources.list (and /etc/sources.list.d) are identical

- rsync /var/lib/apt/* across

- on the remote end: run:

apt-get upgrade --print-uris  # or similar

- grab the URLs

- download the *.debs and rsync them into /var/cache/apt/archives/

- on the remote end:

apt-get upgrade 

This is entirely off the top of my head, but with a bit more thought
and scripting, it _should_ work...

Hope this helps
--
Karl



Re: systemd - how to run system service by user target

2016-10-17 Thread Karl E. Jorgensen
Hi

On Mon, Oct 17, 2016 at 10:01:58AM +0200, Kamil Jońca wrote:
> 
> Assume we have openvpn.service.
> This service neccessary only when I want to connect to my work from
> home.
> 
> Is it possible to make user target which will be automatically run this
> service?
> KJ
> 

It probably is. I had the same problem - a "vpn to home" that doesn't
need to run when at home.

My solution: Firewalling rules on the server-side endpoint, that
rejects VPN connections from inside the network.  Thus, my openvpn
service on my laptop can run constantly, but the VPN will only
actually connect when I'm _not_ at home.

Hope this helps
--
Karl E. Jorgensen (also KJ)



Re: networking

2016-08-26 Thread Karl E. Jorgensen
On Fri, Aug 26, 2016 at 12:43:30PM +0200, Pol Hallen wrote:
> Hi all, I'm helping a friend to create a small network on his office (4
> floors)
> 
> I suggests him to separate each networks:
> 
> floor1 - 192.168.1.0/24
> floor2 - 192.168.2.0/24
> floor3 - 192.168.3.0/24
> floor4 - 192.168.4.0/24
> 
> DSL <--> SERVER <--> WAN - 192.168.10.0/24
>NIC1 - 192.168.1.0/24 <--> switch
>NIC2 - 192.168.2.0/24 <--> switch
>NIC3 - 192.168.3.0/24 <--> switch
>NIC4 - 192.168.4.0/24 <--> switch
> 
> what is better? A linux server with 5 NICS (for all floors) or a dedicated
> and cheapest router with 5 NICS? (DSL <--> SERVER <--> ROUTER)

As others have noted, there is not enough information here to decide
what is best...

However...

You may want to for different networks to allow for future
expansion. Your current scheme will only allow for max ~ 250 clients
per floor.  And you have the IP ranges rubbing against each other
without gaps...

It is usually a good idea to leave "space" between the IP ranges to
allow them to expand without too much trouble. And avoid making the IP
range too narrow - running out of IP addresses is nasty.

For example:

floor1 - 192.168.128.0/20  [ 192.168.128.0 ... 192.168.143.255 ]
floor2 - 192.168.160.0/20  [ 192.168.160.0 ... 192.168.175.255 ]
floor3 - 192.168.192.0/20  [ 192.168.192.0 ... 192.168.207.255 ]
floor4 - 192.168.224.0/20  [ 192.168.224.0 ... 192.168.239.255 ]

With /20 it allows for ~4000 devices per floor. And there are "gaps"
in the IP ranges to allow for expansion, so if the population of a
floor grows, it can grow to a /19 without clashing with the next
floor.

In each IP range you need to allow IP addresses for:

  default gateway (traditionally the first IP in the range. Or
   the last. Convention differs.)
  broadcast address
  network address (not sure this is needed nowadays, but I tend do...)

and you may also want to reserve a block (16 or 32 IPs) at the
beginning/end of each network range for devices with fixed IP
addresses - e.g. your dhcp server (unless you let the router forward
DHCP/BOOTP), DNS server (which may or may not be on the same network)
and other stuff that crops up.
  
Of course, here we seem to be talking about wired access. Wireless
access probably should have its own IP range (and allow for a sizeable
number of devices) as it will probably not be specific to a floor...
You could treat this as a different (less trusted) floor

Hope this helps
--
Karl



Re: jessie-kvm-qemu: Win7 guest fails to update

2016-07-13 Thread Karl E. Jorgensen
Hi

On Wed, Jul 13, 2016 at 04:06:43PM -, Frank Miles wrote:
> I have two jessie systems with kvm-qemu virtualized Windows7 guest OSs.
> These are mostly working well (including guest inter-networking) to
> the extent that I use Windows, with one glaring exception: when I try
> to do a Windows Update - the process never finds anything to do, nor does
> it ever terminate.  Ordinary Windows systems (belonging to other users)
> are finding lots of updates and fairly quickly.
> 
> One of these is my home computer (Win7Pro); the other is my work computer
> (Win7Enterprise).  Both were afflicted approx the same time (not sure exactly
> when, I use the Win7 guests less than once/wk).

Are they on the same network?

> 
> I've talked to our network/user-systems techs/admins, and they haven't a
> clue.  They recommend their usual solution - full reinstall of Windows.
> A hideous amount of time (ISTM) especially for my home system on a slow
> internet feed.

Since this is a problem in a windows VM (probably in a Debian host?),
this is barely applicable to the list, but I'll bite...

Sounds like general network gremlins... A couple of things that spring
to mind:

(1) Can the windows boxes ping e.g. 8.8.8.8 ? If not, then network
connectivity is likely broken...

(2) Can the windows boxes resolve names? E.g. ping www.google.com ?
If not, then DNS resolution is borked...

(3) IP address collisions: If two systems on the same network have the
same IP address, then you will get inconsistent results...  To see
whether a box suffers from this, obtain it's IP address and
disconnect it from the network. If the IP address is still
pingable (or just arping'able), then this is a red flag...

Hope this helps
--
Karl E. Jorgensen



Re: apache and clients

2016-06-20 Thread Karl E. Jorgensen
On Sun, Jun 19, 2016 at 02:49:42PM +0200, Pol Hallen wrote:
> Hi folks!
> 
> Inside a small lan (less 10 pc) I've a server with apache.
> 
> I've to install bind/dnsmasq to automatically resolve IP of apache or can I
> use clients's host file?
> 
> What's the easy/fast way to resolve IP of this server?

It depends on what the clients support...

If they support mDNS, then installing something like avahi-daemon on
the server will make it broadcast it's presence via mDNS, and
(assuming that clients understand mDNS) it can then be reach as
"servername.local" (where "servername" is your host name).

--
Hope this helps



Re: Konqueror - security hole or bug?

2016-06-15 Thread Karl E. Jorgensen
On Wed, Jun 15, 2016 at 09:32:18AM +0200, Hans wrote:
> Dear community, 
> 
> I found a strange behaviour with konqueror (does anyone use it?) and I 
> believe 
> it is either a bug or a security problem.
> 
> the problem is the following: 
> 
> I discovered, that my network card is doing a lot of traffic, although I did 
> nothing with my computer (heavy blinking of my traffic led). Using etherape 
> and 
> wireshark, I could prove, that there is really a lot of traffic from my 
> computer 
> into the internet. However, I could not see, what content it was. 
> 
> At last I found out, that a process called "konqueror" (which is of course 
> the 
> browser) caused this heavy traffic. BUT konqueror was already safely ended by 
> me!

I don't run KDE... Perhaps it is staying around for quick launch later?

> Further testings prove, that this behaviour appears from time to time. It 
> also 
> appears, that this behaviour only happens on certain websites. These are 
> www.heise.de and youtube.com, but maybe others not.

By looking at the DNS requests, you should be able to gather clues about that...

I'd recommend using tcpdump to gather traffic into a file, which you
can then later examine with e.g. wireshark.

> As I do not know, if it is just broadcast traffic or real content, we should 
> have an eye on it. Maybe somebody else can confirm this or saw this in the 
> past.

By looking at the IP addresses, you should be able to see whether it
is broadcast, multicast or point-to-point traffic...

Hope this helps

--
Karl



Re: ljudkortsfråga

2016-06-08 Thread karl
Kristoffer Gustafsson:
> Är det nån här på listan som har erfarenhet av ljudkort under debian?
> är intresserad av inspelning och sådanna saker bland annt.
> någon som testat mycket ljudkort underlinux, som kan svara på sådanna frågor?
> har rätt många.

Bara testat M-Audio 1010LT, pci, fungerar helt ok. Använder det för 
inspelning av kören mha. jack och ardour.

Hälsningar,
/Karl Hammar

---
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sverige
0173 140 57




Re: Löpande presentation på intern-TV

2016-04-26 Thread karl
Staffan:
...
> Först var tanken att den ska titta i en mapp, och visa alla objekt som
> finns i denna, med ett visst tidsintervall.
> 
> Exempel
> fil 1, jpg, 10 sekunder
> fil 2, video, kör
> fil 3, pdf, 20 sekunder
> osv
...

om det vill visa en pdf kan du göra såsom:

fil=det_du_vill_visa.pdf

pg=`pdfinfo $fil | grep Pages | cut -f2 -d:`

xpdf -remote aa  $fil &
for i in `seq   1 $pg`
do
 xpdf -remote aa $fil $i
 sleep 10
done

Hälsningar,
/Karl Hammar

---
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sverige
0173 140 57




Re: chroot setup problem

2016-04-22 Thread Karl E. Jorgensen
On Thu, Apr 21, 2016 at 07:17:14PM -0400, Haines Brown wrote:
> I attempt to chroot from /dev/sdb on /dev/sda. 
> 
>   # mount /dev/sda1 /mnt/debinst
> 
> I verify it is mounted and then do:
> 
>   # LANG=C.UTF8 /usr/sbin/chroot /mnt/debinst /bin/bash
>   /usr/sbin/chroot: failed to run command `/bin/bash': No such file or  
> directory 
> 
> /usr/bin/chroot exists. So does /mnt/debinst. So does /bin/bash.

/bin/bash is irrelevant in this context - the filename will be looked
up _inside_ the chroot, so you need to check that
/mnt/debinst/bin/bash exists (and the shared libraries it uses...)

Hope this helps

--
Karl



Re: Re: Åtkomst till annan volume

2016-01-02 Thread karl
KeeriK:
> Håller på att starta upp en Debianserver på Citycloud, så det är en Virtuell
> server detta ligger på så har ingen fysisk åtkomst till servern.

Jaha, det var det du menade med att byta server. Jag har inte använt 
någon virtuell maskin, så jag måste passa den frågan till någon annan.

> VDA är systemdisken och VDB är datadisken där jag kommer lägga hemsidan och
> mysql databasen.

Tänk på att VDA och vda är olika saker i unix, man skiljer på
små och stora bokstäver.
 
> Från fstab:
> proc  /proc   procnodev,noexec,nosuid 0   0
> /dev/vda1 /   ext3errors=remount-ro   0   1
> /dev/vdb1 /volumes/vol001 ext4 defaults,errors=remount-ro 0 1

/proc borde ha "auto" eller "defaults", men det är förmodligen någonting
annat som mounterar det före mount -a.

Du kanske skulle lägga till "defaults" för /dev/vda1 för formens skull,
och prova med att ta bort errors=remount-ro och se om det gör någon 
skillnad, man mount är lite otydlig på om ext4 har den flaggan.

> Jag har kataloger som ser ut så här:
> volumes/vol001/
> 
> under vol001 så har jag dessa kataloger:
> 
> tunetech
>   data
>   images
> shop
>  www

När du just har startat om din virtuella server, finns katalogerma

 /volumes
 /volumes/vol001

då ?

Vad säger mount eller df ?

> I katalogen volumes/vol001/tunetech/www har jag laddat ner alla filer för
> min webbshop, då denna katalog kommer att vara roten.
> I datakatalogen kommer mysql databasen ligga
> 
> Men vid omstart av server försvinner katalogerna, även om det ligger data i
> de katalogerna.
> Jag vill att de skall mountas vid omstart. Och vid en eventuell
> ominstallation av server (Virtuell) skall jag kunna ta tillbaka denna volym
> och kataloger utan att installera om dessa med...
> 
> Hur gör jag..??

Nu vet jag inte hur det är med virtuella maskiner, men vanligtvis 
avmonterar du bara /volumes/vol001, gör din ominstallation på /dev/vda 
(rör inte /dev/vdb bara), boota upp den nya servern, justera fstab

 mkdir -p /volumes/vol001
 mount /dev/vdb1
 # och för att kolla
 find /volumes -type d

> Och ja, jag har en firma som heter Biltuning Performance Parts Nordic.
> Jag är en gammal CNE (Novell) så Linux är nytt för mig, men vill lära mig.

Ja, gud bevars, novell har jag minnen av. Första novellserver vi fick 
och så satte jag mig vid konsolen och skulle kolla hur man installerade 
drivisarna för WfWg.
 Vilken kulturkrock, man kunde ju inte göra någonting av det jag
var van vid. Så för att läsa manualen för att lära mig hur man skulle
installera novellstödet på windowsmaskinen, så måste jag använde
win-maskinen för komma åt servern, moment 22 verkligen.

Det fanns också en "novell"-server för linux, mars-nwe, det fungerade
men jag använde den inte så mycket.

> Visst finns det säkert konsulter som jag kan köpa och de hjälper mig, men då
> lär jag mig inget!
> Och www.biltuning.se kommer att förflyttas till annan server framöver...
> Så jag hoppas att jag kan få lite hjälp på traven denna väg.

Det blir nog bra.

> fdisk -l
> Disk /dev/vda: 20 GiB, 21474836480 bytes, 41943040 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: 0x
> 
> Device Boot Start  End  Sectors Size Id Type
> /dev/vda1  * 2048 41943039 41940992  20G 83 Linux
> 
> Disk /dev/vdb: 50 GiB, 53687091200 bytes, 104857600 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: gpt
> Disk identifier: 2BD0F641-20CA-4EAF-B101-2C7069CE6A76
> 
> Device Start   End   Sectors Size Type
> /dev/vdb1   2048 104857566 104855519  50G Linux filesystem

Det ser ju ok ut.

Hälsningar,
/Karl Hammar

---
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sverige
0173 140 57




Re: Åtkomst till annan volume

2016-01-02 Thread karl
Keerik:
> Hej igen,
> Ja jag är nybörjare! ;-)
> 
> Har en extra volume som heter volumes med en del kataloger på.

Vad menar du med "volume" ?
Är det en diskpartition, lvm-enhet, md-raid enhet, nfs-export eller 
något annat ?

> Men hur får jag dessa kataloger att visa sig vid omstart av server?

Lägg in filsystemets /dev-nod i fstabben.
Vet du hur fstab är uppbyggd, om inte prova med "man fstab".

> eller byte av server?

Flytta disken till den nya maskinen.

> volymen visar sig, då jag lagt in den i fstab att den skall mounta sig vid
> omstart. Men de andra katalogerna visar sig inte? Hur gör jag?
> Måste varje katalog skrivas in här? Hur?

Om du gjort mount /dev/xxx /mnt, så ska du se katalogerna som /mnt/yyy,
där xxx mnt yyy beror pä vilka namn du använder.

///

För att kunna hjälpa dig måste presentera mer fakta, visa
raden i /etc/fstab.

///

Är det detta det är frågan om:

 http://www.biltuning.se/index.php?
 För att kunna uträtta underhåll, har våran sida stängt tillfälligt.

Är det denna firma du jobbar på:

 Biltuning Performance Parts Nordic

finns det ingen konsult i Lidköping du kan anlita ?

Regards,
/Karl Hammar

---
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57




Re: /dev/tty problem

2015-12-31 Thread karl
Erik Svensson:
> Den 2015-12-28 kl. 23:31, skrev Stefan Alfredsson:
> > On 25/12/15 21:10, Erik Svensson wrote:
> >> /etc/init.d/samba start:
> > Blir det skillnad om du använder systemctl för att starta istället för
> > init.d-scriptet?
> >> Har googlat men inte hittat något vettigt svar.
> >> Är det någon som har någon idé om vad problemet beror på.
> > Jag googlade på
> > systemd Error opening current controlling terminal for the process
> > (`/dev/tty')
> > och fick upp liknande problem med andra programvaror.
> > Det verkar som att det är PolicyKit (polkit) som försöker kontakta en
> > autenticeringsagent, misslyckas, och försöker istället få fatt på en
> > tty som inte heller är åtkomlig (kanske pga chroot?).
> > Har du paketet "polkit" installerat?
> > Körs det någon polkit-agent, t.ex.
> > /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 ?
> Samma problem med systemctl.
> Verkar dock som det är x relaterat. Kör jag "ctrl+alt+f2" så jag hamnar
> i terminal så funkar init.d och systemctl utan problem. Men så fort jag
> är tillbaka i x så är problemet tillbaks.
> 
> Kör lightdm för inlogg och xfce som fönsterhanterare,

Jag kan inte systemd, men har för mig att systemd använder cgroups
for att ha koll på vad som hör ihop med vad. Sökning på systemd och
cgroup ger (läs och se om det kan hjälpa dig):

http://0pointer.de/blog/projects/resources.html

///

Fast enklast är nog att gå tillbaka till sysv, iallafall tills någon
har rett ut problemet.

Enklast är då att prova https://devuan.org/, med

 deb http://packages.devuan.org/merged jessie main

som aptsource.

Hälsningar,
/Karl Hammar

---
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sverige
0173 140 57




Re: Systemd bybasses fstab mounting root partition(?)

2015-10-19 Thread Karl E. Jorgensen
Hi

On Mon, 2015-10-19 at 18:24 +0300, Ivan Boro wrote:
> Looks like subj.
> Have a KVM machine with jessie assembled via debootstrap. Fstab states
> 
> /dev/vda2   /   ext4rw  0   0
> 
> The partition labeled vda2 is listed in grub.cfg as the root partition
> by its uuid.(via update-grub)
> 
> Added a disk to have swap on it. Booted normally, despite the fact, that
> the new swap-disk was automatically labeled as vda and the disk with
> root is as vdb:
> 
> # mount | grep ' / '
> /dev/vdb2 on / type ext4 (rw,relatime,data=ordered)
> 
> No errors or warnings in dmesg.
> 
> So, systemd mounted root partition, whitout looking into fstab.
> 
> I don't have much experience in systemd, and now wonder how this "smart"
> mount works.

Well - I doubt this is systemd specific.

/etc/fstab is in the root file system.  Thus, the system can only
examine /etc/fstab _after_ the root file system has been mounted...

Instead you may want to examine the kernel command line (e.g. in grub
or /proc/cmdline) - it should have "root=" in it. Nowadays that is
often specified via a UUID - and the UUID stays the same if if you move
disks about.

Hope this helps
-- 
Karl E. Jorgensen



Stale mount freezes Gnome3 desktop

2015-10-08 Thread Mag. Dr. Karl Kashofer
Dear all !

I have a problem on Jessie and Gnome3. Its easily explained:

I need to mount a folder with:
sshfs worker@storage1.ngslab:/data/home/worker Worker

This works fine, however when i loose network connectivity or the share
lags due to network traffic, my desktop freezes. The desktop is
unresponsive (no dash, no alt-tab, mouse moves but clicking does
nothing) until network connectivity is restored.

This is really annoying, would anyone have any idea why that happens ?

Thanks,
Karl



signature.asc
Description: OpenPGP digital signature


Re: How come i wrote a NO-BREAK SPACE in xterm+bash ?

2015-08-02 Thread Karl E. Jorgensen
Hi

On Sun, 2015-08-02 at 10:54 +0200, Thomas Schmitt wrote:
 Hi,
 
 i just had some interesting minutes with this riddle in bash
 on xterm:
 
   $ ls -l .. | wc
   ls: cannot access .. : No such file or directory
 
 The refusal sticks to the command in libreadline's history
 buffer and to copy+paste, but not to a manually retyped
 command:
 
   $ ls -l .. | wc
  70 6234159
 
 Finally i found out that the refusing command line does not
 have an ASCII Blank (decimal 32) before the pipe symbol
 but rather UTF-8 code (194,160) which means U+00A0
 NO-BREAK SPACE.
 Obviously this does not count as whitespace in bash (vanilla
 Debian 8.1 install). The error message had (194,160) between
 .. and :.
 
 Now i riddle how my chair, my US-ASCII keyboard, and the
 problem inbetween managed to produce such a character
 in the bash (libreadline) command line of an xterm.
 
 Does anybody have an idea how to reproduce this ?
 (In order to better avoid it.)

I can reproduce that with Alt-gr + space space (My Alt-Gr key is my
compose key):

karl@xps:~$ od -t u1
 
000 194 160  10
003

I suspect you may be able to do the same, although you may have
configured your compose key differently (I cannot remember whether mine
is the default).

Hope this helps

-- 
Karl E. Jørgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1438543857.27201.5.ca...@jorgensen.org.uk



Re: OT: bra exempel på serieportskod i C

2015-07-29 Thread karl
Janne:
 On Wed, 29 Jul 2015 07:55:33 +
 Michael Kjörling mich...@kjorling.se wrote:
  On 29 Jul 2015 06:22 +0200, from j...@lillahusetiskogen.se:
   Det enda jag vill göra är lite trivial skicka och ta emot
   textsträngar via serieporten.
...
  Om du bara vill skicka och ta emot data (inte behöver ha kontroll över
  enstaka pins på porten, t.ex.) så räcker det väl fint att öppna
  lämplig /dev/ttyS* med fopen() och sen hantera den som vilken filström

Fungerar det även om CRTSCTS är satt (jag har inte provat så jag vet inte) ?

Exempel på hur man öppnar en serieport finns i tty_openraw() i:

 http://turkos.aspodata.se/git/c/libaspoutil/tty_util.c

exempel på användning:

 http://turkos.aspodata.se/git/openhw/bungard/

 Jag missade att berätta att jag vill kunna vifta på RTS också.

För att läsa av kontrollinjerna, se statserials källkod eller 
exempelvis:

#include sys/ioctl.h
#define LOG_IFERRNO(a,b) if (a)
int home(void) {
  int ix;
  unsigned value;

  LOG_IFERRNO( (ix = ioctl(fd, TIOCMGET, value)) == -1, LOG_ERR) return -1;

  if (value  TIOCM_RNG) return 1; // RI  pin 9 / 22 (9pin/25pin d-sub)
  if (value  TIOCM_CAR) return 1; // DCD pin 1 /  8
  return 0;
}

Det borde vara något liknande för att sätta utsignaler.
Titta på tty_ioctl(4) under Modem control.

Hälsningar,
/Karl Hammar

---
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sverige
0173 140 57



-- 
To UNSUBSCRIBE, email to debian-user-swedish-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150729102809.6a4b98039...@turkos.aspodata.se



Re: OT: bra exempel på serieportskod i C

2015-07-28 Thread karl
Janne:
 För ~10år sedan skrev jag serieportskod för Linux och lyckades rätt bra
 (tyckte jag) även om det inte var trivialt.
 
 Idag försöker jag mig på samma sak och misslyckas kapitalt. Jag undrar
 om någon har någon pekare till några bra exempel på serieportskod. Jag
 har sökt på nätet men får inte till det. Frustrerande!

Jag har lite serieportskod utspridd i http://turkos.aspodata.se/git/c/
vad är det du vill göra ?

Hälsningar,
/Karl Hammar

---
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sverige
0173 140 57



-- 
To UNSUBSCRIBE, email to debian-user-swedish-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150728235712.a38fa8039...@turkos.aspodata.se



Re: Cron not working

2015-07-12 Thread Karl E. Jorgensen
Hi

On Sun, 2015-07-12 at 13:02 -0400, Haines Brown wrote:
 This may be a FAQ, but it has me stumped. I try to do a weekly backup
 with this, but nothing happens, and there is nothing in syslog: 
 
   # crontab -l
   0 4 * * 0 /home/haines/scripts/backup
 
 I can run the script manually with # /home/haines/scripts/backup.
 
 Cron daemon is running:
 
   $ ps -ef | grep cron | grep -v grep
   root  8972 1  0 12:37 ?00:00:00 cron
 
 

Nothing happens ? odd. There _should_ be entries in /var/log/syslog
from cron when it invokes jobs. And if it does, you should have mail
in /var/mail/haines ...


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1436720833.19469.2.ca...@jorgensen.org.uk



Re: the correct way to read a big directory? Mutt?

2015-05-27 Thread Karl E. Jorgensen
Hm...

On Wed, May 27, 2015 at 10:56:48AM +0100, Jonathan Dowland wrote:
 On Fri, Apr 24, 2015 at 04:12:15PM +0200, Nicolas George wrote:
  Le quintidi 5 floréal, an CCXXIII, Vincent Lefevre a écrit :
   Now I wonder whether the use of the hash by ext3 is a good idea...
   
   Alternatively, I suppose that a SSD disk could improve things.
  
  Well, filesystems can not be optimized for every use.
 
 Ext3 dates from 2001, and is an incremental update to the ext2 design from
 1993. Large-scale storage on flash devices was very uncommon then, and the
 rise of modern SSDs didn't start until around 2008 iirc.
 
  Having myriads of small files has always been a bad idea anyway, it trashes
  the inode and dentries cache, it costs extra disk bandwidth (because you can
  not read half a sector at the end of the file) and latency (because of all
  the seeks, even when reading in order, it will be more fragmented than a
  single file), etc.  Of course, nowadays, huge RAM and SSD will mitigate the
  issue.
 
 Mail storage is a lose-lose situation, really. Maildir improves the 
 performance
 and reliability of parallel operations on a mailbox versus mbox, but is less
 space efficient precicely because of the metadata overhead, especially for
 large mailboxes. One should keep high-read boxes in Mailidir and low-read,
 large-size archival mailboxes in mbox, potentially compressed. The archivemail
 tool can assist with moving one to the other.
 
  It is a tragedy that a standard, robust and efficient format for mailboxes
  was never designed and adopted.
 
 It's a tragedy that many such standards were invented :)

Obligatory XKCD reference: http://xkcd.com/927/

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/20150527112621.ga8...@eee.karl.home.jorgensen.org.uk



Re: An inotifywait question

2015-04-17 Thread Karl E. Jorgensen
Hi!

On Fri, 2015-04-17 at 12:05 -0400, Gene Heskett wrote:
 Greetings  all;
 
 I am as you have proably guessed by now, the originator of some bash 
 scripts that greatly simplify the day to day background operations.
 
 Two of these scripts make use of inotifywait to hand them the data they 
 need to do the rest of their jobs.
 
 One of them watches /var/spool/mail and is dependent on finding the 
 $pidof kmail so it kmail isn't running, it will not send a message to 
 kmail over the dcop or dbus facility and thereby stuffing up the buffers 
 either of these use.
 
 However, there are generally two instances of inotifywait running because 
 I also use a session to watch another directory where a .jar file 
 running as drivewire for a legacy computer in the basement, so that I 
 can send a file to a printer it thinks is attached to that machine, but 
 which in reality is actually sent up the usb cable to this machine and 
 dropped into a file here.
 
 Simplified, that file, when closed by drivewire, is then sent via an lp 
 command in that script, thru cups which renders it, then sends it back 
 down that same usb cable to a brother BW laser printer on that 
 computers desk, where it gets spit out in a beautiful font, at 19 ppm, 
 which is about 20x faster than any pin pounder printer that was ever 
 connected to it 30 years ago.
 
 However, if something goes aglay, my scripts try to kill the inotifywait 
 session, and go silent until the proper $pidof's are present again.
 
 But occasionally they will kill each others inotifywait sessions as I am 
 currently doing that kill with killall $name.  Not the correct way 
 obviously to kill the session that THAT script started.
 
 Because inotifywait is not silent when it launches, I have been forced to 
 do an var=inotifywait $option_string 21 /dev/null  to absorb the 
 noise.  Am I dumping the PID return?  Can I save that launch return and 
 use it to do a specific kill $savedvar?

 
 The manpage for inotifywait is silent in this regard, but I suspect I am 
 looking at the wrong manpage.  Perhaps, since its a bash script in both 
 cases, its the bash manual I should be studying?
 
 Thanks for any clues.  The bash manual, at around 500 pages, details 
 aren't that easy to find in that tome.

Bash (or sh) is really a programming language :-)

You're looking for $! :

Special Parameters:
...
   !  Expands  to the process ID of the job most recently placed
into the background, whether executed as an asynchronous
  command or using the bg builtin (see JOB CONTROL below).


Hope this helps
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1429288451.22434.17.ca...@jorgensen.org.uk



Re: Authentication breakdown

2015-04-07 Thread Karl E. Jorgensen
Hi

On Tue, 2015-04-07 at 10:02 -0300, francis picabia wrote:
 I'm having a perplexing problem around authentication on my home system.
 
 It has been running 32 bit Debian for years, and up to date with Debian 7.
 
 Nothing new had been installed or configured for months, only
 aptitude update and aptitude safe-upgrade.
 
 This morning, checking email, I found thunderbird could not login to dovecot.
 Restarted dovecot and no difference.
 
 SSH login failed from two different systems.
 
 I checked that the firewall on Linux was off.
 I checked last reports and there was no unusual access.
 Tested with chkrootkit and nothing came up.
 This system is normally protected by unusual ssh port
 plus denyhosts against brute force login.
 
 nsswitch.conf had compat for passwd, group and shadow,
 and I switched it to files, with no difference.  Nothing
 seemed odd under /etc/pam.d with the common-* files.
 
 Console login as my user or as root failed.
 
 dmesg didn't report anything unusual happened.
 
 Tried a passwd refresh to a new password.  That required
 entering my existing password, and entering the existing
 password worked.  However it wouldn't allow ssh or console
 login with the changed password.  I changed it back
 to the usual password, and again, it accepted the
 old password when prompted.

If logins via both console and ssh failed (as both yourself and root),
how did you get in?

Once logged in, I would suggest that you study the log files before
trying to change things.  The log files are usually a much faster route
to the underlying cause...

Assuming you have a default(ish) syslog config, the first log file I'd
look at is /var/log/auth.log. Then /var/log/kern.log and the remaining
log files.

 Eventually I was locked out when the screen save came on
 after leaving it alone for awhile.  I rebooted, and the system still
 has this wacky behaviour. 

Ah - a graphical login!

I'd recommend staying with the console (text-only) login whilst
diagnosing this. It's simpler software, and should thus be simpler to
debug.  And it is plausible that your gdm greeter is suffering from the
same underlying cause...


 
 In addition, the gdm screen
 does not come up - displaying only an hourglass.
 VT consoles do come up after reboot, but again,
 console login as myself or root are failing,
 and ssh login from remote as myself is failing.
 
 I've never seen something like this fail before unless I had
 been messing around with pam configuration files.  I'm currently
 unable to get into the system so I'll be getting a rescue CD
 set up to use later today.

Well - it is theoretically possible that a disk corruption has done
something to your pam configuration.   Hopefully the log files will
contain clues so you don't have to rely on such wild unsubstantiated
guesses...

Hope this helps
-- 
Karl E. Jorgensen k...@jorgensen.org.uk


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1428443299.4670.13.ca...@jorgensen.org.uk



Re: Jessie regularly loses wifi connection though signal is strong

2015-03-13 Thread Karl E. Jorgensen
On Fri, Mar 13, 2015 at 10:58:05AM -0400, Thomas H. George wrote:
 Very frustrating. Wifi says it is connected though it is not.
 After reset the connection works for a time, then just stops.
 
 Any suggestions?

More diagnostics is needed to make sensible suggestions.

A couple of things to look at next time you have a network outage:

* check the logs - mainly : /var/log/kern.log and
  /var/log/daemon.log. There might be interesting stuff in
  /var/log/daemon.log too. Messages with a timestamp immediately you
  lose the network connection may give clues to what is going on.

* Do you lose association with the access point?  (iwconfig wlan0
  and studying /var/log/kern.log for wlan0-related messages will give
  the answer to this)

* Is the network interface still up? (ifconfig wlan0) Has it got the
  right IP address?  /var/log/daemon.log will show dhcp-related events
  here...

* Can you reach the access point with ping?

Hope this helps
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/20150313210058.ga12...@eee.karl.home.jorgensen.org.uk



Re: Very slow downloads when doing dist-upgrade.

2015-03-13 Thread Karl E. Jorgensen
Hi

On Fri, Mar 13, 2015 at 11:27:54AM +0100, SL wrote:
 Hi,
 
 I have a number of VPSs which I need to upgrade to Wheezy.  During the
 dist-upgrade step I'm getting very slow download speeds from debian.org 
 (10kB/
 s), which is causing the process to take a very long time.  Is there anything 
 I
 can do to speed things up?  Could anyone suggest e.g. a mirror I could add to
 sources.list? (I'm in Europe).

If you have more than a few servers, it is really beneficial to use a 
caching HTTP proxy (e.g. squid configured to cache big files) on your
local network ... Then you'll only have to download things once (usually)

hope this helps

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/20150313104354.ga30...@xps.home.jorgensen.org.uk



Re: recommended ftp clients for Debian

2015-02-24 Thread Karl E. Jorgensen
On Tue, 2015-02-24 at 09:32 -0800, Patrick Bartek wrote:
 On Tue, 24 Feb 2015, Lisi Reisz wrote:
 
  Yes, I know I can STFW.  I have in fact done so.  But I am after
  personal experience.  
  
  I want a simple ftp client, for putting not getting, that is easy and
  pleasant to use.  GUI based.  For the use of non-geeks as well as
  myself.
 
 FileZilla.  Never had a problem with it.  Ever.  Very configurable.
  Lots of feature.  Easy to use.  Initially used gftp, but switched to
  FZ years ago.

[joining this thread late - sorry]

If you are using Gnome, then the normal file manager (nautilus) should
be able to fit the bill too.  Then users do not have to learn a new
interface...

Just my 2 p

-- 
Karl



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1424801811.11361.12.ca...@jorgensen.org.uk



Re: Some commands is not working in Linux server

2015-02-23 Thread Karl E. Jorgensen
Hi

On Mon, 2015-02-23 at 21:00 +0530, Justinmp wrote:
 Greetings to all..
 
 Everything was working normally until last day.From today I am not
 able to execute few commands like ls in cent os machine.Interesting
 part is ls -al is working fine.
 
 When ever I issued ls , du -sh *  ,yum update system got stuck and
 putty session  freezes.
 
 Is this because of any hardware issue ?This server is remotely
 accessed.

You do not list many symptoms, so the server could be suffering from
anything. Or your network may suffer from anything.  Without more
details, the best we can do is pure speculation.

... yum update ?? You know: this is a debian list...



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1424708419.11587.2.ca...@jorgensen.org.uk



Re: Upgrading Kernel on VPS - Failed?

2015-02-22 Thread Karl E. Jorgensen
Hi

On Sun, Feb 22, 2015 at 03:14:19PM -0500, Stephen R Guglielmo wrote:
 Hi list,
 
 I have a VPS with a company. The image I initially chose was Debian
 Wheezy. I immediately upgraded to Jessie. I updated the kernel and
 rebooted. However, it seems I can't use iptables:
 
 $ sudo iptables --list
 modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could
 not open moddep file '/lib/modules/3.2.0-4-amd64/modules.dep.bin'
 
 iptables v1.4.21: can't initialize iptables table `filter': Table does
 not exist (do you need to insmod?)
 Perhaps iptables or your kernel needs to be upgraded.
 
 3.2.0-4-amd64 is from Wheezy. It seems that the system is still looking
 for the previous kernel. Does anyone have information about this?

What does uname -a report? This should tell you what the running
kernel version is.

It could be a case of your providing implementing your Virtual Private
Server using kernel cgroups - e.g. via Linux Containers (LXC). If so,
then you do not control what kernel you run - you share the kernel of
the host operating system, but have limited access inside it. Tools
like grub and lilo do not apply inside Linux Containers either.

A VPC is a very close approximation to a real hardware server, but
not quite the same.

One relatively easy way of detecting whether you're inside a LXC is to
run uptime - this will report the uptime of the host kernel. If you
recently rebooted your VPS, you will see an uptime which is too
long. Tools like the imvirt package can also tell you what
virtualisation you're running under.

Hope this helps

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/2015013646.ga24...@eee.karl.home.jorgensen.org.uk



Re: A big Thank You to Debian :-)

2015-02-18 Thread Karl E. Jorgensen
On Wed, 2015-02-18 at 22:40 +1300, Richard Hector wrote:
 On 17/02/15 23:40, Karl E. Jorgensen wrote:
  I also ended up with systemd - which I was also somewhat sceptical 
  about.  But since I could not come up with any technically sound 
  arguments against it (partially caused by my ignorance of systemd),
  I decided to take the leap - if nothing else, to be able to
  honestly criticize it and actually know what I was talking about.
 
 On 18/02/15 20:29, Andrew McGlashan wrote:
  You couldn't even bring yourself to say systemd, what's wrong with
  saying it?
 
 He did, actually. And described constructive motives.

I did. But in the first paragraph of the email, I *did* have a typo,
where I missed out the 'd' in systemd, which is what I assume Andrew is
referring to.

I'm amazed that a typo can bring such an emotional reaction - my email
was really not about systemd, but about the fact that Debian Works -
at least for me.  I cannot speak for others.

I feel it is important to praise (or at least: acknowledge) the things
that go right.  And my upgrade went smoothly.  A lot of work has gone
into Debian, and I believe it is very important that we encourage the
things that go right - just complaining about the wrong things is
insufficient and probably not constructive.

The fact that some people dislike what runs on my system[1] is
immaterial as far as I am concerned. My system works for me.

[1] Yes: system. No d. That's on purpose. There are other things in
life.
-- 
Karl E. Jorgensen.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1424254517.4884.12.ca...@jorgensen.org.uk



A big Thank You to Debian :-)

2015-02-17 Thread Karl E. Jorgensen
I see that there has been a fair amount of talk on this mailing list
about system , Gnome 3 and some general dislike of Debian Jessie as a
result. So I thought I'd throw in my 2 p

I recently upgraded my main laptop (a fancy new Dell XPS with more SSD
than I've ever had before) from Wheezy to Jessie, and I have to say:
Brilliant!

The upgrade took a while (almost exactly 1 hour) and there were a few
NEWS files presented to me, but no problems surfaced.  Things just
worked.  It was a bit of an anticlimax, bordering on boring, followed
by a nervous reboot.  It took me longer to make sure I had working
backups and alternate boot media - just in case.

Even though I had opted to install the laptop with a single (big) BTRFS
file system, this didn't cause as much as a comment by the upgrade.  The
scripts just got on with their jobs without grumbling.  I was fearing
that GRUB might have a hiccup on this, as I realise this is not a
commonly-used set-up, and thus probably less tested.

I *did* end up with Gnome 3 - which I initially was a bit sceptical
about. I was a Gnome (2?) user with a preference for the awesome
window manager - this did not seem to be an option with Gnome 3.  But
with Gnome 3 and the Shellshape extension (could somebody package that?
Otherwise I might!) things are back as I like them. With eye candy to
boot.  This would probably not be suitable for my low-powered Atom
netbook, but I'm now confident enough to upgrade that too. Later. When I
get time.

I also ended up with systemd - which I was also somewhat sceptical
about.  But since I could not come up with any technically sound
arguments against it (partially caused by my ignorance of systemd), I
decided to take the leap - if nothing else, to be able to honestly
criticize it and actually know what I was talking about.

As far as I am concerned, the proof is in the pudding: It *works*,
dammit! :-)  I'm sure there are some rough edges somewhere - I just
haven't encountered them. And until I do, I have nothing to complain
about.

My system now boots in SECONDS. It nearly boots *too* quick. It seems
like the pause in Grub is taking longer than both the POST and Debian
boot!?  Booting is as quick as resuming from sleep!  I'm not used to
that!!

I'm sure that there is a *lot* of work going on for Debian Jessie that I
simply have not paid attention to - simply because it did not cause
problems.  Which is absolutely excellent - that's the way software
*should* be. Keep up the good work!

-- 
Karl E. Jørgensen



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1424169638.4500.25.ca...@jorgensen.org.uk



Re: Writing files with formatted name

2015-02-09 Thread Karl E. Jorgensen
Hi

On Mon, Feb 09, 2015 at 03:02:07PM -0500, Roman Gelfand wrote:
 would writing synchronized java class using the same algorithm solve the race
 problem?

Java is a bit overkill for that :-)

Atomic locking is available in the shell too - man flock ...

 
 Thanks
 
 On Fri, Feb 6, 2015 at 12:12 PM, Roman Gelfand rgelfa...@gmail.com wrote:
 
 I need to write files with name format {5 digit sequential number}.
 {extension I will supply}.
 
 Is there a utility which would allow me to copy/move/put a file with the
 above name format incrementing the sequence for each subsequent file. 
 Something similar to what logrotate is doing.
 
 Tlhanks in advance
 
 

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/20150210071924.ga24...@eee.karl.home.jorgensen.org.uk



Re: Was: Ric Moore

2015-01-19 Thread Karl E. Jorgensen
Hi

On Mon, Jan 19, 2015 at 09:13:20AM -0600, Richard Owlett wrote:
 Gene Heskett wrote:
 On Sunday 18 January 2015 18:21:02 Mart van de Wege did opine
 [SNIP]
 
 apt-get remove network-manager seems to work just fine for me.
 
 Mart
 
 I have attempted that, several times in the past 5 or 6 years.  The list
 of stuff it will also remove is usually several printed pages, IF you
 could actually get a printout. Unfortunately, you can't even copy/paste
 for a record from that screen by any method but a screen snapshot series.
 [snip]
 
 I had a similar problem some time back.
 Someone pointed me to a utility that saved everything sent to a
 console window.
 It was not redirection nor a pipe as the console retained all
 its functionality.
 
 The procedure was:
   start the utility in the console specifying a destination file
   run arbitrary number of commands
  [the utility recording input keystrokes and resulting output]
   terminate the utility
   close console if desired
 
 I understand the typical use of the utility is in a classroom
 situation where instructor needs to see exactly what the student
 did. I know I saved the message but I can't come up with keywords to
 retrieve it.

That sounds like the script command - it's in the bsdutils package
which should be installed by default.
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/20150119152335.ga3...@eee.karl.home.jorgensen.org.uk



Re: shell script removing log files.

2014-12-22 Thread Karl E. Jorgensen

On Mon, Dec 22, 2014 at 10:51:26AM -0800, pe...@easthope.ca wrote:
 This command in a shell script removes unwanted log files.
 
 for i in $( echo *.Log ); do 
   /bin/rm $i; 
   echo Removed $i. 
 done
 
 In the edge case of no matching files, rm complains.
 /bin/rm: cannot remove `*.Log': No such file or directory
 
 If echo is replaced with ls, it complains when there 
 is no match.
 
 Does anyone have a tidy solution for this task?

First of all, you have an unnecessary use of echo. Although
seemingly innocuous, if you have file names with spaces, the spaces
will mess things up as things will be going through the shell
twice. Which is once too many.

Second, remember that when the shell performs pathname expansion, it
will leave the original pattern in there if nothing matches.  Hence
the error message you see.

This should do the trick:

  for i in *.Log ; do
if test -f $i; then
  rm $i
  echo Removed $i.
fi
  done

or if you want to make things *really* simple:

  rm --force --verbose *.Log

:-)

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/2014101542.GB5035@hawking



Re: USB drive mounted Read-only; what to do ?

2014-12-19 Thread Karl E. Jorgensen
Hi

On Fri, Dec 19, 2014 at 05:45:33AM -0300, Renaud OLGIATI wrote:
 I plug in a USB pen drive, and launch dd  to copy an iso image.
 
 # dd bs=4M if=debian-live-7.6.0-amd64-rescue.iso of=/dev/sdi  sync
 dd: opening `/dev/sdi': Read-only file system

Read-only file system on /dev/sdi??  This is very out of the usual:
This seems to indicate that your /dev filesystem is read-only, and
dd cannot create /dev/sdi ...

What does:

  ls -l /dev/sdi

report?  I suspect it will say the file does not exist.

If /dev/sdi does not exist, dd will attempt to create it.  As a normal
file.  Which is probably not what you want...

Similarly, can /dev actually be written to?  The output of a command
like this would be instructive:

  touch /dev/somefile-which-doesnt-exist

 
 Is there a way to force it to mount read-write ?

Probably. But it depends on why it was read-only to start with...

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141219120135.GB25008@hawking



Re: user permission inconsistency

2014-12-08 Thread Karl E. Jorgensen
Hi

On Mon, Dec 08, 2014 at 06:16:37PM +0100, alex wrote:
 
 Hi everybody,
 
 I observe a strange inconsistency in user permissions (jessie up to
 date; xfce4). Id est:
 
 user@rheya:~$ ls -la /dev/ttyACM0
 crw-rw 1 root dialout 166, 0 Dec  8 17:25 /dev/ttyACM0
 
 user@rheya:~$ id alex
 uid=1000(user) gid=1000(user) groups=1000(user),20(dialout)

This will show the group memberships of the alex user, if he was to
log in now.

 
 user@rheya:~$ echo \0  /dev/ttyACM0
 bash: /dev/ttyACM0: Permission denied

Well - you do not appear to be logged in as alex. You are user ??

 
 although
 
 root@rheya:~# echo \0  /dev/ttyACM0  echo ok
 ok

running the id command without any parameters should show you the
group memberships of your shell.

 I *suspect* this is somehow related to systemd-logind (while systemd
 is not running as pid 1)
 
 I just added user to group dialout (and astonished not to have to
 logout in order to have updated user groups list)

Well - if you run id username, this will update immediately. 

But what matters is the group memberships of your *shell* - which it
will get at login-time...

Hope this helps
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141208172633.GA24709@hawking



Re: Debian by default / Debian jessie

2014-12-05 Thread Karl E. Jorgensen
Hi

On Fri, Dec 05, 2014 at 10:47:16AM +, Frederic Robert wrote:
 Hello,
 
 How are you? Pulseaudio is used by default. I'm using debian
 jessie. I'd like to use Alsa by default. I removed pulseaudio
 (apt-get remove pulseaudio) and installed alsa-base. When i reboot
 the computer, i don't have sound :(

Which application did you expect to emit sound?  some more information
would be helpful here...

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141205111348.GC4406@hawking



Re: bind9 needs sometimes a restart after resume from suspend

2014-12-02 Thread Karl E. Jorgensen
Hi

On Sun, Nov 30, 2014 at 03:26:29PM +0100, Rainer Dorsch wrote:
 On Sunday 30 November 2014 11:59:16 Karl E. Jorgensen wrote:
  Hi
  
  On Sun, Nov 30, 2014 at 12:26:36PM +0100, Rainer Dorsch wrote:
   Hi Pascal,
   
   On Sunday 30 November 2014 11:15:41 Pascal Hambourg wrote:
Hello,

Rainer Dorsch a écrit :
 I run bind9 locally and noticed that bind9 sometimes needs a restart
 after
 suspend.

Why ? Not running, not resolving, errors... ?
   
   bind9 does not respond.
   
   See e.g. the dig command from my previous post
   
   blackbox:~# dig heise.de
   ^Cblackbox:~#
  
  That was well hidden :-)
  
  Any related messages in /var/log/daemon.log ?
 
 Indeed there are a number of entries in there, these are the entries right 
 after restart:
 
 Nov 30 10:10:49 blackbox named[24198]: clients-per-query decreased to 12
 Nov 30 10:10:50 blackbox console-kit-daemon[2055]: WARNING: Error waiting for 
 native console 56 activation: Resource temporarily unavailable 
 Nov 30 10:10:50 blackbox named[24198]: validating @0xb3f5c0d0: . NS: got 
 insecure response; parent indicates it should be secure
 Nov 30 10:10:50 blackbox named[24198]: error (insecurity proof failed) 
 resolving './NS/IN': 192.168.178.1#53
 Nov 30 10:10:50 blackbox named[24198]: error (network unreachable) resolving 
 './NS/IN': 2001:503:c27::2:30#53
 Nov 30 10:10:50 blackbox named[24198]: managed-keys-zone: No DNSKEY RRSIGs 
 found for '.': success
 Nov 30 10:10:50 blackbox named[24198]: validating @0xb3a00018: . NS: no valid 
 signature found
[snipped more of the same]

These messages dont look abnormal - in fact they seem to indicate
proper operation.

 
 But after restart when bind9 is working, I still see similar entries:
 
 Nov 30 15:19:40 blackbox named[2322]: validating @0xb4072230: . NS: got 
 insecure response; parent indicates it should be secure
 Nov 30 15:19:40 blackbox named[2322]: error (insecurity proof failed) 
 resolving './NS/IN': 192.168.178.1#53
[similar messages snipped]

Going back to your original symptom: bind not responding... It looks
like bind is at least *alive*.

I wonder... What exactly does bind not responding mean? any command
that reproduces that would be handy.

As this is happening in relation to suspend/resume, this would imply
that network interfaces go down and up too. So perhaps bind is failing
to detect the re-arrival of network interfaces?

The output of a command like sudo netstat -nlp | grep bind while
bind is not responding would be instructive. And then compare/contrast
with the scenario of a working bind...

Hope this helps 
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141202130714.GA32322@hawking



Re: bind9 needs sometimes a restart after resume from suspend

2014-11-30 Thread Karl E. Jorgensen
Hi

On Sun, Nov 30, 2014 at 12:26:36PM +0100, Rainer Dorsch wrote:
 Hi Pascal,
 
 On Sunday 30 November 2014 11:15:41 Pascal Hambourg wrote:
  Hello,
  
  Rainer Dorsch a écrit :
   I run bind9 locally and noticed that bind9 sometimes needs a restart after
   suspend.
  
  Why ? Not running, not resolving, errors... ?
 
 bind9 does not respond.
 
 See e.g. the dig command from my previous post
 
 blackbox:~# dig heise.de
 ^Cblackbox:~#

That was well hidden :-)

Any related messages in /var/log/daemon.log ?

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141130115916.GA22567@hawking



Re: Image cloning software

2014-11-30 Thread Karl E. Jorgensen
Hi

On Sat, Nov 29, 2014 at 06:39:32PM +0100, Miroslav Skoric wrote:
 Is there a good software for Debian 7.7 as well as for Debian 6.10
 that is capable to produce a multi DVD/CD image of a working system,
 in a way that such image can be used later as a DVD/CD installation
 media for 'cloning' on the other comps (or on itself, in case of an
 irreparable failure of a working machine)? Thanks.

You may want to look at the bootcd package - looks like it will do
what you ask... Or at least similar enough to get you most of the way
there.

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141130121538.GB22567@hawking



Re: EXT4-fr error, ext4_find_entry: reading directory...

2014-11-24 Thread Karl E. Jorgensen
Hi

On Mon, Nov 24, 2014 at 01:17:29PM +0100, linuxmasterj...@free.fr wrote:
 Hi,
 
   Since a couple of days, I have a bunch of EXT4-fr error device
   ... ext4_find_entry: reading directory errors. 

Sounds like stuff in the kernel log?

   For me, that's only a disk issue, I booted on a sysresccd and did
   a e2fsck. Everything was OK. Then, I rebooted and I still had
   those errors. I bought another hard drive and copied all data from
   the old HD to the new one, re-install grub and booted on
   it. Worked like a charme but I still have those awful errors. I
   did another e2fsck with check blocks : nothing abnormal...

How was the data copied? dd of the underlying device or copied at the
file level...

The errors in the kernel log sound like file-system level
inconsistencies.  Copying the data by using dd of the underlying
device would also preserve the filesystem level inconsistencies...

   Any ideas ? Could be a SATA cable / SATA controller / motherboard
   issue? How to identify the right problem?

Possibly. If so, I'd expect other clues in the kernel log complaining
about hardware issues

It could even be a power issue - lack of sufficient voltage can have
all sorts of weird and counter-intuitive results. And inconsistently
so.

Hope this helps
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141124122313.GA12505@hawking



Re: Block size confusion.

2014-11-21 Thread Karl E. Jorgensen
Hi

On Fri, Nov 21, 2014 at 04:20:07PM +0500, Muhammad Yousuf Khan wrote:
 Dear experts,
 
 i know its frustrating because i always ask theoretical question. i hope and
 believe you guyz will not mind and  i really learn alot from this list.
 
 So, coming to the point, I want to clear my confusion on block size.
 theoretically i  know what block size is but practically i dont know that what
 are the reasons that one might want to change the block size and how it 
 effects
 the IO performance.

Well.. Block sizes exist at multiple levels...

The physical disk will have blocks - i.e. all physical reads and
writes happen in multiple of blocks. To change one byte, the whole
block has to be read into memory, the byte change in memory, the whole
block written out again.

Nowadays disks may hide this in their interface, but on the physical
media (I'm thinking of spinning rusty platters), we still have to obey
the laws of physics. Changing the magnetisation of a single spot is on
neigh-impossible without distorting the surrounding magnetic fields,
so blocks have gaps between them to allow for this.  Obviously things
are different on SSDs.

A different block concept also exists at the file system level for
the purposes of allocation - disk space can be allocated in units of
blocks.  For file systems with a few big files, bigger block sizes are
good - means fewer total blocks to keep track of and probably less
fragmentation. For file systems with lots of little files, smaller
block sizes will tend to waste less space. And then there is the
massive grey area in between

If you are using LVM, this also has extents which is the unit of
allocation here.

 i have heard that people would want to use bigger block size if they are
 hosting or storing big files like videos, or other big size data. on the other
 hand people recommends to use small size when we have many small
 files.

Yes - this is the block size concept for allocation.

 actually i know the science behind that if i create a bigger block size and
 file size is small it will create the same size file as block size which end 
 up
 eating space when we have large database of small file.

Usually, yes.  It really depends on the filesystem you use.  I believe
it to be true for ext3, and (probably) also for ext4.  But reiserfs,
btrfs and others have some optimisations in this area, where small
files are stored in the directory.  But here we're talking about file
system internals.

 
 so in context of above. my questions are.
 
 why to change the block size? and what are the basic reasons that make some 
 one
 to think about that?

Usually, there are two desires pulling in different directions:
Performance and disk usage efficiency.  And what is best for one use
case may be unacceptable for a different use case.

When we throw other concepts like resilience and backups into the mix,
things get murkier still.

 
 did it really help in increasing the performance by changing the block size?
 
 can it effect the RAID (mdadm) or hardware RAID performance if we change the
 block size?

Yes :-)

 what is the deference b/w block size and cylinder. ?

http://en.wikipedia.org/wiki/Cylinder-head-sector

 
 why it is recommended that we should use same size of block in both VG and LV
 as the size of PV?

This could possible be due to alignment


-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141121124135.GD26871@hawking



Re: LVM: shrinking a logical volume (moving LVM logical volumes to new disks)

2014-11-18 Thread Karl E. Jorgensen
Hi

On Wed, Nov 19, 2014 at 12:24:27AM +0100, lee wrote:
 Hi,
 
 so far, I managed to pvmove a LV to my USB stick and from there to a
 backup disk in another machine.  Doing so, I found that I can split off
 LVs from a volume group and that this inevitably creates a new VG.  That
 leaves you stuck because it's impossible to move a LV from one VG to
 another, and it's also impossible to merge multiple VGs into one VG :(
 How stupid is that??

Well - you can merge VGs. and You and split VGs. so you could:

- pvcreate /dev/${usbdevice}
- use pvmove to move your LV of choice onto the USB stick.
- use vgsplit to split /dev/${usbdevice} into its on VG
- Sneakernet the USB stick to a new box
- Use vgmerge to join the USB stick to the box's VG
- Use pvmove to move the LV onto a local disk
- Use vgsplit to make the USB its own VG again
- Sneakernet the USB stick back to the original box
- Rinse and repeat.

But that's a fair number of steps...  You could also just:

- Create a file system on the USB device. and mount it.
- dd if=/dev/oldvg/vgname | gzip --best  /media/usbstick/somefile.gz
- Unmount and sneakernet to the new box

etc.. I'm sure you get the idea. No need to make it more complicated
than absolutely necessary.

 This means that I must move the remaining LVs from the server to the USB
 stick all at once because otherwise I'd end up with a number of VGs,
 each representing one LV, rather than a number of LVs within one VG.

Not quite...

[snipped lots of stuff that my tired braincells cannot cope with]

 (Note to self: Do not partition LVs but create LVs for swap partitions
 instead.)

Sounds like a sensible note. Unfortunately, if you use virtualisation,
you will often end up slicing off LVs to be presented to the virtual
machines as disks. And the VMs then partition them and/or create PVs
on them. Nested stuff galore.

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141119003752.GB25922@hawking



Re: Unable to start kvm virtual machines after re-install of testing

2014-11-13 Thread Karl E. Jorgensen
Hi

On Tue, Nov 11, 2014 at 11:31:30AM +0200, Jarle Aase wrote:
 Hi,
 
 After a fresh reinstall of Debian testing today, I am unable to start
 my virtual machines. I lost the configuration during the reinstall, but
 have the disk images. I'm not sure if it is a bug or something wrong on
 my machine. The images worked on Debian testing after an upgrade two
 days ago).
 
 
 Trying to import any of the VM's with virt-manager, I get the the
 error below.
 
 Please advice it I should file a bug-report or steps to resolve the problem.
 
 
 From Virtual Machine Manager:
 Unable to complete install: 'internal error: Cannot find suitable CPU
 model for given data'

Strange - does your VM require any special CPU settings? If so, they
should be visible in the XML for the VM...

If your VM is linux, then I see little reason for the VM to require
certain CPU features - just going with the defaults would normally
suffice, as Linux runs happily on the hypervisor host already...

What is the relevant part of the output of virsh dump for the VM in
question ?

 # cat /proc/cpuinfo
 processor   : 0
 vendor_id   : GenuineIntel
 cpu family  : 6
 model   : 42
 model name  : Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
 stepping: 7
 microcode   : 0x28
 cpu MHz : 809.789
 cache size  : 6144 KB
 physical id : 0
 siblings: 8
 core id : 0
 cpu cores   : 4
 apicid  : 0
 initial apicid  : 0
 fpu : yes
 fpu_exception   : yes
 cpuid level : 13
 wp  : yes
 flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
 mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
 syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology
 nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx
 est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt
 tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts
 dtherm tpr_shadow vnmi flexpriority ept vpid
 bogomips: 4385.36
 clflush size: 64
 cache_alignment : 64
 address sizes   : 36 bits physical, 48 bits virtual
 power management:

Not the greatest CPU for virtualisation, but I see no reason it should
not work...

I wonder: It sounds like the contents of /proc/cpuinfo changed between
the two kernel versions... Is the contents the same if you boot the
old kernel?  The differences could be instructive...

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141113093507.GA27667@hawking



Re: A Synaptic question

2014-11-12 Thread Karl E. Jorgensen
Hi

On Wed, Nov 12, 2014 at 06:27:16AM -0300, Renaud OLGIATI wrote:
 In my recently installed Debian 7.7 in notice in Synaptic Settings = 
 Repositories = Updates that I can choose to be notified of being notified of 
 a new Ubuntu version.
 
 Ubuntu ?

Sounds like a bug...  And from perusing
http://bugs.debian.org/synaptic it appears to be new

I recommend that you report this bug - tools like reportbug should
help you

:-)

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141112101033.GB31362@hawking



Re: moving LVM logical volumes to new disks

2014-11-12 Thread Karl E. Jorgensen
Hi

On Wed, Nov 12, 2014 at 10:09:43PM +0100, lee wrote:
 Hi,
 
 what's the best way to move existing logical volumes or a whole volume
 group to new disks?
 
 The target disks cannot be installed at the same time as the source
 disks.  I will have to make some sort of copy over the network to
 another machine, remove the old disks, install the new disks and put the
 copy in place.

Having to do this over the network makes it slightly
complicated But not impossible.

 Using dd doesn't seem to be a good option because extend sizes in the
 old VG can be different from the extend sizes used in the new VG.
 
 The LVs contain VMs.  The VMs can be shut down during the migration.
 It's not possible to make snapshots because the VG is full.

Ok.

 New disks will be 6x1TB RAID-5, old ones are 2x74GB RAID-1 on a
 ServeRaid 8k.  No more than 6 discs can be installed at the same time.

Assuming that:

* both machines can be online at the same time

* there is a good network connection between them. The fatter the pipe
  the better

* both run Debian. Obviously

* The VMs are happy to (eventually) migrate to the new hardware box

Then there is a sneaky way, which can help minimize the downtime: LVM
and network block devices (or iSCSI. Either can work). Chunky,
slightly hacky, but worth considering.

The basic idea is:

* On the receiving machine, prepare the disks. Export the *whole*
  disks (or rather: the RAID device(s)) using nbd, xnbd or iSCSI.

* On the sending machine: attach the disks over the network, using nbd
  client, xndb client or iSCSI.

* On the sending machine: 'pvcreate' the disks, and 'vgextend' them
  into your volume group.  So you end up with a volume group that spans
  *both* machines. Some of the PVs will be accessed over the network,
  but LVM doesn't care. Obviously, the I/O characteristics of the
  remote disks will be a lot worse.

* Avoid running any LVM commands on the receiving machine just yet -
  if you did, it would see a partial volume group and probably
  complain like mad. It may even update the metadata on the PVs it
  *can* see to say that the other PVs are unavailable, which is
  tricky to fix.

* On the sending machine, use 'pvmove' to move each LV to the new
  disks of your choice. This will send them over the network.  This
  doesn't *require* any downtime on the VMs, but be prepared for slow
  I/O on them, as they will now (increasingly) be accessing stuff over
  the network.

* Once all your LVs have been moved, shut down the VMs on the sending
  machine and quiesce everything. You want to 'deactivate' the LVs with:

 lvchange -an vgname/lvname

  This will (amongst other things) remove the entries in /dev for the
  LVs, and make them unavailable.

* On the sending machine, use 'vgsplit' to split the volume group into
  two volume groups. The remote disks should be moved into a new
  volume group.

* On the sending machine: sync;sync;sync. Just for paranoia's
  sake. Paranoia is good, and not a vice.

* On the receiving machine, run 'pvscan', 'vgscan' and similar: This
  should now see a complete VG.

* shut down the nbd client/xnbd client/iscsi client on the sending
  machine. You don't want the two machines accessing the same
  disks. Therein lies madness.

* Activate the LVs on the receiving machine (lvchange -ay), copy the
  VM definitions across (exactly how depends on your virtualisation)

* Start up the VMs. Pray that they have network etc as before.

* Profit.

I'm sure that there are (hopefully minor) details here that I've
forgotten (backups?), but it should give you the general idea.

Bottom line: Accessing disks over the network is perfectly possible,
if you are willing to live with the added latency. Not a good idea for
database servers or other IO intensive VMs.

It may be a better alternative than extended downtime.  As an
administrator, you get to make that trade-off.

Hope this helps
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141112225744.GA9128@hawking



Re: exim4 panic log issue

2014-11-10 Thread Karl E. Jorgensen
Hi

On Mon, Nov 10, 2014 at 09:42:03AM -0600, John Foster wrote:
 exim paniclog /var/log/exim4/paniclog on mail.myserver.net has non-zero size, 
 mail system might be broken.
 
 the error above is popping up. I did the removal of the log file as suggested 
 in several solutions that I found. However I see that they are all related to 
 an issue with the kernel and IPV6 handling. What is the proper way to solve 
 this permanrently whilst leaving IPV6 functional.
 Thanks!


What is the actual error reported in /var/log/exim4/paniclog ?

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141110154841.GA27900@hawking



Re: alsa-utils save / restore not working http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768665

2014-11-09 Thread Karl E. Jorgensen
Hi

On Sun, Nov 09, 2014 at 06:12:32PM +1030, Arthur Marsh wrote:
 Pardon me, but I'm a bit frustrated on how to debug
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768665
 
 does /var/run get saved across reboots?

I would not expect so.  http://www.pathname.com/fhs/2.2/fhs-5.13.html

 Where are the state of the sound card(s) saved / restored?

I don't use alsa-utils, but based on my understanding of the FHS, I'd
expect somewhere under /var/lib/alsa-utils.

But from reading the bug report, I'm led to believe it is
/var/lib/alsa/asound.state

Hope this helps
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141109093452.GA20873@hawking



Re: network card bridging failing on wheezy

2014-11-09 Thread Karl E. Jorgensen
Hi

On Sat, Nov 08, 2014 at 05:57:41PM -0500, Gary Dale wrote:
 For some reason my network card bridging has failed after working
 properly for many years.
 
 My /etc/network/interfaces is:
 
 auto lo
 iface lo inet loopback
 iface eth0 inet manual
 auto br0
 iface br0 inet static
 address 192.168.1.14
 netmask 255.255.255.0
 broadcast 192.168.1.255
 gateway 192.168.1.1
 bridge_ports eth0
 bridge_stp off
 bridge_fd 0
 bridge_maxwait 0
 
 From a fresh boot, I get nothing running. If I bring up br0
 (ifconfig br0 up), it comes up with 192.168.122.1 whether I do it
 with eth0 up or down. Bringing up eth0 seems to produce the correct
 results - a network interface with no IP, same as it always did.
 
 Bringing up br0 with the 192.168.1.14 address leaves me with a
 machine that can't connect or be connected to. However, if I drop
 br0 and bring up eth0 with the address, things work, apart from the
 lack of a gateway.
 
 I can manually add a default gateway to the route. While this works,
 running the route command takes a long time to come back with the
 results. However my computer now connects and can be connected to.

Hm.. I don't see auto eth0 anywhere

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141109100954.GB20873@hawking



Re: Re: umask has no man page?

2014-11-03 Thread Karl E. Jorgensen
Hi

On Mon, Nov 03, 2014 at 01:56:36PM +1100, Alexis wrote:
 
 Iain M Conochie writes:
 
  However:
  
  $: which umask
  $:
  
  So umask is _not_ a program (in the sense that there is no binary
  called umask on the system)
 
 zsh, however, is more helpful:
 
 $ which umask
 umask: shell built-in command

Well, it *appears* that zsh is more helpful.  But only because the
which command itself is a built-in for zsh  :-) (it isn't for bash)

So you have the opposite problem: man which gives you the wrong
manual page :-) (but presumably very similar)

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141103092351.GA13473@hawking



Re: Preventing the computer from shutting down.

2014-10-31 Thread Karl E. Jorgensen
Hi

On Thu, Oct 30, 2014 at 11:07:27PM -0700, Don Armstrong wrote:
 On Thu, 30 Oct 2014, Joey Hess wrote:
  Don Armstrong wrote:
   systemd-inhibit --who='backup script' --why='backup is running currently' 
   \
--mode=block yourbackupscript;
  
  This doesn't currently prevent either /sbin/shutdown or eg, the
  lightdm menu item from shutting the system down. It does inhibit
  systemctl reboot/halt.
 
 Huh. That seems kind of unfortunate (and weird, because /sbin/shutdown
 is symlinked to systemctl here; I would have expected /sbin/shutdown to
 be a special case of systemctl halt.)

molly-guard doesn't really mess with /sbin/shutdown and
family. Instead it implements, e.g. /usr/sbin/shutdown.  Since
/usr/sbin precedes /sbin in $PATH this allows them to be overridden.

A bit clumsy, I agree, but sufficient to prevent administrator
mistakes.

Personally, I would have preferred molly-guard to use dpkg-divert, but
it works as it is.

 This is probably at least a documentation bug, and possibly a real bug.

In the case of molly-guard, I belive that is up for debate.

It only intentds to be a safety net, not a security feature.  After
all, attempting to protect a system against the root user is
nonsensical.

Regards
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141031082118.GA22377@hawking



Re: WLAN router doesn't provide fix IP addresses

2014-10-31 Thread Karl E. Jorgensen
Hi

On Fri, Oct 31, 2014 at 09:28:33AM +0100, B. M. wrote:
 Hi list,
 
 I have a problem with my (w)lan setup.  We use telephone and
 internet over the cable network and the company gives us a wlan
 modem for free. Unfortunately this modem doesn't allow me to specify
 fix IPs in the internal network for all of our machines.

Well - even if it doesn't, surely it allows you to specify which
*range* of IP addresses should be used for DHCP?

There is nothing wrong with configuring a server with a fixed IP
address (=not use DHCP client), as long as you use the correct
network, netmask and default gateway.

 Nevertheless I setup an owncloud server on one machine (which is
 somehow our server but not always running), including SSL
 encryption with a self-signed certificate for its IP address. That
 worked well for a couple of months because the IP addresses didn't
 change (although they were not fixed).

Oh. certificates for IP addresses is a new one on me :-)

 Now due to a technical problem our modem got replaced all of the IP
 addresses changed. (I did expect that for sometime in the
 future... but not so early...)
 
 Since it's impossible to manually define the IP addresses, I've a
 problem. Of course I could create a new certificate, put it on all
 other machines and adjust all settings (owncloud server address...);
 but that's quite an hassle.

Do the machines use avahi (or mdns? I'm actually not sure of the name,
but having libnss-mdns installed and mdns4 mentioned in
/etc/nsswitch.conf would indicate so).

If so, you should be able to use ${hostname}.local instead of an IP
address, and the multicast DNS resolution would sort things out.
 
 So I wanted to ask if there are other possibilities? I can define
 one or two DNS server in the modem's config. Would it work to setup
 my main machine (which is not always running) as an internal DNS
 server and use the hostnames instead of the IP addresses?

That is also a possibility. But if it is only for facilitating a
single server, then it's overkill.  And it adds a single point of
failure too: you would not be able to resolve IP addresses while the
machine is down.

If you already own/run a domain, you can also add a A record in the
DNS for this to point to it - e.g. owncloud.example.com IN A
192.168.0.45.

Using an entry in /etc/hosts is also an option.

Hope this helps
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141031084541.GB22377@hawking



Re: LVM on two disks - spin down?

2014-10-30 Thread Karl E. Jorgensen
Hi

On Thu, Oct 30, 2014 at 08:15:47PM +0100, b-m...@gmx.ch wrote:
 Hi all,
 
 If I have a LVM which uses two partitions on two different disks and at least 
 one of its subvolumes is always in use, can the second disk spin
 down?

Depends on where that subvolume is mapped to.

It will probably be instructive if you run e.g.:

   # pvdisplay --maps /dev/sda1

which will give the answer to Which LVs occupy chunks of
/dev/sda1?. Or

   # lvdisplay --maps /dev/vgname/lvname

which will give the answer to Where is vgname/lvname actually
stored?

(alternatively, run vgcfgbackup vgname and peruse /etc/lvm/backup/vgname)

 
 An example showing what I mean:
  _ _ _ _ _ _ _ _  _ _ _ _ _ _ _ _
 |/dev/sda1  ||/dev/sdb1  |
 |_ _ _ _ _ _ _ _||_ _ _ _ _ _ _ _|
 
 
 lvmGrp  =  /dev/sda1 + /dev/sdb1
  _ _ _ _   _ _ _   _ _ _ _ _ _
 |lvm1   | |lvm2 ||lvm3   |
 |_ _ _ _| |_ _ _||_ _ _ _ _ _|
 
 So since sdb is new, if I add lvm3 it will be on sdb1 and not sda1,
 correct?; 

Assuming that /dev/sda1 is full, yes.  Even so, you can force the
issue when creating the LV.  Or by moving it afterwards.

 if I don't mount lvm3 automatically, can sdb spin down although lvm1 and lvm2 
 are used?

I haven't actually tried that, but I believe so. As long as none of
the LVs which reside (even partially) on /dev/sdb1 are in use, yes.

Note that most LVM operations (lvcreate, pvdisplay etc) will wake up
*all* of the PVs.

 The reason for this setup is the possibility to extend e.g. lvm2 later with 
 space on sdb1 if it is really required without any re-formatting. (Of course 
 I 
 will loose the spin down then, but for the time being I'd take care of my new 
 disk.)

Remember that you can move portions of LVs around to suit you if you
like (without downtime) - courtesy of the (somewhat misnamed) pvmove
command.  So even if you start off with the wrong layout, it's
relatively easy to fix.

Hope this helps

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141030223059.GA24198@hawking



Re: Preventing the computer from shutting down.

2014-10-30 Thread Karl E. Jorgensen
Hi

On Thu, Oct 30, 2014 at 02:02:49PM -0600, Mario Castelán Castro wrote:
 Thanks you Doug, Don and Laurent. Is there a less hacky way to do
 this using the default init system in wheezy?

I think that you can get *some* of the way by installing the
molly-guard package.

Although molly-guard is primarily aimed towards preventing system
administrators from blowing their feet off, it does allow the system
adminstrator to add in scripts in /etc/molly-guard/run.d which can
prevent shutdown or poweroff from working.

It's a safety net - not a guarantee. And it is reasonably simple to
bypass by a half-competent admin.

I doubt this affects the LXDE power off button though. (I do not use
LXDE).

Hope this helps

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141030224748.GB24198@hawking



Re: debian-installer grub install problem

2014-10-27 Thread Karl E. Jorgensen
Hi

On Sun, Oct 26, 2014 at 09:06:26PM -0700, Ric Marques wrote:
 I need to install wheezy via pxe boot to many (hundreds) of systems.
 The problem I am currently running into in my testing is that my
 boot drive is enumerated by udev as /dev/sdat in many of those
 systems, and the grub-install routine inside debian-installer will
 not install to that device...  I already have worked out how to
 select the proper device with a script in preseed.

FAI apepars to have no problem with such things - perhaps the code for
FAI (mostly just scripts) can be used as inspiration?

 Is there a way to manipulate udev rules so that I can force my boot
 drive to always enumerate as sda, or is there a way to get
 grub-install to work with more than the first 16 devices (that is
 where I found it to stop working /dev/sdp).

Alternatively, if all of your systems have identical(ish) hardware,
you may be able to use /dev/disk/by-path/X instead?

 Any suggestions, besides the painfully obvious (and nearly
 impossible) removal of the extra 45 drives in each of the systems?

Personally, I find it much easier to install using FAI than basic
pre-seeding - FAI is much more customizable, and allows you to set up
the resulting system exactly as you want (e.g. including kicking off
puppet, cfgengine and similar), without needing any manual
intervention.

Hope this helps

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141027094917.GA9371@hawking



Running awesome with Gnome - want gnome-panel too!

2014-10-22 Thread Karl E. Jorgensen
Hi

I have been using awesome as my window manager of choice for about a
year now - it's great, and has increased my productivity (or at least:
stopped the annoying routine of move-resize windows constantly).

But now I desire to use the gnome3 panel too - and the thing won't
start at login!?

I log into a (customised) gnome session, and have thus done

I have awesome configured in my gnome session and thus did this in the
past to set things up:

gconftool-2 --type bool --set /apps/nautilus/preferences/show_desktop False
gconftool-2 --type string --set 
/desktop/gnome/session/required_components/windowmanager awesome

which works fine.

I also have (in gconf):
/desktop/gnome/session/required_components/panel set to gnome-panel

and yet there is no sign of the panel starting at login time.  Not
even complaints in ~/.xsession-errors ...

I also tried copying /usr/share/applications/gnome-panel.desktop to
~/.config/autostart - still no luck...

Other apps from ~/.config/autostart get started OK

Annoyingly enough, if I run gnome-panel from within awesome, it
starts up OK and things look OK !?  But I want it to start automagically!!

Any ideas on how I can diagnose this and/or narrow it down?

FWIIW I'm running an up-to-date wheezy install - gnome-panel version
3.4.2.1-4 ...

Any help would be appreciated...
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141022095028.GA27257@hawking



Re: lvm: creating a snapshot

2014-10-03 Thread Karl E. Jorgensen
Hi

On Fri, Oct 03, 2014 at 08:43:06PM +0200, lee wrote:
 Hi,
 
 how can I create a LVM snapshot of a VM?
 
 
 root@heimdall:~# lvcreate -L 4G -s /dev/mapper/vg_guests-lv_jarl -n 
 lv_snap_jarl /dev/mapper/vg_mydata
   Physical Volume /dev/mapper/vg_mydata not found in Volume Group 
 vg_guests
 root@heimdall:~#
 
 
 There is no free space in 'vg_guests'.  The only free space is in
 'vg_mydata'.

That's a problem.  Snapshots must be in the same volume group - they
are essentially copy-on-write (sort-of).

 Can I create a snapshot over the network on disks an another
 machine?

No

 Can I extend 'vg_guests', using the free space of 'vg_mydata'?

Not directly. But you *can* merge the two volume groups - but that
requires all of the logical volumes in the old volume group are
inactive (i.e. unmounted and closed):

E.g. to merge oldvg and newvg and end up with a new (larger) newvg:

   lvchange -an oldvg
   vgmerge newvg oldvg

 Or would
 I have to shrink 'vg_mydata' to have free space to be able to extend
 'vg_guests' to be able to create a snapshot?

This is probably possible - depends on whether you can completely free
up a PV.

Note that a PV (physical volume) can only belong to *one* volume
group.  So if you can shave off a PV from one volume group, then you
can attach it to a different volume group instead.

You can also resize PVs, but since this usually requires messing with
partition tables and such things may require a reboot, this may not be
suitable for your situation. 

 I want to back up the VM without shutting it down.  If it can't
 avoided, I could shut it down to take the backup.  In that case, how
 would I copy the volume to get a useful backup file?
 
 I think I wish I had used btrfs ...

btrfs is good - if you are working with files.  When working with
block devices, LVM rules.

But... if you had set things up the analogous way with btrfs, you
would still have the same problem, and you would be asking Can I
snapshot from one BTRFS file system into another BTRFS file system?

It sounds you have a strange concept of volume groups here though: one
set of PVs for data and another set for guests ?  Once you
segregate things like that, then you have to live with them being
separate.

The volume group concept is for grouping the *disks*, so you can treat
a group of disks with similar properties as a
interchangeable.  So it makes more sense to have volume groups for
e.g. 15krpm and SSD.  Or you can just have one big volume group,
which makes disk upgrades seamless.

Hope this helps
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141003212402.GB27564@hawking



Re: cron in UTC?

2014-10-02 Thread Karl E. Jorgensen
Hi

On Thu, Oct 02, 2014 at 09:20:26PM +0100, Jonathan Dowland wrote:
 On Thu, Oct 02, 2014 at 02:16:06PM -0400, Steve Litt wrote:
  Thanks Jonathan. I use Docker from time to time, but never knew about
  LXC. If I use LXC experimentally, what's a good, simple, proof of
  concept use case?

Doesn't docker use LXC internally ?

 
 Well it isn't doing anything useful but I created a generic linux guest
 using lxc-create and had a guest in a matter of a minute or so,
 
  SUITE=jessie lxc-create -n guest2 -t debian -B lvm --vgname qusp_vg
 
 Another minute to do bridge configuration in the host and set up networking.  
 I
 haven't used it for much but it starts up and shuts down very rapidly. There's
 a general impression of speed vs. real VMs.

Agreed. Just like the good olde linux-vserver.  You don't have the
overhead of multiple kernels running - just user-space processes.

 At work, we do high-density VM hosting for practicals (every UG student gets a
 VM on some modules). We've used KVM for the last few years but I'd like to try
 LXC if possible this year, to see if we can get better host utilisation (we
 usually avoid putting more than 100 VMs on each host machine).

For this use case, I'd expect LXC to excel, although I'm not sure how
migration of VMs between hardware hosts work.

In my experience, combining LXC with btrfs (i.e. put /var/lib/lxc on a
btrfs file system) makes things *very* quick - creating a new VM is
(literally) a few seconds:

   # lxc-clone -o template -n newbox
   # lxc-start -n newbox -d

Using DHCP combined with dynamic DNS helps too. Once bored:

   # lxc-stop -n newbox ; lxc-destroy -n newbox

 I would find it useful to have a sid container (or containers) knocking around
 for building debian packages rather than either run sid on my real machine or
 use pbuilder, schroot etc. - which work, but are rather hacky.

Also very useful for testing deployments...

 I'm also considering using an lxc container to run a cupsd with some nasty
 samsung drivers, to keep that stuff out of my main system. If I consider
 running the dropbox client on my backup system (to backup my wife's dropbox)
 I would want to isolate that too.

Here you hit upon a very central concept: I find that most people who
talk about the benefits of virtualisation, really are talking about
the benefits of *isolation*.  And isoation of apps does not require
the full overhead of a new root file system, new kernel etc.

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141002204518.GA25081@hawking



Re: Racoon

2014-09-29 Thread Karl E. Jorgensen
Hi

On Mon, Sep 29, 2014 at 08:30:31PM +0300, Gokan Atmaca wrote:
 Hello
 
 I want to make using racoon IPSEC connection. My configuration is as
 follows. B site RouterOS (Mikrotik) are available. A kind of
 connection can not be established.

What do you get in the logs?

For a connection (by which I assume you mean an established tunnel)
to be established, racoon needs to the the handshakes with the other
side - if these fail, there should be traces of it in the
logs.

Usually, there will be logging even if it is successfull.  Racoon
should log via syslog, hence (depending on your syslog configuration)
/var/log/daemon.log would be the place to look.

 Note: IP addresses are shown as examples.
 
 WAN sites: 1.1.1.1
 LAN sites: 2.2.2.2
 B's: 3.3.3.3
 B's: 4.4.4.4
 
 
 
 - A site config;
 
 pre_shared_key path /etc/racoon/psk.txt;
 path certificate / etc / racoon / certs;

This looks like a bad copy/paste?? You have spaces in it? Really??

 remote 3.3.3.3 {
 exchange_mo in the main;

This does not look like valid syntax. More bad copy/paste? Looks like
it was an attempt at exchange_mode ...

 initial_contact one;
 proposal_check obey;
 proposal {
  encryption_algorithm 3DES;
  hash_algorithm md5;
  authentication_method pre_shared_key;
  dh_group modp1024;
  }
 }

You may want to avoid 3DES...

 
 
 Sainfoin any address 2.2.2.2/24 4.4.4.4/24 address any {

Sainfoin .. hm...

Which version of racoon is this?

  lifetime time 24 hour;
  encryption_algorithm 3DES;
  authentication_algorithm hmac_md5;
  compression_algorithm deflate;
  pfs_group modp1024;
 }

I'd recommend looking in the logs to start with, and getting rid of
the syntax errors in the config before going further...

Hope this helps
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140929183443.GA17498@hawking



Re: Let's have a vote!

2014-09-28 Thread Karl E. Jorgensen
On Sun, Sep 28, 2014 at 11:50:45PM +1300, Chris Bannister wrote:
 On Sat, Sep 27, 2014 at 09:49:10PM -0400, Steve Litt wrote:
  On Sat, 27 Sep 2014 18:32:38 -0400
  Ric Moore wayward4...@gmail.com wrote:
  
   On 09/27/2014 02:49 PM, lee wrote:
   
Just ask yourself: Why would someone choose to download an ISO for
Debian?
   
   For me, it's the safest way to install/upgrade. I have had too many 
   problems with interrupted live major migration to the next release
   level via an upgrade, or a live network total install. Owell, I'm
   not  huge fan of cloud based services either. :) Ric
  
  Yes. I'm a huge believer in wiping and reinstalling major versions.
  It's like spring cleaning, and I eliminate ghosts of operating systems
  past.
 
 And then there's the rest of us who run Debian precisely because you
 don't have to reinstall. It's great because you only ever need to
 install once. 

+1

On my main workhorse machine [1], I have only ever installed debian
from scratch twice.  Initially it was debian potato, which was upgrade
eventually to squeeze. And at some point in the squeeze days it was
re-installed to migrate from 32 to 64 bit. And now wheezy. No serious
problems.

The install has survived changing motherboards, disks, houses, video
cards, cpu failures, and living in 3 different laptops.

It is great to have a linux distribution you can trust to just work.
I find the quality of the packaging to be a an important factor in the
reliability of the distribution: upgrades generally work without a
hitch.  The few times they'd broken on me turned out to be me doing
things I shouldn't have been doing to start with.

In the old days, when moving the disk to different hardware, xorg.conf
changes may have been needed, but that was about it.  No re-licensing
or having-to-convince-the-software-i'm-not-a-pirate.

The trick to this appears to have several key elements:

* choice of distribution. Debian, Obviously. Rock stable. May not be
  the newest, but the most reliable.

* not doing crazy things, like running backports or
  testing/unstable [2], and no grabbing *.debs from weird places.

* Backups.

So in conclusion: A big thank you to the Debian Developers. The
stability of the distribution is a direct result of their work.

[1] Yes, I run a fair number of virtual machines which are always
re-built from scratch. Gotta test deployment scripts somewhere.

[2] I have no reservations about running testing/unstable inside a
virtual machine. Those can be thrown away and re-built with a few
keystrokes.

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140928111449.GA32280@hawking



Re: DNS Resolution and Short Names with Dots

2014-09-24 Thread Karl E. Jorgensen
Hi

On Tue, Sep 23, 2014 at 05:46:29PM -0400, Mark Kamichoff wrote:
 Hi -
 
 I've been running into somewhat inconsistent behavior with DNS short
 name resolution in Debian across a few systems.
 
 Here's the behavior that I've occasionally relied on over the years:
 
 % cat /etc/resolv.conf
 search example.com
 nameserver 192.0.2.10
 % host foo.bar.baz.example.com.
 foo.bar.baz.example.com has address 192.0.2.1
 foo.bar.baz.example.com has IPv6 address 2001:db8::1
 % host foo.bar.baz
 foo.bar.baz.example.com has address 192.0.2.1
 foo.bar.baz.example.com has IPv6 address 2001:db8::1
 
 Basically, I expect the search suffix to always be appended to the label
 unless a trailing . (ie, fully-qualified) is the last character.
 
 I don't know if it was a glibc upgrade or something else but on a few of
 my Debian systems (combination of i386 and x86_64) I now cannot resolve
 any short names that have a dot in them.  So, the above example now
 returns:
 
 % cat /etc/resolv.conf
 search example.com
 nameserver 192.0.2.10
 % host foo.bar.baz.example.com.
 foo.bar.baz.example.com has address 192.0.2.1
 foo.bar.baz.example.com has IPv6 address 2001:db8::1
 % host foo.bar.baz
 Host foo.bar.baz not found: 3(NXDOMAIN)
 
 However, something this will still succeed:
 
 % host www
 www.example.com has address 192.0.2.2
 www.example.com has IPv6 address 2001:db8::2

So... it looks like the number of dots in the query matter

Perhaps one of the recent libc upgrades have changed the default for
'ndots' ?

If so, according to a quick scan of the resolv.conf(5) manual page you
should be able add this to /etc/resolv.conf to get your old behaviour back:

   options ndots:3

Hope this helps

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140924075551.GB14490@hawking



Re: Problem with SSH host keys

2014-09-24 Thread Karl E. Jorgensen
On Tue, Sep 23, 2014 at 03:59:56PM -0700, Don Armstrong wrote:
 On Tue, 23 Sep 2014, Keith Lawson wrote:
  On Tue, Sep 23, 2014 at 01:26:36PM -0700, Don Armstrong wrote:
   Do you all of the ip addresses and hostnames listed for those keys in
   known_hosts?
  
  These are all servers I've been connecting to for years so I should
  have their IP and host keys.
 
 Because the entries in known_hosts are hashed by default, it's not
 trivial to determine this.
 
 If you've changed DNS resolution slightly, or if they now reverse to
 different names, or you now can connect via IPv6, or the IP addresses
 have changed, you will see this warning.
 
 This is one of the reasons why I (and Debian itself) don't use hashed
 known hosts for machines.

Another good reason not to hash the known_hosts file: bash command
completion - after ssh or scp the bash command completion will use
~/.ssh/known_hosts to suggest/complete hosts. Brilliant stuff.

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140924074126.GA14490@hawking



Re: excessive CPU usage

2014-09-21 Thread Karl E. Jorgensen
Hi

On Sun, Sep 21, 2014 at 11:54:01AM -0700, Gary Roach wrote:
 Hi all
 
 For the last few months I have been plagued by very slow response
 from my system. As an example, it takes 2 1/2 minutes to drag and
 drop 80 files from my email inbox to the trash bin in icedove. It
 has taken as high as 5 minutes for iceweasel to load. This problem
 is not just these packages but also applies to all of the rest of my
 programs.
 
 I am using Debian Wheezy with a i5750 4 core processor on a fast
 Intel board. I run a kde desktop. All the software is up to date.
 
 I have checked all of the log files and can't find any anomalies.
 Rebooting doesn't help.
 
 Using the KDE System Monitor (ksysguard) I have noticed that at
 least one of the processors goes to 100% and stays there for long
 periods even though there is no noticeable activity in the process
 tables. The only other thing I have noticed (the printing just hung
 up while I am writing this) is that the hard drive indicator comes
 on and stays on during the processor activity. I ran some checks on
 the hard drive but found no indication of any hard drive problems.

First step is probably to collect more data to find out whether the
bottleneck is cpu, memory, io or network (although we can probably
eliminate network here).

Try running e.g. vmstat 10 (its in the procps package which you
probably have installed anyway) - this will emit a line every 10
seconds with interesting system information. (As a rule of thumb:
ignore the first sample). Analyzing this can be a bit of a dark art -
it requires a decent understanding of how the kernel works, but not
too bad.  Lots of people on this list should be able to help if they
have that output.

It's also worth having a glance in /var/log/kern.log (usually where
syslog puts the kernel messages) for anything amiss: Misbehaving
hardware can really mess things up.

Hope this helps
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140921194434.GA21232@hawking



Re: No localhost - I'm stumped

2014-08-26 Thread Karl E. Jorgensen
Hi

On Tue, Aug 26, 2014 at 03:50:25PM -0400, John wrote:
 On 25/08/14, Reco (recovery...@gmail.com) wrote:
 
  Date: Mon, 25 Aug 2014 22:13:41 +0400
  From: Reco recovery...@gmail.com
  To: debian-user@lists.debian.org
  Subject: Re: No localhost - I'm stumped
  X-Spam-Status: No, score=-11.2 required=4.0 tests=DKIM_SIGNED,DKIM_VALID,
   DKIM_VALID_AU,DKIM_VERIFIED,FREEMAIL_FROM,LDOSUBSCRIBER,LDO_WHITELIST,
   T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.2
  
   Hi.
  
  On Mon, 25 Aug 2014 12:09:59 -0400
  John johnrchamp...@wowway.com wrote:
  
   ...  But alas, nothing from it solved my problem. ...
 
  Probably won't do you any good, since you have a basic kernel facility
  (ip routing) in a broken state.
  
  Can you please post the output of (run it all as root):
 
 I've separated the various items with  -- to make them easier to find.
 
  1) iptables-save
 iptables-save
 # Generated by iptables-save v1.4.21 on Tue Aug 26 15:41:11 2014
 *mangle
 :PREROUTING ACCEPT [19424:11674255]
 :INPUT ACCEPT [18400:11319703]
 :FORWARD ACCEPT [0:0]
 :OUTPUT ACCEPT [17345:4202761]
 :POSTROUTING ACCEPT [17393:4208427]
 COMMIT
 # Completed on Tue Aug 26 15:41:11 2014
 # Generated by iptables-save v1.4.21 on Tue Aug 26 15:41:11 2014
 *nat
 :PREROUTING ACCEPT [1166:401489]
 :INPUT ACCEPT [0:0]
 :OUTPUT ACCEPT [2108:130276]
 :POSTROUTING ACCEPT [0:0]
 -A POSTROUTING -j MASQUERADE
 COMMIT
 # Completed on Tue Aug 26 15:41:11 2014
 # Generated by iptables-save v1.4.21 on Tue Aug 26 15:41:11 2014
 *filter
 :INPUT DROP [0:0]
 :FORWARD DROP [0:0]
 :OUTPUT ACCEPT [17315:4187744]
 -A INPUT -s 127.0.0.0/8 -d 127.0.0.0/8 -i lo -j ACCEPT
 -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
 -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT
 -A INPUT -p tcp -m tcp --dport 25 -m state --state NEW -j ACCEPT
 -A INPUT -m state --state INVALID,NEW -j DROP
 -A FORWARD -j REJECT --reject-with icmp-port-unreachable
 COMMIT

iptables look OK to me - although I find it cleaner to have:

 -A INPUT -i lo -j ACCEPT

but I guess it doesn't make any difference.

  2) strace ping -c2 localhost

snipped  output - it looks OK to my cursory glances..


  4) sysctl --system
 sysctl --system
 * Applying /etc/sysctl.d/99-sysctl.conf ...
 net.ipv4.icmp_echo_ignore_all = 0
 net.ipv4.icmp_echo_ignore_broadcasts = 0

These caught my eye: Ignore all ICMP ? That would stop ping
(a.k.a. ICMP echo) from working, wouldn't it?

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140826221205.GA18500@hawking



Re: dropbox install break apt-get

2014-08-24 Thread Karl E. Jorgensen
Hi


On Sat, Aug 23, 2014 at 09:53:58PM -0700, tom arnall wrote:
 I tried to install dropbox and the result is that apt-get is broken.
 (I do not by the way want dropbox on my system and want to purge it
 completely.)
 
 Here is the output which demonstrates the current state of the system:
 
 ---
 root@debian:/home/tom# apt-get purge dropbox
 E: dpkg was interrupted, you must manually run 'dpkg --configure -a'
 to correct the problem.
 
 root@debian:/home/tom# dpkg --configure -a
 Setting up nautilus-dropbox (1.4.0-3) ...
 Dropbox is the easiest way to share and store your files online. Want
 to learn more? Head to http://www.dropbox.com/
 
 Downloading Dropbox... 100%
 ---
 
 
 With Downloading Dropbox... 100% the system hangs until I do a
 ctl-c.

I believe that dpkg (which is used by apt anyway) is running the
config (or post-inst) script of the package.

Do you get the same result out of running (as root):

   /var/lib/dpkg/info/dropbox.config

or

   /var/lib/dpkg/info/dropbox.postinst configure

?

I guess if you just want top purge dropbox, then adding an exit 0 at
a strategic place in the script would be sufficient to stop it from
breaking dpkg and apt.

 i find btw reports of this problem going back to 2012. why is debian
 allowing the thing in the repository?

It does??  At the very least, I hope it is relegated to non-free ...

If you can reproduce it, I recommend that you raise a bug on it.

Hope this helps

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140824090758.GA8651@hawking



Re: writing to /dev/stdout fails in cron script

2014-08-22 Thread Karl E. Jorgensen
Hi

On Fri, Aug 22, 2014 at 11:23:37AM +0200, Tony van der Hoff wrote:
 Hi,
 
 Running up-to-date Wheezy.
 
 I have a script, simplified like this:
 
 -
 #!/bin/bash
 DEBUG=1
 
 OUT=/dev/null
 
 if [ $DEBUG -ne 0 ]; then
   OUT=/dev/stdout
 fi
 
 echo hello  $OUT
 -
 
 This works fine when invoked from the command line, but when called as a
 cron task, same user, it fails with
 /home/tony/scripts/test: line 10: /dev/stdout: Permission denied
 
 Any suggestions on how to fix this, please?

Short version: Don't do it. At least not this way.

I suspect that the crontab entry is your own - or alternatively an
/etc/cron.d/* file which specifies a non-root user - is that correct?

If so, the error message makes sense - you have to take into account
how cron works: cron will create an empty temporary file to capture
the stdout/stderr or whatever it runs (because it will be emailed to
you).  And stderr/stdout will be redirected to this file *before* it
drops its privileges.  So this temporary file will be owned by root.
And the permissions on the file ensure it is only writeable by root
(and probably only readable by root, as somebody might expect the
output to be private).

So when your script starts, its stdout has already been opened for
it.  Remember that file permissions are only checked at the time the
file is opened - not subsequently.

But when you come along and do a :
echo SomeDebug  /dev/stdout

that has to open the file again. Which then fails, because your script
is not root, and the file is only writeable by root.

Try this as an experiment to illustrate the point. Imagine this shell script:


#!/bin/sh
# contents of /tmp/somescript
echo normal echo
echo bad echo  /tmp/somefile
echo final echo

and then (as root! - I assume you have sudo installed):

# umask 077
# rm /tmp/somefile
# sudo -u SomeNonRootUser sh /tmp/somescript  /tmp/somefile

and you'll end up with:

/tmp/somescript: 4: /tmp/somescript: cannot create /tmp/somefile: Permission
denied

But the file will contain:
# cat /tmp/somefile
normal echo
final echo

In your case, he solution for switching debugging on/off is probably
changing the way you do things: Instead of writing to /dev/null when
debugging is off, simply do not perform debugging if it is off!
(writing to /dev/null is a waste of resources anyway)

A little shell function like this will do the trick:

debug()
{
  if [ $DEBUG -ne 0 ]; then
echo $@
  fi
}

so you script can use debug the same way it uses echo.

Hope this helps.

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140822205336.GA6480@hawking



Re: lite brydd [OT]

2014-07-14 Thread Karl Thorén
Hej!

Körs skriptet vid start så hamnar echo (stdout) utskrifter bara på den
aktiva konsollen. Dvs sparas inte till någon logg.

Vill du spara till syslog så använd programmet logger istället.

Byter du ut
echo Setting max frequency of all CPUs to 3.4GHz
till
logger -s Setting max frequency of all CPUs to 3.4GHz
Så skrivs medelandet till syslog och stderr.

Lite beskrivning finns här
http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html

/Karl


2014-07-14 16:12 GMT+02:00 j...@lillahusetiskogen.se:

 Hej!

 Nu har jag ett script som verkar fungera:

 8   8   8   8   8   8   8   8
 #!/bin/bash

 let freq=340
 let cpu=0

 echo Setting max frequency of all CPUs to 3.4GHz
 while [ $cpu -lt 8 ]; do
   cpufreq-set -c $cpu -u $freq
   let cpu=cpu+1
 done
 8   8   8   8   8   8   8   8

 Det körs vid boot. Genom att köra en variant med 1,4GHz kan jag se att
 det fungerar.
 Men, var hamnar texten? Först kollade jag dmesg, sedan greppade jag
 alla loggfiler.

 /Janne


 --
 To UNSUBSCRIBE, email to debian-user-swedish-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact
 listmas...@lists.debian.org
 Archive: https://lists.debian.org/20140714161239.48b4dd2b@igor




-- 
Karl Thorén karl.h.tho...@gmail.com
PGP-key: 836BD4C8


Re: Where to put start-up and shutdown code from `man 4 random`?

2014-07-11 Thread Karl E. Jorgensen
Hi

On Fri, Jul 11, 2014 at 06:41:49AM -0400, Kynn Jones wrote:
 The documentation in `man 4 random` (**Configuration** section) gives a couple
 of shell-script snippets that it recommends should be added, respectively, to
 an appropriate script which is run during the Linux start-up sequence and to
 an appropriate script which is run during the Linux system shutdown.  (It is
 silent on what those appropriate scripts should be.)
 
 What should these scripts be for a Debian system?

I believe that the initscripts package (which you almost certainly
have got installed already) handles this already - if you cast your
eyes over /etc/init.d/urandom you should see similar code.

 
 Are there standard scripts in which to put such start-up and shutdown code?  
 Or
 is one supposed to put those snippets in standalone scripts in special
 designated directories (which will ensure that they will be run at the startup
 or shutdown)?  Or something else altogether?
 
 (In case it matters, I'm using wheezy.)

For wheezy[1], the normal place for startup/shutdown is in /etc/init.d/ -
symlinks will be created from /etc/rcX.d/ as appropriate for each
runlevel (X is a run level in this context).

For simple hacks by the system admin, tweaking /etc/rc.local is also
acceptable - packages are not allowed to interfere with that.

There is a plethora of information available about this -
https://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
may be a good starting point.

[1] Let's not get into the whole systemd saga here

Hope this helps
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140711105605.GG1336@hawking



Re: building .debs with +b1 on the end

2014-07-07 Thread Karl E. Jorgensen
Hi

On Mon, Jul 07, 2014 at 01:37:17AM -0400, Brian Sammon wrote:
 I want to re-build a package for personal use, and have a special version 
 number for my custom build.
 
 Since I'm not planning on customizing the source or the debian control files, 
 I think the ideal choice is to build a binary package with a suffix like 
 +b1 or +local on the end.

If you make no changes to the source, nor the debian control files,
shouldn't you end up with the same package?

Or perhaps, you want to backport a package? Or compile for some
esoteric architecture? If so, there should be no need to change the
version number - this would introduce unnecessary confusion...

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140707084715.GA7545@hawking



Re: tvrplus.ro/tvr-1.html (Flash) just shows a black screen. Other Flash sites work.

2014-07-01 Thread Karl Munch
The stream is restricted to the territory of Romania, so I guess you are
there.

I was able to watch an ad there, but not the stream due to the above
restriction. For your information, I moved the libflashplayer.so
to /usr/lib/mozilla/plugins.

On Tue, 2014-07-01 at 16:59 +0300, Rares Aioanei wrote:
 Hi everyone, 
 
 Sometimes I want to be in touch with the World Cup so I try to watch it
 online. The URL in the Subject is the site of Romania's national TV
 which broadcasts the games online live.  I tried flash-plugin-nonfree,
 I tried directly installing libflashplayer.so in ~/.mozilla/plugins,
 installed at the same time or separately, I tried
 pepperflashplugin-nonfree and Chromium, I tried Firefox Nightly (I
 compile my own every week), I tried Iceweasel, Epiphany and lots of
 other browsers, I tried disabling FlashBlock and other extensions but
 the outcome is the same : all I get is a black square with no
 content. On my other machine running Arch, with FlashBlock enabled, it
 works just fine. Running stable/testing on a Thinkpad X200, and tested
 lots of WMs and DEs (KDE, Fluxbox, Xfce, i3wm). Any ideas are much
 appreciated.  
 -- 
 
 Rares Aioanei
 
 


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1404226288.6956.6.camel@piggie



Re: bridges with multiple static IPs or DHPC - how to configure?

2014-06-04 Thread Karl E. Jorgensen
Hi

On Wed, Jun 04, 2014 at 08:00:49PM +0200, Steffen Dettmer wrote:
 Hi,
 
 how to configure a bridge with multiple static IPs and/or DHPC
 via /etc/network/interfaces?
 
 I tried many combinations, but I didn't find any working one.
 
 Of course everything works as expected when configuring manually
 with ip, brctl etc.
 
 Any working example would be great!
 
 The rest of the mail discusses what I tried so far.
 
 Yes, I read man bridge-utils-interfaces(5), but it has simple
 examples only (single static IP or no IP). The man page tells,
 interfaces used as bridge_ports
 
are the  interfaces  that  are  part  of  the  bridge,  and
they shouldn't  have  any  stanzas defining them on the
interfaces file  -- man bridge-utils-interfaces(5)
 
 but this is wrong. There must be a stanza like
 
   auto eth3.14
 iface eth3.14 inet manual

Hm... this is VLAN 14 on eth3
 
 otherwise no bridge can use it any only gives an error message
 like interface eth3.14 does not exist!.

Hm. have you got the vlan package installed?

But anyway: When you bridge interfaces together, the IP addresses
should be assigned to the *bridge*, not the interfaces that join the
bridge.  At least that's what I've been told.

 For an ordinary ethernet interface, the following works:
 
   auto eth3.10
   iface eth3.10 inet static
 address 10.72.9.17
 netmask 255.255.255.248
   iface eth3.10 inet static
 address 10.72.9.25
 netmask 255.255.255.248
 
 For bridges, it is not clear how to use multiple stanzas for
 multiple IPs; it seems, the options to create the bridge and to
 add IPs to it are somehow mixed.

Hm.. it doesn't complain about having multiple stanzas with the name
iface !?  (I'm surprised here, so I may well learn something)

 There are options like bridge_ports. They have to be in each
 iface br0 stanza?
 
   (Experiments show that bridge_ports are accumulated (probably
   simply because each stanza brctl addif each, in total producing
   the desired result), but other options such as bridge_maxwait
   are not.)

Good.

 The same approach as for Ethernet does not work for Bridges:
 
   iface br1 inet static
 address 10.1.1.1
 netmask 255.255.255.248
 bridge_ports eth3.10
 bridge_maxwait 0
   iface br1 inet static
 address 10.1.1.9
 netmask 255.255.255.248
 bridge_ports eth3.11
 bridge_ports eth3.12
 bridge_maxwait 0
 
 This adds all interfaces to br1, but only the IP address from the
 last block.

And you're bridging VLANs 10,11 and 12. Very unusual. If the VLANs
should be bridged, this is usually done on the switch...

 It is similar when it comes to DHCP.

Using a DHCP address on a bridge interface is .. unusual. But I guess
there must be use cases where it is valid.

E.g. a laptop which runs virtual machines (which are connected to the
bridge), because the virtual machines need to be in the same network?
I almost do this, but I decided to let the bridge interface be
unattached - i.e. the laptop *routes* traffic from the virtual
machines to the outside world via normal routing (and NAT where
appropriate).  This way, the virtual machines don't need to know about
me moving from one LAN to another.

I'd suggest something like this:

# ---8-- cut here ---8---
auto br0
iface br0 inet dhcp
  bridge-ports eth3
  post-up ip address add 10.1.1.1/24 dev br0
  post-up ip address add 10.1.1.9/24 dev br0
# ---8-- cut here ---8---

or alternatively:

# ---8-- cut here ---8---
auto br0:
iface br0 inet dhcp
  bridge-ports eth3
auto br0:1
iface br0:1
  address 10.1.1.1
  netmask 255.255.255.0
auto br0:2
iface br0:2
  address 10.1.1.9
  netmask 255.255.255.0
# ---8-- cut here ---8---

which should give the bridge 3 IP addresses: One assigned by DHCP as
well as 10.1.1.1 and 10.1.1.9.

I assume you only want ONE IP address from DHCP :-) If you want more
than that, we're really wandering into unknown territory.

In general, I suspect that you are confusing VLANs with IP aliasing:

- VLANs is a way of creating multiple (virtual and independent)
  networks on the same underlying network. This is accomplished by
  VLAN tagging - there are 10 bits reserved in the IP headers for
  this, allowing up to 4096 VLANs).  Linux represents each VLAN on the
  hardware interface as a separate network device using the
  dot-notation, e.g. eth0.1, eth0.2 etc.  Other notations are
  possible, but us poor puny humans are easily confused.

- IP Aliasing is a way of allowing a device to have multiple IP
  addresses on the same VLAN.  This is usually done via the colon
  notation - e.g. eth0:1, eth0:2 etc.

VLANs usually do not apply in a residential setting.  But if you're a
geek (and your switch supports it), feel free to play away on it.

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140604202558

Re: High %wa, irregular blocking

2014-06-04 Thread Karl E. Jorgensen
Hi

On Wed, Jun 04, 2014 at 08:49:44AM +0200, b-m...@gmx.ch wrote:
 Hi,
 
 Some weeks ago I installed Testing on my wife's iMac [1] from 2008.
 Unfortunately it has one issue:
 
 There are irregular periods of very high %wa, maybe 3-5 times per hour, not
 directly related to a certain user action. They last for some seconds up to
 even a minute or so and render the machine unusable for that time. top shows 
 %wa
 of 80 or 90%, load can go up to 9 on this dual core machine, iotop shows only 
 a
 few KB/s.

High wait-for-IO combined with very little disk throughput usually
points towards disk problems...

Anything interesting from e.g. iostat -kNx ? That should tell you
which disk and partition is suffering. (Or if you already think you
know, this should confirm it)

 
 I already added pcie_aspm=off to the boot options which seems to help,
 but I still see this I/O hangs (without, I had about 10+ hangs per hour).
 
 Any idea what could cause these blockings? How can I find out more? I use 
 Linux
 for 15+ years but I never saw such things... and I want to show my
 wife, that Linux is the better OS, of course... ;-)

My first call would be the kernel logs.  IIRC in the default syslog
config this goes to /var/log/kern.log, but you can see the most recent
output with e.g. dmesg or dmesg -T

Combine this with the disk-related snippets from /var/log/dmesg (which
has the kernel output from boot) and you may see further clues...

Which kernel are you using? Stock kernel, or self-compiled? 32bit?
64bit?

The firmware version may also be relevant here.

 
 Aside from that issue everything runs quite nicely.
 
 Thanks  best regards,
 Bernd
 
 [1] iMac 8,1: 2008, Core 2 Duo 2.8 GHz, GB RAM, 500 GB WD HDD, ATI Radeon HD
 2600 PRO (PCIe)

Looks similar to this one? http://www.odi.ch/prog/macbookpro/#3

Hope this helps
-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140604205400.GB9871@hawking



Re: GNOME-Terminal is blank or inactive in Awesome WM on Debian 7

2014-05-26 Thread Karl E. Jorgensen
Hi

On Sun, May 25, 2014 at 03:56:47PM +0600, Muntasim Ul Haque wrote:
 Hi,
 GNOME-Terminal is blank in Awesome WM. It just opens but doesn't
 show anything. Not even by username and hostname. Absolutely
 nothing. But Xfce terminal was working great. Even Terminator is
 working properly. So what's wrong with GNOME-Terminal?

I once had a similar problem - when pulseaudio had hung for some
reason.  Turned out that because the audio path was blocked, GNOME
apps (mainly gnome-terminal) would hang when doing the sound effects
(which I thought I had turned off).  Other tool like xterm, rxvt etc
worked fine...

Hope this helps

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140526083502.GA24055@hawking



Re: Recommends for hard dependency?

2014-05-13 Thread Karl E. Jorgensen
Hi

FYI: I'm not a Debian developer; just a mere user with an opinion...

On Tue, May 13, 2014 at 12:05:48PM +0530, Shriramana Sharma wrote:
 Hello people. This is about:
 
 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747716
 
 Currently libqt5sql5-sqlite is given as a recommends and not a depends
 for qttools5-dev-tools
 (https://packages.debian.org/sid/qttools5-dev-tools) whereas
 /usr/lib/x86_64-linux-gnu/qt5/bin/assistant, one of the programs
 installed by the latter package, cannot even start up without
 libqt5sql5-sqlite being installed. I hence requested to change it to
 depends.
 
 The developers say no, recommends is right in this case since only
 assistant requires it and the other tools in the package do not -- you
 should have recommends installed by default in your system in most
 cases -- if you don't, that's not a problem of the packaging.

Hm... I do not agree with that. The binaries in the package *should*
work (in their default configuration if at all possible) with only
hard dependencies present, without relying on Recommends...

 I pointed out that the specification at
 https://www.debian.org/doc/manuals/maint-guide/dreq.en.html#control
 says to use depends if your program absolutely will not run ...
 unless a particular package is present.

Yes. And the verbiage for Recommends is (amongst other things):

   Use this for packages that are not strictly necessary but are
   typically used with your program

I have to admit that I can sort-of see the developer's point there.

I guess the developer(s) can have a (somewhat weak) argument here if
there is some combination of command line options or configuration
file settings (e.g. to use a different database driver?) which then
allows the program to run.  Perhaps even one installed outside the
packaging system.

If this is the case, I'd hope to see a meta package
(e.g. qt5-sql-driver) which is implemented by the requisite packages -
and thus a dependency in the style of:

Package: qttools5-dev-tools
Depends: qt5-sql-driver | libqt5sql5-sqlite

(or perhaps libqt5sql5-sqlite | qt5-sql-driver - I'm doing this from
memory. There's a mention of meta packages dependencies somewhere in
the policy manual IIRC).

There may be such a meta package already. I haven't checked.

 IMO something that a program can't even start without should be a hard
 dependency and not just a recommends. A user may disable installation
 of recommends for whatever reason. This should not prevent the user
 from even starting up the program!

I'd agree with that sentiment :-)

Another way to resolve this could be to relegate the assistant into
it's own package (which would have hard dependencies on
libqt5sql5-sqlite and qtttools5-dev-toos), and let the main package
recommend the assistant package?

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140513073219.GC5817@hawking



Re: Spacewalk or similar for Debian?

2014-05-02 Thread Karl E. Jorgensen
Hi

On Wed, Apr 30, 2014 at 07:30:42AM -0400, Henning Follmann wrote:
 On Wed, Apr 30, 2014 at 10:15:43AM +0100, Karl E. Jorgensen wrote:
  Hi
  
  Consider this scenario:
  
  - 1000+ servers (lenny, squeeze and wheezy) at varying degrees of
up-to-datedness with respect to security updates and general bug
fixes.
  
  - Demand for getting servers up-to-date. (They heard of heartbleed,
but chose to ignore all my previous notifications of security
problems. Go figure)
  
  - Risk-adverse non-technical upper management (spreadsheet mania)
  
  - Every update must be vetted and tested out first on development
servers, then QA servers, staging servers and live servers. No
exceptions.
  
  My current line manager knows only RedHat, and thus wants
  spacewalk. (Because this is he used before. In a proper
  enterprise. And Thus proper enterprises use spacewalk).
  
  Spacewalk looks sort of nice, but not quite the Debian way of
  doing things.
  
  And I cannot imagine that I am the first person with this problem...
  
  How have others solved this?
  
  My main concern here is the security updates and point releases: I'm
  pushing for getting all the servers upgraded to wheezy anyway, and as
  part of the upgrade they'll pick up any pending (at that point in
  time) security updates.
 
 There are a number of configuration management packages available.
 A nice comparison is available on wikipedia:
 http://en.wikipedia.org/wiki/Comparison_of_open_source_configuration_management_software
 
 May I suggest Puppet. I think it is mature and has a active community
 around it.

Yes - we make extensive use of Puppet (and to some degree: ansible)
already.

However, the main demand appears to have a web interface, where
updates can be selected. Because that's what spacewalk has. And I
don't see puppet filling that gap :-(

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140502062701.GE8743@hawking



Re: Laptop pads: was Weird random reboot -- thinkpad x220

2014-05-02 Thread Karl E. Jorgensen
Hi

Jumping in late in the thread...

On Fri, May 02, 2014 at 11:23:42AM -0400, Steve Litt wrote:
[snip]
 Also, in every carrying case for every laptop, I carry a trusty
 Logitech M310 wireless led mouse. These mice are shaped well, have
 enough sensitivity to be fast enough even with LXDE, and the scroll
 wheel is stiff enough and its rotational clicks are discrete enough
 that middle clicking can be done without fear of turning. So, unless
 I'm trying to work where there's no table, I just use a regular mouse.
 
 Have you ever tried the xxxterm browser? It might be called xombrero on
 your Debian version. It's a browser made to be used with keystrokes
 reminiscent of Vim: No mouse required.

For the emacs users out there: Obviously w3m !  But for a graphical
browser: conkeror. If you're used to emacs, it should be natural.

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140502180500.GA18737@hawking



Spacewalk or similar for Debian?

2014-04-30 Thread Karl E. Jorgensen
Hi

Consider this scenario:

- 1000+ servers (lenny, squeeze and wheezy) at varying degrees of
  up-to-datedness with respect to security updates and general bug
  fixes.

- Demand for getting servers up-to-date. (They heard of heartbleed,
  but chose to ignore all my previous notifications of security
  problems. Go figure)

- Risk-adverse non-technical upper management (spreadsheet mania)

- Every update must be vetted and tested out first on development
  servers, then QA servers, staging servers and live servers. No
  exceptions.

My current line manager knows only RedHat, and thus wants
spacewalk. (Because this is he used before. In a proper
enterprise. And Thus proper enterprises use spacewalk).

Spacewalk looks sort of nice, but not quite the Debian way of
doing things.

And I cannot imagine that I am the first person with this problem...

How have others solved this?

My main concern here is the security updates and point releases: I'm
pushing for getting all the servers upgraded to wheezy anyway, and as
part of the upgrade they'll pick up any pending (at that point in
time) security updates.

-- 
Karl E. Jorgensen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140430091543.GA12773@hawking



  1   2   3   4   5   6   7   8   9   10   >