Re: Inconsistent utx.active?
Hello Vlad, * Vlad Galu d...@dudu.ro, 20120225 00:24: Sigh, you are right. I had UseLogin set to yes in sshd_config. Sorry for the noise and thanks! Even with UseLogin I fail to reproduce it on my system. Even with UseLogin enabled it shouldn't cause utmpx entries to be `leaked'. I'll keep UseLogin enabled on one of my systems from now on to see whether it occurs sporadically. Thanks for reporting the issue. -- Ed Schouten e...@80386.nl WWW: http://80386.nl/ pgp0DE1Ur5bxA.pgp Description: PGP signature
random problem with 8.3 from yesterday
On Wed, 22 Feb 2012 13:34:36 +0700 Erich Dollansky er...@alogreentechnologies.com wrote: I got a new thumb drive which was FAT formatted. I use this script to change this: !/bin/tcsh # # This script format a thumb drive connected to USB as da0. # printf You have to run this script as 'root' to succeed.\n printf Warning this script will delete all your data from /dev/da0. Continue? set Eingabe = $ if ($Eingabe == y) then printf \nDeleting the device dd if=/dev/zero of=/dev/da0 bs=1k count=1 printf \nWriting the BSD label bsdlabel -Bw da0 auto Hmmm...so no MBR and no GPT either? Just the bare device? I guess I haven't tried that, so I don't know what that would do. printf \nEditing the BSD label bsdlabel -e da0 newfs /dev/da0a printf \nThe device /dev/da0 was formated to be used with FreeBSD.\n else printf \nScript aborted!\n endif I then call manually tunefs -L NewDeviceName /dev/da0a Just out of curiosity, I'd like to know why you run tunefs manually, rather than using -L NewDeviceName on the newfs command, given that your script is clearing the physical device and then creating an empty file system. Either this call or the mount command does not work randomly. When I then try to mount the device on /dev/da0a it does not work always. What do you mean when you write mount the device on /dev/da0a? Normally one mounts a filesystem onto a device, e.g., mount /dev/ad0s1d /var or some similar thing. Also, why do you refer to /dev/da0a at all if you labeled the file system? The whole point of labeling the file system is supposed to be so that you can mount it independently of the physical device name, e.g., mount /dev/ufs/NewDeviceName /thumbfs which allows you to have an entry in /etc/fstab for mounting the file system that doesn't need to be edited every time you reboot the system or move devices around. I do not know what this causes, I am only randomly able to reproduce it. It might be affected by removing the device or keeping it plugged in. Well, yes, that's what you label partitions/devices to avoid having to deal with manually, right? uname says: FreeBSD AMD620.ovitrap.com 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #28: Tue Feb 21 17:15:07 WIT 2012 er...@amd620.ovitrap.com:/usr/obj/usr/src/sys/AsusAMD620 amd64 dmesg says: ugen1.2: vendor 0x1005 at usbus1 umass0: vendor 0x1005 USB FLASH DRIVE, class 0/0, rev 2.00/1.00, addr 2 on usbus1 umass0: SCSI over Bulk-Only; quirks = 0x4001 umass0:2:0:-1: Attached to scbus2 da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 da0: USB FLASH DRIVE PMAP Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 15272MB (31277056 512 byte sectors: 255H 63S/T 1946C) It is not an urgent problem. It most likely is not a problem at all. See http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-glabel.html#AEN27470 With best regards, Scott Bennett, Comm. ASMELG, CFIAG ** * Internet: bennett at cs.niu.edu * ** * A well regulated and disciplined militia, is at all times a good * * objection to the introduction of that bane of all free governments * * -- a standing army. * *-- Gov. John Hancock, New York Journal, 28 January 1790 * ** ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: random problem with 8.3 from yesterday
On Sat, Feb 25, 2012 at 2:27 AM, Scott Bennett benn...@cs.niu.edu wrote: On Wed, 22 Feb 2012 13:34:36 +0700 Erich Dollansky er...@alogreentechnologies.com wrote: I got a new thumb drive which was FAT formatted. I use this script to change this: !/bin/tcsh # # This script format a thumb drive connected to USB as da0. # printf You have to run this script as 'root' to succeed.\n printf Warning this script will delete all your data from /dev/da0. Continue? set Eingabe = $ if ($Eingabe == y) then printf \nDeleting the device dd if=/dev/zero of=/dev/da0 bs=1k count=1 printf \nWriting the BSD label bsdlabel -Bw da0 auto Hmmm...so no MBR and no GPT either? Just the bare device? I guess I haven't tried that, so I don't know what that would do. Call me a bit confused, but I thought -B did write an MBR. It always has seemed to do so for me, at any rate. From man bsdlabel: Installing Bootstraps If the -B option is specified, bootstrap code will be read from the file /boot/boot and written to the disk. Or am I not understanding something? -- R. Kevin Oberman, Network Engineer E-mail: kob6...@gmail.com ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: random problem with 8.3 from yesterday
On Sat, 25 Feb 2012 08:56:24 -0800 Kevin Oberman kob6...@gmail.com wrote: On Sat, Feb 25, 2012 at 2:27 AM, Scott Bennett benn...@cs.niu.edu wrote: =A0 =A0 On Wed, 22 Feb 2012 13:34:36 +0700 Erich Dollansky er...@alogreentechnologies.com wrote: I got a new thumb drive which was FAT formatted. I use this script to cha= nge this: !/bin/tcsh # # This script format a thumb drive connected to USB as da0. # printf You have to run this script as 'root' to succeed.\n printf Warning this script will delete all your data from /dev/da0. Cont= inue? set Eingabe =3D $ if ($Eingabe =3D=3D y) then =A0 printf \nDeleting the device =A0 dd if=3D/dev/zero of=3D/dev/da0 bs=3D1k count=3D1 =A0 printf \nWriting the BSD label =A0 bsdlabel -Bw da0 auto =A0 =A0 Hmmm...so no MBR and no GPT either? =A0Just the bare device? =A0I= guess I haven't tried that, so I don't know what that would do. Call me a bit confused, but I thought -B did write an MBR. It always has seemed to do so for me, at any rate. From man bsdlabel: Installing Bootstraps If the -B option is specified, bootstrap code will be read from the fi= le /boot/boot and written to the disk. Or am I not understanding something? I guess I understand the part that you quoted above as meaning that the bootstrap code would be copied to the bootstrap sectors. However, as I interpret it, the bsdlabel command does not write a MBR, which would include the slice map for the device. Further, Erich's later commands did not specify a slice number. In short, it looks to me as though he may have ended up with the initial boot code where it belonged at the start of the device, but the boot code looks for the slice map, which isn't there, so it should not be possible to boot a kernel because the bootstrap code would not be able to find it. But as far as simply mounting a file system, I really don't know whether it should work to have a BSD label written to a bare device with neither a MBR nor a GPT to find that label. IOW, would the device node to be used in the mount operation have been created? Note to Erich: did you look in /dev and /dev/ufs to see whether all of the device files that you expected to be there were, in fact, present before you attempted the mount? Scott Bennett, Comm. ASMELG, CFIAG ** * Internet: bennett at cs.niu.edu * ** * A well regulated and disciplined militia, is at all times a good * * objection to the introduction of that bane of all free governments * * -- a standing army. * *-- Gov. John Hancock, New York Journal, 28 January 1790 * ** ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: random problem with 8.3 from yesterday
On Sat, Feb 25, 2012 at 9:17 AM, Scott Bennett benn...@cs.niu.edu wrote: On Sat, 25 Feb 2012 08:56:24 -0800 Kevin Oberman kob6...@gmail.com wrote: On Sat, Feb 25, 2012 at 2:27 AM, Scott Bennett benn...@cs.niu.edu wrote: =A0 =A0 On Wed, 22 Feb 2012 13:34:36 +0700 Erich Dollansky er...@alogreentechnologies.com wrote: I got a new thumb drive which was FAT formatted. I use this script to cha= nge this: !/bin/tcsh # # This script format a thumb drive connected to USB as da0. # printf You have to run this script as 'root' to succeed.\n printf Warning this script will delete all your data from /dev/da0. Cont= inue? set Eingabe =3D $ if ($Eingabe =3D=3D y) then =A0 printf \nDeleting the device =A0 dd if=3D/dev/zero of=3D/dev/da0 bs=3D1k count=3D1 =A0 printf \nWriting the BSD label =A0 bsdlabel -Bw da0 auto =A0 =A0 Hmmm...so no MBR and no GPT either? =A0Just the bare device? =A0I= guess I haven't tried that, so I don't know what that would do. Call me a bit confused, but I thought -B did write an MBR. It always has seemed to do so for me, at any rate. From man bsdlabel: Installing Bootstraps If the -B option is specified, bootstrap code will be read from the fi= le /boot/boot and written to the disk. Or am I not understanding something? I guess I understand the part that you quoted above as meaning that the bootstrap code would be copied to the bootstrap sectors. However, as I interpret it, the bsdlabel command does not write a MBR, which would include the slice map for the device. Further, Erich's later commands did not specify a slice number. In short, it looks to me as though he may have ended up with the initial boot code where it belonged at the start of the device, but the boot code looks for the slice map, which isn't there, so it should not be possible to boot a kernel because the bootstrap code would not be able to find it. But as far as simply mounting a file system, I really don't know whether it should work to have a BSD label written to a bare device with neither a MBR nor a GPT to find that label. IOW, would the device node to be used in the mount operation have been created? Note to Erich: did you look in /dev and /dev/ufs to see whether all of the device files that you expected to be there were, in fact, present before you attempted the mount? I thought he was creating a monolithic device...what was called dangerously dedicated. No slices at all. Not only are DD volumes mountable, they are bootable. It's been years since I created a DD disk as the slight space savings are irrelevant on modern hundreds of gigabyte disks, so I may have forgotten how it works. It might still make sense on a small thumb drive, bootable or not. -- R. Kevin Oberman, Network Engineer E-mail: kob6...@gmail.com ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: geom vs. removable disks/cards (was: Re: random problem with 8.3 from yesterday)
On Sat, 2012-02-25 at 07:55 +0100, Juergen Lock wrote: In article 1330126840.7317.60.ca...@revolution.hippie.lan you write: On Sat, 2012-02-25 at 00:39 +0200, Andriy Gapon wrote: on 24/02/2012 18:23 Ian Lepore said the following: I've always suspected something in the geom layer isn't noticing that a CF or SD card in the reader got removed/inserted/reformatted, and un-/re-plugging the whole reader (making the cam layer destroy and recreate the devices) makes geom aware of the change. This is a fact, actually. Nothing in GEOM layer (and below it) notices a silent card change, since most hardware doesn't have any notification for the change and FreeBSD disk stack doesn't do any polling for changes. If the hardware did have change notification, is there a mechanism that would communicate that to geom? That's a precursor question to my real question: is there a way to manually kick geom when necessary? If the api exists but there's no userland app to make the needed calls, I'll write some code -- just point me at a manpage or header file. scsi has a mechanism called unit attention to report things like media changes, not sure usb devices use that tho since the host can only poll them... Anyway, the usual workaround is to force a geom retaste by opening the device for writing without actually writing anything, e.g.: # : /dev/da0 Btw this can't be Erich's problem I'd say since he said he's plugging in a thumbdrive not a card into a reader (and also writing /dev/zero to it) so geom _should_ already taste it. (Unless the write fails since the thumbdrive is too slow initializing or something like that...) HTH, Juergen I was a bit concerned that the similarities between Erich's symptoms and mine were purely superficial, with different underlying causes. I've never seen the stale geom data problem I described on a thumb drive, except when I've used dd to zero out the beginning of a drive that was gpt-formatted but left the backup partition table at the end of the drive -- that always causes me problems that only get fixed by using gpart destroy -F. Thanks for the tip about forcing a re-taste, I think I'll be using that a bunch. -- Ian ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: random problem with 8.3 from yesterday
Hi, On Saturday 25 February 2012 17:27:30 Scott Bennett wrote: On Wed, 22 Feb 2012 13:34:36 +0700 Erich Dollansky er...@alogreentechnologies.com wrote: I got a new thumb drive which was FAT formatted. I use this script to change this: !/bin/tcsh # # This script format a thumb drive connected to USB as da0. # printf You have to run this script as 'root' to succeed.\n printf Warning this script will delete all your data from /dev/da0. Continue? set Eingabe = $ if ($Eingabe == y) then printf \nDeleting the device dd if=/dev/zero of=/dev/da0 bs=1k count=1 printf \nWriting the BSD label bsdlabel -Bw da0 auto Hmmm...so no MBR and no GPT either? Just the bare device? I guess I haven't tried that, so I don't know what that would do. it works since years with all other and even with hard disks. Only the system disk has to be done 'properly'. I then call manually tunefs -L NewDeviceName /dev/da0a Just out of curiosity, I'd like to know why you run tunefs manually, Historical reasons. It is an old script and I never updated it. rather than using -L NewDeviceName on the newfs command, given that your script is clearing the physical device and then creating an empty file system. Either this call or the mount command does not work randomly. When I then try to mount the device on /dev/da0a it does not work always. What do you mean when you write mount the device on /dev/da0a? Normally one mounts a filesystem onto a device, e.g., I mean the device connected to /dev/da0a just to make clear that I did not use /dev/da0. or some similar thing. Also, why do you refer to /dev/da0a at all if you labeled the file system? The whole point of labeling the file system is supposed to be so that you can mount it independently of the physical device name, e.g., It is a chicken egg problem. As long as fstab is not updated with the name of the new device, it does not work the other way. mount /dev/ufs/NewDeviceName /thumbfs which allows you to have an entry in /etc/fstab for mounting the file system that doesn't need to be edited every time you reboot the system or move devices around. I do the editing later. It is just a matter of work sequence. I do not know what this causes, I am only randomly able to reproduce it. It might be affected by removing the device or keeping it plugged in. Well, yes, that's what you label partitions/devices to avoid having to deal with manually, right? Do not forget, that this step does not happen always. uname says: FreeBSD AMD620.ovitrap.com 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #28: Tue Feb 21 17:15:07 WIT 2012 er...@amd620.ovitrap.com:/usr/obj/usr/src/sys/AsusAMD620 amd64 dmesg says: ugen1.2: vendor 0x1005 at usbus1 umass0: vendor 0x1005 USB FLASH DRIVE, class 0/0, rev 2.00/1.00, addr 2 on usbus1 umass0: SCSI over Bulk-Only; quirks = 0x4001 umass0:2:0:-1: Attached to scbus2 da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 da0: USB FLASH DRIVE PMAP Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 15272MB (31277056 512 byte sectors: 255H 63S/T 1946C) It is not an urgent problem. It most likely is not a problem at all. See http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-glabel.html#AEN27470 It does not explain to me why the device could not be mounted. I did not have this problem anymore since then. It might be the case that the problem only appears when the drive has a fresh file system or a new label. I will check this later. Erich ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: random problem with 8.3 from yesterday
Hi, On Sunday 26 February 2012 00:17:40 Scott Bennett wrote: On Sat, 25 Feb 2012 08:56:24 -0800 Kevin Oberman kob6...@gmail.com wrote: On Sat, Feb 25, 2012 at 2:27 AM, Scott Bennett benn...@cs.niu.edu wrote: =A0 =A0 On Wed, 22 Feb 2012 13:34:36 +0700 Erich Dollansky er...@alogreentechnologies.com wrote: I got a new thumb drive which was FAT formatted. I use this script to cha= nge this: !/bin/tcsh # # This script format a thumb drive connected to USB as da0. # printf You have to run this script as 'root' to succeed.\n printf Warning this script will delete all your data from /dev/da0. Cont= inue? set Eingabe =3D $ if ($Eingabe =3D=3D y) then =A0 printf \nDeleting the device =A0 dd if=3D/dev/zero of=3D/dev/da0 bs=3D1k count=3D1 =A0 printf \nWriting the BSD label =A0 bsdlabel -Bw da0 auto =A0 =A0 Hmmm...so no MBR and no GPT either? =A0Just the bare device? =A0I= guess I haven't tried that, so I don't know what that would do. Call me a bit confused, but I thought -B did write an MBR. It always has seemed to do so for me, at any rate. From man bsdlabel: Installing Bootstraps If the -B option is specified, bootstrap code will be read from the fi= le /boot/boot and written to the disk. Or am I not understanding something? it looks like that I have left the -B option by mistake for many years in there. I guess I understand the part that you quoted above as meaning that the bootstrap code would be copied to the bootstrap sectors. However, as I interpret it, the bsdlabel command does not write a MBR, which would include the slice map for the device. Further, Erich's later commands did not specify a slice number. In short, it looks to me as though he may have ended up with the initial boot code where it belonged at the start of the device, but the boot code looks for the slice map, which isn't there, so it should not be possible to boot a kernel because the bootstrap code There is also no kernel, no binary, nothing what could be started on the device. would not be able to find it. But as far as simply mounting a file system, I really don't know whether it should work to have a BSD label written to a bare device with neither a MBR nor a GPT to find that label. IOW, would the device node to be used in the mount operation have been created? Note to Erich: did you look in /dev and /dev/ufs to see whether all of the device files that you expected to be there were, in fact, present before you attempted the mount? It was there. I extra checked. As I said before, since I got the file system onto the device, the device can be used as expected. Erich ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
Re: random problem with 8.3 from yesterday
Hi, On Sunday 26 February 2012 00:55:46 Kevin Oberman wrote: I thought he was creating a monolithic device...what was called dangerously dedicated. No slices at all. Not only are DD volumes yes, I remember this term. And Windows machines get confused but they do not damage the media. mountable, they are bootable. It's been years since I created a DD disk as the slight space savings are irrelevant on modern hundreds of gigabyte disks, so I may have forgotten how it works. It might still make sense on a small thumb drive, bootable or not. Never break a winning team. The script doing the job works since a long time. This is the simple reason behind. Erich ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org