?

Log in

FreeBSD Community
 
[Most Recent Entries] [Calendar View] [Friends]

Below are the 20 most recent journal entries recorded in FreeBSD Community's LiveJournal:

[ << Previous 20 ]
Tuesday, February 3rd, 2015
4:23 am
[r0b_rod]
Seriously?
3 years and not one single soul has
shared any FreeBSD? Let's rekindle
that smoky fire people!!

Current Mood: surprised
Saturday, July 14th, 2012
8:35 pm
[velesov]
FreeBSD 9 in Windows Virtual PC
Has anyone of you sucessfully installed FreeBSD 9 amd64 on Windows Ultimate 7 x64 in WIndows Virtual PC? If you have, please do tell.
Wednesday, January 12th, 2011
9:58 pm
[cowbert]
ZFS root funkiness on 8.2-RC1
So I modified a set of Pawel's ZFS-root dataset layout here:
http://blogs.freebsdish.org/pjd/2010/08/06/from-sysinstall-to-zfs-only-configuration/

But since I was using raidz, I merged that setup with the installation-from-fixit onto root ZFS instructions in the wiki here
SEE STEP 2.2:
http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/RAIDZ1

Reboot and system comes up. However, none of my zfs filesystems are mounted through legacy mount:

on boot, all mount shows is:
zroot/root on / (zfs,local,noatime)
devfs on /dev (devfs, local, multilabel)


I have to manually invoke zfs mount -a in order to have them mount, even though yes, they all have static zfs mountpoints set. The filesystem can still run normally without the zfs mounted, as they pass through the root mount. But why is this happening? (zfs_enable=yes in rc.conf, and I can clearly boot to multiuser fine, so bootfs is set properly.).

Here is my fstab:
zroot/root / zfs rw, noatime 0 0
/dev/mirror/swap none swap sw 0 0


Here is zfs get mountpoints:
zroot / (canmount=no)
zroot/root legacy
zroot/tmp /tmp
zroot/usr /usr (canmount=no)
zroot/usr/home /usr/home
zroot/usr/local /usr/local
zroot/usr/obj /usr/obj
zroot/usr/ports /usr/ports
zroot/usr/ports/distfiles /usr/ports/distfiles
zroot/usr/src /usr/src
zroot/var /var (canmount=no)
zroot/var/audit /var/audit
zroot/var/log /var/log
zroot/var/tmp /var/tmp
Monday, March 16th, 2009
4:36 pm
[stilbengschuher]
FreeBSD-7.1 failes to detect HDD after reboot.
I've just installed 7.1-RELEASE on toshiba satellite A45 laptop and it works fine until I run 'reboot now'. After reboot the system can not detect HDD and switches to manual root filesystem selection. If I power it off/on it works again until next reboot. I've also tried winXP and ubuntu on the same laptop and both worked fine. Any ideas what can be wrong with FreeBSD?
Thursday, March 12th, 2009
10:36 am
[hugs]
fun script
a friend who is working on learning bash asked me to do this. Write a script which generates all the letters then reports back whether they are capital or lowercase. It took me a little bit of thinking to come up with one I must admit, but this is what I wrote:

X=101
until [ "$X" -ge 173 ] ; do
printf "\\$X" | grep [A-Z] > /dev/null && printf "\\$X is a capital letter \n" || printf "\\$X is a lowercase letter \n"
[ "$X" = "132" ] && X=140
X=$(echo "ibase=8;obase=8;$X+1"|bc)
done

I had to convert the numbers into octal for printf to display them and had to look up variables to get bc to use base 8. I thought it was just "base" but it uses input base and output base so ibase and obase.

How would you have written it?
Tuesday, February 3rd, 2009
9:02 pm
[tmtl]
Random reboots
I'm currently getting random reboots in 7.1. dmesg states

panic: ffs_clusteralloc: map mismatch
Uptime: 58m48s
Physical memory: 1015 MB
Dumping 182 MB: 167 151 135 119 103 87 71 55 39 23 7
Dump complete
Automatic reboot in 15 seconds - press a key on the console to abort
Rebooting...


But, this doesn't state which filesystem - I'm assuming that ffs_clisteralloc: relates to a filesystem. I've jumped into single user mode and fsck'd all the harddisks I have in the system. One was initially marked as dirty but ended up being cleaned

My disks look like:

(21:06:18 <~>) 0 $ mount
/dev/ad0s1a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/ad0s1e on /tmp (ufs, local, soft-updates)
/dev/ad0s1f on /usr (ufs, local, soft-updates)
/dev/ad0s1d on /var (ufs, local, soft-updates)
linprocfs on /usr/compat/linux/proc (linprocfs, local)
/dev/mirror/gm0s1d on /backup (ufs, local, soft-updates)
(21:06:21 <~>) 0 $ gmirror status
      Name    Status  Components
mirror/gm0  COMPLETE  ad8
(21:06:27 <~>) 0 $


I currently only have 1 disk in gm0 on purpose

Collapse )

Can anyone offer some pointers for what I need to be looking at for the cause?

It's only recently started happening. I upgraded to 7.1 and it was fine for some time before the reboots started, so I don't think they're related. But, I could well be wrong

Uptime currently ranges from minutes to hours before a reboot

All input appreciated!
Sunday, December 14th, 2008
5:20 pm
[tmtl]
Changing drives
What would be the best way to change drives around. I currently have all my partitions on ad0, but have recently installed a pair of drives with gmirror doing the RAID

% df
Filesystem            Mounted on
/dev/ad0s1a           /
/dev/ad0s1e           /tmp
/dev/ad0s1f           /usr
/dev/ad0s1d           /var
[...]
/dev/mirror/gm1s1d    /newRoot
/dev/mirror/gm1s1e    /newTmp
/dev/mirror/gm1s1f    /newVar
/dev/mirror/gm1s1h    /newUsr

I figure I can't just do a cp -R / /newRoot as I think cp would cross mount points?

I've tried using dd, but the new partitions are larger than the old. Using dd appeared to create partitions of the same size. Which, I guess is to be expected

What would the best way of migrating all my data from <mountpoint> to <newmountpoint>. I would guess that once all the data's migrated, it's just a case of updating /etc/fstab to point to the new locations

Thanks!
Monday, December 8th, 2008
3:31 am
[electrojunk]
The Quest for the text editor
Hello List,

After to have used FreeBSD with satisfaction on several servers I've finally come round on to using FreeBSD on my laptop (after ditching OpenSolaris 10 and Fedora 10). My laptop is a fine machine and can handle most of the stuff I throw at it, so running GNOME and KDE isn't a problem judging by the available resources. But this time I wanted to cut down on bulky libraries and desktop environments and focus on speed and functionality.

As I developer I'm in need of a text editor editing files on remote machines. Under Windows WinSCP+NotePad++ is my number once choice. On the Mac its Cyberduck+Textmate and if I'm lazy I've got Linux loaded with Gnome with its VFS who can take care of this and then some flashy editor like gPHPedit. Since I'm trying to keep libraries like GNOME and KDE of my system I am missing a suitable set of applications under fluxbox.

The current setup is this:
Fluxbox: My default WindowManager
FuseFS: My remote connectivity on a system level

At this point the most important think I am missing is a texteditor like NotePad++, Kate or gphpedit which can have several files open, understands different languages and can highlight bits and pieces without requiring to much of GNOME or KDE libraries or services for its functionality. Do any of you have an suggestions?

Also I think I'm in need of a decent file manager for in the X environment. Suggestions?

Thanks in advance...
Wednesday, November 19th, 2008
10:24 am
[hugs]
Delete a million files?
One of the devices I admin is an old Solaris 8 device... I was cleaning it up yesterday and found a directory of spam from 2002... good candidate for deletion... I did an `rm -Rf` on the directory and left it alone. Today I go and check to see if it's complete... nope, only 2% done, it had been running for 14 hours. This is odd...

A closer inspection of the directory and I found that there were in fact over 2,000,000 emails in this directory, each in their own directory and file. The system was taking about half a second PER FILE. There has to be a better way.

Some research online I got no result. There are a lot of people with this problem but there weren't any answers which worked. People had tried to script something in perl, php, shell... no result.

So I got to thinking about it, the `rm` command is single threaded... doesn't really use up that much cpu or disk.. so you can run MANY of them at once with out hurting the device (this is a production device btw). BUT if you try to run a rm command for EVERY file in the directory, THAT will hurt the device. What about running a number of remove commands at once, when one stops the next one can start. Sounds like a plan.

It works! here is the command I wrote... in this case the number 5 controls the number of commands you want it to run at the same time... right now I have it set for 50 and I'm deleting 60,000 files about every 2 minutes.

while read X; do while [ "$(jobs | wc -l)" -gt 5 ]; do sleep 1; done; rm -R $X & done< <(ls) 
Saturday, October 18th, 2008
12:46 am
[cowbert]
sysinstall fixup idea
Too late for 7.1 probably, but someone ought to patch sysinstall so that it writes a gjournal label after partitioning, prior to disklabel, and then set the default newfs to use -J. Or provide an interface to do that (like a gjournal step after partioning, before disklabel under the custom installation method). The appropriate module is (now) part of GENERIC so there is really no reason to no longer not use it (like the triple negative there!?!) (then again, I am whining because I just provisioned this box and forgot about it...).
Thursday, September 25th, 2008
9:53 am
[tmtl]
Issues booting
I had a power failure, which obviously resulted in my machine powering off

When I switched it back on, the boot process halted at this point

The machine only has 1 harddisk in it, so the actual disk is readable for it to boot at all, I'd have thought?

I managed to boot into safe mode once, which resulted in a background FSCK running. I let that run through, and rebooted. Again, the boot process halted at the same stage

Now, if I try to boot into safe mode, it gets to the same stage. But, disk access is via PIO4 rather than UDMA100

Does anyone have any ideas what the crack is? Or in fact, how I can fix it :) I doubt it matters, but I'm running 7.0
Wednesday, May 28th, 2008
10:21 pm
[cowbert]
RCng rant
Wondering why /usr/local/etc/rc.d scripts are invoked via knobs in /etc/rc.conf. It seems like they should remain more separated (have a /usr/local/etc/rc.conf instead). I haven't looked for any bikeshed discussions on this from the past few years, but would anyone like to fill me in? :)
Tuesday, May 27th, 2008
11:08 am
[yesthattom]
Please take my survey (and spread the word!)

I know this is OT, but I'm trying to reach out to a broad number of people. Plus, I am a FreeBSD user since 1999!

I’m curious about “recommendation engines”, the systems that enable Amazon and NetFlix to make recommendations like “People who bought _____ also bought ____”. I’m conducting experiments to build such a system. To do that, I need raw data. Would you help me by filling out my survey?

Click HERE to take the survey NOW (U.S. citizens only).

I’m doing this in my spare time as a hobby. I am a computer system administrator and author but this is a side-project. I’ll keep the data private and secure. I’m not collecting names or email addresses thus the data is useless to marketing companies and spammers. There is a link to a privacy policy on the survey.

All that I ask is that you answer the questions honestly.

For best results, I need to collect information from at least 10,000 people of a large variety of political, ethnic, and geographic backgrounds. Since most of my friends are in a similar political leaning, I really need help finding people outside my social circle to fill out the survey. If you could spread the word (blogs, etc.) between now and the end of June (I’m shutting off the survey on July 1, 2008).

Thanks!

Click HERE to take the survey NOW (U.S. citizens only).

Tuesday, April 8th, 2008
7:14 pm
[cowbert]
Hyperthreading dmesg
Dear Lazyweb -

Does disabling hyperthreading in BIOS cause <HTT> to disappear from CPU features in dmesg.boot? Or does it only affect "Logical CPUs per core:"?

Also, does the "Logical CPUs per core:" message require booting an SMP-aware kernel? (Since the multiproc enumeration only takes place after these messages and the ACPI APIC table brand echo).

This is on 6.3
Monday, April 7th, 2008
2:19 am
[nm_work]
9 common mistakes in shell programming
All of you, who started to work with Unixes not so long ago face problems when using shell or trying to program in shell. Many of Unix novices dislike writing shell scripts, because it takes too much time from them, scripts does not work as expected, because shell 'is so dumb and it's impossible to write complex things in it'.

I wish to prove, that that's wrong and it's possible to learn shell programming very quick – in 7-10 days.

Thus I'm starting an online training for all Unix novices.

I've collected some questions which novices give about unix shell and categorized them. So let's go on and see, what usually makes difficulties for most of unix shell starters:

  1. Misunderstanding now shell does command line expansion, how command arguments are processed and substituted in correct places. In fact shell does not do any magic when it executes command. It just replaces all things to be substituted (variables, command substitution, file patterns) and then executes resulting command.

  2. Misunderstanding about how variable expansion works – why does it eat spaces some time, some time does not work at all and etc.

  3. Novices practically do not use backtricks to do command substitution, which can be very powerful tool in their hands.

  4. Some misconcepts about how input and output redirection works (<, >, >>). Usually novices do not ever heard of here-in documents(<<), which can make your shell scripts much more beatiful and compact.

  5. Novices experience fear or difficulties with building long shell pipes (|). Usually you can write very long shell pipe, taking up several lines, which process data or texts and provide exactly that result, what you need.

  6. Sed and awk – when I was learning unix, they kept me in awe, because it was too messy and difficult to understand how sed and awk programs work. After some time learning them, I finally got that it's quite easy – but manual pages wrote in a difficult way. It's better to learn sed and awk by examples – which makes learning much more easier, that reading man page.

  7. Some great misunderstanding is tied with test command ([ ]), because most of the novices believe, that it is some 'magical' shell command, which is interpreted by the shell itself when used in if/while operators. Usually you can do a lot of funny tricks with it, it you understand how it works.

  8. Most of the people experience difficulties with using xargs command in their scripts and command pipes. In fact xargs is very powerful tool too and it should be learned and actively used, when it's necessary – usually when you process huge amounts of data.

  9. while operator may be used in a tricky way to parse input data and process them.

If you are really interested in improving your shell programming skills, you are welcome to join my free online training on unix shell programming. It will start 13 or 14 April and number of places is really limited.

Please see more details and subscribe for the training on the following page http://community.livejournal.com/bin_sh_en/348.html

I hope YOU will participate in that training, so GO ON and SUBSCRIBE NOW, while it's free.

With best regards,
Gaspar Chilingarov

Tuesday, March 11th, 2008
2:33 pm
[bifrosty2k]
FreeBSD Job in SFBA
I get stuff like this from time to time, Looks like it could be an interesting FreeBSD gig in the SFBA.
I know folks are having a bit of a crunch so I figured I'd post this here.

Collapse )
Thursday, February 28th, 2008
2:54 am
[und1sk0]
7.0-RELEASE
A little late, but always on time:

http://www.freebsd.org/releases/7.0R/announce.html

The FreeBSD Release Engineering Team is pleased to announce the availability of FreeBSD 7.0-RELEASE. This is the first release from the 7-STABLE branch which introduces many new features along with many improvements to functionality present in the earlier branches.
Friday, February 1st, 2008
11:01 am
[cowbert]
escaping colons in filenames
I have this weird problem where no matter how I try to escape the colon in a file name, I cannot get rsync or scp to copy it, because it parses the colon and thinks that the string preceding the colon in the filename is a hostname (and complains that it cannot to remote to remote transfers, which is, uh, sort of common sense :)

So far, I've been working around this by sticking the files that have colons in them in a folder and them using -r to copy the contents of that folder, but I feel so ashamed having to resort to that (worse than the unnecessary use of cat(1)).
Friday, January 25th, 2008
6:29 pm
[cowbert]
Hmm..apparently 6.3 didn't fix the annoying devfs issue with removable direct access devices where you have to do the "dd if=/dev/null of=/dev/da0 bs=1 count=0" workaround to get devfs to enumerate the slice table on da0.
(In the following case:
da0 at umass-sim1 bus 1 target 0 lun 0
da0: <OTi CF CARD Reader 2.00> Removable Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present

You have to try writing to the da0 before it redetects that the card has been inserted. Not sure if this would benefit from a HAL notification type thing or not, though.)
Wednesday, November 21st, 2007
1:07 am
[deka]
Freebsd on Intel Xeon 5110 DC
Collegues, has anybody an (un)successfull expirience of using FreeBSD 5.5 or 6.2 on Intel Xeon DC 5110 (EM64T, assuming amd64 architecture)? I own for now HP DC140G3 servers with one DC 5110 CPU and 4 GB RAM (interleave mode). Servers will act as e-mail relay servers with quite high load and must be very stable. Which branch I would prefer, 5.5 or 6.2 (thinkink that both will be STABLE branches)?
[ << Previous 20 ]
Official FreeBSD Website   About LiveJournal.com