Re: Booting 2nd(!) FreeBSD installation sitting on same disk

2012-11-04 Thread Andre Albsmeier
On Sat, 03-Nov-2012 at 18:46:04 +0100, Mehmet Erol Sanliturk wrote:
 
 
 On Sat, Nov 3, 2012 at 9:54 AM, Andre Albsmeier 
 andre.albsme...@siemens.commailto:andre.albsme...@siemens.com wrote:
 For various reasons I have to use this disk layout:
 
 One harddisk with MBR and 3 slices on a i386 box:
 
 Slice 1: Windows XP :-(
 Slice 2: FreeBSD 7.4-STABLE V1
 Slice 3: FreeBSD 7.4-STABLE V2
 
 The MBR is configured as:
 
 options=packet,noupdate,nosetdrv
 default_selection=F2 (Slice 2)
 
 When booting, I can choose between:
 
 F1 Win
 F2 FreeBSD
 F3 FreeBSD
 
 However, when pressing F3, the system of slice 2(!) is
 loaded. This is due to the fact that boot1 always loads
 the first active FreeBSD slice ;-(.
 
 I have two possibilities to actually boot slice 3:
 
 1. Playing with currdev when loader(8) is loaded (or
using loader.conf of slice 2).
 
 2. Using boot0cfg to allow updating the MBR.
 
 1. is not really fexible and 2. means that the system
 remembers which slice was booted last (something I do
 not want).
 
 Is there no chance to actually honour the fact that F3 was
 pressed and boot from slice 3 without updating the MBR before?
 
 Thanks,
 
 -Andre
 
 
 There is the following port for managing boot selections :
 
 ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.0-release/Latest/grub2.tbz
 
 http://www.freshports.org/sysutils/grub2/

Well, I actually wanted to stick to FreeBSD's boot stuff...

-Andre
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Booting 2nd(!) FreeBSD installation sitting on same disk

2012-11-04 Thread Andre Albsmeier
On Sat, 03-Nov-2012 at 23:34:48 +0100, jb wrote:
 Andre Albsmeier Andre.Albsmeier at siemens.com writes:
 
  ... 
  However, when pressing F3, the system of slice 2(!) is  
  loaded. This is due to the fact that boot1 always loads
  the first active FreeBSD slice ;-(.
  ... 
  Is there no chance to actually honour the fact that F3 was
  pressed and boot from slice 3 without updating the MBR before?
 
 I do not know the story of active slice in FreeBSD, but I know that neither
 Windows nor Linux require active partitions (in their jargon) to boot from any
 more.

If course FreeBSD doesn't rely on being started from an active
slice. Otherwise playing with currdev in loader wouldn't work.
It is just boot1 which causes the problem since it always searches
the MBR partition (slice) table for the first active FreeBSD slice
and if it doesn't find one it starts over again and searches for
any FreeBSD slice.

The problem is that boot1 doesn't get the information which F-key
was pressed in boot0 directly. It does only in case you allow a
write-back of the MBR using -o update with boot0cfg.

I made an ugly hack for this by patching boot1 code of slice 3
in a way that it actually searches for IN(!)active partitions in
its first pass:

--- sys/boot/i386/boot2/boot1.S.ORI 2012-09-23 22:07:16.0 +0200
+++ sys/boot/i386/boot2/boot1.S 2012-11-05 07:16:29.0 +0100
@@ -151,7 +151,11 @@
jne main.3  # No
jcxz main.5 # If second pass
testb $0x80,(%si)   # Active?
+#ifdef AA_SKIP_ACTIVE_BSDSLICE
+   jz main.5   # No
+#else
jnz main.5  # Yes
+#endif
 main.3:add $0x10,%si   # Next entry
incb %dh# Partition
cmpb $0x1+PRT_NUM,%dh   # In table?


Since this code only sits in boot1 of slice 3 it just applies to
slice 3.

The proper fix would be to pass the information about the key pressed
in boot0 to boot1 directly via registers of by whatever means...

-Andre
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Booting 2nd(!) FreeBSD installation sitting on same disk

2012-11-03 Thread Andre Albsmeier
For various reasons I have to use this disk layout:

One harddisk with MBR and 3 slices on a i386 box:

Slice 1: Windows XP :-(
Slice 2: FreeBSD 7.4-STABLE V1
Slice 3: FreeBSD 7.4-STABLE V2

The MBR is configured as:

options=packet,noupdate,nosetdrv
default_selection=F2 (Slice 2)

When booting, I can choose between:

F1 Win
F2 FreeBSD
F3 FreeBSD

However, when pressing F3, the system of slice 2(!) is  
loaded. This is due to the fact that boot1 always loads
the first active FreeBSD slice ;-(.

I have two possibilities to actually boot slice 3:

1. Playing with currdev when loader(8) is loaded (or
   using loader.conf of slice 2).

2. Using boot0cfg to allow updating the MBR.
 
1. is not really fexible and 2. means that the system
remembers which slice was booted last (something I do
not want).
 
Is there no chance to actually honour the fact that F3 was
pressed and boot from slice 3 without updating the MBR before?
 
Thanks,
 
-Andre

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Hardware RAID controller questions - 3Ware vs RocketRaid

2010-03-29 Thread Andre Albsmeier
On Thu, 18-Mar-2010 at 09:37:32 +0100, Andy Wodfer wrote:
 Hi,
 We're setting up two backup servers where each server will have about 4TB of
 harddrives (for now) connected (4x1TB and 8x500GB drives). Last night we ran
 into trouble with the 3ware controllers we have (9650SE-8LPML) because we
 couldn't create a larger RAID5 than 1.99TB.

I can only speak for a 9690SA-8I, but this thing is amazing.
It handles FSs over 2TB pretty well:

twa0: 3ware 9000 series Storage Controller port 0xc800-0xc8ff mem 
0xfa00-0xfbff,0xfeaff000-0xfeaf irq 16 at device 0.0 on pci4
twa0: [ITHREAD]
twa0: INFO: (0x15: 0x1300): Controller details:: Model 9690SA-8I, 128 ports, 
Firmware FH9X 4.10.00.007, BIOS BE9X 4.08.00.002

And with 8 1TB in a RAID5 drives it gives me:
 
da0 at twa0 bus 0 target 0 lun 0
box:~diskinfo /dev/da0
/dev/da0512 624277248   13671727104 851025  255 63

-Andre

 
 We are going to use FreeBSD 8.0 and Bacula, but first we obviously need to
 create a working RAID.
 
 My questions are:
 
 - Are HighPoint RocketRaid controllers a good alternative to 3ware
 controllers? Are RocketRaid controllers true hardware RAID?
 
 - What should we look for in a RAID controller spec to see that it has
 support for larger than 2TB RAIDs?
 
 I've been looking at these:
 http://www.highpoint-tech.com/USA_new/series_rr2300.htm
 http://www.highpoint-tech.com/USA_new/series_rr3500.htm
 
 Any FreeBSD recommendations? Or perhaps for another 3ware controller?
 
 We're using SATAII drives.
 
 Thanks for your help!
 
 Best regards,
 Andreas
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

-- 
I am forced by company policy to use Micro$oft products.
I am not responsible for this choice and decline any
responsibility for any harm which may be caused by it.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Freebsd Built-in vacation program does not auto reply

2009-09-08 Thread Andre Albsmeier
On Fri, 04-Sep-2009 at 20:43:21 +0200, Andre Albsmeier wrote:
 On Thu, 16-Apr-2009 at 18:00:26 +, lyd mc wrote:
  Hi guys,
  
  Why Freebsd built-in vacation program (/usr/bin/vacation) does not auto 
  reply?
  
  I am using fresh installed Freebsd7.0 and 7.1. here is my configs.
 
 Did you solve the problem already? I had a similar issue and
 tracked it down to a really strange compiler bug...

In fact it's no compiler bug (I only discovered it by changing
the compiler options) but a problem in vacation.c.

-Andre
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Freebsd Built-in vacation program does not auto reply

2009-09-07 Thread Andre Albsmeier
[Please do not topquote]

On Tue, 08-Sep-2009 at 05:19:53 +, lyd mc wrote:
 Hi Andre,
 
 I haven't solve it yet. I use the one in the ports tree 
 (/usr/ports/mail/vacation) as my work around.
 
 Now I use sieve script for vacation notice.
 
 Do you have a patch? May be I can use it in the future... Thanks.

No, I have a workaround. Do you have the sources to
compile vacation yourself? Can you recompile it without

-O2 -fno-strict-aliasing

and try again? And then recompile it with

-O2

and try this again?

-Andre

 
 Best Regards,
 
 alyd
 
 --- On Sat, 9/5/09, Andre Albsmeier andre.albsme...@siemens.com wrote:
 
 From: Andre Albsmeier andre.albsme...@siemens.com
 Subject: Re: Freebsd Built-in vacation program does not auto reply
 To: lyd mc alydi...@yahoo.com
 Cc: freebsd-questions@freebsd.org
 Date: Saturday, September 5, 2009, 2:43 AM
 
 On Thu, 16-Apr-2009 at 18:00:26 +, lyd mc wrote:
  Hi guys,
  
  Why Freebsd built-in vacation program (/usr/bin/vacation) does not auto 
  reply?
  
  I am using fresh installed Freebsd7.0 and 7.1. here is my configs.
 
 Did you solve the problem already? I had a similar issue and
 tracked it down to a really strange compiler bug...
 
     -Andre
 
  
  Under the home directory of the user (alydio.mc)
  
  .forward
  ??? \alydio.mc, |/usr/bin/vacation alydio.mc
  
  .vacation.msg
  ?? Subject: On vacation message
  ?? From: alydio...@mydomain.com
  ?? I'm on vacation and will not be reading my mail for a while.
  ? Your mail will be dealt with when I return.
  .
  from postfix/sendmail logs:
  
  ...sniff
  ?(delivered to command: /usr/bin/vacation alydio.mc)
  
  after this nothing will happened... no errors no warnings...? 
  
  However the one I installed from ports (/usr/local/bin/vacation) works fine.
  
  
  I want to use the freebsd base vacation program.? 
  
  Please help.
  
  Thank you,
  alydiomc
  
  
        
 
 -- 
 Micro$oft: When will your system crash today?
 
 
 
   

-- 
Linux is only free if your time is worthless.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Freebsd Built-in vacation program does not auto reply

2009-09-04 Thread Andre Albsmeier
On Thu, 16-Apr-2009 at 18:00:26 +, lyd mc wrote:
 Hi guys,
 
 Why Freebsd built-in vacation program (/usr/bin/vacation) does not auto reply?
 
 I am using fresh installed Freebsd7.0 and 7.1. here is my configs.

Did you solve the problem already? I had a similar issue and
tracked it down to a really strange compiler bug...

-Andre

 
 Under the home directory of the user (alydio.mc)
 
 .forward
 ??? \alydio.mc, |/usr/bin/vacation alydio.mc
 
 .vacation.msg
 ?? Subject: On vacation message
 ?? From: alydio...@mydomain.com
 ?? I'm on vacation and will not be reading my mail for a while.
 ? Your mail will be dealt with when I return.
 .
 from postfix/sendmail logs:
 
 ...sniff
 ?(delivered to command: /usr/bin/vacation alydio.mc)
 
 after this nothing will happened... no errors no warnings...? 
 
 However the one I installed from ports (/usr/local/bin/vacation) works fine.
 
 
 I want to use the freebsd base vacation program.? 
 
 Please help.
 
 Thank you,
 alydiomc
 
 
   

-- 
Micro$oft: When will your system crash today?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


P2B-D and ACPI or SMB anyone?

2009-05-21 Thread Andre Albsmeier
Hi,

found this old P2B-D board with two 1GHz CPUs and don't want
to throw it away ;-)

Has anyone got it running with ACPI and without the interrupt
storm on irq20? Judging from old mailing list messages it was
blacklisted in 5.3 so ACPI got disabled but since it doesn't
in 6.4-STABLE the issues were possibly fixed and I am simply
too stupid...

Another thing is the SMB. I have lots of P2B and P2B-L boards
where the SMB is running fine (used by healthd). On this P2B-D
it doesn't even attach using the usual

device  smbus
device  intpm
device  smb

lines in the kernel.

This is the dmesg (without ACPI), nothing special to see. When
enabling ACPI we see an error about an interrupt storm on irq20
constantly...

Copyright (c) 1992-2008 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 is a registered trademark of The FreeBSD Foundation.
FreeBSD 6.4-STABLE #5: Wed May 20 11:58:13 CEST 2009
r...@server.ofw.tld:/src/obj-6/src/src-6/sys/cvsfix
Timecounter i8254 frequency 1193182 Hz quality 0
CPU: Intel Pentium III (1002.28-MHz 686-class CPU)
  Origin = GenuineIntel  Id = 0x686  Stepping = 6
  
Features=0x383fbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
real memory  = 536858624 (511 MB)
avail memory = 520503296 (496 MB)
MPTable: OEM0 PROD
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  1
 cpu1 (AP): APIC ID:  0
ioapic0: Assuming intbase of 0
ioapic0 Version 1.1 irqs 0-23 on motherboard
cpu0 on motherboard
cpu1 on motherboard
pcib0: MPTable Host-PCI bridge pcibus 0 on motherboard
pci0: PCI bus on pcib0
eccmon0: RAM ECC Monitor v0.01 on 8086:7190
eccmon0: Chipset (i440BX/ZX) ECC capability: ECC with hardware scrubber
eccmon0: Active mode: ECC with hardware scrubber
eccmon0: Bank  Size  Type  ILV  ECC
eccmon0:   0   128M   SDR   NY
eccmon0:   1   128M   SDR   NY
eccmon0:   2   128M   SDR   NY
eccmon0:   3   128M   SDR   NY
eccmon0: Total RAM detected: 512M
eccmon0: attached
pcib1: MPTable PCI-PCI bridge at device 1.0 on pci0
pci1: PCI bus on pcib1
pci1: display, VGA at device 0.0 (no driver attached)
isab0: PCI-ISA bridge at device 4.0 on pci0
isa0: ISA bus on isab0
pci0: mass storage, ATA at device 4.1 (no driver attached)
pci0: serial bus, USB at device 4.2 (no driver attached)
piix0: PIIX Timecounter port 0xe800-0xe80f at device 4.3 on pci0
Timecounter PIIX frequency 3579545 Hz quality 0
ahc0: Adaptec 29160 Ultra160 SCSI adapter port 0xd000-0xd0ff mem 
0xd680-0xd6800fff irq 18 at device 10.0 on pci0
ahc0: Bugs (0x0040): SCBCHAN_UPLOAD
ahc0: [GIANT-LOCKED]
aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs
em0: Intel(R) PRO/1000 Network Connection Version - 6.7.3 port 0xb800-0xb83f 
mem 0xd600-0xd601 irq 17 at device 11.0 on pci0
em0: Ethernet address: 00:07:e9:14:56:a6
orm0: ISA Option ROM at iomem 0xc-0xcefff on isa0
atkbdc0: Keyboard controller (i8042) at port 0x60,0x64 on isa0
atkbd0: AT Keyboard irq 1 on atkbdc0
atkbd0: [GIANT-LOCKED]
fdc0: Enhanced floppy controller at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fdc0: [FAST]
fd0: 1440-KB 3.5 drive on fdc0 drive 0
sc0: System console at flags 0x100 on isa0
sc0: VGA 9 virtual consoles, flags=0x300
vga0: Generic ISA VGA at port 0x3b0-0x3df iomem 0xa-0xb on isa0
uart0: 16550 or compatible at port 0x3f8-0x3ff irq 4 on isa0
uart1: 16550 or compatible at port 0x2f8-0x2ff irq 3 on isa0
unknown: PNP0700 can't assign resources (port)
unknown: PNP0c01 can't assign resources (memory)
unknown: PNP0303 can't assign resources (port)
unknown: PNP0c02 can't assign resources (port)
Timecounters tick every 10.000 msec
da0 at ahc0 bus 0 target 0 lun 0
da0: SEAGATE ST39175LW 0001 Fixed Direct Access SCSI-2 device 
da0: 40.000MB/s transfers (20.000MHz, offset 15, 16bit), Tagged Queueing Enabled
da0: 8683MB (17783240 512 byte sectors: 255H 63S/T 1106C)
da1 at ahc0 bus 0 target 1 lun 0
da1: QUANTUM XP39100S LYK8 Fixed Direct Access SCSI-2 device 
da1: 20.000MB/s transfers (20.000MHz, offset 31), Tagged Queueing Enabled
da1: 8682MB (17781520 512 byte sectors: 255H 63S/T 1106C)
da2 at ahc0 bus 0 target 2 lun 0
da2: SEAGATE ST318404LW 3251 Fixed Direct Access SCSI-3 device 
da2: 160.000MB/s transfers (80.000MHz, offset 63, 16bit), Tagged Queueing 
Enabled
da2: 17501MB (35843670 512 byte sectors: 255H 63S/T 2231C)
da3 at ahc0 bus 0 target 3 lun 0
da3: SEAGATE ST318404LW 3251 Fixed Direct Access SCSI-3 device 
da3: 160.000MB/s transfers (80.000MHz, offset 63, 16bit), Tagged Queueing 
Enabled
da3: 17501MB (35843670 512 byte sectors: 255H 63S/T 2231C)
SMP: AP CPU #1 Launched!
cd0 at ahc0 bus 0 target 6 lun 0
cd0: TOSHIBA CD-ROM XM-6201TA 1400 Removable CD-ROM SCSI-2 device 
cd0: 10.000MB/s transfers (10.000MHz, offset 16)
cd0: Attempt to query device size failed: NOT READY, Medium not present
Trying to mount root 

Re: P2B-D and ACPI or SMB anyone?

2009-05-21 Thread Andre Albsmeier
On Thu, 21-May-2009 at 08:44:00 -0400, Michael Powell wrote:
 Andre Albsmeier wrote:
 
  Hi,
  
  found this old P2B-D board with two 1GHz CPUs and don't want
  to throw it away ;-)
  
  Has anyone got it running with ACPI and without the interrupt
  storm on irq20? Judging from old mailing list messages it was
  blacklisted in 5.3 so ACPI got disabled but since it doesn't
  in 6.4-STABLE the issues were possibly fixed and I am simply
  too stupid...
  
 [snip]
 
 What you may want to check is the BIOS revision. Easy enough to flash it 
 with the latest released bits if there is something newer than what you've 
 got currently.

Done that already. I run the latest V14beta3 (whose counterpart
I also run on the UP boxes for the purpose of Tualatin support)...

-Andre
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: SCSI errors with Adaptec 2200S RAID

2004-08-05 Thread Andre Albsmeier
On Tue, 03-Aug-2004 at 23:31:52 -0400, [EMAIL PROTECTED] wrote:
 
 Please cc replies directly to me, as I am not subscribed to the lists.
 
 With some help from here, I was able to get this RAID card to see our
 external DLT (QUANTUM 4000) SCSI tape drive by installing the aacp (pass
 through) driver in addition to the aac driver.  camcontrol now works, as
 do basic mt commands and amcheck (amanda check).
 
 However, (amanda) dumps either hang, fail completely or fail after
 transfering very little data.  On the console, I see:
 
 (sa0:aacp1:0:4:0): READ(06). CDB8 0 0 0 20 0 0
 (sa0:aacp1:0:4:0): NO SENSE ILI (length mismatch): -24576 csi:0,0,0,1
 
 At this point the device is completely unresponsive, and the only way to
 get the system to see it again is to reboot the whole server.  I tried
 ordering a 3 ft cable, thinking I was pushing my luck with the 6 ft (I've
 had this problem with SCSI cables in the past), but the problem persists.
 
 The same drive (which has an active terminator) has been working fine for
 years on a different box using an Intel L440GX+ MB's on-board SCSI port.
 
 Once again, any helpful replies are greatly appreciated!

Are you sure you are running a recent fw on your DLT4k? My DLTs
used to behave badly with early fw revisions. Check out

http://www.quantum.com/am/service_support/downloads/software/dlt4000.htm

You can upgrade it by tape or use my software for updating the fw of
SCSI devices on FreeBSD.

-Andre

 
 James Smallacombe   PlantageNet, Inc. CEO and Janitor
 [EMAIL PROTECTED] http://3.am
 =
 
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-isp
 To unsubscribe, send any mail to [EMAIL PROTECTED]

-- 
Regression testing? What's that? If it compiles,
it is good, if it boots up, it is perfect.
 - Linus Torvalds
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 3D with MGA on XFree86 4.3.0 / 5.0-RELEASE?

2003-03-13 Thread Andre Albsmeier
On Thu, 13-Mar-2003 at 13:32:21 +0100, Gary Jennejohn wrote:
 Glenn Johnson writes:
  On Wed, Mar 12, 2003 at 03:38:02PM -0800, J. Kanowitz wrote:
   With 4.3.0, I've not seen the usual reminder about the driver, and
   blindly specifying WITH_MATROX_GXX_DRIVER (without bothering to pore
   over the build output; see previous comment on 'lazy') doesn't do the
   trick:
  
  No, it is not an option for XFree86-4.3.  Matrox has not made an updated
  version available yet.  I am not sure if the current code from Matrox
  will build with XFree86-4.3 but that would leave you with an older mga
  driver.  I would guess that Matrox will eventually update their driver
  but unless you are running multi-displays you probably do not need it.
  
 
 I'm using a G450 with a TFT which makes using the HAL necessary. I
 merely copied the old mga_hal_drv.o from 4.2.1 and it works just fine.

It is also needed for TV-Out support on the G400-DH.

-Andre

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


How to truncate a file in the beginning

2002-12-13 Thread Andre Albsmeier
Are there any special features in FreeBSD that I can use
to truncate a file in the beginning?

Let's assume I have a 50GB file. Only the last 10GB are
interesting for me and I have to free the first 40GB for
some reason. Of course, I could seek to the appropriate
position and copy the 10GB to a new file and unlink the
old one. The problem is that I don't have a lot of time
to do this so I am looking for something like ftruncate()
but for the beginning...

Any ideas?

Thanks,

-Andre

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: How to truncate a file in the beginning

2002-12-13 Thread Andre Albsmeier
On Fri, 13-Dec-2002 at 08:15:22 -0500, Gerald T. Freymann wrote:
 On Fri, 13 Dec 2002, Andre Albsmeier wrote:
 
  Are there any special features in FreeBSD that I can use
  to truncate a file in the beginning?
 
  Sure.
 
  man split
 
  should do it!

Don't think so... from the split manpage:

 The split utility reads the given file and breaks it up into files of
 1000 lines each.  If file is a single dash (`-') or absent, split reads
 from the standard input.
 ...

Maybe my email wasn't very clear regarding this: I can't afford to
read the 10GB (or even more) and move them to a new file (this would
have to be done on the same disk so it would take too long). I need
something that moves the start of the file to a position within the
file and discard all bytes upto that position.

I had a look at split.c but it does exactly that what I don't
need: It reads and writes...

-Andre

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: How to truncate a file in the beginning

2002-12-13 Thread Andre Albsmeier
On Fri, 13-Dec-2002 at 05:41:41 -0800, David Schultz wrote:
 Thus spake Andre Albsmeier [EMAIL PROTECTED]:
  Are there any special features in FreeBSD that I can use
  to truncate a file in the beginning?
  
  Let's assume I have a 50GB file. Only the last 10GB are
  interesting for me and I have to free the first 40GB for
  some reason. Of course, I could seek to the appropriate
  position and copy the 10GB to a new file and unlink the
  old one. The problem is that I don't have a lot of time
  to do this so I am looking for something like ftruncate()
  but for the beginning...
 
 Nope, you have to copy the data.  Technically something like this
 could be implemented by copying metadata only, but it would only
 work if the amount you want to snip is a multiple of the
 filesystem's block size.  However, it's a lot of work for a rather
 uncommon case; even ftruncate() is used infrequently.  Perhaps you
 could devise a scheme for striping your data across multiple 10GB
 files.

Hmm, that's bad news :-). Thanks anyway, now I know that I have
to figure out something differently. Maybe I will create lots
of, let's say, 100MB files and manage them myself...

Thanks,

-Andre

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: mounting smbfs at boot time

2002-11-07 Thread Andre Albsmeier
On Tue, 05-Nov-2002 at 11:10:59 -0800, Rotaru Razvan wrote:
 Hello,
 
 well when I said ~/.nsmbrc i meant also /root/.nsmbrc. Still i doesn't
 work for me, but then again my method with the daemon-like startup
 script in /usr/local/etc/rc.d is unusual. /usr/local/etc/nsmb.conf
 doesn't even work work even with a normal mount_smbfs command with -N.

I don't have the machine handy at the moment (I am on holidays) but
IIRC, this is what I do:

1. I have the filesystems in /etc/fstab:

   //user@machine/apps/smbfs/appssmbfs   noauto,rw 0 0

2. I have the appropriate entries in /etc/nsmb.conf (NOT in /usr/local)

3. I have a script in /usr/local/etc/rc.d which mainly does this

   /sbin/mount -o -N,-R3,-cl /smbfs/apps

It is a bit more complicated here since I have to traverse a firewall
and my script also tests the availability of the servers. It also
scans /etc/fstab to automatically mount every smbfs in there.

However, IMO, the ideal solution would be to teach amd about smbfs
but I don't know enough about amd :-( Maybe one day I will have
time to dig into this...

-Andre

 
 Can you tell me how do you mount your shares at boot time? or at least
 can i see your /etc/fstab file ?
 
 Regards,
 Razvan
 
 --- Andrew Brampton [EMAIL PROTECTED] wrote:
  I'm a freeBSD newbie, but I found a solution to your problem, I
  appear to
  have a /root/.nsmbrc file with passwords in which are used to mount
  my
  shares at boot time. But if you can't use this file then try
  /usr/local/etc/nsmb.conf which is a default of some kind.
  
  Hope this helps :)
  Andrew
  - Original Message -
  From: Rotaru Razvan [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, November 05, 2002 5:36 PM
  Subject: mounting smbfs at boot time
  
  
   Hello,
  
   Well here is what i want to ask:
   I want to mount a smbfs at boot time. Editing /etc/fstab won't do
   because filesystems are mounted before network initalisation. The
   noauto option doesn't help (it doesn't mount at boottime, neither
  on
   'mount -a' ; by the way why should anyone enter a filesystem in
  fstab
   with the noauto option?!?! doesn't make any sense).
   Next thing i tried is to make a daemon-like startup script (in
   /usr/local/etc/rc.d ) that actually doesn't start any daemon, but
   mounts my partition when called with 'start' parameter and unmounts
   when called with 'stop' parameter. The problem is i have to call in
   this script a mount_smbfs command with the -N option (it should not
  ask
   for my smb password on boot time). Well with this option
  mount_smbfs
   looks in ~/.nsmbrc for a password. Apparently on boot time (when
   initializing local services) the deamon startup scripta do not run
  as
   root (i doubt they run as any user that has a home directory) so
  there
   is no way of supplying this .nmbrc file to mount_smbfs.
  
   Well for now am i out of ideas. Maybe you have a more simple
  solution.
   Thanks anyway for the attention.
   Razvan
  
  
   __
   Do you Yahoo!?
   HotJobs - Search new jobs daily now
   http://hotjobs.yahoo.com/
  
   To Unsubscribe: send mail to [EMAIL PROTECTED]
   with unsubscribe freebsd-questions in the body of the message
  
  
 
 
 __
 Do you Yahoo!?
 HotJobs - Search new jobs daily now
 http://hotjobs.yahoo.com/
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-questions in the body of the message

-- 
Win98: useless extension to a minor patch release for 32-bit extensions and
   a graphical shell for a 16-bit patch to an 8-bit operating system
   originally coded for a 4-bit microprocessor, written by a 2-bit
   company that can't stand for 1 bit of competition.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Directory structure for commercial products

2002-10-10 Thread Andre Albsmeier

On Thu, 10-Oct-2002 at 15:19:26 +0300, Serban Mihai wrote:
 Hi,
 I'm looking for a standard/official specification for the filesystem 
 hierarchy used on FreeBSD (and all BSDs) regarding commercial products.
 
 Conforming to hier(7) the PREFIX (/usr/local) location should be used 
 for local packages. And there the /usr hierarchy should be used.
 Let's suppose I have to install a commercial product named 'foo'. The 
 package contains binaries, libraries, logs, UNIX sockets, temporary 
 files, configuration files and periodically updated data files.
 Does the following directory structure conform to standards?
 PREFIX/foo/{bin, lib, etc, tmp, log, data, run...}
 
 or should it be:
 PREFIX/bin/foo
 PREFIX/lib/foo
 PREFIX/etc/foo
 PREFIX/libdata/foo/{tmp, log, data, run..}?
 
 Is there any other solution? I will greatly appreciate your help.

One thing to observe is, that some people like to mount their /usr
read-only. This might be a reason to put the tmp and log data
into /var (instead of /usr/local/...). Samba, for example, puts
its temporary data in /var. This might especially be true for
servers.

-Andre

 
 Best regards.
 
 Mihai Serban
 AV Development Manager
 GeCAD Software / RAV Division
 
 
 
 This mail was scanned by RAV AntiVirus
 on behalf of GeCAD Software.
 
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-questions in the body of the message

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: How to configure refclock-0 with MAKEDEV ?

2002-10-09 Thread Andre Albsmeier

On Wed, 09-Oct-2002 at 15:51:43 +0200, Frank Bonnet wrote:
 Hi
 
 I have a DCF77 gude receiver 
 I run ntpd with RAWDCF 
 
 I looked into MAKEDEV script with mention refclock-* statement
 but I cannot generate such device file with MAKEDEV.
 
 Does someone could give me the exact syntax to generate such
 device file ?

Since I assume that your DCF receiver is attached to a serial
port on your machine (mine is), I would do a

cd /dev; ln -s cuaax refclock-0

where x corresponds to the number of your serial port and
assuming the cuaax device is already in there.

-Andre

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message