Re: ! why?

2004-03-25 Thread Sergey 'DoubleF' Zaharchenko
On Thu, 25 Mar 2004 08:37:01 -0500 (EST)
__Clint__ <[EMAIL PROTECTED]> probably wrote:

> > > The "[EMAIL PROTECTED]" email was a one-time disposable
> > > email address that I only ever gave to FreeBSD.org.
> >
> > Well, you started out with the right strategy, but you abandoned it too
> > soon.  You've now blown what looks like your real email address.  Never
> > reveal your true email address, for it can be used against you.
> 
> How have I blown it?  I sent a note to [EMAIL PROTECTED] when I got
> spammed.  The automatic bounceback said to send it to
> [EMAIL PROTECTED]  If [EMAIL PROTECTED] is actually a mail list,
> I was never told.
> 

freebsd.*com*?

$ whois freebsd.com



Registrant:
Internet Business Solutions Ltd. (DKWSKOEOWD)
   Hardstrasse 235
   Zurich, ZH 8005
   CH

   Domain Name: FREEBSD.COM

   Administrative Contact, Technical Contact:
  Internet Business Solutions Ltd.  (35897980O) [EMAIL PROTECTED]
  Hardstrasse 235
  Zurich, ZH 8005
  CH
  +41 1 277 75 75 fax: +41 1 277 75 77

   Record expires on 21-Mar-2008.
   Record created on 02-Sep-2003.
   Database last updated on 25-Mar-2004 12:04:47 EST.

   Domain servers in listed order:

   FREEFALL.N-R-G.COM   195.134.128.40
   BARBARELLA.N-R-G.COM 195.134.128.59

Comments, anyone?

--
DoubleF
I have a simple philosophy:

Fill what's empty.
Empty what's full.
Scratch where it itches.
-- A. R. Longworth


pgp0.pgp
Description: PGP signature


Re: burncd not able to create multisession disco?

2004-03-22 Thread Sergey &#x27;DoubleF' Zaharchenko
On Mon, 22 Mar 2004 13:41:30 +0800
"Zhang Weiwu" <[EMAIL PROTECTED]> probably wrote:

> What I wish to do is to burn a multisession data disco, the data
> session should be closed but the disco should not be finalized so I
> can add other files later.
> 
> So it seems burncd(8) cannot do it? I just wanna make it sure rather
> than diging into all the docs only to find it is impossible.

Use -m. man burncd says:

-mclose disk in multisession mode (otherwise disk is closed
  as singlesession).

You have to fixate the disk anyway, but then you can append data to
disk after you fixate it. HTH,

-- 
DoubleF
Keep grandma off the streets -- legalize bingo.


pgp0.pgp
Description: PGP signature


Re: Problems using ppp as a server

2004-03-19 Thread Sergey &#x27;DoubleF' Zaharchenko
On Fri, 19 Mar 2004 17:34:16 +0300 (MSK)
"ejff" <[EMAIL PROTECTED]> probably wrote:

> Hello, i have a problem using ppp as a server.
> When i start it like this:
> 
> root # ppp -direct server
> 
> it prints out a garbage:
> 
> ~Ъ}#ю!}!}!} }=}(}"}'}"}"}&} } } } }!}$}%э}%}&?Е3i}#}%б#}%Cц~~Ъ}#ю!}!}!} 
> }=}(}"}'}"}"}&} } } } }!}$}%э}%}&?Е3i}#}%б#}%Cц~~Ъ}#ю!}!}!} }=}(}"}'}"}
> "}&} } } } }!}$}%э}%}&?Е3i}#}%б#}%Cц~~Ъ}#ю!}!}!} }=}(}"}'}"}"}&} } } }
>  }!}$}%э}%}&?Е3i}#}%б#}%Cц~~Ъ}#ю!}!}!} }=}(}"}'}"}"}&} } } } }!}$}%э}%
> }&?Е3i}#}%б#}%Cц~

It doesn't work this way. ppp's standard  input and output should be
directed to the device.

> THE MAIN PROBLEM IS THAT I CAN NOT MAKE MY MODEM TO ANSWER TO THE
> CONNECTION REQUEST AUTOMATICALLY. 

Find the section RECEIVING INCOMING PPP CONNECTIONS in

$ man ppp

FWIW I'm using method No2.

> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


pgp0.pgp
Description: PGP signature


Re: PPP Question - should be easy...

2004-03-17 Thread Sergey &#x27;DoubleF' Zaharchenko
Somewhere around then,
"Chris Knipe" <[EMAIL PROTECTED]> wrote:

> > Hi all,
> > 
> > I was just wondering, I run ppp from rc.conf with -ddial, and it is
> > working brilliantly. However,
> > I need to change ppp configurations quite frequently, is there a
> > quick way to tell ppp to reload
> > the configuration without killing it?

On Sun, 14 Mar 2004 17:18:03 -0500
"JJB" <[EMAIL PROTECTED]> probably wrote:

> Killall ppp  followed by ppp -ddial xxx

Chris said without killing it.

Many of the configuration values are only used at negotiation
time. Those, you norrmally can't change without reopening the
link. The STD on PPP implies that it should be possible to renegotiate
the link without physically dropping carrier (by sending an LCP packet,
for instance), but I doubt ppp supports it (and I don't really think it
should).

What are you trying to do?

-- 
DoubleF
"A power so great, it can only be used for Good or Evil!"
-- Firesign Theatre, "The Giant Rat of Summatra"


pgp0.pgp
Description: PGP signature


Re: Using int 13 while BSD is running

2004-03-11 Thread Sergey &#x27;DoubleF' Zaharchenko
On Wed, 10 Mar 2004 11:14:03 -0500 (EST)
Jerry McAllister <[EMAIL PROTECTED]> probably wrote:

> Gee whiz, just let dd(1) do it for you.   It can seek to any position
> and read any number of bytes of a disk.

That's what I meant by `shellscript':).

> If it gets ornery, set the
> block size to 1 byte - a little slow and inefficient, but then it won't
> have trouble with other block arrangements.

The minimum blocksize is 512 bytes (at least on ATA drives; 2048 on
data CDROMS). You get an `invalid argument' error if you try using a
size which is not a multiple of 512. But after dd'ing, you can use
head(1)/tail(1) to get only the necessary info, right to the single
byte.

-- 
DoubleF
My mother loved children -- she would have given anything if I had been
one.
-- Groucho Marx


pgp0.pgp
Description: PGP signature


Re: Using int 13 while BSD is running

2004-03-11 Thread Sergey &#x27;DoubleF' Zaharchenko
On Wed, 10 Mar 2004 08:49:17 -0800
Jason Dictos <[EMAIL PROTECTED]> probably wrote:

>  
> 
> > To Jason: take care not to *write* anything to the disk via int 13h.
> > I still don't think I understand why you are using FreeBSD for this
> > specific purpose. Why if you just spend time escaping from the OS?
> 
> We actually _like_ protected mode, it allows us to be more flexible
> and our code doesn't have to be bastardized with 16 dos compilers ;).

What are those sixteen compilers that are bastardizing you?:)

[Open]Watcom seems to be up for the job (you can create 32-bit DOS
programs with it).

> However in dos
> we have garanteed hard drive support via int13 (Well almost garanteed,
> but if an os can boot of the computer, we can access the disk),

The hard disk is not the only device you can boot off. Consider
floppies, CDROMS, etc. etc. So your access to the disk is only
guaranteed when you can read the disk, which seems like a tautology to
me:).

> and I'm looking for the same sorta garantee in BSD.

You are stating that the BIOS has better hardware support that
FreeBSD. Can you give any examples?

> People will be using this with raid
> controllers, scsi hard disks, and ide drives (Server recovery), so
> there will be many times when the hardware running the hd requires
> specific support, which BSD may or may not have, point is we dont'
> want to manage that.

May I paraphrase: `If we have a disk which is unsupported by BIOS, we
can just wash hands as we can't change the BIOS. If we have a disk
which might be supported by FreeBSD but which we don't know the driver
name for, we feel guilty, so we don't want that'. Is my understanding
correct? There are not so many HDD drivers for FreeBSD out there.

-- 
DoubleF
Critic, n.:
A person who boasts himself hard to please because nobody tries
to please him.
-- Ambrose Bierce, "The Devil's Dictionary"


pgp0.pgp
Description: PGP signature


Re: 3com modem

2004-03-11 Thread Sergey &#x27;DoubleF' Zaharchenko
On Wed, 10 Mar 2004 19:20:21 -0700
RYAN vAN GINNEKEN <[EMAIL PROTECTED]> probably wrote:

> kernel conf
> # Serial (COM) ports
> device  sio0at isa? port IO_COM1 flags 0x10 irq 4
> device  sio1at isa? port IO_COM2 irq 3
> device  sio2at isa? disable port IO_COM3 irq 5
> device  sio3at isa? disable port IO_COM4 irq 9

Did you try adding the `puc' driver to the kernel?

device  puc

The pucdata.c file (at least in 5.2, the sources of which are now at
hand) lists a USR 3C5609 modem as supported, but its vendor and device
match those of your own... Try it and see if it helps.

-- 
DoubleF
Suddenly, Professor Liebowitz realizes he has come to the seminar
without his duck ...


pgp0.pgp
Description: PGP signature


Re: Using int 13 while BSD is running

2004-03-10 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 9 Mar 2004 22:12:31 -0800 
Jason Dictos <[EMAIL PROTECTED]> probably wrote:

> Aren't the nodes "/dev/ad[0-9] (ide) or /dev/da[0-9] (scsi/usb)" created by
> their device drivers, i.e. protected mode device drives? That would mean
> that I would have to make sure that the hardware is supported by a device
> driver, whereas if I had raw int 13 access I would be garanteed access to
> the drive the system booted from, and any other bios addressable device,
> without having to load any driver for the hardware. 
> 
> -Jason

Argh, I didn't get your point first. I thought your hardware wasn't
supported by int 13h, and you were trying to get FreeBSD drivers to
work for you in real mode...

Any real HDD's out there not supported by FreeBSD but supported by
BIOS'en?

Somewere around then Dan Nelson <[EMAIL PROTECTED]> probably
replied:

> I guess it's possible, since you have to use the bios to make VESA
> video calls, and they work.  /sys/i386/isa/vesa.c has most of the stuff
> you would need.  Also see the i386_vm86() userland function; you may not
> even need to mess around inside the kernel.

That's v86 mode, not real mode. Sometimes it makes a difference. It
depends on how that particular BIOS was written.

To Jason: take care not to *write* anything to the disk via int 13h.
I still don't think I understand why you are using FreeBSD for this
specific purpose. Why if you just spend time escaping from the OS?

-- 
DoubleF
All I ask is a chance to prove that money can't make me happy.


pgp0.pgp
Description: PGP signature


Re: Using int 13 while BSD is running

2004-03-09 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 9 Mar 2004 14:03:34 -0800 
Jason Dictos <[EMAIL PROTECTED]> probably wrote:

> The situation is
> this, currently we licenses Caldera DOS for a program we wrote which
> uses the int13 extensions to manipulate the systems hard drive (i.e.
> to recover partition tables and what not). This forces our application
> to be written in 16 bit mode, but it does allows us to not have to
> worry about loading any driver which would be hardware specific to
> access the hard drive.

Through the /dev/ad[0-9] (ide) or /dev/da[0-9] (scsi/usb) you can get
access to any byte in you harddrive. They `look like' ordinary files to
most programs. Just seek the appropriate number of bytes and read what
you want (0-512 is the mbr, for example). You don't even need to write a
line in assembly for that, just plain C (or even shell-script, if you
prefer that).

> Is there
> any way to write a driver for BSD which would put the processor into
> real mode, therefore allowing us to use the int 13 api of the bios to
> read and write hard drives?

Putting the cpu back into real mode is kind of perversion. And I don't
think FreeBSD provides any real mode interface. Whatever you would see
in real mode, you can bet it isn't a FreeBSD driver for your harddrive.

-- 
DoubleF
Romeo wasn't bilked in a day.
-- Walt Kelly, "Ten Ever-Lovin' Blue-Eyed Years With
   Pogo"


pgp0.pgp
Description: PGP signature


Re: Running Linux binaries

2004-03-08 Thread Sergey &#x27;DoubleF' Zaharchenko
On Mon, 08 Mar 2004 17:26:53 +0300
Dmitry <[EMAIL PROTECTED]> probably wrote:

> It looks like it need libglut.so.3. I have it. I copy it from
> /usr/X11R6/lib to /compat/linux/lib and try to run the binary again:

Almost definitely a wrong way to go...

> Is there any way to use FreeBSD libraries to run Linux binaries or
> I have to get the Linux versions of them?

$ pkg_which /usr/X11R6/lib/libglut.so
Mesa-3.4.2_2

A small search in /usr/ports gets /usr/ports/graphics/linux_mesa3,
which might be what you want. HTH,

-- 
DoubleF
A Law of Computer Programming:
Make it possible for programmers to write in English and you
will find the programmers cannot write in English.


pgp0.pgp
Description: PGP signature


Re: xterm

2004-03-05 Thread Sergey &#x27;DoubleF' Zaharchenko
On Sat, 6 Mar 2004 19:21:24 +0800
Stephen Liu <[EMAIL PROTECTED]> probably wrote:

> - snip -
> > you might check into setting options for xterm in the .Xdefaults
> > file of your home directory...
> 
> Hi Aaron,
> 
> Kindly advise where can I find .Xdefaults.  I found
> /home/user/.Xauthority but I can' read it

The last time I used .Xdefaults it was named .Xresources:) If there
isn't one, create it.

$ cat ~/.Xresources
.xterm.vt100.deleteIsDEL: true
.xterm.vt100.eightBitOutput: true
.xterm.vt100.font: -xos4-terminus-bold-r-normal--24-240-72-72-c-120-koi8-r

The '.xterm.vt100.font' is what you need to change to use another
default font. Naturally, you can use xfontsel to generate a `fontline'
for you. 

Be sure to put an `xrdb ~/.Xresources' line in your
.xsession/.xinitrc/whatever X startup script.

Changes will be applied on next login (to apply them earlier, run the
xrdb command manually). HTH,

-- 
DoubleF
"But don't you worry, its for a cause -- feeding global corporations
paws."



pgp0.pgp
Description: PGP signature


Re: kernel compile Q - How to get the speaker to work?

2004-03-04 Thread Sergey &#x27;DoubleF' Zaharchenko
On Thu, 04 Mar 2004 01:30:27 -0500
"HOLLOW, CHRISTOPHER" <[EMAIL PROTECTED]> probably wrote:

> I've never heard of the case speaker making anything but beeps.  Either 
> yours is quite unique or you guys are talking about different speakers. 

>From a 4.x LINT file:

#
# pca: PCM audio through your PC speaker
#
.
.
.
# Not controlled by `snd'
device  pca0 at isa? port IO_TIMER1

I've once heard that much `PCM audio' :. At the very least, as
experience shows, you can surprise your friends.

-- 
DoubleF
There's no point in being grown up if you can't be childish sometimes.
-- Dr. Who





pgp0.pgp
Description: PGP signature


Re: priority-- curious about cpu resouce share

2004-03-04 Thread Sergey &#x27;DoubleF' Zaharchenko
On Wed, 03 Mar 2004 22:57:05 +0800
Zhang Weiwu <[EMAIL PROTECTED]> probably wrote:

> Things can hardly be perfect. Now I begin to use mpg123, I used your 
> method of "rtprio up and su back", very useful to me.
> 
> But if mpg123 has higher priority than ppp, sometimes mpg123 decides to 
> move to another song, it reloads buffer, starveing ppp and timeouting 
> bluetooth device... If mpg123 has equal/lower priority with ppp, they 
> struggle for CPU, and that *sounds* bad. Now I adjusted buffer, it works 
> so so.
> 
> I read the handbook it says "no way to limit CPU percentage". It's my 
> toy, a old P166M box, I let other people in the office ssh to the box 
> with cmp3 console DJ (backended mpg123) to play music, because it has 
> good speakers. I use ppp over bluetooth to connect to the box when I'm 
> enjoying sun shine outdoor.

You still didn't post the whole of top(1) output.

FWIW splay has a -2 switch that permits it to generate half that
quality output using half that processor cycles (not sure about
mpg123). Unless the people out there are melomaniacs, that may be
sufficient.

P.S. It *seems* possible to use a little hack to renice the mp3 player
after it has loaded the new song. That is, every time a new song is
being played, launch both the player and a separate shell process
which sleep(1)s for a second, and then rtprio's the player. For one
song, it will *probably* look like this:

-begin playsong.sh
#!/bin/sh
mpg123 $1&
MPG123_PID=$!
(sleep 1; sudo rtprio 3 -${MPG123_PID})&
wait
-end playsong.sh

assuming you have the appropriate line in your sudoers file (the '-'
before the ${MPG123_PID} is not a typo).

-- 
DoubleF
"I refuse to have a battle of wits with an unarmed person."


pgp0.pgp
Description: PGP signature


Re: Email account utilization warning.

2004-03-03 Thread Sergey &#x27;DoubleF' Zaharchenko
On 02 Mar 2004 22:53:49 -0500
Mike Jeays <[EMAIL PROTECTED]> probably wrote:

> PIF files are Windows Program Information Files, dating from the days of
> Windows 3.1.  I am surprised they still work - but it seems that they
> do. They have executable content, and are now being used to spread
> malicious software.

Just for the sake of correctness...

Physically, real PIFs have no more executable content than something
between a binary data file and a soft link. But Windows thinks that
they can be `executed' (that was necessary to make them usable as
links, I guess), which is quite enough - when the loader analyzes the
file, it understands it's not a PIF but an EXE format executable
from the magic number and runs it.

Some olden virus-writers probably think that if one masquerades an
.exe as .pif, some olden antiviruses won't find them :). They are
making progress: the virus is about 25% smaller than its .C
predecessor:

P.S. And nobody even cared to remove staff@ from CC:)

-- 
DoubleF
Cloning is the sincerest form of flattery.


pgp0.pgp
Description: PGP signature


Re: priority-- curious about cpu resouce share

2004-03-03 Thread Sergey &#x27;DoubleF' Zaharchenko
On Wed, 03 Mar 2004 00:34:37 +0800
"Zhang Weiwu" <[EMAIL PROTECTED]> probably wrote:

> Today I did't experiment on {rt|id}prio(1), just to be interesting. I am 
> trying to understand FreeBSD priority mechenism. IMHO realtime/idle 
> priority only starvs processes when there is no cpu resource at all. 
> 
> To test, I run mpg321 on realtime priority 3, run ppp on realtime priority 
> 4, a little lower than mpg321, and scp over the ppp tunnel on normal 
> priority. 
> 
> Top(1) shows an average about:
> 55.2% user,  0.0% nice, 21.5% system, 12.2% interrupt, 11.1% idle
> * mpg321 takes average about 70%;
> * ppp is seriously slowed down, it takes about 1.5% (normally 17% on full 
> speed);
> * sshd almost starves; it takes 0.00% (normally 2%) and only transfer 
> several bytes once several minutes; the otherside scp prompts "stalled".

sshd doesn't starve CPU, I guess; as you reach it through ppp, and ppp
gets slow, sshd does, too.

> I'm the kind of newbie think 11.1% idle cpu time to be free cpu resource, 
> because I don't have idle process. I wish to know why, as there are still 
> 11.1% free cpu resource, ppp and sshd doesn't get this share? 

The most frequent cause is that they don't need the CPU so much as
something else, like disk I/O, etc. Could you please post the whole
output of top (and a snapshot of systat -vmstat, for example)?

> Just to be curious. Thank you.

FWIW, splay uses <30% of a P150:)

-- 
DoubleF
A jury consists of 12 persons chosen to decide
who has the better lawyer.
-- Robert Frost


pgp0.pgp
Description: PGP signature


Re: Strange behaviour in assembly language program

2004-03-03 Thread Sergey &#x27;DoubleF' Zaharchenko
On Wed, 3 Mar 2004 06:23:28 +
Daniela <[EMAIL PROTECTED]> probably wrote:

> In this situation, I can only use a single-byte instruction to push 4 bytes, 
> everything else costs me too much space. The only one I know of, is PUSHA, 
> but it pushes too many bytes.

Quoting from dev-handbook:

> But assembly language programmers like to shave off cycles. The above
> example requires a call/ret combination. We can eliminate it by
> pushing an extra dword:
> 
> open:
> pushdword mode
> pushdword flags
> pushdword path
> mov eax, 5
> pusheax ; Or any other dword
> int 80h
> add esp, byte 16
> 
> The 5 that we have placed in EAX identifies the kernel function, in
> this case open.

The last time I wrote `push ebp \n mov ebp, esp' the push took 1
byte :). `push ' will work, as the kernel doesn't
really care for the value of the dword.

-- 
DoubleF
"I'd love to go out with you, but I have to floss my cat."


pgp0.pgp
Description: PGP signature


Re: LINT file?

2004-03-02 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 2 Mar 2004 10:00:05 -0500 (EST)
Jerry McAllister <[EMAIL PROTECTED]> probably wrote:

> > And if you are unable to understand the programming at all, then may 
> > I suggest that you SHUT THE FUCK UP!!
> > 
> 
> Oh now that's a really helpful response.
> 

:(

> 
> Anyway, my 4.9 LINT has comments.
> I certainly hope to see them when I get to 5.xxx.
> 

You will see them, as Kris noted already, in NOTES. If you want to see
them in LINT, do something like

$ cd /usr/src/sys && cat conf/NOTES i386/conf/NOTES > i386/conf/LINT

:)

> 
> Without the comments LINT is essentially useless.
> 

I guess it serves a specific purpose for development: if you try to
compile a kernel with it as the config file, the compiler will attempt
to process most of the OS code.

> 
> Just long lists of cryptic character strings are not
> very helpful, even if there is a man page on every one.
> 

I feel like that this separation of a file needed for developers
(LINT) and file readable by others (NOTES) nevertheless has some
sense. For example, one doesn't have to make sure that NOTES is in any
way compilable, it's `lines that can be cut/pasted into kernel' config
file. That way, one may be able to enumerate more options, even they
are mutually exclsive. That's just one reason that came to my
mind. The reason for splitting notes into conf/NOTES and
/conf/NOTES seems more obvious: common devices go into the
former, specific - into the latter.

HTH.


-- 
DoubleF
Jesus Saves,
Moses Invests,
But only Buddha pays Dividends.


pgp0.pgp
Description: PGP signature


Re: scheduling priority not working?

2004-03-01 Thread Sergey &#x27;DoubleF' Zaharchenko
On Sun, 29 Feb 2004 19:07:12 +0800
"Zhang Weiwu" <[EMAIL PROTECTED]> probably wrote:

> nice(1) is just what I learned from school; school books are
> often not very practical these days.

> STANDARDS
>  The nice utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'').
> 
> HISTORY
>  A nice utility appeared in Version 4 AT&T UNIX.

nice(1) is standard, and {id|rt}prio(1) are specific to FreeBSD. So
don't blame school books. If they say they describe a POSIX system,
well, that's what they do.

BTW, why does it say `*A* nice utility'?

-- 
DoubleF
Waste not, get your budget cut next year.


pgp0.pgp
Description: PGP signature


Re: scheduling priority not working?

2004-02-29 Thread Sergey &#x27;DoubleF' Zaharchenko
On Sun, 29 Feb 2004 19:07:12 +0800
"Zhang Weiwu" <[EMAIL PROTECTED]> probably wrote:

> Sergey 'DoubleF' Zaharchenko wrote:
> 
> >There's more than nice to change priority; for example, check out
> >rtprio(1) and idprio(1). Just FYI.
> >
> GREAT TOOL rtprio(1) is. Now I can run 'rtprio 5 mpg321 *.mp3' it produce
> very smooth sound.

Are you running the MP3 player as root? I wouldn't recommend it. I'd
make a script using sudo and su'ing back to myself just after the
priority change. FWIW this is what I use for listening to my music:

sudo /usr/sbin/rtprio 5 /usr/bin/su df -c "/usr/local/bin/splay -s -2 
/home/df/music/*" &

Of course, I changed the suders file accordingly and wrote a script
`mus' which includes the quoted line.

rtprio is really powerful, and that's why it may be a bit
dangerous. If a program which has run-time priority gets into a large
amount of calculations, or into a busy-wait loop, all other programs
will starve (the machine will appear hung). If you don't trust your
MP3 player (or any program you set to have run-time priority) to be
bullet-proof, you should think twice before using rtprio. Not that I
have found many misbehaving programs, but I sometimes happen to write
one:)

-- 
DoubleF
Truthful, adj.:
Dumb and illiterate.
-- Ambrose Bierce, "The Devil's Dictionary"


pgp0.pgp
Description: PGP signature


Re: scheduling priority not working?

2004-02-29 Thread Sergey &#x27;DoubleF' Zaharchenko
On Sat, 28 Feb 2004 06:28:24 +0100
Erik Trulsson <[EMAIL PROTECTED]> probably wrote:

> Let me guess: You are using [t]csh as your shell, right?
> That has 'nice' as a built-in command with a slightly different syntax
> than /usr/bin/nice  (which is what is documented in the nice(1)
> manpage)

Substitute `slightly different' for `evil and incompatible':).

That's why it's so usable to use an escape so that the nice binary
would be used, not the built-in command:

$ \nice -n 19 make

There's more than nice to change priority; for example, check out
rtprio(1) and idprio(1). Just FYI.

HTH,

-- 
DoubleF
A diplomat is someone who can tell you to go to hell in such a way that
you will look forward to the trip.


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-02-19 Thread Sergey &#x27;DoubleF' Zaharchenko
On Thu, 19 Feb 2004 06:42:22 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> 
> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> > Try
> > 
> > $ hd /dev/...| grep -A 5 "02 00 00 00 0c 00 04 01  2e 00 00 00 02 00 00
> > 00"
> 
> Well that definitely produced something:
> 
> bash-2.05b# hd /dev/ad2s1e | grep -A 5 "02 00 00 00 0c 00 04 01  2e 00 00 00 02 00 
> 00"
> 002d  02 00 00 00 0c 00 04 01  2e 00 00 00 02 00 00 00  ||
> 002d0010  0c 00 04 02 2e 2a 00 00  00 a0 09 00 10 00 04 00  |.*..|
> 002d0020  70 69 63 73 00 10 6a c0  00 f8 40 00 14 00 04 08  |[EMAIL PROTECTED]|
> 002d0030  6f 68 64 5b 6e 70 66 73  00 00 00 00 03 00 00 00  |ohd[npfs|
> 002d0040  14 00 08 0a 58 42 38 32  43 6b 6e 62 69 63 00 d9  |XB82Cknbic..|
> 002d0050  00 00 63 00 0c 00 04 03  65 70 63 00 00 58 63 00  |..c.epc..Xc.|
> --
> 002f4000  02 00 00 00 0c 00 04 01  2e 00 00 00 02 00 00 00  ||
> 002f4010  0c 00 04 02 2e 2e 00 00  00 a0 09 00 10 00 04 04  ||
> 002f4020  70 69 63 73 00 14 6a c4  00 f8 40 00 14 00 04 08  |[EMAIL PROTECTED]|
> 002f4030  6f 6c 64 5f 6e 74 66 73  00 00 00 00 03 00 00 00  |old_ntfs|
> 002f4040  14 00 08 0a 58 46 38 36  43 6f 6e 66 69 67 00 d9  |XF86Config..|
> 002f4050  00 00 63 00 0c 00 04 03  65 74 63 00 00 58 63 00  |..c.etc..Xc.|

You created directories in / of that drive (that is, /data) recently,
didn't you?

> That second one seems to be more intact. "pics" and "old_ntfs" and "X" were
> directories off /data (there were others). The first match would appear to
> be slightly corrupted (that "etc" might have been a backup I made of /etc at
> some point in case of / failure).

If you are feeling adventurous (not in the sense of writing anything
there yet), you could `walk' the directory structure manually so as to
find out if it's still there. Just mask out the inode numbers, use
this

# hd /dev/ad2s1e | grep -A 5 ".. .. .. .. 0c 00 04 01  2e 00 00 00 .. .. .. .."

and be ready to read a huge amount of hexdump:). If you wish to see
more of a directory, increase the `5' in -A (afterwards context line
count).

> It's still churning away but I'm going to assume that it's found all it's
> going going to and send this email now.
> 
> For what it's worth, FedEx is estimating Monday the 23rd as delivery of the
> spare 80GB.


-- 
DoubleF
"The illegal we do immediately. The unconstitutional takes a bit
longer."
-- Henry Kissinger


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-02-19 Thread Sergey &#x27;DoubleF' Zaharchenko
X-Mailer: Sylpheed version 0.9.8claws (GTK+ 1.2.10; i386-portbld-freebsd4.8)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

On Wed, 18 Feb 2004 12:31:55 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> 
> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> 
> > Here you should have answered `y' (it doesn't ask you to change
> > anything yet). Let's try that again, shall we?
> 
> Sorry, ok I went through it again, saying Y to all the "Continue?" prompts
> but N to all the ones that talked about changing things. The final result
> was huge, so instead of posting it here I'll host it on my site:
> 
> http://vtbsd.net/fschk.txt
> 

Sorry for timing out and sending a NAK mail too soon.

> > Well, after all fsck doesn't seem mad (`erase everything and mark fs
> > clean').

Quoting part of it to the list:

> UNKNOWN FILE TYPE I=5789755
^
> CLEAR? [yn] n
> 
> 1268475613 BAD I=5789756
> -1633222987 BAD I=5789756
> 2069254589 BAD I=5789756
> -575751885 BAD I=5789756
> 868457706 BAD I=5789756
> 1801998801 BAD I=5789756
> -1342935077 BAD I=5789756
> -1580481935 BAD I=5789756
> -1823336811 BAD I=5789756
> 837335149 BAD I=5789756
> 2115764945 BAD I=5789756
> EXCESSIVE BAD BLKS I=5789756
> CONTINUE? [yn] y

> DIRECTORY CORRUPTED  I=5789753  OWNER=1001 MODE=40755
> SIZE=512 MTIME=Jun  6 07:21 2001
> DIR=?
> 
> SALVAGE? [yn] n
> 
> MISSING '.'  I=5789753  OWNER=1001 MODE=40755
> SIZE=512 MTIME=Jun  6 07:21 2001
> DIR=?

I was, not to be rude, TOO optimistic:(

This is, to my mind, one of three things.

a) the superblock copy we are using is largely incorrect.
b) (the superblock and) several directories are.
c) the whole disk is.

the first one being more probable in case of a `natural' failure (like
power failure or such) (if anyone's willing to second that, I'd like
to hear).

> I have ordered an additional 80GB drive for this very purpose (along w/ an
> external USB enclosure but we don't have to get that working yet). I will
> let you know when it arrives. If the next step you want to do is going to
> make changes, I'm happy to wait until the 2nd drive is here and we can do
> the dd.

Before I read the log, I thought that buying an extra drive for this
very purpose wasn't necessary. Now, I've changed my opinion.

> Thanks!
> 

-- 
DoubleF
Census Taker to Housewife: Did you ever have the measles, and, if so,
how many?




pgp0.pgp
Description: PGP signature


Re: How to view BIOS settings on a running system?

2004-02-16 Thread Sergey &#x27;DoubleF' Zaharchenko
On 16 Feb 2004 09:10:38 -0500
Lowell Gilbert <[EMAIL PROTECTED]> probably wrote:

> Rob <[EMAIL PROTECTED]> writes:
> 
> > A few times I have seen answers to problems like:
> > 
> > "Verify this-and-this in your BIOS setting"
> > 
> > The only way to do this, that I know of, is to shutdown the system
> > and hit the DEL-key at boot up etc. But this is a bit silly, for
> > just checking a particular setting of the BIOS.
> 
> Not if the setting could indicate an important issue with booting the
> system, which is usually the case for such questions.
> 
> > Isn't there a tool in FreeBSD that shows the BIOS settings in a
> > similar layout, without shutting down the system?
> 

Theoretically, it's possible to write a program to open /dev/io and then
use the out* functions (see include/machine/cpufunc.h) to write to port
0x70, read from port 0x71 to obtain the CMOS values (hard disk type,
RTC,...). That's rude, but if you happen to *really* need it...

-- 
DoubleF
Trying to establish voice contact ... please yell into keyboard.


pgp0.pgp
Description: PGP signature


Re: reboot record information

2004-02-14 Thread Sergey &#x27;DoubleF' Zaharchenko
On Fri, 13 Feb 2004 11:39:28 -0500
"JJB" <[EMAIL PROTECTED]> probably wrote:

> When an FBSD system crooks, and It reboots it's self, very seldom
> does any of issued problem messages have time to be posted
> completely before the rug is pulled out from under the log write
> process by the reboot occurring. All you can find out from the logs
> is yes indeed it did reboot. You are SOL, just like the rest of us
> when this happens to us.

Probably a loose chance, but `last' could come up with something...
Anyway it still just reads the logs...

If you're afraid this may happen again, and you're on a network, you
might want to use the remote logging feature of syslog. Then, all
messages will make it to the destination, right up to the reboot.

HTH,

-- 
DoubleF
Truth is the most valuable thing we have -- so let us economize it.
-- Mark Twain


pgp0.pgp
Description: PGP signature


Re: Input/output error report

2004-02-12 Thread Sergey &#x27;DoubleF' Zaharchenko
On Thu, 12 Feb 2004 08:42:55 -0500
Jim Freeze <[EMAIL PROTECTED]> probably wrote:

> Hi
> 
> My daily security report has recently been spitting profanities
> at me:
> 
>   Subject: rabbit security run output
>   
>   
>   Checking setuid files and devices:
>   find: /usr/local/share/texmf/doc/latex/sidecap/sc2demo.tex: Input/output error
>   find: /usr/local/share/texmf/doc/latex/sidecap/scdemo.tex: Input/output error
>   find: /usr/local/share/texmf/doc/latex/sidecap/sidecap.dvi: Input/output error
>   ...
>   
> Is this indicated of a disk going bad?

Maybe, especially if messages about `read error reading fsbn xxx' show
up on the console.

> If so, is there a way to confirm it?

Here you are:

MD5 (/usr/local/share/texmf/doc/latex/sidecap/sc2demo.tex) = 
2f6c69ad5f32b8fe044dbac7ebb1042f
MD5 (/usr/local/share/texmf/doc/latex/sidecap/scdemo.tex) = 
143f7b274aa9d772fa129227990f2dab
MD5 (/usr/local/share/texmf/doc/latex/sidecap/sidecap.dvi) = 
049f05a5ddd0b46fa2f98de7b139ce89

I've got the latest version (2.0.2).

HTH,

-- 
DoubleF
The fact that boys are allowed to exist at all is evidence of a
remarkable Christian forbearance among men.
-- Ambrose Bierce


pgp0.pgp
Description: PGP signature


(const port *) Re: desktop freebsd??

2004-02-06 Thread Sergey &#x27;DoubleF' Zaharchenko
On Fri, 6 Feb 2004 11:30:38 -
"Edd Barrett" <[EMAIL PROTECTED]> probably wrote:

> Hi all,
> I have been using freebsd for my web/database/music server for a while and
> it has performed flawlessly. good good! However recently I installed freebsd
> on my desktop too. I can do the things I want to, it just seems that i need
> to be root to do a lot of things. If I didnt have root, I would be screwed.
> 
> One point I find annoying is that I cant workout how a normal user can
> unmount a fs. I have created ~/cdrom and put an fstab entry in for it. The
> device is /dev/acd0 (777 for now). vfs.usermount=1. I can mount the share,
> but not unmount it. For now I have chmod +s /sbin/umount. This is bad and i
> wouldnt appreciate a normal user unmounting my hard disks. What is the
> proper way?? My version is 5.2-release.
> 

Use sudo. /usr/ports/security/sudo. Or super. Location same.

> Also is there any guides online that tell you how freebsd can be configured
> as a desktop machine?

/usr/ports/misc/instant-workstation :)

Just kidding. It's going to be *your* PC - find out what you like and
install what you like. I don't think anyone can recommend you anything
- unless you know someone who knows you better than you yourself.

> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
Take everything in stride.  Trample anyone who gets in your way.


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-02-04 Thread Sergey &#x27;DoubleF' Zaharchenko
On Wed, 4 Feb 2004 08:26:47 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> 
> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> > Try using fsck -n (answer `no'), and recording what else comes up.
> 
> That won't work, because it answers no to the first question of looking for
> alternate superblocks, then aborts immediately. So I'm just going to
> manually say no to all questions after yes to the first:
> 
> bash-2.05b# fsck /dev/ad2s1e
> ** /dev/ad2s1e
> BAD SUPER BLOCK: MAGIC NUMBER WRONG
> 
> LOOK FOR ALTERNATE SUPERBLOCKS? [yn] y
> 
> USING ALTERNATE SUPERBLOCK AT 32
> ** Last Mounted on
> ** Phase 1 - Check Blocks and Sizes
> 416 BAD I=2
> 412 BAD I=3
> 424 BAD I=4
> 414 BAD I=4
> 417 BAD I=5
> INCORRECT BLOCK COUNT I=4257794 (8928 should be 9952)
> CORRECT? [yn] n
> 
> 17227776 DUP I=4257795
> 1722 DUP I=4257795
> 17227778 DUP I=4257795
> 17227779 DUP I=4257795
> 17227780 DUP I=4257795
> 17227781 DUP I=4257795
> 17227782 DUP I=4257795
> 17227783 DUP I=4257795
> 17227784 DUP I=4257795
> 17227785 DUP I=4257795
> 17227786 DUP I=4257795
> EXCESSIVE DUP BLKS I=4257795
> CONTINUE? [yn] n

Here you should have answered `y' (it doesn't ask you to change
anything yet). Let's try that again, shall we?

> UPDATE STANDARD SUPERBLOCK? [yn] n
> 
> 
> * FILE SYSTEM MARKED DIRTY *

Well, after all fsck doesn't seem mad (`erase everything and mark fs
clean'). But if you are really are paranoid, as you should be, you
should copy the whole contents of the harddrive, maybe to a remote
machine, by dd (over NFS, perhaps). Perhaps the `sparse' dd option
would help save a bit of space (by creating `holes' in the file where
there were NUL's on the harddrive).

> > If you know what fsdb(8) is, it might be helpful (still with the -r
> > (read-only) option, and the -d option as well). I don't, but I'm
> > learning it intensively at the moment:).
> 
> I don't, and the man page sufficiently put the fear of the almighty in me as
> far as it goes "Use this tool with extreme caution--you can damage an FFS
> file system beyond what fsck(8) can repair."  It's also a bit out of my
> league as far as understanding how to make use of it. 

It's not harmful in `-r'-mode, but I'm afraid it won't help because it
wouldn't even use an alternate superblock, as I've found out.

> > > so I'd still need to fix that manually somehow... correct?
> > 
> > Yes, by means of dd.
> 
> Hmm although that last fsck question "UPDATE STANDARD SUPERBLOCK? [yn]"
> seemed interesting.
> 

That's another option.

-- 
DoubleF
An elephant is a mouse with an operating system.


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-02-04 Thread Sergey &#x27;DoubleF' Zaharchenko
On Wed, 4 Feb 2004 06:37:11 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> > And /dev/ad2s1e?
> 
> bash-2.05b# mount -r /dev/ad2s1e /data
> mount: /dev/ad2s1e on /data: incorrect super block
> bash-2.05b# fsck /dev/ad2s1e
> ** /dev/ad2s1e
> BAD SUPER BLOCK: MAGIC NUMBER WRONG
> 
> LOOK FOR ALTERNATE SUPERBLOCKS? [yn] y
> 
> USING ALTERNATE SUPERBLOCK AT 32
> ** Last Mounted on
> ** Phase 1 - Check Blocks and Sizes
> 416 BAD I=2
> 412 BAD I=3
> 424 BAD I=4
> 414 BAD I=4
> 417 BAD I=5
> INCORRECT BLOCK COUNT I=4257794 (8928 should be 9952)
> CORRECT? [yn]
> 
> Hmmm that looks more promising, although I'm not sure exactly what it's
> trying to warn me about, or how bad things are from that, so I'm going to
> leave it there for now. :)

This really looks weird. The incorrect block counts seem somewhat
suspicious.

Try using fsck -n (answer `no'), and recording what else comes up.

If you know what fsdb(8) is, it might be helpful (still with the -r
(read-only) option, and the -d option as well). I don't, but I'm
learning it intensively at the moment:).

> And if I remember correctly, even though fsck has used an alternate
> superblock to perform the repair process, it hasn't actually replaced the
> master superblock with the alternate one, so I'd still need to fix that
> manually somehow... correct?

Yes, by means of dd.

--
DoubleF
The only possible interpretation of any research whatever in the
`social sciences' is: some do, some don't.
-- Ernest Rutherford


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-02-04 Thread Sergey &#x27;DoubleF' Zaharchenko
On Wed, 4 Feb 2004 06:06:06 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> 
> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> > Well, as it's UFS1 as we've figured out, the next logical thing would be
> > to try mounting /dev/ad2s1c r/o, and if that fails, try fscking it.
> 
> bash-2.05b# mount -r /dev/ad2s1c /data
> mount: /dev/ad2s1c on /data: incorrect super block
> 
> bash-2.05b# fsck /dev/ad2s1c
> ** /dev/ad2s1c
> BAD SUPER BLOCK: MAGIC NUMBER WRONG
> /dev/ad2s1c: NOT LABELED AS A BSD FILE SYSTEM (unused)
> 
> 

And /dev/ad2s1e?

-- 
DoubleF
Excellent day for drinking heavily.  Spike office water cooler.


pgp0.pgp
Description: PGP signature


Re: verify md5 for /sbin/init (v1.7.2.3 2002/08/12 11:17:37 ) on FreeBSD Stable 4.9

2004-02-04 Thread Sergey &#x27;DoubleF' Zaharchenko
X-Mailer: Sylpheed version 0.9.8claws (GTK+ 1.2.10; i386-portbld-freebsd4.8)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

On Wed, 4 Feb 2004 17:05:12 +0300
Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> probably wrote:

> On Wed, 4 Feb 2004 13:51:16 -
> "Edmund Craske" <[EMAIL PROTECTED]> probably wrote:
> 
> > 1.2 is not greater than 1.7. Check your logic.
> >
> 
> I mean the dates. Revision numbers have no correspondence between them.
> If you have two *different* files, and one of them has a revision number
> greated than the other, it doesn't necessarily mean it's older.
  ^^
I meant *either* of the files:) (read "if you have two different files,
and one of them has a revision number greated than the other, it doesn't
necessarily mean anything").

-- 
DoubleF
Time flies like an arrow, but fruit flies like a banana.




pgp0.pgp
Description: PGP signature


Re: verify md5 for /sbin/init (v1.7.2.3 2002/08/12 11:17:37 ) on FreeBSD Stable 4.9

2004-02-04 Thread Sergey &#x27;DoubleF' Zaharchenko
On Wed, 4 Feb 2004 13:51:16 -
"Edmund Craske" <[EMAIL PROTECTED]> probably wrote:

> 1.2 is not greater than 1.7. Check your logic.
>

I mean the dates. Revision numbers have no correspondence between them.
If you have two *different* files, and one of them has a revision number
greated than the other, it doesn't necessarily mean it's older.

You can commit a file ten times, and after that commit another file one
time. If they were both at 1.1, then the first one, in your opinion,
will be `older' than the second, when it's indeed vice versa.

HTH,

--
DoubleF
Equal bytes for women.


pgp0.pgp
Description: PGP signature


Re: verify md5 for /sbin/init (v1.7.2.3 2002/08/12 11:17:37 ) on FreeBSD Stable 4.9

2004-02-04 Thread Sergey &#x27;DoubleF' Zaharchenko
On Wed, 4 Feb 2004 07:21:39 -0500
"treeml" <[EMAIL PROTECTED]> probably wrote:

> ident /mnt/sbin/init
> 
> Gave out a long list of results, but at the end of the list, which is also
> the most recent is the following.  $FreeBSD:
> src/lib/libc/locale//ldpart.c,v1.7.2.3 2002/08/12 11:17:37 ache Exp $
> 

I can't believe it's the most recent entry! I'm on 4.8-REL and my most
recent entry is

$FreeBSD: src/lib/libc/string/strerror.c,v 1.2.14.3 2003/01/17 13:39:32 mike Exp $

(I mean, more recent than yours). Try running

# ident /mnt/sbin/init | sort -k 4

and look at the bottommost entry instead of vgrepping through the
whole list. Then maybe that string will serve some purpose.

HTH,

-- 
DoubleF
"I didn't know it was impossible when I did it."


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-02-04 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 3 Feb 2004 23:05:05 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> > Sorry, you were recovering an 80G disk, and now you say the 80G has 4.9
> > on it. Did you erase anything? Is this a remote machine?

> No, it was not the drive that had the OS on it. It was originally mounted as
> /data on a system that had FreeBSD 5.1 installed on a separate drive. We
> determined the 80GB was UFS1. You wanted to try troubleshooting using
> FreeBSD 4.9, so I obtained a spare system which I installed FreeBSD
> 4.9-RELEASE on. I then moved the 80GB from the 5.1 system (which is actually
> 5.2 now) and installed it into the 4.9 system on the 2nd controller. So now
> 4.9 is installed on a 20GB on /dev/ad0, and our problem 80GB is /dev/ad2.

Thank you for the explanation.

> > You can boot 4.9, right? Examine the output of disklabel ...s1 and
> > ...s1c to make heart feel better.

> bash-2.05b# disklabel /dev/ad2s1
[snip]
> 8 partitions:
> #size   offsetfstype   [fsize bsize bps/cpg]
>   c: 1563445170unused0 0# (Cyl.0 - 9731*)
>   e: 15634451704.2BSD 2048 1638489  # (Cyl.0 - 9731*)

> bash-2.05b# disklabel /dev/ad2s1c
[snip]
> 8 partitions:
> #size   offsetfstype   [fsize bsize bps/cpg]
>   c: 1563445170unused0 0# (Cyl.0 - 9731*)
>   e: 15634451704.2BSD 2048 1638489  # (Cyl.0 - 9731*)

Good:)

Well, as it's UFS1 as we've figured out, the next logical thing would be to
try mounting /dev/ad2s1c r/o, and if that fails, try fscking it.

--
DoubleF
The faster we go, the rounder we get.
-- The Grateful Dead


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-02-03 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 3 Feb 2004 16:05:26 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> Hello, gentlemen. For those of you still interested in this little
> adventure, I now have the 80GB drive mounted on the 2nd IDE controller in
> its own dedicated FreeBSD 4.9-RELEASE system.
> 
> ad0: 19092MB  [38792/16/63] at ata0-master UDMA100
> ad2: 76345MB  [155114/16/63] at ata1-master UDMA33
> 
> I'm ready to proceed if you're still willing, if not I understand! :)

Oh, there are survivors:)

Sorry, you were recovering an 80G disk, and now you say the 80G has 4.9
on it. Did you erase anything? Is this a remote machine?

> (If anyone else new to this problem and would like to help, you can use
> google or the archives, or I can catch you up if you'd like)
> 
> Many thanks already to all who have helped so far.

You can boot 4.9, right? Examine the output of disklabel ...s1 and
...s1c to make heart feel better.

--
DoubleF
We have only two things to worry about:  That things will never get
back to normal, and that they already have.


pgp0.pgp
Description: PGP signature


Re: recommendation for disk sector editor

2004-01-24 Thread Sergey &#x27;DoubleF' Zaharchenko
On Fri, 23 Jan 2004 09:51:46 -0800
[EMAIL PROTECTED] probably wrote:

> Good morning, FreeBSD enthusiasts,
> 
> Would you wish to recommend a disk sector editor program?  I am looking for
> something that provides functionality similar to Microsoft DskProbe, but
> not requiring a graphics user interface, and most importantly, does not
> require any operating system support beyond that which can be loaded from a
> floppy diskette.  It would be used on a computer with contemporary Intel
> architecture.  I am interested in accessing things such as the boot record,
> partition table, FAT, directories, i-nodes, and other similar parts of the
> hard drive.  The type of display that a tool such as PCTools, or XTGold has
> would be great; however each of these accesses files, not sectors, and
> neither work with contemporary gigabyte drives.  Surprisingly, I was unable
> to identify any such program at the GNU site.  Any suggestions would be
> appreciated.  Yours truly, Lee Shackelford   L e e underscore S h a c k e l
> f o r d dot d o t dot c a dot g o v

SleuthKit (sysutils/sleuthkit) *reads*

>& bsdi (BSDi FFS)
>& fat (auto-detect FAT)
>& fat12 (FAT12)
>& fat16 (FAT16)
>& fat32 (FAT32)
>& freebsd (FreeBSD FFS)
>& linux-ext2 (Linux EXT2FS)
>& linux-ext3 (Linux EXT3FS)
>& netbsd (NetBSD FFS)
>& ntfs (NTFS)
>& openbsd (OpenBSD FFS)
>& solaris (Solaris FFS)

I'm not sure how much *editing* you may do with it (I guess none, but at
least you can figure out the physical location of the data you need
modified)

When I built it statically (not via the port), it took more than 1
diskette (~3M), but I didn't try crunching the binaries together. I
guess you might end up using 2 diskettes: 1 for booting, the other for
sleuthkit.

HTH.


-- 
DoubleF
"It's a small world, but I wouldn't want to have to paint it."
-- Steven Wright


pgp0.pgp
Description: PGP signature


Re: Default /var directories/permissions in 4.9R

2004-01-23 Thread Sergey &#x27;DoubleF' Zaharchenko
On Fri, 23 Jan 2004 06:55:15 -0500 (EST)
Cliff Addy <[EMAIL PROTECTED]> probably wrote:

> I've got a new 4.9R box with fbsd installed by the vendor.  However, the
> /var partion did not get installed properly and I need to reconstruct it.
> I have no other 4.9 systems to compare it with and apparently it's
> different from the other systems we have around here.
> 
> Are the default layout and permissions documented anywhere?  Or could
> someone give me a dump of their 4.9 /var showing just the directories and
> their perms?

/etc/mtree/BSD.var.dist

is your friend. Mail back if you don't understand some of it.

FWIW, mtree(8) can be used to reconstruct the tree with minimal
knowledge of how the file is organized (and also saves keystrokes:).

> Cliff
> 
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
The reader this message encounters not failing to understand is
cursed.


pgp0.pgp
Description: PGP signature


Re: FDisk won't detect or accept correct disk geometry from BIOS

2004-01-23 Thread Sergey &#x27;DoubleF' Zaharchenko
On Thu, 22 Jan 2004 14:24:19 -0800
"Keith Kelly" <[EMAIL PROTECTED]> probably wrote:

> Thanks for your thoughtful and helpful reply.  I should have given more 
> technical details.
> 
> I already tried (with both 4.9 and 5.1) letting the FreeBSD install proceed 
> with fdisk's  geometry value assumptions, and what I always get is a 
> non-bootable hard drive that gives the "Missing operating system" error at 
> boot.
> 
> The hard drive is IDE, not SCSI.  It is a Maxtor UltraMax 40GB ATA/100 drive 
> purchased shy of two years ago.  The "physical geometry" reported by Maxtor 
> in the specs for the drive is different from the geometry my BIOS reports 
> that it has auto-detected and is using to address the drive.  And both of 
> *those* geometries are different from the one that fdisk keeps trying to 
> assume.

>From the web page, I learnt the 3 geometries you have.

$ bc -l -q
155061*16*63*512
80026361856
9729*255*63*512
80023749120
38309*16*255*512
80025968640

So which of them is not 80G (modulo the ``rounding error'', which is, as
you can see, negative, I mean, neither BIOS nor FreeBSD think the drive
to be larger than it is according to its specs, so it cann't cause real
trouble)?

After reading your further posts, I realized it wasn't *your* geometry
:). Could you please post `all of them', like in the webpage?

No, don't tell me the difference between them makes it impossible to
boot from the drive. The mbr is at the beginning of the drive, not at
the end:)

I own just the same model drive (this means the same as in the webpage),
and I never had a geometry problem with any FreeBSD version I tried
(4.4, 4.7, 4.8, 5.2-RC2).

FWIW, here is my fdisk output.

> $ fdisk /dev/ad2
> *** Working on device /dev/ad2 ***
> parameters extracted from in-core disklabel are:
> cylinders=9729 heads=255 sectors/track=63 (16065 blks/cyl)
> 
> Figures below won't work with BIOS for partitions not in cyl 1
> parameters to be used for BIOS calculations are:
> cylinders=9729 heads=255 sectors/track=63 (16065 blks/cyl)

BTW, you could try fiddling with the `packet' option of boot0, but that
would take a fixit floppy/CD.

# boot0cfg -o packet /dev/whatever

might help you (it enables the bootloader to use LBA packet mode).

> I've already read all the FAQs, handbooks, and support sites I could find 
> regarding FreeBSD and disk geometry.  None of them have contained any 
> information specific to IDE drives (they all seem SCSI-centric), and none of 
> them have clearly explained all the background context about how drive 
> geometries work.

In short - they (geometries) don't. Physical geometry doesn't exist.
Only the number of sectors (should be marked `LBA addressable', or
something like that,on the drive) matters on modern drives. Satisfied?

P.S. Now, who cc'd it to bugs@:)?

-- 
DoubleF
"This is a test of the Emergency Broadcast System.  If this had been an
actual emergency, do you really think we'd stick around to tell you?"




pgp0.pgp
Description: PGP signature


Re: C programming: ADT support

2004-01-22 Thread Sergey &#x27;DoubleF' Zaharchenko
On Thu, 22 Jan 2004 11:11:23 +0100
r t g tan <[EMAIL PROTECTED]> probably wrote:

> Hi,
> 
> I'm looking for some ADT's  like lists trees and
> such, to be used in C programs. 
> 
> Is there a librarie out there?
> 
> Tnx,
> 
> ---
> robert t g tan

I imply the word `for FreeBSD' somewhere in your question (if not,
Google is your friend - go find the libs yourself).

$ apropos "singly-linked list"
SLIST_EMPTY(3), SLIST_ENTRY(3), SLIST_FIRST(3), SLIST_FOREACH(3),
<... and a screenful more of>
implementations of singly-linked lists, singly-linked tail
queues, lists, tail queues and circular queues

Have fun!

P.S. Is it so difficult to make them yourself?

-- 
DoubleF
Eggheads unite!  You have nothing to lose but your yolks.
-- Adlai Stevenson



pgp0.pgp
Description: PGP signature


Re: How to mount a FreeBSD-5.1 partition from FreeBSD-4.9

2004-01-21 Thread Sergey &#x27;DoubleF' Zaharchenko
On Wed, 21 Jan 2004 15:52:25 +0100
Juan Rodriguez Hervella <[EMAIL PROTECTED]> probably wrote:

> On Wednesday 21 January 2004 14:53, Sergey 'DoubleF' Zaharchenko wrote:
> > On Wed, 21 Jan 2004 13:26:25 +0100
> >
> > Juan Rodriguez Hervella <[EMAIL PROTECTED]> probably wrote:
> > > Hello, please send the reply to myself cause Im not
> > > subscribe to the list
> > >
> > > I've got a FreeBSD-5.1 installation in /dev/ad0s3,
> > > but I usually run FreeBSD-4.9 from /dev/ad0s2.
> >
> > 5.x uses UFS2 by default. 4.x does not understand UFS2. In short, you
> > either re-newfs the 5.x partition to be UFS1, or you are short of luck
> > this time.
> 
> I can not believe you !, 
> 
> I guess there is (or there will be) some work-in-progress to have
> UFS2 support on FreeBSD-4.X systems.

If only by you:(. I'd suggest you make your 5.x partition UFS1 and be
satisfied with that - that's pretty much all you can do.

> Or are we following "Windows way of life" here ?

If 5.x couldn't understand 4.x, that would be a bad thing. But forcing
5.x to be absolutely compatible with 4.x is another bad thing.

If you were forced to stay that compatible all the time, you wouldn't be
able to do major architectural changes. If everyone thought the same
way, an Athlon or a P4 would be a 80286, only MUCH faster (which it is
for most olden DOS or Windows/16 programs, so your definition of
`Windows way of life' is definitely contrary to mine).

You don't complain 4.x can't run 5.x binaries, do you?:)

-- 
DoubleF
If I traveled to the end of the rainbow
As Dame Fortune did intend,
Murphy would be there to tell me
The pot's at the other end.
-- Bert Whitney


pgp0.pgp
Description: PGP signature


Re: problem generating certificate for postfix

2004-01-20 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 20 Jan 2004 18:56:42 +1100
Gautam Gopalakrishnan <[EMAIL PROTECTED]> probably wrote:

> On Tue, Jan 20, 2004 at 09:32:54AM +0200, Hiren wrote:
> > greetings all
> > i am in the process of generating a certificate for postfix
> > i am currently trying to run the following command:
> > dd if=/dev/urandom of=/etc/postfix/ssl/post.rand count=1 2>/dev/null
> > the error i get is:
> > dd: unknown operand 2
> 
> I guess you're using csh or tcsh. Try using /bin/sh, bash or ksh.
> 

Or just use

dd if=/dev/urandom of=/etc/postfix/ssl/post.rand count=1

The informative message going to your terminal about how many (512)
bytes have been written won't be too much trouble, will it?

> hth
> Gautam
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
Accuracy, n.:
The vice of being right


pgp0.pgp
Description: PGP signature


Re: Yet another SUPERBLOCK/LABEL problem

2004-01-09 Thread Sergey &#x27;DoubleF' Zaharchenko
On Thu,  8 Jan 2004 07:36:37 +0200
[EMAIL PROTECTED] probably wrote:
> 
> it>/mnt# newfs -N /dev/ad3s1f | head
> /dev/ad3s1f: 36383.7MB (74513744 sectors) block size 16384, fragment 
> size 2048 using 198 cylinder groups of 183.77MB, 11761 blks, 23552 
> inodes.

Sorry for the delay. A cylinder group for you is 11761*16384=192692224
bytes. Tell me what your cylinder size (look up the geometry given by
disklabel and multiply sectors/cylinder by 512) is and I will tell you
how many cylinders per group you have (just divide).

HTH,


-- 
DoubleF
The faster we go, the rounder we get.
-- The Grateful Dead


pgp0.pgp
Description: PGP signature


Re: How to create .iso file image of cdrom (atapi)?

2004-01-06 Thread Sergey &#x27;DoubleF' Zaharchenko
On Wed, 7 Jan 2004 01:10:45 + (GMT)
Francisco Reyes <[EMAIL PROTECTED]> probably wrote:

> On Wed, 7 Jan 2004, Sergey 'DoubleF' Zaharchenko wrote:
> 
> > On Tue, 6 Jan 2004 22:42:35 + (GMT)
> > Francisco <[EMAIL PROTECTED]> probably wrote:
> >
> > > On Mon, 5 Jan 2004, W. Sierke wrote:
> > >
> > > > Is there a straightforward way of creating a file image (.iso) of a data
> > > > cdrom mounted in an atapi cd-rom drive?
> > >
> > > I use a port called mkisofs.
> > > mkisofs -R -l -J -o  .
> >
> > He means getting the .iso from the cdrom, not putting it there. So the
> > previous postings are more `on topic', though this one should still be
> > interesting to the OP.
> 
> I though  understood the question. Wouldn't making the image with mkisofs
> be what he is looking for? He said a data CD.. so IF.. and that is the issue, he
> can mount it he may be able to use mkisofs to make an ISO of the data.

Ah, I see, first mount the cdrom, then make an iso from its filesystem -
then that's OK, but is seems a little of an overkill, as the cdrom
already `contains' the iso. If created your way, the image will not
be completely identical to the one on the cd (for example, the boot
sectors, if any, will be missing). 

> Maybe I am not really understanding the question...
> 


-- 
DoubleF
A very intelligent turtle
Found programming UNIX a hurdle
The system, you see,
Ran as slow as did he,
And that's not saying much for the turtle.


pgp0.pgp
Description: PGP signature


Re: Opera7 won't install from ports collection

2004-01-06 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 06 Jan 2004 22:14:30 -0500
Jud <[EMAIL PROTECTED]> probably wrote:

> If you do want to update ports at some point and have FTP access you can  
> download the full ports tarball from  ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports-stable/ports.tar.gz>.
> 

Or use CTM by ftp:
go to ,
download the latest `Empty' delta, download all deltas after it,
put them in /var/somewhere,
cd /usr/ports,
remove everything,
run

$ ctm /var/somewhere/*

maybe delete the deltas you downloaded, and whenever you want to update
your ports, download the next set of deltas, starting from the first one
you didn't download (/usr/ports/.ctm_status will tell you the last
applied delta) without the empty ones, of course, and re-run ctm.

This just saves you download time, as you don't have to download the
same unmodified files friom the collection, you just get the
differences.

This has a drawback of if you have fsck'd up your ports tree, you won't
be able to restore it unless you store all the deltas.

> Jud
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
Nostalgia isn't what it used to be.


pgp0.pgp
Description: PGP signature


Re: How to create .iso file image of cdrom (atapi)?

2004-01-06 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 6 Jan 2004 22:42:35 + (GMT)
Francisco <[EMAIL PROTECTED]> probably wrote:

> On Mon, 5 Jan 2004, W. Sierke wrote:
> 
> > Is there a straightforward way of creating a file image (.iso) of a data
> > cdrom mounted in an atapi cd-rom drive?
> 
> I use a port called mkisofs.
> mkisofs -R -l -J -o  .

He means getting the .iso from the cdrom, not putting it there. So the
previous postings are more `on topic', though this one should still be
interesting to the OP.

> So you would mount the CD and then CD into it.

:)

> To later burn to another CD I use
> burncd -f /dev/acd0c -s 10 data $1 fixate
> 
> Where 10 is the speed of my burner, but you should set it to the max speed
> of yours.. which if your CD burner is recent is probably faster than 10.
> :-)
> 
> Hope that helps.
> 
> As far as I knowh though this approach will not work to copy a bootable
> CD. The ISO image will be created and the content will be there, but the
> new CD will not be bootable.
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
Oh, I am a C programmer and I'm okay
I muck with indices and structs all day
And when it works, I shout hoo-ray
Oh, I am a C programmer and I'm okay


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-01-06 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 6 Jan 2004 11:39:57 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> 
> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> > I think you already have a copy (the data at offset 32 seems to be it).
> > If you want, do a
> > 
> > # dd if=/dev/ad6s1 skip=16 count=16 of=/some/file
> 
> ok, done. Is there a way to use fsck_ufs -b now to fix this? Or is that
> premature? And if I remember correctly, that doesn't actually APPLY the
> alternate superblock... it just allows fsck to run while utilizing an
> alternate one. So we need to use some sort of dd command to copy it to the
> proper location, correct?
> 
> > Please tell me everything what you tried to use to mount/fsck the drive
> > (and the results, of course).
> 
> Well, my memory is sketchy so I don't know how much use it'd be. But I was
> saving a file to /data (ad6) when the system hung. Then it rebooted on its
> own. Of course fsck ran on bootup but it gave up and told me I had to run it
> manually. When I did (I don't remember any parameters I specifically used,
> if any) I got:
> 
> /dev/ad6s1c
> Cannot find file system superblock
> /dev/ad6s1c: NOT LABELED AS A BSD FILE SYSTEM
> 
> I remember there being some of the other common message for little things
> that you just tell it to go ahead and fix. But the above error was a brick
> wall and would keep me from going multi-user. Ultimately I had to
> comment-out the line in fstab:
> 
> #/dev/ad6s1c/data   ufs rw  2   2
> 
> So I could at least boot. And that's the way I've been ever since.
> 
> Trying to mount it now gives:
> 
> su-2.05b# mount -r /dev/ad6s1c /data
> mount: /dev/ad6s1c on /data: incorrect super block
> 
> And so we stand.
> 
> > Try booting from a 4.x floppy and doing it all over again... The FS is
> > UFS1, isn't it?
> 
> Ummm... doing what all over again?

I mean trying to mount it, to fsck it, using dd|hd to find the
superblock, etc. I just want to be *really* sure we know what
we are doing.

While we are on that, do you have an empty disk to copy this disk's
contents to? I'm not sure, but maybe I have an idea...

> Wipe the disk and redo the partitions? I
> hope we're not quite there yet. How does using 4.x give me an advantage over
> 5.1? I'm not clear on that part.

Simplicity.

> 
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
Lackland's Laws:
(1) Never be first.
(2) Never be last.
(3) Never volunteer for anything


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-01-06 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 6 Jan 2004 15:17:29 -0500 (EST)
Jerry McAllister <[EMAIL PROTECTED]> probably wrote:

> > 
> > --- Jerry McAllister <[EMAIL PROTECTED]> wrote:
> > > > (is disklabel/bsdlabel only meant to be run on slices and not 
> > > > bsd-partitions?). 
> > > 
> > > You have it backwards in this question.   Disklabel is meant to run
> > > only on bsd partitions and not slices.   Slices (1-4) are the major 
> > > divisions of the disk and partitions (a-h) are divisions within slices. 
> > > Fdisk is what creates slices.
> 
> First, as I look at what I wrote,  I said this wrong in two ways - because
> I didn't read carefully and had just come off a bad headache, probably
> caused by breathing spray paint fumes - always use in well ventilated
> area.  
> 
> The biggie!!  disklabel DOES work on slices and CREATES partitions.   
> It does not work on partitions - it creates them which is where my 
> sleepy [Groggy has already been claimed by a famous contributer] got 
> lost.   So, trying to run disklabel on ad0s1c would definitely cause 
> an error.
> 
> The other thing is, I should have left out the word 'only' (after writing
> the rest of it correctly, of course) because disklabel can, but usually 
> shouldn't, be run on the whole disk  ad0 (as apposed to just a slice ad0s1) 
> which will create a "dangerously dedicated" disk.  There is no real danger 
> as long as you only use FreeBSD on it and don't want to multi-boot it or 
> anything.  Since you only lose the tiny bit by slicing it (63 sectors), 
> you should just always first slice it (with fdisk) - even if that means 
> making it all one big slice.  That will make sure things are happy should 
> you get weird creative ideas later on.
> 
> > Ok, well the reason I thought it might be the other way is because if you
> > run disklabel (bsdlabel) on a slice (such as /dev/ad4s1 on my machine, which
> > is working, or /dev/ad0s1 on another machine I have access to) it works fine
> > (and reports an offset of 0),  but if you run it on the partition
> > (/dev/ad0s1c) you get an offset of 63 and errors like:
> 
> Yes, the offset in disklabel is from the beginning of the slice.  I am not 
> sure what it is trying to do if you try to further partition a partition.  
> Anyway, the 'c' partition is a special one that refers to the whole slice 
> regardless of the partitions it has been carved in to.

As for now, I have the impression that it's so in 4.x, but in 5.x it's
some kind kind of special. If in 4.x the adXsY and adXsYc nodes were
identical, it just isn't so in 5.x, and `bsdlabel' shows offsets from
beginning of th *physical disk*, not the slice (why?).

> I would have to 
> go wading through code to figure out how it is handled differently.  Just 
> for fun, try doing a disklabel on ad0s1a or something like that and see 
> what it does - on a disk you can afford to trash.
> 
> Anyway, sorry for the first round of mis-statement.
> 
> jerry
> 
> > 
> > partition c: partition extends past end of unit
> > bsdlabel: partition c doesn't start at 0!
> > bsdlabel: An incorrect partition c may cause problems for standard system
> > utilities
> > partition f: partition extends past end of unit
> > 
> > So why does disklabel/bsdlabel produce errors when run on the partition even
> > when the disk is fine, if it is meant to be run on partitions and not
> > slices?
> > 
> > Trying to learn... thanks!
> > ___
> > [EMAIL PROTECTED] mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> > 
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
"He was a modest, good-humored boy.  It was Oxford that made him
insufferable."


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-01-06 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 6 Jan 2004 09:48:40 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> 
> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> 
> > I can't find a zero-bad floppy in this place! It's all the holidays!
> 
> That's what AOL disks (vs. discs) used to be good for. :)
> 
> > With `c', they're all offset by 63(why?). But still, you can mount the
> > partitions on the ad4s1, so the disklabel should be ok...
> 
> Yeah. Starts to suggest what we were thinking was a evidence related to the
> problem is really unrelated and "normal" behavior (is disklabel/bsdlabel
> only meant to be run on slices and not bsd-partitions?). Are we looking in
> the wrong place?

After trying out 5.2-RC2, it seems like the offsets reported with the
`c' slice are from the beginning of the disk, not from the beginning of
the slice. That accounts for the +63 difference. I guess it's documented
somewhere, but as I don't use 5.x I haven't read its docs.

> What about that potentially good superblock we found a
> while ago? (the skip 16 one that contained "/data" in it) Should we be
> saving that somewhere while we can? (how?)

I think you already have a copy (the data at offset 32 seems to be it).
If you want, do a

# dd if=/dev/ad6s1 skip=16 count=16 of=/some/file

Please tell me everything what you tried to use to mount/fsck the drive
(and the results, of course).

> Anyone out there know 5.x file-system dirtiness like the back of their hand?
> C'mon, you know you wanna join the fun. :)

Try booting from a 4.x floppy and doing it all over again... The FS is
UFS1, isn't it?

-- 
DoubleF
Why does New Jersey have more toxic waste dumps and California have
more lawyers?

New Jersey had first choice.


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-01-06 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 6 Jan 2004 09:12:22 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> 
> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> > I'm in the process of downloading the floppies...
> 
> ok cool
> 

I can't find a zero-bad floppy in this place! It's all the holidays!

> > And what about ad4? Does disklabel show different values for the slice
> > and the `c' partition?
> 
> Hmm not only are they different as w/ ad6, but I get the same error on the c
> partition:
> 
> su-2.05b# bsdlabel /dev/ad4s1
> # /dev/ad4s1:
> 8 partitions:
> #size   offsetfstype   [fsize bsize bps/cpg]
>   a:  102400004.2BSD 2048 16384 64008
>   b:  2097152  1024000  swap
>   c: 401314410unused0 0 # "raw" part, don't
> edit
>   d:   524288  31211524.2BSD 2048 16384 32776
>   e:  1024000  36454404.2BSD 2048 16384 64008
>   f: 35462001  46694404.2BSD 2048 16384 28552
> 
> su-2.05b# bsdlabel /dev/ad4s1c
> # /dev/ad4s1c:
> 8 partitions:
> #size   offsetfstype   [fsize bsize bps/cpg]
>   a:  1024000   634.2BSD 2048 16384 64008
>   b:  2097152  1024063  swap
>   c: 40131441   63unused0 0 # "raw" part, don't
> edit
>   d:   524288  31212154.2BSD 2048 16384 32776
>   e:  1024000  36455034.2BSD 2048 16384 64008
>   f: 35462001  46695034.2BSD 2048 16384 28552
> partition c: partition extends past end of unit
> bsdlabel: partition c doesn't start at 0!
> bsdlabel: An incorrect partition c may cause problems for standard system
> utilities
> partition f: partition extends past end of unit
> 
> The plot thickens...
> 

With `c', they're all offset by 63(why?). But still, you can mount the
partitions on the ad4s1, so the disklabel should be ok...

-- 
DoubleF
Is your job running?  You'd better go catch it!


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-01-06 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 6 Jan 2004 08:32:31 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

I'm in the process of downloading the floppies...

> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> > Sorry that was to be $ bsdlabel -R -n /dev/ad6s1c dislabel.ad6s1c.new :(
> 
> No worries... I figured it out :)
> 
> > Indeed it's not like in 4.x, where they were the same. And what about 
> > 
> > # ls -l /dev/ad6s1a /dev/ad6s1b
> > 
> > (these minor numbers don't seem to be in order).
> 
> Neither exists. Just so you know: My motherboard (Asus A7V133) has 2

Ouch! I've forgotten about devfs. So these numbers could be OK.

> integrated IDE controllers. Besides the native VIA controller there is a
> Promise ATA100. The following are the relevant snippets from dmesg:
> 

And what about ad4? Does disklabel show different values for the slice
and the `c' partition?

-- 
DoubleF
Chicago law prohibits eating in a place that is on fire.


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-01-06 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 6 Jan 2004 06:31:08 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> 
> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> > And maybe prefix that by a
> > 
> > $ bsdlabel -R /dev/ad6s1c dislabel.ad6s1c.new

Sorry that was to be $ bsdlabel -R -n /dev/ad6s1c dislabel.ad6s1c.new :(

> > 
> > which would just check your new layout for errors, without writing
> > anything, and print your file out as disklabel understands it.
> 
> So you're saying, run it as user and not root for the sake of testing it in
> a read-only setting? Would that be better than using -n? From the man page:
> 
> "The -n stops the bsdlabel program right before the disk would have been
> modified, and displays the result instead of writing it."
> 
> > > > And lastly... your talk about offsets. The man page for bsdlabel
> > describes
> > > > using it on the whole disk (ad6) and not a slice or partition. If I
> > run it
> > 
> > It can't be fdisk that you are reading about?
> 
> Nope. "man bsdlabel" mentions:
> 
> "disk represents the disk in question, and may be in the form da0 or
>  /dev/da0.  It will display the partition layout."
> 
> But I see now all the later examples mention da0s1 so maybe I misunderstood.
> 

A little before that the manual says:

>   Disk device name
>  All disklabel forms require a disk device name, which should always be
>  the raw device name representing the disk or slice.  For example da0 rep-
>  resents the entire disk regardless of any DOS partitioning, and da0s1
>  represents a slice.  Some devices, most notably ccd, require that the

So that da0 is just an example, albeit a perverted one.

> > And the `new' one seems to be correct for a 80G drive (+- a couple of
> > megabytes)? Have you touched anything?
> > 
> > Now, mount might work.
> 
> Haven't changed anything yet. Which one are you calling the "new" one? Mount

The one you sent the last time (with the 0-s).

> would be done on the partion (ad6s1c) which gives errors with bsdlabel and
> has an offset of 63, not the whole slice (ad6s1) which has an offset of 0
> and doesn't give errors (with bsdlabel).
> 
> > Uhum. disklabel said that the offset was 63 in your previous posting,
> > didn't it? 
> 
> 63 for ad6s1c, 0 for ad6s1. This is what's got Malcolm confused.
> 

It confuses me too.

> > What does
> > 
> > # ls -l /dev/ad6s1 /dev/ad6s1c
> > 
> > say? Any differences? I have none.
> 
> su-2.05b# ls -l /dev/ad6s1 /dev/ad6s1c
> crw-r-  1 root  operator4,  20 Dec 29 08:11 /dev/ad6s1
> crw-r-  1 root  operator4,  21 Dec 29 08:11 /dev/ad6s1c

Indeed it's not like in 4.x, where they were the same. And what about 

# ls -l /dev/ad6s1a /dev/ad6s1b

(these minor numbers don't seem to be in order).

Anyway, the correct beginning for the filesystem is 0 (starting with
ad6s1), as the superblock is 16 sectors from there.

> And to recap:
> 
> su-2.05b# bsdlabel /dev/ad6s1
> # /dev/ad6s1:
> 8 partitions:
> #size   offsetfstype   [fsize bsize bps/cpg]
>   c: 1563445170unused0 0 # "raw" part, don't
> edit
>   e: 15634451704.2BSD 2048 1638489
> 
> su-2.05b# bsdlabel /dev/ad6s1c
> # /dev/ad6s1c:
> 8 partitions:
> #size   offsetfstype   [fsize bsize bps/cpg]
>   c: 156344517   63unused0 0 # "raw" part, don't
> edit
>   e: 156344517   634.2BSD 2048 1638489
> partition c: partition extends past end of unit
> bsdlabel: partition c doesn't start at 0!
> bsdlabel: An incorrect partition c may cause problems for standard system
> utilities
> partition e: partition extends past end of unit

Indeed. I'm confused. 5.x doesn't look like 4.x.

2 different(?) labels on the same slice don't look good to me (or are
the nubers just calculated differently?).

I will probably download some 5.1 boot floppies to reproduce the
situation.

> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
Speak softly and carry a +6 two-handed sword.


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-01-06 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 6 Jan 2004 19:57:09 +1030
Malcolm Kay <[EMAIL PROTECTED]> probably wrote:

> On Tue, 6 Jan 2004 15:38, Scott I. Remick wrote:
> > --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> > > > I wonder whether editing the label and setting both offsets to 0
> > > > might solve the problem.
> > >
> > > It definitely seems like that, as the actual offset of the partition is
> > > 0, as dd shows.
> >
> > Ok, sounds like a plan. Not that I know what I'm doing. Should I use
> > something like the following command to save my current disklabel?
> >
> > bsdlabel /dev/ad6s1c > disklabel.ad6s1c.backup
> >
> > Then do I just edit a copy of that textfile, change the offsets to 0, then
> > write it back like this?
> >
> > bsdlabel -R /dev/ad6s1c dislabel.ad6s1c.new
> >

And maybe prefix that by a

$ bsdlabel -R /dev/ad6s1c dislabel.ad6s1c.new

which would just check your new layout for errors, without writing
anything, and print your file out as disklabel understands it.

> > And lastly... your talk about offsets. The man page for bsdlabel describes
> > using it on the whole disk (ad6) and not a slice or partition. If I run it

It can't be fdisk that you are reading about?

> > on  ad6, I get:
> >
> > bsdlabel: /dev/ad6: no valid label found
> >
> 
> Beware; if you write a disklabel (or presumably bsdlabel; I have no experience 
> with 5.x) to ad6 you create a "dangerously dedicated" 
> disk, i.e. a disk without slices.

And of course the label isn't there, just because nobody wanted a `DD' disk.

> > If I run it on the slice ad6s1 I get:
> >
> > # /dev/ad6s1:
> > 8 partitions:
> > #size   offsetfstype   [fsize bsize bps/cpg]
> >   c: 1563445170unused0 0 # "raw" part,
> > don't edit
> >   e: 15634451704.2BSD 2048 1638489
> >
> > And there I see the offset of 0 you might be talking about...? Are we
> > looking at the proper label? Just want to make sure before I mess things
> > up.
> >
> 
> Are you saying that the disklabels reported for ad6s1 and ad6s1c are different?

And the `new' one seems to be correct for a 80G drive (+- a couple of
megabytes)? Have you touched anything?

Now, mount might work.

> Under FreeBSD 4.x ad6s1 and ad6s1c would normally be aliases referencing the 
> entire slice. Maybe 5.x is different! I'm now very confused.

Uhum. disklabel said that the offset was 63 in your previous posting, didn't it? 
What does

# ls -l /dev/ad6s1 /dev/ad6s1c

say? Any differences? I have none.

> What is reported by fdisk?

Let me guess: a single large slice.

> Malcolm Kay
> 
> > Thanks!
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
[Sir Stafford Cripps] has all the virtues I dislike and none of the
vices I admire.
-- Winston Churchill


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-01-06 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 6 Jan 2004 19:43:44 +1030
Malcolm Kay <[EMAIL PROTECTED]> probably wrote:

> On Tue, 6 Jan 2004 15:05, Sergey 'DoubleF' Zaharchenko wrote:
> > On Tue, 6 Jan 2004 13:29:26 +1030
> >
> > Malcolm Kay <[EMAIL PROTECTED]> probably wrote:
> > > On Tue, 6 Jan 2004 10:59, Scott I. Remick wrote:
> > > > Sorry for the delay... holidays had me busy.
> >
> > Me too:)
> >
> > > > Hopefully you're still around
> > > > and interested in picking up where we left off. I think we're
> > > > definitely onto something...
> > >
> > > Looking back over some of your e-mails I find:
> > > QUOTE
> > > su-2.05b# disklabel -r /dev/ad6s1c
> > > # /dev/ad6s1c:
> > > 8 partitions:
> > > #size   offsetfstype   [fsize bsize bps/cpg]
> > >   c: 156344517   63unused0 0 # "raw" part,
> > > don't edit
> > >   e: 156344517   634.2BSD 2048 1638489
> > > partition c: partition extends past end of unit
> > > disklabel: partition c doesn't start at 0!
> > > disklabel: An incorrect partition c may cause problems for standard
> > > system utilities
> > > partition e: partition extends past end of unit
> > >
> > > That doesn't look good.
> > > ENDQUOTE
> > >
> > > The 63 offset is spurious. I've seen this before somewhere but can't
> > > remember the details -- i.e the value 63.
> >
> > I know where you've seen this. The normal offset for the first *slice*
> > is 63 sectors, for some historical reasons (those extra sectors were to
> > be used for bad block replacement or something like that).
> >
> 
> Yes, I expect it in the output from fdisk.
> Ignoring for the moment that the BIOS ideas of geometry has nothing 
> to do with the physical reality; all slices start at sector 1 of a track so having
> used sector 1 of the first track (cylinder 0 head 0) for the MBR, the first slice
> must start at cylinder 0 head 1 sector 1; usually an offset of 63 with the assumed
> virtual geometry.
> (Nothing to do with bad block replacement which on modern drives is almost 
> completely hidden)

Yes I know, I meant used to be used for:)

> But I have seen the 63 before in corrupted disklabels, not just slice positions.

Maybe in dedicated disklabels? How did they get *that* corrupted?

> > Not sure how the 63 made it into the disklabel, though.
> 
> Neither do I.
> 
> Malcolm Kay
> 
> 


-- 
DoubleF
You look like a million dollars.  All green and wrinkled.


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2004-01-05 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 6 Jan 2004 13:29:26 +1030
Malcolm Kay <[EMAIL PROTECTED]> probably wrote:

> On Tue, 6 Jan 2004 10:59, Scott I. Remick wrote:
> > Sorry for the delay... holidays had me busy.

Me too:)

> > Hopefully you're still around
> > and interested in picking up where we left off. I think we're definitely
> > onto something...
> >
> 
> Looking back over some of your e-mails I find:
> QUOTE
> su-2.05b# disklabel -r /dev/ad6s1c
> # /dev/ad6s1c:
> 8 partitions:
> #size   offsetfstype   [fsize bsize bps/cpg]
>   c: 156344517   63unused0 0 # "raw" part, don't
> edit
>   e: 156344517   634.2BSD 2048 1638489
> partition c: partition extends past end of unit
> disklabel: partition c doesn't start at 0!
> disklabel: An incorrect partition c may cause problems for standard system
> utilities
> partition e: partition extends past end of unit
> 
> That doesn't look good.
> ENDQUOTE
> 
> The 63 offset is spurious. I've seen this before somewhere but can't
> remember the details -- i.e the value 63.

I know where you've seen this. The normal offset for the first *slice*
is 63 sectors, for some historical reasons (those extra sectors were to
be used for bad block replacement or something like that).

Not sure how the 63 made it into the disklabel, though.

> I wonder whether editing the label and setting both offsets to 0
> might solve the problem.

It definitely seems like that, as the actual offset of the partition is
0, as dd shows.

> You could always make a copy of the existing label 
> and put it back if the changes don't help.
> 
> You could in addition check the size for the partitions against the size given by 
> fdisk for the slice.
> 
> Malcolm Kay
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
Never settle with words what you can accomplish with a flame thrower.


pgp0.pgp
Description: PGP signature


Re: How to create .iso file image of cdrom (atapi)?

2004-01-04 Thread Sergey &#x27;DoubleF' Zaharchenko
On Mon, 5 Jan 2004 02:51:12 +1030
"W. Sierke" <[EMAIL PROTECTED]> probably wrote:

> "Scott Mitchell" wrote:
> > You want to use /dev/acd0c - the 'c' partition covers the whole disk.

Yes, for those devices which are disklabel(8)'d.

> > Something like:
> >
> > dd if=/dev/acd0c of=foo.iso bs=64k
> 
> Ah! Thanks for that. The bs argument is crucial, I hadn't thought to try
> anything further when without it I got:
> 
> dd: /dev/acd0c: Invalid argument
> 
> I let myself be led astray into thinking that there must be something amiss
> with using that device.

That is because the default block size is 512 bytes, and cdroms only
support (multiples of) 2048 bytes.

> So if the 'c' partition is the whole disk, what's
> the 'a' partition, out of curiosity?

$ ls -l /dev/acd0a /dev/acd0c 
crw-r-  4 root  operator  117,   0  4 янв 19:47 /dev/acd0a
crw-r-  4 root  operator  117,   0  4 янв 19:47 /dev/acd0c

The nodes seem to be completely identical. The reason for `a''s creation
is some sort of compatibility, I think...

> 
> 
> Thanks,
> 
> Wayne
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
"Have you lived here all your life?"
"Oh, twice that long."


pgp0.pgp
Description: PGP signature


Re: Mount /cdrom as non-root user - does this actually work for anyone?

2004-01-04 Thread Sergey &#x27;DoubleF' Zaharchenko
On Sun, 4 Jan 2004 00:53:52 +
Stacey Roberts <[EMAIL PROTECTED]> probably wrote:

> Hello,

> I've just realised that I am unable to mount a cdrom disk as a
> non-root user for *any* of my machines.
> 
> All hosts concerned are running FreeBSD-4.9Stable, and running through:
> http://www.freebsd.org/doc/en_US.IS...SER-FLOPPYMOUNT does *not* work
> for me at all..,

[snip]

Why not use sudo (from the ports) and allow yourself (and anyone who
needs) to mount the cdrom?

Here's what I have in my sudoers file:

df  ALL=NOPASSWD:   /sbin/umount /cdrom,\   
/sbin/mount_cd9660 -o nosuid\,nodev /dev/acd0c /cdrom   

This means `df' can mount and unmount the cdrom. And I have a couple of
scripts, `cdrom+' and `cdrom-', which contain the allowed commands
above. As you see, I don't need a password or anything to mount the
cdrom (NOPASSWD).

HTH.

> Regards,
> 
> Stacey
> -- 
> Stacey Roberts
> B. Sc (HONS) Computer Science
> 
> Web: www.vickiandstacey.com
> 


-- 
DoubleF
The penalty for laughing in a courtroom is six months in jail; if it
were not for this penalty, the jury would never hear the evidence.
-- H. L. Mencken


pgp0.pgp
Description: PGP signature


Re: Fwd: Re: Please help. Can't see HD

2003-12-29 Thread Sergey &#x27;DoubleF' Zaharchenko
On Mon, 29 Dec 2003 14:57:13 +1030
Malcolm Kay <[EMAIL PROTECTED]> probably wrote:

> On Mon, 29 Dec 2003 14:39, Francisco Reyes wrote:
> > On Mon, 29 Dec 2003 14:27:01 +1030, Malcolm Kay wrote:
> > >This is likely your problem source!!!
> > >
> > >/dev/rad[n] is an alias of /dev/ad[n]; that is it refers to IDE drive n.
> > >(Historically they had somewhat different meanings but even then still
> > >refered to the same physical device -- the 'r' means raw)
> > >
> > >If n was 2 you have over written the beginning of ad2.
> >
> > Well I guess the good news is that the HD is probably ok then.
> >
> > :-)
> 
> Yes; should be.
> >
> > In FAT I seem to recall there are two copies of the boot sector.
> > Does FreeBSD has anything like that?
> >
> 
> I seem to recall some options or utilities under MS-DOS that did 
> something like that, but think this was mainly for floppies.
> Certainly there are duplicate copies of the FAT allocation tables,
> but these are next to one another on the disk so don't really protect
> against this sort of calamity.
> 
> I guess the nearest thing in FreeBSD is mutiple copies of the 
> superblocks within the file system, but unless you can reconstruct 
> the slice table(partition in MS terms) I don't believe it will help.
> 
> > If what I did trashed the first sectors would that have affected
> > all mount points?
> 
> How big was the image you copied to the disk? -- that should tell
> you how much of your drive is overwritten.
> 
> It is probable your disklabel has also disappeared, so you 

And the superblock, and some large piece of data.

> probably need to reconstruct both the slice table in the MBR and 
> the disklabel in the first slice. With some vague recollections of 
> what you did originally to install FBSD it is possible that some 
> lucky guesses might work.

For the `slice table' (MBR) sysutils/gpart could be of some help. Not
sure about the disklabel, though. 

> If you can find the first sector of a slice carrying an installed file

Where `find' might mean 

# hd < /dev/ad6s1 | grep "54 19 01 00"

if looking for a ufs1 filesystem or

# hd < /dev/ad6s1 | grep "19 01 54 19"

for ufs2. (see the archive for details; in the discussion the method
seemed to work)

> system then this might hold a copy of the slice table allowing
> reconstruction of the original MBR with some confidence. 
> 
> Malcolm Kay
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
Vote for ME -- I'm well-tapered, half-cocked, ill-conceived and
TAX-DEFERRED!



pgp0.pgp
Description: PGP signature


Re: TTF fonts in XFree86

2003-12-24 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 23 Dec 2003 21:44:06 +1030
Malcolm Kay <[EMAIL PROTECTED]> probably wrote:

> On Wed, 24 Dec 2003 16:37, flux wrote:
> > Hi everyone,
> 
> You seem to be a day ahead of the rest of us!
> 
> >
> >   I want to use TrueType font collection from MS Windows. I mounted my
> > FAT32 partition on my FreeBSD box and copied all *.TTF files from
> > C:\WINDOWS\Fonts to /usr/X11R6/lib/X11/fonts/TTF/ directory. Then
> > I added the following line into my /etc/X11R6/XF86Config:
> >
> > FontPath  "/usr/X11R6/lib/X11/fonts/TTF/"
> >
> 
> Does this directory contain a file fonts.dir?
> You possibly need to go there and execute:
> # mkfontdir
> 
I guess you first need a mkfontscale and only then mkfontdir.

> Malcolm Kay
> 
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
"The sooner you fall behind, the more time you'll have to catch up!"


pgp0.pgp
Description: PGP signature


Re: Question about static libraries and compression

2003-12-24 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 23 Dec 2003 18:32:04 +
Daniela <[EMAIL PROTECTED]> probably wrote:

> I have a problem with linking:
> When I invoke make, I always give it the -DNOSTATIC option on the commandline 
> to save space. However, this doesn't work. My system still builds static 
> libraries. Or are the binaries linked dynamically, and the static libs are 
> there for nothing? I guess it's safe to delete them, right?

If you *know* no user will ever need them (he is not going to write
programs which link statically), then it's all right.

> Everything is self-compiled, I do not use binary packages at all.
> 
> Also, I read that the kernel can execute gzipped a.out binaries directly, can 
> the same thing be done for ELF? I need a really small system, because I want 

gzexe.

> to boot and run it from CD-ROM.

Try putting the programs in a crunchbox, as it is done on most boot-floppies.
Man crunchgen, chrunchide, etc.

> Regards,
> Daniela
> 
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
"I can resist anything but temptation."


pgp0.pgp
Description: PGP signature


Re: Apacer USB Flash drive

2003-12-24 Thread Sergey &#x27;DoubleF' Zaharchenko
On Wed, 24 Dec 2003 01:23:20 +1100
Gautam Gopalakrishnan <[EMAIL PROTECTED]> probably wrote:

> On Tue, Dec 23, 2003 at 06:19:50AM -0800, Olga Zenkova wrote:
> > Hi!
> > 
> > Can't mount Apacer USB Flash drive in FreeBSD 4.8. 
> > When I do: 
> > 
> > mount -t msdos /dev/da0s1 /mnt
> > 
> > I get:
> > 
> > msdos: /dev/da0s1: Input/output error
> 
> My guess is that you have not formatted it first?
> (newfs_msdos /dev/da0s1)

I guess it wolud be an invalid argument error then. I don't think that's
it. Try

# hd /dev/da0s1 | head

to see if you can read it at all.

> Gautam
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
Yesterday upon the stair
I met a man who wasn't there.
He wasn't there again today --
I think he's from the CIA.


pgp0.pgp
Description: PGP signature


Re: master.passwd -- securing

2003-12-18 Thread Sergey &#x27;DoubleF' Zaharchenko
On Thu, 18 Dec 2003 11:44:14 +
"Rhys John" <[EMAIL PROTECTED]> probably wrote:

> Both accounts are now active but i would like to remove the encrypted 
> password from master.passwd and replace it with a *. Is this possible with 
> "vipw"?
> 

It doesn't matter what you use for editing your password files (at least
for this point).

If you have a `*' in your master.passwd, that means that direct console
logins for that user are disabled. If you are so much embarassed about
root having a password, you may use sudo (from ports) and allow a
certain user to "sudo sh" to gain root priveleges, for instance. He (you
as a user) will then have to enter his own password, not root's. This
way, you exchange a cracker's job of cracking your root password for a
job of cracking your user password, so it's not much more secure:).

> Thanks for your reply hugle
> 
> >From: hugle <[EMAIL PROTECTED]>
> >Reply-To: hugle <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Re: master.passwd -- securing
> >Date: Thu, 18 Dec 2003 03:39:18 -0800
> >
> >RJ> Ive been playing with "vipw" trying to change passwords into "*" for a
> >RJ> slightly higher level of security but ran into some very big problems. 
> >RJ> From reading through the FreeBSD handbook it seemed all i had to do was replace
> >RJ> the encrypted password with *, which is what i did. I thought it seemed 
> >RJ> bit odd but continued anyway. Foolishly (although i was quite tired) i did
> >RJ> this to both my user account and root. So they both had * as their password
> >RJ> and looked the same as every other entry in the file. I saved it and "vipw"
> >RJ> updated the database so i thought all was well and logged off to check...
> >RJ> big mistake! The net result of this was not good, i couldnt access my user
> >RJ> account or root :( Anyway i had to cut the power to my PC since i couldnt
> >RJ> shut it down because i was locked out. After that i went into single user
> >RJ> mode and changed the passwords back and its working now but i cant hide the
> >RJ> passwords. So i guess after all this rambling my question is how to i secure
> >RJ> the password file? How do i change from the encrypted password to * without
> >RJ> screwing over my system? Any help would by much appreciated

> >try doing that:
> >#Forget your root pw?
> >1. Reboot. when you see the "boot" prompt, type boot -s and hit enter
> >2. run this command: fsck -p / && mount -u /
> >3. use the `passwd` command to set a password for root
> >4. reboot, done
> >
> >hope that helps..
> >
> >
> >___
> >[EMAIL PROTECTED] mailing list
> >http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> >To unsubscribe, send any mail to 
> >"[EMAIL PROTECTED]"
> 
> _
> Find a cheaper internet access deal - choose one to suit you. 
> http://www.msn.co.uk/internetaccess
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
Violence is the last refuge of the incompetent.
-- Salvor Hardin


pgp0.pgp
Description: PGP signature


Re: shutting down network interfaces

2003-12-18 Thread Sergey &#x27;DoubleF' Zaharchenko
On Thu, 18 Dec 2003 17:02:48 -0800
flux <[EMAIL PROTECTED]> probably wrote:

> I have two netcards and want to shut down one of them without
> rebooting.
> 

What do you mean by shutting it down? Not sure, but may it be

# ifconfig down /dev/whatever
 
?

> -- 
> Best regards,
>  flux  mailto:[EMAIL PROTECTED]
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
A tautology is a thing which is tautological.


pgp0.pgp
Description: PGP signature


Re: growfs on /

2003-12-13 Thread Sergey &#x27;DoubleF' Zaharchenko
On Sat, 13 Dec 2003 14:02:59 +1030
Malcolm Kay <[EMAIL PROTECTED]> probably wrote:

> On Sat, 13 Dec 2003 13:08, Jeff LaMarche wrote:
> > Hey all...
> >
> > Have FreeBSD 4.8-STABLE, and I've run out of space on the slice /
> >
> > I really want to avoid having to backup and reformat, or doing anything
> > that's super-time-intensive - from reading various posts and blogs
> > related to FreeBSD, it appears to me that I can resolve my issue by
> > using growfs - the next slice after / is /tmp which has plenty of room
> > free, and can afford to be reduced by a little. It doesn't seem to be
> > affecting system use except that I can't add new users.
> >
> > Here's what I look like now:
> >
> > Filesystem  1K-blocksUsedAvail Capacity  Mounted on
> > /dev/ad0s1a128990  127682-9010   108%/
> 
> I should have thought that 125Mb or so should have been ample for / when
> /tmp, /var and /usr have there own partitions.
> 
> Your mail prompted me to look at what I have under / and was somewhat
> surprised to find about 90Mb. But when I examined this I found about 40Mb 
> was pure junk -- things like temproot, modules.old and etc.old1 left over from 
> a system update and a core file or two.
> 
> Have you been running X applications (especially browsers) as root  a 
> practice frowned upon, mostly I guess, because it can swallow large gulps of 
> space on /.

Not because of this, but because of security reasons. I believe something like

# du -hx -d 1 /

will help you find out what things use up the space.

> I would certainly look at getting the total file size down in / rather than 
> trying to grow it.
> 
> Malcolm
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
Help a swallow land at Capistrano.


pgp0.pgp
Description: PGP signature


Re: Networking and connection sharing

2003-12-13 Thread Sergey &#x27;DoubleF' Zaharchenko
On Sat, 13 Dec 2003 00:57:09 +0100
Simon Barner <[EMAIL PROTECTED]> probably wrote:

> Hello Ivan,
> 
> > As I'm about to create a kind of a WAN in my area, and I'm having a
> > specific problem, a friend adviced me to install FreeBsd. Problem is
> > that this WAN would be connected to the internet with 1Mbit/s
> > connection, and what I want is that connection to the Internet is
> > shared to other users so that some of them get maximum of 64Kbit/s,
> > some will get 128Kbit/s, and so on. I still want these other
> > computers to be on WAN with 10/100 Mbits, so these limitations must be
> > made on server. Is my problem solvable with FreeBSD (as my friend told
> > me) or not?
> 
> Although I don't have too much experience with this matter, it sounds
> like the dummynet(4) traffic shaper, that is part of the ipfw(8)
> firewall might be what you want.
> 
> Since I don't know whether you already have experience with FreeBSD, and
> whether it is already installed on your system, here are links to the
> html'ized versions of the man pages mentioned:
> 
> http://www.freebsd.org/cgi/man.cgi?query=dummynet&apropos=0&sektion=4&manpath=FreeBSD+4.9-stable&format=html
> http://www.freebsd.org/cgi/man.cgi?query=ipfw&sektion=8&apropos=0&manpath=FreeBSD+4.9-stable
> 
> Regards,
>  Simon
> 

I believe the primary question was about ``connection sharing'', so the
answer here would be probably natd(8). The htmlized manpage is just
close to those mentioned by Simon (you still need to read them, to do
the limitations, or shaping, of the traffic).

-- 
DoubleF
No matter how subtle the wizard, a knife in the shoulder blades will
seriously cramp his style.



pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2003-12-09 Thread Sergey &#x27;DoubleF' Zaharchenko
On Mon, 8 Dec 2003 21:52:54 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> 
> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> > I wonder what did destroy it. Of course, system crashes can do wonders,
> > but...
> 
> Well, I was trying to save a file to that drive when my system spontaneously
> rebooted for no apparent reason.
> 
> > In fact, there should be a way, because a valid superblock copy has a
> > correct checksum. Perhaps I'll hack up a program to do that taking
> > information from the /usr/src/sys/ufs/... There's also a magic number
> > for a superblock, mentioned in fs.h (in 4.8 it's 0x011954). 
> 
> I see:
> 
> #define FS_UFS1_MAGIC   0x011954/* UFS1 fast filesystem magic number
> */
> #define FS_UFS2_MAGIC   0x19540119  /* UFS2 fast filesystem magic number
> */
> 
> And I remember this drive was UFS2, because I was wondering if I should be
> concerned that this drive was UFS2 and the system drive was UFS1 (/, /var,
> /usr). However, the following command turns up no results after several
> mins:
> 
> su-2.05b# hd < /dev/ad6s1 | grep "19 01 54 19"
> 
> Yet this won't work unless the bytes all line up on the same line. If
> they're split across lines in the hd output, there'll be no match.

True, but thanks to the position of the magic number in the superblock
(I don't think it changed in 5.x) , it never crosses a line boundary.

> Even though your command is for UFS1, I get several matches, but they must
> be false-positives as I know I used UFS2:
> 
> su-2.05b# hd < /dev/ad6s1 | grep "54 19 01 00"
> 1620  54 19 01 00 74 10 68 81  23 00 00 e8 d5 03 00 00 
> |T...t.h.#...|

These:

> 2550  01 00 00 00 00 00 00 00  00 00 00 00 54 19 01 00 
> |T...|
> 4550  01 00 00 00 00 00 00 00  00 00 00 00 54 19 01 00 
> |T...|
> 002e6550  01 00 00 00 00 00 00 00  00 00 00 00 54 19 01 00 

DON'T look like false positives. They're just what you were supposed to
get. Let's have a look at

# dd if=/dev/ad6s1 skip=16 |hd
# dd if=/dev/ad6s1 skip=32 |hd

> |T...|
> 00548740  51 19 01 00 52 19 01 00  53 19 01 00 54 19 01 00 
> |Q...R...S...T...|
> 00549740  51 19 01 00 52 19 01 00  53 19 01 00 54 19 01 00 
> |Q...R...S...T...|

These definitely are false positives.

> Unless somehow I am confused...?

My verdict would be that it's indeed UFS1, whatever you think about it.

> Any other ideas for finding an intact superblock off this drive and
> repairing it? Anyone?
> 
> =
> Scott I. Remick   --==--   ICQ: 450152 
> Save the internet - Use a Mozilla-based browser: http://vtbsd.net/mozilla/
> FreeBSD: Because making unix user-friendly is easier than debugging Windows. 
> http://vtbsd.net/freebsd/
> "Voici mon secret. Il est tres simple: on ne voit bien qu'avec le coeur. L'essentiel 
> est invisible pour les yeux."
> 
> Q: Because it reverses the logical flow of conversation.
> A: Why is putting a reply at the top of the message frowned upon?
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
"That boy's about as sharp as a pound of wet liver"
-- Foghorn Leghorn


pgp0.pgp
Description: PGP signature


Re: fetch and portinstall

2003-12-06 Thread Sergey &#x27;DoubleF' Zaharchenko
On Sat, 6 Dec 2003 00:09:02 -0700
mike bueide <[EMAIL PROTECTED]> probably wrote:

> 
> When I install or upgrade a port, all attempts to an HTTP
> URL fetch are timing out.  Typically I'll just sudo
> portupgrade a port I wish to install.
> 
> I am behind a firewall that uses nat and stateful rules.
> Ftp fetches work just fine.  I just would like to speed

If that's the only handicap, I'm very surprised to hear that FTP goes
through and HTTP doesn't. Maybe your sysadmin disabled HTTP access:)?

> things up a bit by either causing the HTTP attempts to time
> out sooner or authorize them somehow.

You mean you have a local proxy? Set HTTP_PROXY to its address then. If
you want to change the timeout value, use -T with fetch.

>  -T seconds  Set timeout value to seconds.  Overrides the environment
>  variables FTP_TIMEOUT for FTP transfers or HTTP_TIMEOUT for
>  HTTP transfers if set.

If you want to make the change permanent, put the appropriate FETCH_CMD
in your /etc/make.conf (e.g FETCH_CMD=/usr/bin/fetch -T 5).

> I have done digging via man  fetch.  It mentions some
> environment variables that can be set:
> 
>   HTTP_AUTH  (man 3 fetch)
>   HTTP_TIMEOUT (man 1 fetch)
> 
> I don't understand what user-name / password combination for
> HTTP_AUTH could be set to enable HTTP fetches.  Is it the
> same as the anonymous/email_address used when manually
> logging into ftp sites as a guest? 
> 
> And, if I set these ENVIRONMENT VARIABLES, do I need them
> set it in the root shell, or the user running sudo? 
> 
> Thanks to any who might respond.
> 
> -- 
>   Michael Bueide 
>   mbueide (at) charter (dot) net .
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
The older a man gets, the farther he had to walk to school as a boy.


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2003-12-05 Thread Sergey &#x27;DoubleF' Zaharchenko
On Thu, 4 Dec 2003 21:07:20 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> 
> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> > I've got a (probably bad) idea. If you say that the partition was
> > mounted as /data, then you could do a
> > 
> > # hd /dev/ad6s1 |grep /data
> > 
> > It should come up soon (the superblock should be close to the beginning
> > of the drive, right?). This way you can at least figure out where your
> > superblock lies (rounding the address of `/data' to 8K). Considering the
> > above discussion, you can calculate the *correct* address of the `e'
> > partition by subtracting 8K or 64K or 256K. See if it matches the one in
> > the disklabel.
> > 
> > Of course, this is all possible only if your superblock isn't screwed
> > enough to NOT contain `/data'.
> 
> Been running about a minute so far... nada. So I guess your assumption is
> correct: the 1st superblock is destroyed (as fsck suggested when it barfed).

I wonder what did destroy it. Of course, system crashes can do wonders,
but...

> > Just a minute. Are you sure that the filesystem was newfs'd with the
> > default parameters? If it were for me to newfs it, I would probably
> > choose larger block&fragment sizes, as I would probably be storing large
> > files. The superblock copy positions depend on the block/frag size. If
> > you specify parameters different from those used for actually newfs'ing
> > it the very first time, newfs -N will give you *incorrect* copy
> > addresses!
> 
> Well, specifying custom block/frag sizes is a bit out of my customization
> forte at the moment, and certainly at the time this drive went in. I'm 99%
> positive I used sysinstall to set it up. I remember some quirks about the
> sysinstall method, and also deciding that the by-hand method was
> unnecessarily complicated for my needs. 
> 
> This has taught me that, should I ever choose to do that, that writing down
> these custom values is CRITICAL.
> 
> Is there any way to positively identify a superblock location (say, using hd
> | grep ) using known information? Just a random thought.

In fact, there should be a way, because a valid superblock copy has a
correct checksum. Perhaps I'll hack up a program to do that taking
information from the /usr/src/sys/ufs/... There's also a magic number
for a superblock, mentioned in fs.h (in 4.8 it's 0x011954). So, for me,
grepping gives

$ hd  Although I'm treating this as a learning experience, I also REALLY REALLY
> don't want to loose all that data. I do appreciate the help you've been
> giving me. Thanks again. I'm choosing to remain optimistic. I used to
> salvage lots of data from DOS/Windows partitions (still do) so learning the
> tricks of the trade in my new OS of choice is important to me.
> 
> (PS: already pricing out external USB hard drive enclosures for making
> backups of this drive in the future)

A good idea would also be to print out the hd of the superblock contents
on a sheet of paper when you find it and put it in a cool dry place:)

> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
New Year's Eve is the time of year when a man most feels his age, and
his wife most often reminds him to act it.
-- Webster's Unafraid Dictionary


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2003-12-04 Thread Sergey &#x27;DoubleF' Zaharchenko
On Thu, 4 Dec 2003 08:24:16 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> 
> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> > If you want to be more sure, try dd'ing your (suspectedly damaged)
> > superblock and some of its (suspectedly OK) copies into different files:
> > 
> > # dd if=/dev/ad6s1e skip=... bs=512 count=16 of=somefile
> > 
> > As /usr/src/sys/ufs/ffs/fs.h suggests, for THE superblock skip should be
> > 16 if you have UFS1 or 128 or 512 if you have UFS2 (if my maths is
> > correct). These commands shouldn't do anything harmful to /dev/ad6s1e.
> 
> Either I'm doing something wrong, or things aren't good.
> 
> Given:
> 
> su-2.05b# newfs -N /dev/ad6s1e

Just a minute. Are you sure that the filesystem was newfs'd with the
default parameters? If it were for me to newfs it, I would probably
choose larger block&fragment sizes, as I would probably be storing large
files. The superblock copy positions depend on the block/frag size. If
you specify parameters different from those used for actually newfs'ing
it the very first time, newfs -N will give you *incorrect* copy
addresses!

> /dev/ad6s1e: 76340.1MB (156344516 sectors) block size 16384, fragment size
> 2048
> using 416 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
> super-block backups (for fsck -b #) at:
>  160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976,
> 
> ...
> 
>  152046368, 152422720, 152799072, 153175424, 153551776, 153928128,
> 154304480,
>  154680832, 155057184, 155433536, 155809888, 156186240


-- 
DoubleF
The computing field is always in need of new cliches.
-- Alan Perlis


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2003-12-04 Thread Sergey &#x27;DoubleF' Zaharchenko
On Thu, 4 Dec 2003 08:24:16 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> 
> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
> > If you want to be more sure, try dd'ing your (suspectedly damaged)
> > superblock and some of its (suspectedly OK) copies into different files:
> > 
> > # dd if=/dev/ad6s1e skip=... bs=512 count=16 of=somefile
> > 
> > As /usr/src/sys/ufs/ffs/fs.h suggests, for THE superblock skip should be
> > 16 if you have UFS1 or 128 or 512 if you have UFS2 (if my maths is
> > correct). These commands shouldn't do anything harmful to /dev/ad6s1e.
[snip]
> I am suspecting there is something wrong in my syntax for fetching the
> superblocks. I see that the SB size is always 8192 bytes regardless so it
> should be 512*16 as in the dd command. And I checked that the #s output by
> newfs -N were block positions and not raw byte permissions.
> 
> However newfs -N is saying that it is reporting the positions using a
> blocksize of 16384. In which case, 160 would mean 160 * 16384 = 2621440
> (byte pos). To translate to the 512-byte blocks, this means the skip should
> be 5120 (and 12048384 and 24091648 respectively for the 2nd & 3rd sb
> positions). However, when I grab 8192-byte chunks using these skip settings
> w/ dd, they don't match up either. I was hoping I was onto something. :(

Unless I am very much mistaken, the positions reported by newfs should
always be multiplied by the sector size (512), not by the block size. So
what you were doing is ok...

> Yet you say using the same # output by newfs -N as the skip for dd worked
> for you... hmm.

This suggests that something else (looking suspiciously at the
disklabel) is screwed, not the superblocks... I think we'll end up
digging through the hex dump of the beginning of the drive.

I've got a (probably bad) idea. If you say that the partition was
mounted as /data, then you could do a

# hd /dev/ad6s1 |grep /data

It should come up soon (the superblock should be close to the beginning
of the drive, right?). This way you can at least figure out where your
superblock lies (rounding the address of `/data' to 8K). Considering the
above discussion, you can calculate the *correct* address of the `e'
partition by subtracting 8K or 64K or 256K. See if it matches the one in
the disklabel.

Of course, this is all possible only if your superblock isn't screwed
enough to NOT contain `/data'.

This won't find you the copies of the superblock, BTW, as they are not
modified my a mount.

> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
Non-Reciprocal Laws of Expectations:
Negative expectations yield negative results.
Positive expectations yield negative results.


pgp0.pgp
Description: PGP signature


Re: "Cannot find file system superblock" error - how to recover?

2003-12-04 Thread Sergey &#x27;DoubleF' Zaharchenko
On Thu, 4 Dec 2003 06:17:40 -0800 (PST)
"Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:

> 
> --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote:
[so you want the list cc'd. good...]
> > Oh yes there are... what's surprising? If you are sure that the problem
> > is with the superblock, pick any you wish.
> > 
> > The actual number of superblock copies depends on the disk size and the
> > parameters you give to newfs.
> 
> [...]
> 
> > It's about THE superblock, not a superblock copy. There can be only one
> > superblock. There may be many copies. But if you dd them to the
> > superblock, that'll be fine.
> 
> Ahh ok, I've learned something new. Guess I misinterpreted the information I
> found online. I'm not complaining: this is GOOD news. :)
> 
> > BTW, what's the output of ``disklabel -r /dev/ad6s1c'' ?
> 
> su-2.05b# disklabel -r /dev/ad6s1c
> # /dev/ad6s1c:
> 8 partitions:
> #size   offsetfstype   [fsize bsize bps/cpg]
>   c: 156344517   63unused0 0 # "raw" part, don't edit
>   e: 156344517   634.2BSD 2048 1638489
> partition c: partition extends past end of unit
> disklabel: partition c doesn't start at 0!
> disklabel: An incorrect partition c may cause problems for standard system
> utilities
> partition e: partition extends past end of unit
> 
> That doesn't look good.

True.

> By the way, the past posts I've read suggest that even if I use fsck_ffs -b
> to run fsck with a diff superblock (say, the one at 160) that it doesn't
> actually fix the master copy, and that I still need to use dd to fix the
> original. The command I've seen used is:
>
> dd if=/dev/ad6s1c skip=32 of=/dev/ad6s1c seek=16 bs=512 count=16

In fact, when you mess with superblocks, it's messing with filesystems
(thus it's different from messing with disklabels). So I guess you
should use /dev/ad6s1e here. `e' should be the partition, and `c' ---
the whole disk.

> 1) Do I just replace the 32 of "skip=32" with 160 (or whichever superblock
> makes fsck_ffs -b happy)?

Probably yes. The thing is you want to copy some 8192 bytes from one
location to another. But I never had a chance to treat a superblock
that way... Go ask a person who did!
 
> 2) I've also read that the size and location of the original superblock can
> vary. Do I have to modify the seek/bs/count values to account for this? And

Yes. skip here is the location of the copy, seek is the location of the
superblock (see below for values).

> if so, how do I find the proper values?
> 
> Nothing done yet... don't wanna screw this up. Thanks everyone!

If you want to be more sure, try dd'ing your (suspectedly damaged)
superblock and some of its (suspectedly OK) copies into different files:

# dd if=/dev/ad6s1e skip=... bs=512 count=16 of=somefile

As /usr/src/sys/ufs/ffs/fs.h suggests, for THE superblock skip should be
16 if you have UFS1 or 128 or 512 if you have UFS2 (if my maths is
correct). These commands shouldn't do anything harmful to /dev/ad6s1e.

Of course, after that, you could hack up a program which will read
superblocks and display them according to their structure defined as
`struct fs' in /usr/src/sys/ufs/ffs/fs.h. Let's not do it today, right?

If your superblock copies will appear similar to each other (use cmp(1)
or md5(1)), then you can be sure that you've found the copies (so far
you haven't done any mistakes in your calculations). Then it's up to you
to commit the change.

I've just tried it on a test machine. The copies matched. Hmm:)

> =
> Scott I. Remick   --==--   ICQ: 450152 
> Save the internet - Use a Mozilla-based browser: http://vtbsd.net/mozilla/
> FreeBSD: Because making unix user-friendly is easier than debugging Windows. 
> http://vtbsd.net/freebsd/
> "Voici mon secret. Il est tres simple: on ne voit bien qu'avec le coeur. L'essentiel 
> est invisible pour les yeux."
> 
> Q: Because it reverses the logical flow of conversation.
> A: Why is putting a reply at the top of the message frowned upon?
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
Peter's Law of Substitution:
Look after the molehills, and the mountains will look after
themselves.


pgp0.pgp
Description: PGP signature


Re: I need some documentation, and not only

2003-12-04 Thread Sergey &#x27;DoubleF' Zaharchenko
On Thu, 4 Dec 2003 12:15:38 +0200 Ion-Mihai Tetcu <[EMAIL PROTECTED]> probably wrote:

> On Thu, 4 Dec 2003 01:59:40 -0800 (PST)
>  Valerian Galeru <[EMAIL PROTECTED]> wrote:
> 
> > Can anyone tell me any sites with documentation about file systems in
> > Unix systems(it will be better on FreeBSD(if there are any differences
> > between Freebsd fs and other Unix fs) ). 
> > And i need documentation about Floppy disks, how to format them
> > in BSD
> 
> Q: What would happend if you start reading:
> the hanbook
>  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/index.html
> the faq
>  http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/index.html
> and the man pages 
>  http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+5.1-RELEASE
> 
> A: You would make things easier for both you and us.
> http://www.freebsd.org/docs.html
> 
> FreeBSD uses UFS1 or UFS2 (default from 5.1R).
> 
> http://docs.freebsd.org/44doc/papers/diskperf.html
> http://docs.freebsd.org/44doc/papers/fsinterface.html
> http://docs.freebsd.org/44doc/smm/03.fsck/paper.html
> http://docs.freebsd.org/44doc/smm/05.fastfs/paper.html
> 
> The sources are in:
> http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/ufs/
> and 
> /usr/src/sys/ufs if you choosed to install them.
> 
> > I need names of programs like
> > window comander, or something like this, not to type cd 100 times a
> > day:).
> 
> cd /usr/local/bin/midc && make install clean
 ^^^
Change it to /usr/ports/misc/mc to make me happy...

> -- 
> IOnut
> Unregistered ;) FreeBSD user
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
As of next week, passwords will be entered in Morse code.


pgp0.pgp
Description: PGP signature


Re: daemon monitoring

2003-11-23 Thread Sergey &#x27;DoubleF' Zaharchenko
On Mon, 24 Nov 2003 02:11:39 +0100 Alex de Kruijff <[EMAIL PROTECTED]> probably wrote:

> Dear Will,
> 
> I've moved you text to the buttom so its more readable for other.
> 
> On Sun, Nov 23, 2003 at 04:46:09PM -0800, Will Prater wrote:
> > On Nov 23, 2003, at 1:57 PM, Alex de Kruijff wrote:
> > >On Sun, Nov 23, 2003 at 10:52:48AM -0800, Will Prater wrote:
> > >>List,
> > >>
> > >>What are most of you using to monitor the running daemons? I have been
> > >>loooking into DJB daemontools which seems appropriate, but are there
> > >>any others that you reccomend?
> > >>
> > >>If DJB's daemontools is the one, could I get some more examples? I am
> > >>primarily trying to keep my mail system online: postfix, cyrus,
> > >>saslauthd, mysql, and spamassassin.
> > >
> > >I would advise Nagios.
> >
> > Sorry, I mispoke. I will be using Nagios to monitor, but I need to make 
> > sure they will restart if there is an error. Will nagios do this as 
> > well?
> > 
> I don't *think* so.
> 
> You could write a sh script (or any other) that does this. It could
> contain this line:
> result=px aux | grep SomeDaemon | wc -l
> 
> If the result is zero than SomeDaemon is not running.

You'd be better off using "ps auxc" here (that is, print only argv[0]):

$ ps aux|grep aux
df   642  0,0  0,4   648  444  p1  R+8:49 0:00,00 grep aux (sh)
df   641  0,0  0,3   516  392  p1  R+8:49 0:00,00 ps aux

$ ps auxc|grep auxc

$

And even a better solution would be to pipe the ps output to a [your
favorite scripting language] script to take only the name part of the
output (to avoid clash with usernames/etc.).

> 
> 
> -- 
> Alex
> 
> Articles based on solutions that I use:
> http://www.kruijff.org/alex/index.php?dir=docs/FreeBSD/
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
There is a Massachusetts law requiring all dogs to have their hind legs
tied during the month of April.



pgp0.pgp
Description: PGP signature


Re: 200gb hard drive?

2003-11-22 Thread Sergey &#x27;DoubleF' Zaharchenko
On Sat, 22 Nov 2003 13:47:40 -0500 Robert Huff <[EMAIL PROTECTED]> probably wrote:

> 
> Sergey 'DoubleF' Zaharchenko writes:
> 
> >  BTW what's the point in printing 3 numbers that match? If they match,
> >  then one of them is redundant:)
> 
>   And if they don't?
> 

Then they all carry some information. If a+b=c, then you don't have to
print out a,b and c, since c carries no information. But the numbers in
df output aren't supposed to match (because of the reserved space), so
they are all printed.


-- 
DoubleF
Honk if you love peace and quiet.


pgp0.pgp
Description: PGP signature


Re: 200gb hard drive?

2003-11-22 Thread Sergey &#x27;DoubleF' Zaharchenko
On Fri, 21 Nov 2003 15:05:51 -0500 Robert Huff <[EMAIL PROTECTED]> probably wrote:

> 
> Sergey 'DoubleF' Zaharchenko writes:
> 
> >  >  A better question for the list: did something change in "df"
> >  > sometime in 5.x?  Because the numbers in the three columns used to
> >  > match (modulo rounding error); if you dipped into the reserve pool
> >  
> >  No, it didn't. 4.8-RELEASE:
> 
>   Now that's interesting.  I jumped from 4.7 to 5.0; wonder if
> the change happened afterwards.

Time to take my 4.4 boot diskette from the shelf.

# df -h
FilesystemSize   Used  Avail Capacity  Mounted on
/dev/md0c 2.3M   2.0M   320K87%/
procfs4.0K   4.0K 0B   100%/proc
/dev/ad1s2a97M45M44M51%/mnt

So no, they didn't add up even in 4.4. I don't think 4.7's df was
something extraordinary.

BTW what's the point in printing 3 numbers that match? If they match,
then one of them is redundant:)

> 
>   Robert Huff
> 
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
"Biology is the only science in which multiplication means the same
thing as division."



pgp0.pgp
Description: PGP signature


Re: C

2003-11-17 Thread Sergey &#x27;DoubleF' Zaharchenko
On Sun, 16 Nov 2003 13:26:17 -0800 (PST) Valerian Galeru <[EMAIL PROTECTED]> probably 
wrote:

> Can anyone tell the name of the package that contain
> the C, something simillar to Borland C++ in windows...
> 

As for the compilers, you know already (cc).

As for IDE, from /usr/ports/devel/xwpe's pkg-descr:

> xwpe is a X-window programming environment designed for UNIX systems.   
> It is similar to 'Borland C++' MS-DOS programming IDE environment.  
> 
> xwpe supports many compilers, linkers, and debuggers, so you are not tied to
> any particular set of tools.  There is both a curses and X11 interface  
> (the later with mouse support). 

It really looks like Borland's IDE, if you want that sort of thing. I
played with it for a while, but...

> __
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
It's not that I'm afraid to die.  I just don't want to be there when it
happens.
-- Woody Allen


pgp0.pgp
Description: PGP signature


Re: Downloading OOo, other ports outside of the system?

2003-11-13 Thread Sergey &#x27;DoubleF' Zaharchenko
On Wed, 12 Nov 2003 17:14:38 -0700 Robin Schoonover <[EMAIL PROTECTED]> probably wrote:

> On Wed, 12 Nov 2003 13:48:20 -0700, "Preston Crawford"
> <[EMAIL PROTECTED]> wrote:
> > I have what may seem like an odd question. I have a new FreeBSD 4.9
> > system that I want to install OpenOffice and some other stuff on. Most of
> > the stuff left to install is pretty big and thus will be hard to download
> > via ports over my dial-up connection (yes, I use dial-up). I know it's
> > possible to download tarballs and drop them into the ports tree somewhere
> > so you don't have to do the download. I'm wondering how easy this is,
> > though. By that I mean, if I wanted to say install Tomcat, Java,
> > OpenOffice, etc. in this manner how would I know which package to
> > download? And from where? I'd like to download these at work, burn them
> > on a CD and take them home. However, since I'm not in front of my machine
> > I don't know where ports will be looking for these files. Anyone know?
> 
> running make fetch-recursive-list will tell you everything including -all-
> the places you can get the files.  If you use a windoze box at work
> however, it'll be slightly painful, since you have to copy each url one by
> one (I imagine using something else like linux wouldn't be too bad, since
> you can generally make it use wget by running it with FETCH_CMD=wget).
> 
> I've never actually done it this way though, and one issue I see is the
> fact that /usr/ports/distfiles has certain things semi-ordered (openoffice
> stuff is dumped into /usr/ports/distfiles/openoffice for example), and I
> don't think fetch-recursive-list does anything about it. Of course, this
> just means you have to move a few things around when you get home.

You can learn where exatly you need the distfile by looking at the line
starting with ftp://ftp.FreeBSD.org/:

[I use wget as my fetch command][lines wrapped on ||]

$ cd /usr/ports/editors/openoffice/; make fetch-recursive-list| head -n 1
/usr/bin/env wget -c -T 5 
ftp://ftp.sunet.se/pub/FreeBSD/distfiles/OOo_1.0.3_source.tar.bz2  ||
/usr/bin/env wget -c -T 5 
http://openofficeorg.secsup.org/stable/1.0.3/OOo_1.0.3_source.tar.bz2  ||
/usr/bin/env wget -c -T 5 
http://mirrors.sunsite.dk/openoffice/stable/1.0.3/OOo_1.0.3_source.tar.bz2  ||
/usr/bin/env wget -c -T 5 
http://ftp.gwdg.de/pub/misc/openoffice/stable/1.0.3/OOo_1.0.3_source.tar.bz2  ||
/usr/bin/env wget -c -T 5 
ftp://www.t.ring.gr.jp/pub/misc/openoffice/stable/1.0.3/OOo_1.0.3_source.tar.bz2  ||
/usr/bin/env wget -c -T 5 
http://www.t.ring.gr.jp/archives/misc/openoffice/stable/1.0.3/OOo_1.0.3_source.tar.bz2 
 ||
/usr/bin/env wget -c -T 5 
ftp://ftp.chg.ru/pub/OpenOffice/stable/1.0.3/OOo_1.0.3_source.tar.bz2  ||
/usr/bin/env wget -c -T 5 
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/openoffice1.0/OOo_1.0.3_source.tar.bz2
  ||
echo OOo_1.0.3_source.tar.bz2 not fetched

This means that the distfile OOo_1.0.3_source.tar.bz2 should be put in
/usr/ports/distfiles/openoffice1.0/

> 
> -- 
> Robin Schoonover (aka End)
> #
> # Smoking is one of the leading causes of statistics.  -- Fletcher Knebel
> #
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
"Virtual" means never knowing where your next byte is coming from.


pgp0.pgp
Description: PGP signature


Re: ipfw question

2003-11-11 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 11 Nov 2003 12:00:10 - "Simon Gray" <[EMAIL PROTECTED]> probably wrote:

> >630000  0 deny log logamount 100 udp from any to any 119 via
> sis0
> >63000   24   1152  deny log logamount 100 tcp from any to any 135 via sis0
> >630000  0 deny log logamount 100 udp from any to any 135 via
> sis0
> 
> >63000 is the rule number correct?
> >IM wondering what the other 2 places are..
> >24  and 1152
> if you're getting 0 on the other rules, it probably means its not running
> those rules.
> So therefore it won't actually log if it isn't get to that rule.
> 
> also from the looks of things, if you're trying to block windows
> filesharing/smb you
> might want to block 135 - 139 both tcp/udp (instead of specifiying 135 in
> the rule add '135-139')
>  rather than just 135 tcp/udp
> 
> >Are they inbound and outbound?
> well depends (could be both yes), anything thats aimed at tcp 135 will be
> denied and
> logged

These are counts in packets and bytes.

> 
> >Do I make any sence?
> 
> Not really :/ whats the question?
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
BLISS is ignorance


pgp0.pgp
Description: PGP signature


Re: detecting the size of a tarball

2003-11-05 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 04 Nov 2003 16:10:08 -0700 David Bear <[EMAIL PROTECTED]> probably wrote:

> I have a 100 mg zip drive that I'm writing to as a raw device -- no
> file system -- just 'tar cvf /dev/afd0 stuff'.  I am curious if there
> is a way to find out how big the tarball is on this kind of thing.
> I'm guessing maybe some kind of seek to EOF but not sure how it might
> be accomplished.  any idea's?

What about "tar cvf - stuff|dd of=/dev/afd0"? dd will tell you how much
has been copied.

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


pgp0.pgp
Description: PGP signature


Re: Unable to delete empty directory /var/tmp/temproot

2003-11-05 Thread Sergey &#x27;DoubleF' Zaharchenko
On Mon, 3 Nov 2003 21:34:05 - "David Jenkins" <[EMAIL PROTECTED]> probably wrote:

> >On Mon, 3 Nov 2003, David Jenkins wrote:
> 
> >
> >I have also tried:
> >
> > # chflags noschg empty/
> > chflags: empty/: Operation not permitted
> > chflags: empty/: Operation not permitted
> >
> > # chmod -R 0700 empty/
> > chmod: empty/: Operation not permitted
> >
> > Please could someone point me in the right direction with this.
> 
> 
> 
> 
> >You raised the security level. Immutable flag can't be removed if 
> >securelevel > 0.
> 
> >Boot into single user mode, then chflags noschg empty/
> 
> 
> > Fer
> 
> I booted to single user mode from the boot prompt, but was unable to do
> anything inside var because there were no directories there!?

You should have mounted it (and /usr, where chflags lives). Even better,
do a

# mount -a

> So, I booted to full mode then did
> 
> # init 1
> 
> Here, I tried as you suggested but yet again I got the same error.
> 
> Also, when I boot up I have kern_securelevel="0" set in my rc.conf,
> which is not > 0

It will be set to 1 when going multiuser. Make it "-1" to prevent that.

-- 
DoubleF
"Man invented language to satisfy his deep need to complain."
-- Lily Tomlin


pgp0.pgp
Description: PGP signature


Re: Dual booting WinXP and FreeBSD - odd problem

2003-11-03 Thread Sergey &#x27;DoubleF' Zaharchenko
On Sun, 02 Nov 2003 23:38:03 -0800 Mike Maltese <[EMAIL PROTECTED]> probably wrote:

> 
> > Hi Mike,
> >
> > Do you have WinXP and FreeBSD on the same disc or on two separate discs?
> >
> > Thanatos
> >
> >
> 
> Same physical disk. Windoze is on ad0s1 and FBSD is on ad0s2. At the 
> moment I'm looking into restoring XP's MBR and then utilizing it's boot 
> manager by copying the FreeBSD boot blocks. I know this can be done with 
> Linux, we'll see about FreeBSD. =) I can't believe this isn't working, 
> I've had great success in the past with dual-booting. The mainboard is a 
> Shuttle AK12 and I just flashed the BIOS to the latest version. It's not 
> the newest board, so I'm wondering if I'm running into the 1024 cylinder 
> limit thing.

If your win slice is >8G, you probably are. You should shrink it. Boot
areas of both Windows and FreeBSD (part of win and FreeBSD root) should
fit into the first 8G for BootEasy to work.

> Help me out here guys, I'm trying to make a convert out of my friend!

:) 

-- 
DoubleF
Ass, n.:
The masculine of "lass".


pgp0.pgp
Description: PGP signature


Re: crontab question...

2003-11-01 Thread Sergey &#x27;DoubleF' Zaharchenko
On Fri, 31 Oct 2003 13:16:29 -0500 "Xpression" <[EMAIL PROTECTED]> probably wrote:

> Hi guys, I was wondering if I have three script files on crontab and all
> they are executed at the same hour how it's function ??? I mean:
> 
> #
> #minutehourmdaymonthwdaywhocommand
> #
> 00***  root
> /path/one/script1
> 00***  root
> /path/two/script2
> 00***  root
> /path/three/script3
> 
> they are executed at the same time or in order ??? thank

Generally, you shouldn't depend on that. If you want the scripts to be
executed in a particular order, write a wrapper script that says
something like

/path/one/script1
/path/two/script2
/path/three/script3

and add it to the crontab.

> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
All men are mortal.  Socrates was mortal.  Therefore, all men are
Socrates.
-- Woody Allen


pgp0.pgp
Description: PGP signature


Re: russian xkblayout

2003-10-30 Thread Sergey &#x27;DoubleF' Zaharchenko
On Mon, 27 Oct 2003 04:51:18 +0300 (MSK) Alexey Koptsevich <[EMAIL PROTECTED]> 
probably wrote:

> 
> Hello,
> 
> After recent reinstallation of X I cannot use Russian layout anymore. With
> the old release (4.1.0), I had two lines in the XF86Config file which did
> the job:
>Option  "XkbLayout"   "ru"

It should be 
Option  "XkbLayout"   "us,ru"

It works, though no docs say that.

>Option  "XkbOptions"  "grp:shift_toggle"
> They installed the map with columns 1,2 filled with Latin keysyms, and
> columns 3,4 filled with Cyrillic keysyms (as reported by 'xmodmap -pk' or
> xkeycaps), and double shift switched the layout.
> 
> With the new release of X (4.3.0), and with the above options in the
> XF86Config retained, I get the map with columns 1,2 filled with Cyrillic
> keysyms, and columns 3,4 empty :(
> 
> OK, if XKB method does not work, I tried to switch back to older scheme,
> xruskb with XkbLayout "en". This way, the columns are switched (as
> reported by xkeycaps), but only empty keysyms are generated in Russian
> mode (as reported by xev). Were there some changes on the way between
> these two version of X? I cannot find anything in the docs or lists...
> 
> Any idea would be appreciated.
> 
> Thanks,
> Alex
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
Everything should be built top-down, except the first time.


pgp0.pgp
Description: PGP signature


Re: Need some insight on error messages that I am getting.

2003-10-24 Thread Sergey &#x27;DoubleF' Zaharchenko
On Thu, 23 Oct 2003 15:20:37 -0400 Marshall Heartley <[EMAIL PROTECTED]> probably 
wrote:

> 
> > \From ata(4) manpage:
> > 
> > man> The use of UDMA4(66MHz) and higher together with non-UDMA4 devices on the
> > man> same ATA channel is not recommended, unless they are run at the non-UDMA4
> > man> device's lower speed.  The driver has been designed to handle that kind
> > man> of setup but lots of older devices do not like this.
> 
> This definitely would explain it.  Shows how new I am to FreeBSD. 
> Thanks!
> 
> Is there a way to put the proper atacontrol command in somewhere so that
> it will slow the first hdd (ad0) down to UDMA33?  

Perhaps a script in "/usr/local/etc/rc.d"... but before it is run, ad0
will be UDMA66.

Wherever you put an atacontrol command, ad0 will be UDMA66 before that
(outside of modifying the kernel), which might cause some trouble.

A solution might be to first set all drives into PIO (by adding
hw.ata.ata_dma=0 in the loader config) and `atacontrol' them in rc.d to
their speeds (both to UDMA33). This may cause the boot to be somewhat
slower.

> Thank you!
> 
> Marshall
> 
> 


-- 
DoubleF
Nondeterminism means never having to say you are wrong.


pgp0.pgp
Description: PGP signature


Re: Need some insight on error messages that I am getting.

2003-10-23 Thread Sergey &#x27;DoubleF' Zaharchenko
On Thu, 23 Oct 2003 11:24:02 -0400 Marshall Heartley <[EMAIL PROTECTED]> probably 
wrote:

> 
> > Try tweaking it up to, say, WDMA2, etc. and see what happens...
> 
> OK I changed it to WDMA2 and it seems to behave!  Well I went a little
> further and changed it back to UDMA33 and slowed the ad0 drive to
> UDMA33.  It was previously set at UDMA66.  Did the copy operation again,
> it did not show me any errors.  
> 
> I am assuming here that FreeBSD does not like drives with different
> speeds on the same bus???  Is my assumption correct??  From what little
> bit of fooling around that I did seems to support this.  When putting
> everything back to the defaults, I start seeing the messages again.
> 
> Interesting huh?  One of the drives ad0 is capable of ATA100 though my
> motherboard is not capable of that.  It uses UDMA66 and this transfer
> mode works well in other OS's.  The drive that is driving me nuts the
> ad1 is only capable of UDMA33.
> 
> This info may/maynot help but it might get one to thinking what could be
> causing this.

\From ata(4) manpage:

man> The use of UDMA4(66MHz) and higher together with non-UDMA4 devices on the
man> same ATA channel is not recommended, unless they are run at the non-UDMA4
man> device's lower speed.  The driver has been designed to handle that kind
man> of setup but lots of older devices do not like this.

> Thanks for the help so far!
> 
> Marshall
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
One Page Principle:
A specification that will not fit on one page of 8.5x11 inch
paper cannot be understood.
-- Mark Ardis



pgp0.pgp
Description: PGP signature


Re: GTK

2003-10-22 Thread Sergey &#x27;DoubleF' Zaharchenko
On Tue, 21 Oct 2003 09:54:47 +1000 "Andrew Kozak" <[EMAIL PROTECTED]> probably wrote:

> Hi All
> 
> Thank You very much to C Ulrich and Sergey 'DoubleF' Zaharchenko for your
[name corrected]
> help with my GTK problem. Unfortunately I think that  C Ulrich is right in
> that I will have to install again from scratch. Unfortunately reinstalling

At least you are wiser now... 

> GTK, gettext etc. has not helped. Ohh well, practice make perfect, and
> Sergey, you have started something now, what on earth does 'In the words of
> M. Bulghakov, "Annushka uzhe razlila maslo..."' mean ? Thank you both so much
[quotation corrected]

It's a quotation from "Master and Margharet". It means (not literally,
but here) that the thing that sentenced you was already done and there's
little you can do about it (I guess the rest about it is OT, so you
should read the book to find out more:).

You might not have to reinstall FreeBSD from scratch, you could just try
wiping out /usr/local, /usr/X11R6, /var/db/pkg and starting all over
again (but that's rather close to reinstalling).

If you will want to recollect what ports you have (so that, when
reinstalling, you don't miss anything), something like 

$ ls /var/db/pkg>~/portsList

will help (surely before you delete /var/db/pkg).

> for using terms I can understand, and although it seems I cannot repair the
> problem, I have learnt a valuable lesson, and picked up a couple of tips
> along the way :) I definitely do intend to read a great deal more about
> FreeBSD, I just have trouble finding time (work 60+ hours a week, new Dad
> etc.) so I guess I will just take a little longer than some :) But I'll get
> there !!
> 
> Thanks Again
> Andrew Kozak


-- 
DoubleF
You think Oedipus had a problem -- Adam was Eve's mother.


pgp0.pgp
Description: PGP signature


Re: Upgrade to 4.8 RELEASE

2003-10-20 Thread Sergey &#x27;DoubleF' Zaharchenko
On Sat, 18 Oct 2003 20:04:39 -0400 "Robert H. Perry" <[EMAIL PROTECTED]> probably 
wrote:

> Hello,
> 
> I'm making plans to upgrade from 4.7 RELEASE to 4.8 RELEASE.  My 
> previous attempt was a binary upgrade from 4.5 to 4.7 which did not go 
> very well.  I eventually purchased the 4.7 CD.  
> 
> The FreeBSD Handbook stresses  backing up the system and implies that 
> /dump/ is a better backup program.  Chapter 12.9.8.1 of  the handbook 
> recommends having a copy of the boot and fixit floppies available and 
> making sure they have all your devices, otherwise you'll need to prepare 
> two bootable custom floppies  that contain /fdisk, disklabel, newfs, 
> mount, /and your backup program.   It goes on to say that these programs 
> must be statically linked.  I understand hard and soft links but I'm not 
> familiar with static links.  The handbook also provides a script for 
> creatinng a bootable floppy.

A static link is a firm link:) Seriously, static linking has nothing to
do with filesystem links. A statically linked program just uses no
shared libraries. AFAICT the programs in /stand (and /bin and /sbin) are
statically linked (note that those in /stand are also a "crunchbox",
that is, a single "monolithic" program which runs differently depending
on the name it was run as). You really have to mess with this only if
you are going to write your own program to run from a boot floppy.

You can use file(1) if you want to see if a program is staticlally linked:

$ file /usr/bin/find 
/usr/bin/find: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for 
FreeBSD 4.8, dynamically linked (uses shared libs), stripped
$ file /stand/find 
/stand/find: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for FreeBSD 
4.8, statically linked, stripped


> Can someone help me understand static link?  Secondly, can I assume that 
> the script must be reviewed for likely modifications?  I'm just learning 
> shell programming and if significant modifications are necessary, I may 
> end up purchasing a CD for 4.8.
> 
> Any suggestions relative to the upgrade process is also appreciated.

In fact, a source update isn't as dangerous as you expect.

> Thanks,
> Bob 
> 
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 


-- 
DoubleF
When I was a boy I was told that anybody could become President.  Now
I'm beginning to believe it.
-- Clarence Darrow




pgp0.pgp
Description: PGP signature


Re: Dialup firewalling with FreeBSD

2003-10-18 Thread Sergey &#x27;DoubleF' Zaharchenko
On Fri, 17 Oct 2003 15:09:21 -0400 "whole_r" <[EMAIL PROTECTED]> probably wrote:

> Hello,
> I followed this doc to install my firewall. Upon reboot I get about 12 lines
> more or less like this:
> 
> ipfw: size mismatch (have 176 need..)

Don't know about this, probably the ipfw program doesn't talk correctly
to the kernel, and you should rebuild (both or one of) your world and
kernel but

> It also says that dev tun0 doesn't exist.

This is correct and OK, since you don't have a connection established at
boot-time. After you have connected, the rule will get active just as
you expect.

-- 
DoubleF
Organic chemistry is the chemistry of carbon compounds.  Biochemistry
is the study of carbon compounds that crawl.
-- Mike Adams


pgp0.pgp
Description: PGP signature


Re: Why is em nic generating interrupts?

2003-10-06 Thread Sergey &#x27;DoubleF' Zaharchenko
On Mon, 6 Oct 2003 19:48:53 +0700 "Michael O. Boev" <[EMAIL PROTECTED]> probably wrote:

> Hello, everyone!
 
Hi!

> I've got a [uniprocessor] router machine with fxp and em nics.
> I've built my kernel with the following included:
> 
> options DEVICE_POLLING
> options HZ=2500
> 
> and enabled polling in /etc/sysctl.conf.
> 
> Having looked through a vmstat -i output I see
> that the em card is generating interrupts, although
> they should be disabled (as I see in em's source code).
> 
> interrupt total   rate
> stray irq01  0
> stray irq61  0
> npx0 irq131  0
> ata0 irq14 2339  0
> em0 irq10421457155
> fxp0 irq5 2  0
> atkbd0 irq13326  1
> clk irq06778872   2500
> rtc irq8 346899127
> Total   7552898   2786
> 
> What's happening? Is polling working in my case?
> If yes, why is vmstat showing interrupts? I see clearly,
> that fxp's counter doesn't increase, and em's is constantly growing.

Assuming you are using 4.8,

\From the polling manpage:

>   As of this writing, the dc, fxp, rl and sis devices are supported, with
>other in the works.

I guess em is just not there yet, while fxp is...

HTH
-- 
DoubleF
"All flesh is grass"
-- Isiah
Smoke a friend today.


pgp0.pgp
Description: PGP signature


Re: Permissions Problem on /dev/lpt0

2003-10-05 Thread Sergey &#x27;DoubleF' Zaharchenko
On Sun, 05 Oct 2003 04:53:13 +1000 Ekrem <[EMAIL PROTECTED]> probably wrote:

> I had done chmod 777 /dev/lpt0, at one time, also did
> chown daemon:daemon /dev/lpt0, in both cases I was able to print OK.
> 
> BUTTT, whenever I reboot FreeBSD, the permissions for /dev/lpt0 are
> reset back to the original 'crw---  1 root  wheel'.
> 

I guess you are using devfs... Edit your /etc/devfs.conf to change the
boot-up permissions.

-- 
DoubleF
Complex problems have simple, easy-to-understand
wrong answers.
(Oops, this doesn't belong here:)


pgp0.pgp
Description: PGP signature


Re: .Xdefaults

2003-06-30 Thread Sergey \&quot;DoubleF\" Zaharchenko
Matthew Seaman wrote:
On Mon, Jun 30, 2003 at 11:22:47AM -0500, [EMAIL PROTECTED] wrote:

Hello, I'm using FreeBSD 5.1 and came across something today. Say I
wanted to make xterms background by default i could add
XTerm*background: black

into my ~/.Xdefaults file and it would load by default. Where would I
go about finding out more options for more programs to place them in
my ~/.Xdefaults file? Thanks.


The manual pages for the various X applications will usually have
quite a bit of information about what you can set in ~/.Xdefaults --
look for the section labelled 'RESOURCES'.  Another place to look is
/usr/X11R6/lib/X11/app-defaults, where you will find the default
values for all resources for a range of applications.
Note that this functionality is generally only used for X applications
based on the Athena widget set or on the Motif libraries.
Applications using higher level X environments like Gnome or KDE tend
to have alternate mechanisms for doing this sort of thing.
	Cheers,

	Matthew

You may also want to use editres(1) if the app supports the editres 
protocol (like xterm does).

HTH,
DoubleF
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: mount & umount read-only floppy: unmount failed: Input/outputerror ??

2003-06-30 Thread Sergey \&quot;DoubleF\" Zaharchenko
Rob Lahaye wrote:
I created the installation floppy from "kern.flp". Removed it from the
drive, to make it read-only.
I then put it back into the drive and do, as root:
# mount -t ufs /dev/fd0 /mnt
# umount /dev/fd0
umount: unmount of /mnt failed: Input/output error
You know, ufs filesystems store the "last mounted on" string in 
themselves (it is reported by "fsck", f.e.). I am not sure, but it seems 
like mount is willing to write it to the floppy.

> Perhaps the updates from mounting the floppy aren't being written
> out to the actual media until you try to unmount it - some kind of
> caching issue?
So you were _writing_ to a read-only floppy;)? Yes, of course, FreeBSD 
does cache them (that's why you can't take it out without unmounting). 
It's just that, short of trying to write to the floppy, you can't get to 
know it's read-only AFAIK.

HTH,
DoubleF
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: question regarding quotas

2003-06-29 Thread Sergey \&quot;DoubleF\" Zaharchenko
Josh Brooks wrote:
So my question was, is there a way to control how big a directory can
grow, regardless of who is putting what files in that directory.
So you are going to make a directory N Mbytes large...
Make a file N Mbytes large, vnconfig it, disklabel it, newfs it and 
mount to your directory. You should be solved then.

man vnconfig for details.

HTH,
DoubleF


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"