write all files in /mnt to usb using dd

2016-08-03 Thread Teng Zhang

hi, i want to write all files in /mnt to usb,so i issued the command:

doas dd if=/mnt of=/dev/rsd1c bs=5M

but it failed. I'm not pretty understand the way to operate dd, so
could you please tell me how can i operate it to write the files to
usb?
Some information about my system:

the files in /mnt is created like this:

$ doas vnconfig vnd0 01.iso
$ doas mount /dev/vnd0c /mnt

$ uname -a
OpenBSD zhangteng.my.domain 5.9 GENERIC.MP#1888 amd64

$ mount
/dev/sd0a on / type ffs (local)
/dev/sd0m on /home type ffs (local, nodev, nosuid)
/dev/sd0d on /tmp type ffs (local, nodev, nosuid)
/dev/sd0f on /usr type ffs (local, nodev)
/dev/sd0g on /usr/X11R6 type ffs (local, nodev)
/dev/sd0h on /usr/local type ffs (local, nodev)
/dev/sd0l on /usr/obj type ffs (local, nodev, nosuid)
/dev/sd0k on /usr/src type ffs (local, nodev, nosuid)
/dev/sd0e on /var type ffs (local, nodev, nosuid)
/dev/vnd0c on /mnt type cd9660 (local, read-only)

dmesg:
umass0 at uhub2 port 1 configuration 1 interface 0 "SanDisk Cruzer Edge" 
rev 2.10/1.00 addr 3

umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd1 at scsibus2 targ 1 lun 0:  SCSI4 
0/direct removable serial.0781556b970715105252

sd1: 7632MB, 512 bytes/sector, 15630336 sectors



empty directories under /usr/src/sys/gnu

2016-07-01 Thread Teng Zhang
hi,  why the empty directory /usr/src/sys/gnu didn't be removed ?
Is it the reason of the limit of GNU license or some other reasons ?



the balance between OpenBSD and life

2016-05-28 Thread Teng Zhang
I can't adjust  the time for OpenBSD and my life appropriately. Could you
please share your experience with me about how you adjust your time between
OpenBSD and your life.
thanks for any reply.



can't find books.html link

2016-05-21 Thread Teng Zhang
Could you please tell me where can i find the link which corresponding to
books.html on the www.openbsd.org.
thanks



Re: Comprehensive user's/programmer's manual for OpenBSD: Do they exist?

2016-05-07 Thread Teng Zhang
Actually, there is indeed some knowledge that can't get from manual and
faq. I usually use wikipedia and openbsd src tree(especially, the include
files) as references(and the most interesting part i love is the comments
embeded in the source code).
2016年5月8日 上午2:53,"Alex Poslavsky"
写道:

> On 05/07, David Lou wrote:
>
>> I wasn't able to find such a thing but perhaps I just missed it. I
>> am wondering if anyone in the community knows whether such manuals
>> exist for OpenBSD. Manpages are nice but they're not what I'm looking
>> for. Trying to learn OpenBSD by looking up individual manpages is like
>> trying to learn C programming by looking up individual functions. Sure
>> you get a description of the functions but you will NOT get all the
>> background information like C syntax, semantics, memory model,
>> pointers, the whole shebang that every beginner *should* know, but
>> don't have the background knowledge to know that they should be
>> looking these up in manpages or elsewhere.
>>
>> I'd like to acquire confident working knowledge in OpenBSD. If no
>> such manuals exist, then I'm wondering how did you or other expert
>> users learn how to use and administrate the system, what the best
>> programming practices are, etc. and have confidence that what they're
>> doing is what they think they're doing? Surely it's not just by
>> trial and error and seeing what appears to work because their
>> ignorance will be a frustrating source of bugs and security flaws?
>>
>>
> Besides the FAQ, the Absolute OpenBSD book is good as well:
> https://www.michaelwlucas.com/nonfiction/absolute-openbsd-2nd-edition
>
> But you sell the OpenBSD manpages short. As a beginner
> myself, I noticed that virtually every question I have can be answered
> with either the FAQ, or the man-pages.
>
> The man-pages in OpenBSD are much more comprehensive *and* cohesive
> then on Linux. Start with help(1) and afterboot(8), then  intro(1..9).
> From there follow all the links it gives you, and you'll have a very good
> overview of your system. The man-pages not just explain command-line
> switches, they also explain the how, with working examples, and why of
> commands, system calls, the c-library etc.
>
> Have fun, Alex



tmux status line doesn't display process name

2016-04-13 Thread Teng Zhang
uname output: OpenBSD zhangteng.my.domain 5.9 GENERIC.MP#1616 i386
hardware: Thinkpad T420(if necessary, i will show dmesg output)
tmux cofiguration: default(don't change anything)
problem description:  I run the following command:
tmux
doas dd if=debian.iso of=/dev/rsd1c

and then, the output of status line: [1]   0:ksh*
about 15 minutes later, the output of status line:[1] 0:dd*
comment: any other programs are shown normally at the status line

Could you please tell me how to solve the problem ?



Alt key doesn't work

2016-01-08 Thread Teng Zhang
hi,
the Alt key doesn't work on my machine in most cases except for
changing console(Crtl+Alt+F_number). So, what key i can use to replace Alt.