Re: Increasing partition size by removing partitions
> I have a disk that is laid out with partion 0 being NTFS and 1 > being FreeBSD. I want to remove the NTFS partition and grow the > FreeBSD one but all the docs I have seen only talk about how to > do this if the new part of the partition is at the end of the > partition you wish to grow. How do I go about this? Partition Commander is aware of *BSD partitions and should be able to do this. (Granted it is payware.) Delete the NTFS partition, move the FreeBSD partition (slice in FreeBSD parlance) to the beginning of the drive, boot into FreeBSD to make sure everything is working, then go ahead with the grow operation as usual. As always, it's highly recommended to make a full backup first. Having done that, it may be easier to reslice the disk as FreeBSD only and then restore the backup. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Increasing partition size by removing partitions
On Sat, Sep 27, 2008 at 7:22 PM, Aryeh M. Friedman <[EMAIL PROTECTED]> wrote: > I have a disk that is laid out with partion 0 being NTFS and 1 being > FreeBSD. I want to remove the NTFS partition and grow the FreeBSD one but > all the docs I have seen only talk about how to do this if the new part of > the partition is at the end of the partition you wish to grow. How do I go > about this? Assuming that there is no (free) software that will do it for you, and you are unable for some reason to move the data to another place and repartition the drive, you have to manually move your FreeBSD partition back and then extend it. I've never done this before, but if I had to try it the first time I would do the following: 1. Try very hard to find some other hard drive where I can just dump the data and avoid this whole thing to begin with. :) 2. Boot from a FreeBSD livecd, attach a usb drive for storing some temporary files and mount it under /mnt. 3. Create a back-up of your master boot record (dd if=/dev/ad0 of=/mnt/mbr-backup bs=512 count=1). Assuming here that your drive is ad0. 4. Use fdisk to get the start and size values of your two partitions (in sectors). 5. Erase the ntfs partition (dd if=/dev/zero of=/dev/ad0s1 bs=2m). 6. Copy your FreeBSD partition to the former start location of ntfs (dd if=/dev/ad0 of=/dev/ad0 bs=512 iseek= oseek= count=). Using bs=512 is slow, but it makes it easier for you to just take the numbers that fdisk gives you and plug them in. 7. Once this is done you will need to edit your mbr sector to overwrite the first partition entry with the second, but certain fields will need to be updated... I recommend you use a hex editor and work on the file that you saved in step 3. You can try the same thing with a partition editor, but you may not get the desired results. For the manual (and more fun) method, the partition table begins at offset 0x01BE, and each entry is 16 bytes long. That means that you need to copy 16 bytes starting at address 0x01CE to address 0x01BE. However, before you do this, you need to set the correct values for cylinder-head-sector of first and last sectors in the FreeBSD partition, as well as the logical address of the first sector. First, take 3 bytes starting at address 0x01BF and copy them to 0x01CF. This takes care of CHS start, which is unchanged. Next, take 4 bytes at address 0x01C6 and copy them to 0x01D6. This is the logical sector start. The tricky bit is the CHS last sector value. If your two partitions were of identical size, then you can copy 3 bytes from 0x01C3 to 0x01D3. Otherwise, you'll need to calculate the new values by hand. If your NTFS partition was marked as active before, then set byte 0x01CE to be 0x80. One this is done, copy that second record over the first and zero-out the 16 bytes at 0x01CE. Use dd again to copy the updated mbr sector to your drive. At this point your master boot record will have the correct entry for your FreeBSD partition, which was moved over the NTFS one. See if you can mount /dev/ad0s1a while still in the livecd environment (actually, you will need to reboot first). If ad0s1a is under /dev and you can mount it, then your mbr is fine. Use growfs from here and then boot from the hard drive. As you can see, it's not a trivial thing to do, but it's possible if you are careful. Once again, I've never done this and am basing the whole thing on some of my previous experience in messing with the master boot record. There may be some other things that I missed. I also don't know if there is existing software that might make this whole process much easier, the directions here are a worst-case scenario for moving your partition by hand. - Max ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Problem Protecting Directories Securly
My buddy helped me install Apache Webserver but there is somthing wrong when I try to password protect my directories? I already created '.htaccess' & 'htpasswd' and but I still cannot password protect the directory... I know there is a command to do this 'htpasswd -c .htpasswd' fred but it dosn't work. Please help me... ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Increasing partition size by removing partitions
On Sat, Sep 27, 2008 at 07:22:20PM -0400, Aryeh M. Friedman wrote: > I have a disk that is laid out with partion 0 being NTFS and 1 being > FreeBSD. I want to remove the NTFS partition and grow the FreeBSD one > but all the docs I have seen only talk about how to do this if the new > part of the partition is at the end of the partition you wish to grow. > How do I go about this? There isn't a way to do this, as far as I know. -- | Jeremy Chadwickjdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Increasing partition size by removing partitions
I have a disk that is laid out with partion 0 being NTFS and 1 being FreeBSD. I want to remove the NTFS partition and grow the FreeBSD one but all the docs I have seen only talk about how to do this if the new part of the partition is at the end of the partition you wish to grow. How do I go about this? ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: bad NFS/UDP performance
Danny Braniss wrote: I know, but I get about 1mgb, which seems somewhat low :-( If you don't tell iperf how much bandwidth to use for a UDP test, it defaults to 1Mbps. See -b option. http://dast.nlanr.net/projects/Iperf/iperfdocs_1.7.0.php#bandwidth --eli -- Eli Dart ESnet Network Engineering Group Lawrence Berkeley National Laboratory PGP Key fingerprint = C970 F8D3 CFDD 8FFF 5486 343A 2D31 4478 5F82 B2B3 ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: ports/126853: ports-mgmt/portaudit: speed up audit of installed packages
Have you also posted this to [EMAIL PROTECTED] rik Eygene Ryabinkin wrote: Good day. A while ago I had created the new utility that serves as VuXML filter for the installed packages: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/126853 My primary intention was to speed up the process of auditing the vulnerable ports: I needed to run portaudit checks with Nagios and to avoid large timeouts. The new utility is called pkg_audit and it serves as a simple text filter: on input it takes the full VuXML feed and on output it puts VuXML entries that matches ports that are installed in the system with port version specification substituted with the actual port versions. No harm is done to the actual poartudit -- if pkg_audit is missing, old code path is activated. If someone is interested and will be able to test -- I am all ears. Thanks! ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: freebsd-update missed?
On 20080927 04:38:53, Colin Percival wrote: > I missed the beginning of this thread, but looking back in the archives... > > 1. I'm very confident that FreeBSD Update is distributing the updated > libpthread.so. Right. > 2. If you run ident on the libpthread.so.2 which FreeBSD Update distributes, > or look at the src/lib/libpthread/thread/thr_kern.c which FreeBSD Update > distributes, you'll see the old 1.116.2.1 RCS number. This is because > FreeBSD Update mimics "start with the released source code and then apply > the patches which are signed by the FreeBSD Security Officer" without a > detour through CVS -- that detour through CVS would be impossible, in fact, > since we build the binary updates before doing CVS (oops, SVN) commits. Ok! > 3. If you want to check that you have the latest libpthread.so for FreeBSD > 6.3, `sha256 /lib/libpthread.so.2` on an i386 system should print > SHA256 (/lib/libpthread.so.2) = > ff3fc6111331d5b64f939117daef176cc5c511362786ed6325a2333848e80573 Yes, seems I have the patched version. > 4. If your system claims to be running 6.3-RELEASE-p1 but says that there > are no updates needed to update to 6.3-RELEASE-p4, it probably means that > you installed the updated kernel which came with 6.3-RELEASE-p4 but you > haven't rebooted yet. That seems pretty likely. I tend to reboot on power outages when the UPS doesn't hold out... Thanks for this info. -- xw ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: freebsd-update missed?
[EMAIL PROTECTED] wrote: I've CCd in cperciva@ to see what he thinks... I missed the beginning of this thread, but looking back in the archives... 1. I'm very confident that FreeBSD Update is distributing the updated libpthread.so. 2. If you run ident on the libpthread.so.2 which FreeBSD Update distributes, or look at the src/lib/libpthread/thread/thr_kern.c which FreeBSD Update distributes, you'll see the old 1.116.2.1 RCS number. This is because FreeBSD Update mimics "start with the released source code and then apply the patches which are signed by the FreeBSD Security Officer" without a detour through CVS -- that detour through CVS would be impossible, in fact, since we build the binary updates before doing CVS (oops, SVN) commits. 3. If you want to check that you have the latest libpthread.so for FreeBSD 6.3, `sha256 /lib/libpthread.so.2` on an i386 system should print SHA256 (/lib/libpthread.so.2) = ff3fc6111331d5b64f939117daef176cc5c511362786ed6325a2333848e80573 4. If your system claims to be running 6.3-RELEASE-p1 but says that there are no updates needed to update to 6.3-RELEASE-p4, it probably means that you installed the updated kernel which came with 6.3-RELEASE-p4 but you haven't rebooted yet. Colin Percival ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: bad NFS/UDP performance
> On Fri, 26 Sep 2008, Danny Braniss wrote: > > > after more testing, it seems it's related to changes made between Aug 4 and > > Aug 29 ie, a kernel built on Aug 4 works fine, Aug 29 is slow. I'l now try > > and close the gap. > > I think this is the best way forward -- skimming August changes, there are a > number of candidate commits, including retuning of UDP hashes by mav, my > rwlock changes, changes to mbuf chain handling, etc. it more difficult than I expected. for one, the kernel date was missleading, the actual source update is the key, so the window of changes is now 28/July to 19/August. I have the diffs, but nothing yet seems relevant. on the other hand, I tried NFS/TCP, and there things seem ok, ie the 'good' and the 'bad' give the same throughput, which seem to point to UDP changes ... danny ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: freebsd-update missed?
On 20080927 13:15:15, Simon L. Nielsen wrote: > Errata's are distributed with freebsd-update just like advisories. > > Since freebsd-update 2 (the one in the base system) /usr/src is also > updated if it exists. That said, note that freebsd-update does not > get's patches from CVS so $FreeBSD$ unfortunatly isn't updated. > > I just checked, for 6.3 the patch 'EN-08:01.libpthread' is on the > freebsd-update build server. So for now, at least, I have to assume that I do have the patched library and the problem is either still occuring for some unknown reason or this is a new issue with the same or at least similar symptoms. I unfortunately don't have access to anything running > 6.3, so I'll need to set up another box with 7.0 to see if the same thing still occurs. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: freebsd-update missed?
On 20080927 03:59:28, Jeremy Chadwick wrote: > On Sat, Sep 27, 2008 at 10:17:33AM +0100, [EMAIL PROTECTED] wrote: > > The man page for it states that it's a binary updater for pieces in the > base system, so you looking at your *source* files would indicate > absolutely nothing, other than when you last ran csup to update your > /usr/src tree. > > I do not know of a way to verify if your libpthread library actually > contains the fix. We will have to wait for Colin's answer. For the record, I was using ident (1), which I thought was supposed to give me exactly that: $ ident /usr/lib/libpthread.so /usr/lib/libpthread.so: $FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.116.2.1 2006/03/16 23:29:07 deischen Exp $ Perhaps patches don't change this value (seems wrong)? -- xw ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: freebsd-update missed?
On 2008.09.27 03:59:28 -0700, Jeremy Chadwick wrote: > The advisory explicitly goes over what files were changed, and what > revisions include the fix. The below versions include the fix. If you > have older versions, then the answer is no, you do not have the fix. > > http://security.freebsd.org/advisories/FreeBSD-EN-08:01.libpthread.asc > > src/UPDATING 1.416.2.37.2.6 > src/sys/conf/newvers.sh 1.69.2.15.2.5 > src/lib/libpthread/sys/lock.c 1.9.2.1.8.1 > src/lib/libpthread/thread/thr_kern.c 1.116.2.1.6.1 > > These are for CVS tag RELENG_6_3. > > I do not use freebsd-update. That said: > > The man page for it states that it's a binary updater for pieces in the > base system, so you looking at your *source* files would indicate > absolutely nothing, other than when you last ran csup to update your > /usr/src tree. > > I do not know of a way to verify if your libpthread library actually > contains the fix. We will have to wait for Colin's answer. Errata's are distributed with freebsd-update just like advisories. Since freebsd-update 2 (the one in the base system) /usr/src is also updated if it exists. That said, note that freebsd-update does not get's patches from CVS so $FreeBSD$ unfortunatly isn't updated. I just checked, for 6.3 the patch 'EN-08:01.libpthread' is on the freebsd-update build server. -- Simon L. Nielsen Hat: FreeBSD Deputy Security Officer (IE, one of the people making freebsd-update builds) ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: freebsd-update missed?
On Sat, Sep 27, 2008 at 10:17:33AM +0100, [EMAIL PROTECTED] wrote: > On 20080927 00:07:57, Julian Elischer wrote: > > I'm sure it's there.. > > it may be a different problem of course. > > > > I don't know... Checking with ident gives: > > $FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.116.2.1 2006/03/16 > 23:29:07 deischen Exp $ > > The patch claims "1.116.2.1.6.1" > > Are these the same revisions? > > I mean, if I can determine that I definitely have the patch, then I have > another > problem to worry about! The advisory explicitly goes over what files were changed, and what revisions include the fix. The below versions include the fix. If you have older versions, then the answer is no, you do not have the fix. http://security.freebsd.org/advisories/FreeBSD-EN-08:01.libpthread.asc src/UPDATING1.416.2.37.2.6 src/sys/conf/newvers.sh 1.69.2.15.2.5 src/lib/libpthread/sys/lock.c 1.9.2.1.8.1 src/lib/libpthread/thread/thr_kern.c1.116.2.1.6.1 These are for CVS tag RELENG_6_3. I do not use freebsd-update. That said: The man page for it states that it's a binary updater for pieces in the base system, so you looking at your *source* files would indicate absolutely nothing, other than when you last ran csup to update your /usr/src tree. I do not know of a way to verify if your libpthread library actually contains the fix. We will have to wait for Colin's answer. -- | Jeremy Chadwickjdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: SSH Tunneling All TCP Traffic
On Sat, 27 Sep 2008, Mike Price wrote: I need to tunnel all of my TCP SSH-2 traffic from my local box to my remote box that I will have an account on. I heard this can be done in one command? ssh -f [EMAIL PROTECTED] -L :lab.com:53 -N SOCKS: SSH2: 53 If you want you use SOCKS use -D option instead of individual TCP connection forwading. However you need SOCKS capable client. Regards, Janos Mohacsi What am I doing wrong? ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: bad NFS/UDP performance
On Fri, 26 Sep 2008, Danny Braniss wrote: after more testing, it seems it's related to changes made between Aug 4 and Aug 29 ie, a kernel built on Aug 4 works fine, Aug 29 is slow. I'l now try and close the gap. I think this is the best way forward -- skimming August changes, there are a number of candidate commits, including retuning of UDP hashes by mav, my rwlock changes, changes to mbuf chain handling, etc. Thanks, Robert N M Watson Computer Laboratory University of Cambridge ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
SSH Tunneling All TCP Traffic
I need to tunnel all of my TCP SSH-2 traffic from my local box to my remote box that I will have an account on. I heard this can be done in one command? ssh -f [EMAIL PROTECTED] -L :lab.com:53 -N SOCKS: SSH2: 53 What am I doing wrong? ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: freebsd-update missed?
On 20080927 00:07:57, Julian Elischer wrote: > I'm sure it's there.. > it may be a different problem of course. > I don't know... Checking with ident gives: $FreeBSD: src/lib/libpthread/thread/thr_kern.c,v 1.116.2.1 2006/03/16 23:29:07 deischen Exp $ The patch claims "1.116.2.1.6.1" Are these the same revisions? I mean, if I can determine that I definitely have the patch, then I have another problem to worry about! ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: bad NFS/UDP performance
> --==_Exmh_1222467420_5817P > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > David, > > You beat me to it. > > Danny, read the iperf man page: >-b, --bandwidth n[KM] > set target bandwidth to n bits/sec (default 1 Mbit/sec). This > setting requires UDP (-u). > > The page needs updating, though. It should read "-b, --bandwidth > n[KMG]. It also does NOT require -u. If you use -b, UDP is assumed. I did RTFM(*), but when i tried it just wouldn't work, I tried today and it's actually working - so don't RTFM before coffee! btw, even though iperf sucks, netperf udp tends to bring the server down to it's knees. danny PS: * - i don't seem to have the iperf man, all I have is iperf -h ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: bad NFS/UDP performance
:how can I see the IP fragment reassembly statistics? : :thanks, : danny netstat -s Also look for unexpected dropped packets, dropped fragments, and errors during the test and such, they are counted in the statistics as well. -Matt Matthew Dillon <[EMAIL PROTECTED]> ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: bad NFS/UDP performance
> > :>-vfs.nfs.realign_test: 22141777 > :>+vfs.nfs.realign_test: 498351 > :> > :>-vfs.nfsrv.realign_test: 5005908 > :>+vfs.nfsrv.realign_test: 0 > :> > :>+vfs.nfsrv.commit_miss: 0 > :>+vfs.nfsrv.commit_blks: 0 > :> > :> changing them did nothing - or at least with respect to nfs throughput :-) > : > :I'm not sure what any of these do, as NFS is a bit out of my league. > ::-) I'll be following this thread though! > : > :-- > :| Jeremy Chadwickjdc at parodius.com | > > A non-zero nfs_realign_count is bad, it means NFS had to copy the > mbuf chain to fix the alignment. nfs_realign_test is just the > number of times it checked. So nfs_realign_test is irrelevant. > it's nfs_realign_count that matters. > it's zero, so I guess I'm ok there. funny though, on my 'good' machine, vfs.nfsrv.realign_test: 5862999 and on the slow one, it's 0 - but then again the good one has been up for several days. > Several things can cause NFS payloads to be improperly aligned. > Anything from older network drivers which can't start DMA on a > 2-byte boundary, resulting in the 14-byte encapsulation header > causing improper alignment of the IP header & payload, to rpc > embedded in NFS TCP streams winding up being misaligned. > > Modern network hardware either support 2-byte-aligned DMA, allowing > the encapsulation to be 2-byte aligned so the payload winds up being > 4-byte aligned, or support DMA chaining allowing the payload to be > placed in its own mbuf, or pad, etc. > > -- > > One thing I would check is to be sure a couple of nfsiod's are running > on the client when doing your tests. If none are running the RPCs wind > up being more synchronous and less pipelined. Another thing I would > check is IP fragment reassembly statistics (for UDP) - there should be > none for TCP connections no matter what the NFS I/O size selected. > ahh, nfsiod, it seems that it's now dynamicaly started! at least none show when host is idle, after i run my tests there are 20! with ppid 0 need to refresh my NFS knowledge. how can I see the IP fragment reassembly statistics? > (It does seem more likely to be scheduler-related, though). > tend to agree, I tried bith ULE/BSD, but the badness is there. > -Matt > thanks, danny ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: freebsd-update missed?
[EMAIL PROTECTED] wrote: On 20080927 01:06:22, Daniel Eischen wrote: It's not security related, so I don't know whether it would be in a binary update. You should follow the procedure listed in the links above. I'm not sure either. In every description I see of freebsd-update, there's a claim that it installs "binary security and errata updates". I only use freebsd-update to update my machines and I was under the impression that I've been getting errata updates too. Could this have been missed on the system used to build updates? I'd be surprised, but you know, these things happen. I've CCd in cperciva@ to see what he thinks... -- xw ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" I'm sure it's there.. it may be a different problem of course. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"