does ukbd delay break scan codes?

2006-02-22 Thread Norbert Koch
Hello,

while testing an older release
of kbdmux under FreeBSD4 I am
seeing some strange things:

I have attached a primary
ps/2 and a secondary usb keyboard.
I run under X (which means that kbdmux
is switched to return raw key codes only)
and inspect kbdmux using some printfs
and xconsole.

From time to time I 'freeze' the keyboard
input of my X application by pressing
e.g. Ctrl+Fn1 on the primary keyboard.
I still see kbdmux returning scan codes.
Unfreezing can be done by simply
switching virtual consoles, which seems
to somehow re-initialize the keyboard state.

I still do not know where it comes from,
but what I found so far is,
that the usb keyboard (or ukbd driver)
seems to delay the break codes for
keys with prefix E0 (which may or may not
have anything to do with my problem).

E.g., I press Keypad-Enter and see
  E0 1C E0
^prefix
 ^make code
  ^prefix
and nothing else. As soon as I press
e.g. Enter (any key works) I see
  9C 1C 9C
^break code
 ^make code
  ^delayed break code.

Does anyone have an idea where that
may come from?
Could it be a possible bug in ukbd's
conversion code?
(BTW: I compared ukbd.c of RELENG-4
 against RELENG-6. There are no
 significant differences)
My usb keyboard is a Cherry RS6000.

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


Glade/GTK autogen issues

2006-02-22 Thread Tom Grove
I'm trying to build a simple hello world using glade.  I've actually 
built this code on this system before and now after a few months and 
several ports tree updates it doesn't work.  When I run autogen.sh 
within the glade built directory I receive the following error:


syntax error near unexpected token `PACKAGE,'

I run:

setenv ACLOCAL_FLAGS -I /usr/local/share/aclocal -I 
/usr/X11R6/share/aclocal


before autogen.sh.

Here's a little info about the system:

6.0-RELEASE FreeBSD 6.0-RELEASE

autoconf-2.13.000227_5
autoconf-2.59_2
automake-1.4.6_2
libtool-1.3.5_2
libtool-1.5.22_1


Also, if anyone knows of something similar to glade as in gui designer 
with C as the development language I would really like to know about 
it.  Thanks.


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


(feature change request) remove link-layer generated routes from netstat -r

2006-02-22 Thread Nikos Vassiliadis
Hi,

netstat -r prints link-layer generated routes and many
times the output becomes somehow obscure. For
example:

[EMAIL PROTECTED]:0:/usr/home/src/FreeBSD-6/src/usr.bin/netstat# netstat 
-ranfinet
Routing tables

Internet:
DestinationGatewayFlagsRefs  Use  Netif Expire
default10.1.1.244 UGS 031016rl0
10.1.1/24  link#1 UC  00rl0
10.1.1.181 00:0f:1f:fb:02:f5  UHLW10rl0
10.1.1.182 00:e0:fc:38:d4:40  UHLW10rl0
10.1.1.183 00:e0:fc:65:07:fd  UHLW10rl0
10.1.1.244 00:50:fc:fe:74:3b  UHLW21rl0
10.1.1.254 00:0c:cf:70:50:06  UHLW10rl0
127.0.0.1  127.0.0.1  UH  0 1117lo0
192.168.1  link#5 UC  00   fxp0
192.168.1.25   00:05:5d:4d:19:58  UHLW10   fxp0
192.168.1.45   00:11:43:b6:a1:55  UHLW10   fxp0
192.168.1.71   00:0c:f1:b9:38:50  UHLW1 1645   fxp0
192.168.1.84   00:04:23:af:79:66  UHLW10   fxp0
192.168.1.112  00:30:4f:21:3b:8a  UHLW10   fxp0
192.168.1.196  00:07:e9:40:1f:c5  UHLW10   fxp0
192.168.1.199  00:e0:81:21:28:21  UHLW10   fxp0
192.168.1.200  00:30:4f:03:88:03  UHLW10   fxp0


when the information I was actually looking for is:

[EMAIL PROTECTED]:0:/usr/home/src/FreeBSD-6/src/usr.bin/netstat# netstat 
-rnfinet
Routing tables

Internet:
DestinationGatewayFlagsRefs  Use  Netif Expire
default10.1.1.244 UGS 031016rl0
10.1.1/24  link#1 UC  00rl0
127.0.0.1  127.0.0.1  UH  0 1117lo0
192.168.1  link#5 UC  00   fxp0
[EMAIL PROTECTED]:0:/usr/home/src/FreeBSD-6/src/usr.bin/netstat# 


The attachment patch (cvs diff -u -rHEAD route.c generated) prints
link-layer generated routes when -a is specified and ignores them
the rest of the time.

Thoughts? POLA violation?

Nikos
Index: route.c
===
RCS file: /home/ncvs/src/usr.bin/netstat/route.c,v
retrieving revision 1.76
diff -u -r1.76 route.c
--- route.c	13 May 2005 16:31:10 -	1.76
+++ route.c	22 Feb 2006 13:35:39 -
@@ -285,11 +285,16 @@
 	int len;
 
 	/*
-	 * Don't print protocol-cloned routes unless -a.
+	 * Don't print protocol-cloned routes and
+	 * link-layer generated routes unless -a.
 	 */
-	if (rt-rt_flags  RTF_WASCLONED  !aflag) {
-		kget(rt-rt_parent, parent);
-		if (parent.rt_flags  RTF_PRCLONING)
+	if (!aflag) {
+		if (rt-rt_flags  RTF_WASCLONED) {
+		 	kget(rt-rt_parent, parent);
+			if (parent.rt_flags  RTF_PRCLONING)
+return;
+		}
+		if (rt-rt_flags  RTF_LLINFO)
 			return;
 	}
 
@@ -712,11 +717,16 @@
 	sa_u addr, mask;
 
 	/*
-	 * Don't print protocol-cloned routes unless -a.
+	 * Don't print protocol-cloned routes and
+	 * link-layer generated routes unless -a.
 	 */
-	if (rt-rt_flags  RTF_WASCLONED  !aflag) {
-		kget(rt-rt_parent, parent);
-		if (parent.rt_flags  RTF_PRCLONING)
+	if (!aflag) {
+		if (rt-rt_flags  RTF_WASCLONED) {
+			kget(rt-rt_parent, parent);
+			if (parent.rt_flags  RTF_PRCLONING)
+return;
+		}
+		if (rt-rt_flags  RTF_LLINFO)
 			return;
 	}
 
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: FreeBSD-6 and em interface speed

2006-02-22 Thread Eygene A. Ryabinkin
 Probably due to the test tool you're using. Does the tool serialize the
 UDP stream (ie: wait for a response for each packet)?
 As far as I understand, not it doesn't. The tool is nepim, version 0.17.

 
 BTW, this should go on freebsd-net.
 OK, next time it will.

 Thanks!
-- 
rea

BOFH excuse #9:
doppler effect
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD 6.1-BETA2/FreeBSD 5.5-BETA2 Available

2006-02-22 Thread Trond Endrestøl
On Mon, 20 Feb 2006 14:53-0700, Scott Long wrote:

 We encourage people to help with testing so any final bugs can be
 identified and worked out.

Although hardly related to the kernel, the libtool15 tagging problem
in the ports collection is the biggest showstopper for all of us,
I guess.

Is this a problem local to each port, global to the entire ports
infrastructure, or system wide, i.e. something we need to set in
/etc/make.conf?

-- 
--
Trond Endrestøl  |   [EMAIL PROTECTED]
Patron of The Art of Computer Programming|   FreeBSD 4.8-S  Pine 4.55
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


devctl attach/detach notification for disks

2006-02-22 Thread Nate Nielsen
I'm working on a bit of code to get devctl notifications for attaching
and removing of disks. This would allow actions to be taken via devd
when a disk is attached or removed from the system.

Currently I have the attach and detach notifications hooked into
disk_create() and disk_destroy() in geom_disk.c. See attached (rough)
patch.

However at these points the disks are not yet present in the /dev/
filesystem. Anyone have any clues or tips for a better place to hook
these notifications into the system?

Cheers,
Nate

Index: sys/geom/geom_disk.c
===
RCS file: /home/ncvs/src/sys/geom/geom_disk.c,v
retrieving revision 1.96.2.1
diff -U3 -r1.96.2.1 geom_disk.c
--- sys/geom/geom_disk.c	26 Nov 2005 22:55:20 -	1.96.2.1
+++ sys/geom/geom_disk.c	22 Feb 2006 17:55:18 -
@@ -42,6 +42,7 @@
 #include sys/systm.h
 #include sys/kernel.h
 #include sys/sysctl.h
+#include sys/bus.h
 #include sys/bio.h
 #include sys/conf.h
 #include sys/fcntl.h
@@ -340,6 +341,7 @@
 	struct g_geom *gp;
 	struct g_provider *pp;
 	struct disk *dp;
+	char *devctl;
 
 	if (flag == EV_CANCEL)
 		return;
@@ -358,6 +360,16 @@
 		printf(GEOM: new disk %s\n, gp-name);
 	dp-d_geom = gp;
 	g_error_provider(pp, 0);
+
+	/* Send a 'added' message to devctl */
+	devctl = g_malloc(512, M_NOWAIT);
+	if (devctl != NULL) {
+		snprintf(devctl, 512,  
+			 +%s%d media-type=\disk\ sectorsize=0x%04x mediasize=0x%04llx sectors=0x%04x heads=0x%02x\n, 
+			 dp-d_name, dp-d_unit, dp-d_sectorsize, dp-d_mediasize, dp-d_fwsectors, dp-d_fwheads);
+		devctl_queue_data(devctl);
+		g_free(devctl);
+	}
 }
 
 static void
@@ -365,6 +377,7 @@
 {
 	struct disk *dp;
 	struct g_geom *gp;
+	char *devctl;
 
 	g_topology_assert();
 	dp = ptr;
@@ -373,6 +386,15 @@
 		gp-softc = NULL;
 		g_wither_geom(gp, ENXIO);
 	}
+
+	/* Send a 'removed' message to devctl */
+	devctl = g_malloc(128, M_NOWAIT);
+	if (devctl != NULL) {
+		snprintf(devctl, 128, -%s%d media-type=\disk\, dp-d_name, dp-d_unit);
+		devctl_queue_data(devctl);
+		g_free(devctl);
+	}
+
 	g_free(dp);
 }
 
Index: sys/sys/bus.h
===
RCS file: /home/ncvs/src/sys/sys/bus.h,v
retrieving revision 1.70
diff -U3 -r1.70 bus.h
--- sys/sys/bus.h	12 Apr 2005 15:20:36 -	1.70
+++ sys/sys/bus.h	22 Feb 2006 17:55:19 -
@@ -83,7 +83,7 @@
  */
 void devctl_notify(const char *__system, const char *__subsystem,
 const char *__type, const char *__data);
-void devctl_queue_data(char *__data);
+void devctl_queue_data(const char *__data);
 
 /*
  * Forward declarations
Index: sys/kern/subr_bus.c
===
RCS file: /home/ncvs/src/sys/kern/subr_bus.c,v
retrieving revision 1.184.2.1
diff -U3 -r1.184.2.1 subr_bus.c
--- sys/kern/subr_bus.c	6 Oct 2005 23:15:18 -	1.184.2.1
+++ sys/kern/subr_bus.c	22 Feb 2006 17:55:22 -
@@ -497,15 +497,8 @@
 	return (revents);
 }
 
-/**
- * @brief Queue data to be read from the devctl device
- *
- * Generic interface to queue data to the devctl device.  It is
- * assumed that @p data is properly formatted.  It is further assumed
- * that @p data is allocated using the M_BUS malloc type.
- */
-void
-devctl_queue_data(char *data)
+static void
+devqdata(char *data)
 {
 	struct dev_event_info *n1 = NULL;
 	struct proc *p;
@@ -528,6 +521,26 @@
 }
 
 /**
+ * @brief Queue data to be read from the devctl device
+ *
+ * Generic interface to queue data to the devctl device.  It is
+ * assumed that @p data is properly formatted.  
+ */
+void 
+devctl_queue_data(const char *data)
+{
+	int len;
+	char *msg;
+
+	len = strlen(data) + 1;
+	msg = malloc(len, M_BUS, M_NOWAIT);
+	if (msg == NULL)
+		return;
+	strcpy(msg, data);
+	devqdata(msg);
+}
+
+/**
  * @brief Send a 'notification' to userland, using standard ways
  */
 void
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]

Looking for advice on chasing a kernel memory leak

2006-02-22 Thread Viktor Vasilev
Hello,

I'm having trouble with a WARP (http://www.pcengines.ch/wrap.htm) board 
running m0n0wall v1.21 (stripped down FreeBSD 4.11-RELEASE-p13). It's serving 
as an internet gateway and the problem is, that after some time it starts 
blocking traffic and doesn't do NAT anymore. The box is handling very low 
traffic volume and is mostly idle. I've enabled logging to a remote machine 
and around the time the trouble happens, there are messages like these:

  Jan 15 04:02:25 gw /kernel: ipf_nattable_max reduced to -96
  Jan 15 04:02:49 gw /kernel: ipf_nattable_max reduced to -94
  Jan 15 04:02:49 gw /kernel: ipf_nattable_max reduced to -94
  Jan 15 04:04:31 gw /kernel: ipf_nattable_max reduced to -92

An inspection of the ipfilter code shows that kmem_alloc is failing:

  
http://fxr.watson.org/fxr/source/contrib/ipfilter/netinet/ip_nat.c?v=RELENG4#L1197

A reboot fixes the things until the same thing happens again in three or so 
weeks. Since that happened a couple of times, I've monitored RAM usage and 
see a constant growth of the wired memory. After reboot top reports:

  Mem: 4312K Active, 3684K Inact, 5960K Wired, 4848K Buf, 99M Free

Now after two weeks:

  Mem: 5044K Active, 3824K Inact, 22M Wired, 5856K Buf, 82M Free

vmstat -m output (attached) clearly shows that there's a huge amount of M_TEMP 
memory held and growing:

  temp 30370 15148K  15169K 19166K 168048220 0  
16,32,64,128,256,512,1K,4K,8K,32K,256K,512K

I don't know how to find out who actually allocates this memory. Any ideas?

ps auxwww output, kernel config and dmesg are attached.


Cheers,
Viktor
Copyright (c) 1992-2005 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 4.11-RELEASE-p13 #0: Sat Nov 26 12:17:56 CET 2005
[EMAIL PROTECTED]:/usr/src/sys/compile/M0N0WALL_WRAP
Timecounter i8254  frequency 1193182 Hz
CPU: NSC Geode (266.64-MHz 586-class CPU)
  Origin = Geode by NSC  Id = 0x540  Stepping = 0  DIR=0x81b7
  Features=0x808131FPU,TSC,MSR,CX8,CMOV,MMX
real memory  = 134217728 (131072K bytes)
avail memory = 116117504 (113396K bytes)
Preloaded elf kernel kernel at 0xc0e03000.
Preloaded mfs_root /mfsroot at 0xc0e030a8.
md0: Preloaded image /mfsroot 11534336 bytes at 0xc0301df0
md1: Malloc disk
npx0: math processor on motherboard
npx0: INT 16 interface
pcib0: Host to PCI bridge on motherboard
pci0: PCI bus on pcib0
sis0: NatSemi DP83815 10/100BaseTX port 0x1000-0x10ff mem 
0x8000-0x8fff irq 10 at device 14.0 on pci0
sis0: Ethernet address: 00:0d:b9:02:c4:d0
miibus0: MII bus on sis0
ukphy0: Generic IEEE 802.3u media interface on miibus0
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
sis1: NatSemi DP83815 10/100BaseTX port 0x1400-0x14ff mem 
0x8004-0x80040fff irq 9 at device 15.0 on pci0
sis1: Ethernet address: 00:0d:b9:02:c4:d1
miibus1: MII bus on sis1
ukphy1: Generic IEEE 802.3u media interface on miibus1
ukphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
sis2: NatSemi DP83815 10/100BaseTX port 0x1800-0x18ff mem 
0x8008-0x80080fff irq 11 at device 16.0 on pci0
sis2: Ethernet address: 00:0d:b9:02:c4:d2
miibus2: MII bus on sis2
ukphy2: Generic IEEE 802.3u media interface on miibus2
ukphy2:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
isab0: PCI to ISA bridge (vendor=100b device=0510) port 
0xf600-0xf63f,0xf400-0xf43f at device 18.0 on pci0
isa0: ISA bus on isab0
chip1: PCI to Other bridge (vendor=100b device=0511) port 0xf000-0xf0ff at 
device 18.1 on pci0
atapci0: Generic PCI ATA controller port 0xfc00-0xfc0f at device 18.2 on pci0
ata0: at 0x1f0 irq 14 on atapci0
pci0: unknown card (vendor=0x100b, dev=0x0503) at 18.3
chip2: PCI to Other bridge (vendor=100b device=0515) port 0xf200-0xf23f at 
device 18.5 on pci0
orm0: Option ROM at iomem 0xe-0xe7fff on isa0
pmtimer0 on isa0
sio0 at port 0x3f8-0x3ff irq 4 flags 0x30 on isa0
sio0: type 16550A, console
BRIDGE 020214 loaded
IPsec: Initialized Security Association Processing.
IP Filter: v3.4.35 initialized.  Default = block all, Logging = enabled
ad0: 123MB PRCF1002 [251/16/63] at ata0-master PIO4
Mounting root from ufs:/dev/md0c
stray irq 7
Memory statistics by bucket size
Size   In Use   Free   Requests  HighWater  Couldfree
  16  573195   111039721280  0
  32  563 772902431 640  0
  64 1828 28   25873127 320 228322
 128 1070114   18465333 160  0
 256 1382   23787479540  80 305488
 51229603 133252875  40  10200
  1K   39  55045708  20  0
  2K   25  3  88792  10  17358
  4K5  1  42295   5  0
  8K   22  0383   5220
 16K4  0 12   5  0
 32K2  0  2   5  0
256K1  0  1   5  0
512K0  0 

urgent, need to recover superblock!

2006-02-22 Thread Dave

Hello,
   Some urgency on this issue!I've got a 10 gb ide drive that has 
critical data on one of it's

partitions /dev/ad1e. This drive was originally gmirrored in
another box it worked fine, it was the master drive. Now i've
installed this drive as a slave in another 6.0 box, and now it
shows up as ad1 with the partition i want being ad1e. I did a mount it
worked fine. So i knew the drive was working, i then unmounted the
partition, and tried to dump it to another drive. This didn't work, dump got
an error about incorrect superblock. I then did a mount
-o ro /dev/ad1e /mnt and i'm getting an error Incorrect
superblock from mount. I then tried fsck /dev/ad1e and got the
same error msg. These partitions were formatted with ufs2 as their
filesystem. I then ran bsdlabel ad1 and got a printout of my label,
this showed up which gives me hope that this data can be retrieved.
An error i'm getting from bsdlabel says that the c: partition does not cover
the
entire disk and that may result in utilities not working correctly. Any
help appreciated.
   Some urgency!
Dave.


Script started on Sun Feb 19 07:56:47 2006
[EMAIL PROTECTED]:/dev#ls ad1*
ad1 ad1a ad1b ad1c ad1d ad1e ad1f ad1g
[EMAIL PROTECTED]:/dev#fdisk /dev/ad1
*** Working on device /dev/ad1 ***
parameters extracted from in-core disklabel are:
cylinders=19386 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=19386 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
UNUSED
The data for partition 2 is:
UNUSED
The data for partition 3 is:
UNUSED
The data for partition 4 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
   start 0, size 5 (24 Meg), flag 80 (active)
beg: cyl 0/ head 0/ sector 1;
end: cyl 1023/ head 254/ sector 63
[EMAIL PROTECTED]:/dev#bsdlabel /dev/ad1
# /dev/ad1:
8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
 a:   266240   164.2BSD 2048 16384 16648
 b:   524288   266256  swap
 c: 195410240unused0 0 # raw part, don't
edit
 d:  7340032   7905444.2BSD 2048 16384 28552
 e:  8388608  81305764.2BSD 2048 16384 28552
 f:  2097152 165191844.2BSD 2048 16384 28552
 g:   921600 186163364.2BSD 2048 16384 57608
bsdlabel: partition c doesn't cover the whole unit!
bsdlabel: An incorrect partition c may cause problems for standard system
utilities
exit

Script done on Sun Feb 19 08:02:34 2006

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


Re: urgent, need to recover superblock!

2006-02-22 Thread Edward B. DREGER
First, copy the entire drive to a file on another drive.  Don't mess 
around with the original drive.  The vnode disk driver is your friend.

I can't find the quick-and-dirty tool I hacked up a few years back when 
I needed to recover a MBR... however one can scan a sector at a time, 
find likely partitions, then manually create a disklabel.  (You see why 
you want to play with an image mounted via vnode!)


Eddy
--
Everquick Internet - http://www.everquick.net/
A division of Brotsman  Dreger, Inc. - http://www.brotsman.com/
Bandwidth, consulting, e-commerce, hosting, and network building
Phone: +1 785 865 5885 Lawrence and [inter]national
Phone: +1 316 794 8922 Wichita

DO NOT send mail to the following addresses:
[EMAIL PROTECTED] -*- [EMAIL PROTECTED] -*- [EMAIL PROTECTED]
Sending mail to spambait addresses is a great way to get blocked.
Ditto for broken OOO autoresponders and foolish AV software backscatter.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: urgent, need to recover superblock!

2006-02-22 Thread Scott Long

Dave wrote:

Hello,
   Some urgency on this issue!I've got a 10 gb ide drive that has 
critical data on one of it's

partitions /dev/ad1e. This drive was originally gmirrored in
another box it worked fine, it was the master drive. Now i've
installed this drive as a slave in another 6.0 box, and now it
shows up as ad1 with the partition i want being ad1e. I did a mount it
worked fine. So i knew the drive was working, i then unmounted the
partition, and tried to dump it to another drive. This didn't work, dump 
got

an error about incorrect superblock. I then did a mount
-o ro /dev/ad1e /mnt and i'm getting an error Incorrect
superblock from mount. I then tried fsck /dev/ad1e and got the
same error msg. These partitions were formatted with ufs2 as their
filesystem. I then ran bsdlabel ad1 and got a printout of my label,
this showed up which gives me hope that this data can be retrieved.
An error i'm getting from bsdlabel says that the c: partition does not 
cover

the
entire disk and that may result in utilities not working correctly. Any
help appreciated.
   Some urgency!
Dave.


Sounds like you need to install ports/syutils/ffsrecov and spend some 
quality time with it tonight.


Scott

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


Re: urgent, need to recover superblock!

2006-02-22 Thread Frank Mayhar
On Wed, 2006-02-22 at 22:23 -0500, Dave wrote:
 Some urgency on this issue!I've got a 10 gb ide drive that has 
 critical data on one of it's
 partitions /dev/ad1e. This drive was originally gmirrored in
 another box it worked fine, it was the master drive. Now i've
 installed this drive as a slave in another 6.0 box, and now it
 shows up as ad1 with the partition i want being ad1e. I did a mount it
 worked fine. So i knew the drive was working, i then unmounted the
 partition, and tried to dump it to another drive. This didn't work, dump got
 an error about incorrect superblock. I then did a mount
 -o ro /dev/ad1e /mnt and i'm getting an error Incorrect
 superblock from mount. I then tried fsck /dev/ad1e and got the
 same error msg. These partitions were formatted with ufs2 as their
 filesystem. I then ran bsdlabel ad1 and got a printout of my label,
 this showed up which gives me hope that this data can be retrieved.
 An error i'm getting from bsdlabel says that the c: partition does not cover
 the
  entire disk and that may result in utilities not working correctly. Any
  help appreciated.
 Some urgency!

My heavily-hacked version of ffsrecov (hacked to support UFS2 but not
quite ready for general release) might help with this.  Source is
available at http://www.exit.com/Archives/FreeBSD/ffsrecov.tar.gz.  If
you make changes, please send them back to me and I'll try to
incorporate them.  One of these days I'll get around to making this
thing suitable for ports.  But not today.

Hope it helps.
-- 
Frank Mayhar [EMAIL PROTECTED] http://www.exit.com/
Exit Consulting http://www.gpsclock.com/
http://www.exit.com/blog/frank/
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: urgent, need to recover superblock!

2006-02-22 Thread Dave

Hello,
   Thank you for your reply. How would i go about doing this copy so i 
could use a vnode on it? As i think i mentioned dump didn't like it. One 
other thing i can mount the ad1a, ad1d, ad1f, and ad1g partitions just fine, 
it's the ad1e partition only that is giving me the grief and that's the one 
i need!

Thanks.
Dave.

- Original Message - 
From: Edward B. DREGER [EMAIL PROTECTED]

To: Dave [EMAIL PROTECTED]
Cc: freebsd-hackers@freebsd.org
Sent: Wednesday, February 22, 2006 10:42 PM
Subject: Re: urgent, need to recover superblock!



First, copy the entire drive to a file on another drive.  Don't mess
around with the original drive.  The vnode disk driver is your friend.

I can't find the quick-and-dirty tool I hacked up a few years back when
I needed to recover a MBR... however one can scan a sector at a time,
find likely partitions, then manually create a disklabel.  (You see why
you want to play with an image mounted via vnode!)


Eddy
--
Everquick Internet - http://www.everquick.net/
A division of Brotsman  Dreger, Inc. - http://www.brotsman.com/
Bandwidth, consulting, e-commerce, hosting, and network building
Phone: +1 785 865 5885 Lawrence and [inter]national
Phone: +1 316 794 8922 Wichita

DO NOT send mail to the following addresses:
[EMAIL PROTECTED] -*- [EMAIL PROTECTED] -*- [EMAIL PROTECTED]
Sending mail to spambait addresses is a great way to get blocked.
Ditto for broken OOO autoresponders and foolish AV software backscatter. 


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


Re: urgent, need to recover superblock!

2006-02-22 Thread Dave

Hello,
   Thank you for your suggestion i will do that though i like the 
suggestion of using a vnode mounted image so i don't blow up the data i'm 
trying to save.

Thanks.
Dave.

- Original Message - 
From: Scott Long [EMAIL PROTECTED]

To: Dave [EMAIL PROTECTED]
Cc: freebsd-hackers@freebsd.org
Sent: Wednesday, February 22, 2006 10:43 PM
Subject: Re: urgent, need to recover superblock!



Dave wrote:

Hello,
   Some urgency on this issue!I've got a 10 gb ide drive that has 
critical data on one of it's

partitions /dev/ad1e. This drive was originally gmirrored in
another box it worked fine, it was the master drive. Now i've
installed this drive as a slave in another 6.0 box, and now it
shows up as ad1 with the partition i want being ad1e. I did a mount it
worked fine. So i knew the drive was working, i then unmounted the
partition, and tried to dump it to another drive. This didn't work, dump 
got

an error about incorrect superblock. I then did a mount
-o ro /dev/ad1e /mnt and i'm getting an error Incorrect
superblock from mount. I then tried fsck /dev/ad1e and got the
same error msg. These partitions were formatted with ufs2 as their
filesystem. I then ran bsdlabel ad1 and got a printout of my label,
this showed up which gives me hope that this data can be retrieved.
An error i'm getting from bsdlabel says that the c: partition does not 
cover

the
entire disk and that may result in utilities not working correctly. Any
help appreciated.
   Some urgency!
Dave.


Sounds like you need to install ports/syutils/ffsrecov and spend some 
quality time with it tonight.


Scott 


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


Re: urgent, need to recover superblock!

2006-02-22 Thread Vasil Dimov
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, Feb 22, 2006 at 10:51:56PM -0500, Dave wrote:
 Hello,
Thank you for your reply. How would i go about doing this copy so i 
 could use a vnode on it? As i think i mentioned dump didn't like it. One 
 other thing i can mount the ad1a, ad1d, ad1f, and ad1g partitions just 
 fine, it's the ad1e partition only that is giving me the grief and that's 
 the one i need!
 Thanks.
 Dave.
 

dd if=/dev/ad1 of=file bs=1m
mdconfig -a -t vnode -f file
mdX gets outputed, then you can play with /dev/mdX using ffsrecov

- -- 
Vasil Dimov
-BEGIN PGP SIGNATURE-

iD8DBQFD/VVZFw6SP/bBpCARAm09AJ4gH4WvWfxByAajQHqwU8pquzWNsgCgrywt
ObFZt9EqNqZifqOH9PelEU4=
=FDql
-END PGP SIGNATURE-
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


volume serial number + volume label

2006-02-22 Thread andrew clarke
Hi,

How can I programmatically retrieve the volume serial number and
volume label of a removable disc in FreeBSD?  This is the same
information that's presented by issuing a dir command in Windows:

 Volume in drive D is FooBar
 Volume Serial Number is 58BB-96AA

This is for a small disk cataloguing program I'm writing in Python and
C++.

Thanks.

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


Re: volume serial number + volume label

2006-02-22 Thread Tod McQuillin

On Thu, 23 Feb 2006, andrew clarke wrote:

How can I programmatically retrieve the volume serial number and 
volume label of a removable disc in FreeBSD?  This is the same 
information that's presented by issuing a dir command in Windows:


Volume in drive D is FooBar
Volume Serial Number is 58BB-96AA


This information is only relevant for msdos filesystems, for which you'll 
likely find the emulators/mtools port provides good support.

--
Tod McQuillin

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