hns - 日記自動生成システム - Version 2.19.9

先月 2006年07月 来月
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2006年07月17日(月) 旧暦 [n年日記] [更新:"2006/07/17 16:08:27"]

#1 [NetBSD][pkgsrc] 久し振りに meta-pkg で sudo make package

3.99.21 が入ったので、久し振りに meta-pkg の config-base, config-serv を作っている。 (実は今回から gcc-4)。これは多分一時的なものだと思うけれど:
Index: PLIST
===================================================================
RCS file: /e/cvsync/cvsync/pkgsrc/net/wget/PLIST,v
retrieving revision 1.12
diff -u -r1.12 PLIST
--- PLIST       17 Apr 2006 07:07:31 -0000      1.12
+++ PLIST       17 Jul 2006 02:02:51 -0000
@@ -1,7 +1,6 @@
 @comment $NetBSD: PLIST,v 1.12 2006/04/17 07:07:31 jlam Exp $
 bin/wget
 info/wget.info
-man/man1/wget.1
 share/examples/wget/wgetrc
 share/locale/bg/LC_MESSAGES/wget.mo
 share/locale/ca/LC_MESSAGES/wget.mo
ttyZ0:makoto@yoshimi 11:03:45/060717(...net/wget)> 
これのおかげで、寝ていた間、計算機も寝ていたようだ。
ttyZ0:makoto@yoshimi 11:08:07/060717(...powerpc/All)> ls -lt
total 38052
-rw-r--r--  1 root  wheel    483236 Jul 17 11:06 w3m-0.5.1nb4.tgz
-rw-r--r--  1 root  wheel    555923 Jul 17 11:03 wget-1.10.2nb1.tgz
-rw-r--r--  1 root  wheel    367674 Jul 17 11:01 boehm-gc-6.7.tgz
-rw-r--r--  1 root  wheel    676782 Jul 17 00:35 curl-7.15.4.tgz
-rw-r--r--  1 root  wheel    251365 Jul 17 00:28 libidn-0.6.5.tgz
-rw-r--r--  1 root  wheel     52263 Jul 17 00:25 pkg-config-0.20.tgz
-rw-r--r--  1 root  wheel    138269 Jul 17 00:19 id-utils-3.2d.tgz
-rw-r--r--  1 root  wheel    546973 Jul 17 00:09 screen-4.0.2nb5.tgz
-rw-r--r--  1 root  wheel     37813 Jul 17 00:07 lha-114.9nb2.tgz
-rw-r--r--  1 root  wheel    141496 Jul 17 00:06 unzip-5.52nb3.tgz
-rw-r--r--  1 root  wheel    223774 Jul 17 00:04 rsync-2.6.8.tgz
-rw-r--r--  1 root  wheel    461122 Jul 17 00:01 gmake-3.81.tgz
-rw-r--r--  1 root  wheel    685486 Jul 16 23:58 autoconf-2.60.tgz
-rw-r--r--  1 root  wheel     87591 Jul 16 23:57 m4-1.4.4.tgz
-rw-r--r--  1 root  wheel     11170 Jul 16 23:55 ja-a2ps-1.45.tgz
-rw-r--r--  1 root  wheel    100129 Jul 16 23:55 ja-less-358nb1.tgz
-rw-r--r--  1 root  wheel      9667 Jul 16 23:53 ack-1.39.tgz
-rw-r--r--  1 root  wheel     84928 Jul 16 23:53 nkf-2.05.tgz
-rw-r--r--  1 root  wheel     25076 Jul 16 23:52 p5-Jcode-2.06.tgz
-rw-r--r--  1 root  wheel     19075 Jul 16 23:51 p5-MIME-Base64-3.07.tgz
-rw-r--r--  1 root  wheel     39132 Jul 16 23:50 hfsutils-3.2.6nb1.tgz
-rw-r--r--  1 root  wheel     99764 Jul 16 23:49 libhfs-3.2.6nb2.tgz
-rw-r--r--  1 root  wheel     74680 Jul 16 23:47 gettext-lib-0.14.5nb2.tgz
-rw-r--r--  1 root  wheel     66667 Jul 16 22:56 bytebench-4.1.0nb3.tgz
-rw-r--r--  1 root  wheel  12622619 Jul 16 22:54 perl-5.8.8nb2.tgz
-rw-r--r--  1 root  wheel    123371 Jul 16 21:25 sudo-1.6.8pl12nb2.tgz
-rw-r--r--  1 root  wheel    532619 Jul 16 21:24 libtool-base-1.5.22nb3.tgz
-rw-r--r--  1 root  wheel    603929 Jul 16 21:20 tcsh-6.14.00nb1.tgz
-rw-r--r--  1 root  wheel     51907 Jul 16 21:17 digest-20060302.tgz
ttyZ0:makoto@yoshimi 11:30:54/060717(...powerpc/All)> 
===> Building for pchar-1.4nb4 c++ -O2 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include -I/usr/pkg/include -I/usr/include -I. -DSIZEOF_BOOL=1 -DHAVE_SOCKLEN_T=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SOCKADDR_SA_LEN=1 -DHAVE_HERROR=1 -DHAVE_SNPRINTF=1 -DHAVE_LIBM=1 -DHAVE_IPV6=1 -DHAVE_SNMP=1 -DHAVE_LIBSNMP=1 -c main.cc -o main.o
GetIfInfo.h:21: error: extra qualification 'GetIfInfo::' on member 'GetName'
*** Error code 1
--- GetIfInfo.h.orig    2006-07-17 11:53:50.000000000 +0900
+++ GetIfInfo.h 2006-07-17 11:47:06.000000000 +0900
@@ -18,7 +18,7 @@
   bool IsValid(void);
 
   const char * GetDescription(void) const;
-  const char * GetIfInfo::GetName(void) const;
+  const char * GetName(void) const;
   const char * GetContact(void) const;
   const char * GetLocation(void) const;
   const char * GetIfDescription(void) const;
ttyp2:makoto@yoshimi 11:56:24/060717(...work.yoshimi/pchar-1.4)> 
gcc-4 ってやはり厳しい ? 同じ Class の中だったら、いいと思うのだけれど。
  • 以前に send-pr されていないか ?
送ってしまった が、もしかして pchar の元の方では直っているかも ?

#2 [機械] 全く同じ disk の間での複写

例えば 20G の disk が二つあって、一つは NetBSD の起動 disk だとします。
(複写元)
wd0 at atabus0 drive 0: <IC25N020ATCS04-0>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 19077 MB, 38760 cyl, 16 head, 63 sec, 512 bytes/sect x 39070080 sectors
(複写先)
sd0 at scsibus0 target 0 lun 0: <HD227-FW, , > disk fixed
sd0: fabricating a geometry
sd0: 19077 MB, 19077 cyl, 64 head, 32 sec, 512 bytes/sect x 39070080 sectors
この動いている方の disk が どうも熱を持つと、不安定になるので、たまたま手元にあった別の 20 G に写すにはどういう方法があるか ? です。 複写先の 20G を Firewire 外付箱に入れて、3.99.21 の FW 口につなぎます。 すると sd0 で見えます。
host 名IP address機種OS利用可能な口disk
ibook192.168.1.170iBook G3 Shell3.99.8USB + Ethernet(内蔵) /dev/wd0c
yoshimi192.168.1.226PowerMac G4/AGP3.99.21USB/FW/Ethernet(外付 FW 箱) /dev/sd0c
これに dd で写してみます。

まず sudo 練習をしておきます。

sudo echo test
ssh 192.168.1.170 sudo echo test
これで次の時には passwd を聞かれないで済みます。
ttyp3:makoto@yoshimi 13:50:27/060717(~)> ssh 192.168.1.170 sudo dd if=/dev/wd0c bs=512 | \
sudo dd of=/dev/sd0c bs=512
dd: /dev/wd0c: Input/output error
263296+0 records in
263296+0 records out
134807552 bytes transferred in 213.720 secs (630767 bytes/sec)
263296+0 records in
263296+0 records out
134807552 bytes transferred in 214.625 secs (628107 bytes/sec)
(bs=512 は初期設定、つまり既定値なので、実は不要です) だめか ..
seek出力
skip入力
続けて:
ttyp3:makoto@yoshimi 14:14:12/060717(~)> ssh 192.168.1.170 sudo dd if=/dev/wd0c bs=512 skip=263304 | \
sudo dd of=/dev/sd0c bs=512 seek=263304
kDisconnecting: Corrupted MAC on input.
8340961+0 records in
8340961+0 records out
4270572032 bytes transferred in 4053.961 secs (1053431 bytes/sec)
ttyp3:makoto@yoshimi 15:21:48/060717(~)> 
この方法を使えば、いくつもの同じ型の機械用に disk を高速に写せるかな。 /dev/sd0a (/) と /dev/sd0g (/usr) は fsck -n で問題なし。しかし:
ttyp3:makoto@yoshimi 15:51:20/060717(~)> sudo fsck /dev/sd0e
** /dev/rsd0e
BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE
/dev/rsd0e: LABEL DOES NOT CONTAIN FILE SYSTEM PARAMETERS
ttyp3:makoto@yoshimi 15:51:36/060717(~)> 

findblk を使う:

ふかうみさんに教わって findblk を使って見る。 findblk は相対 block number を使うということで 263296 は disklabel で表示される /dev/sd0a の中の
263296 - 67080 = 196216
を使う。
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:    409600     67080     4.2BSD      0     0     0  # (Cyl.     66*-    472*)
 b:   1024000    476680       swap                     # (Cyl.    472*-   1488*)
 c:  39070080         0     unused      0     0        # (Cyl.      0 -  38759)
 d:     65536      1544    unknown                     # (Cyl.      1*-     66*)
 e:  33473400   5596680     4.2BSD      0     0     0  # (Cyl.   5552*-  38759)
 g:   4096000   1500680     4.2BSD      0     0     0  # (Cyl.   1488*-   5552*)
ttyp3:makoto@yoshimi 16:06:22/060717(~)> 
ttyp1:makoto@yoshimi 16:02:15/060717(...net/pchar)> sudo fsdb -n -f /dev/sd0a
/dev/sd0a is not a character device
CONTINUE? yes

** /dev/sd0a (NO WRITE)
Editing file system `/dev/sd0a'
Last Mounted on /mnt
current inode: directory
I=2 MODE=40755 SIZE=1024
        MTIME=Jul 13 20:45:54 2006 [990000000 nsec]
        CTIME=Jul 13 20:45:54 2006 [990000000 nsec]
        ATIME=Jul 17 15:29:25 2006 [125566000 nsec]
OWNER=root GRP=wheel LINKCNT=23 FLAGS=0x0 BLKCNT=0x2 GEN=0x0
fsdb (inum: 2)> findblk /dev/sd0a 512 196216
block 512: inode block (1792-1856)
fsdb (inum: 2)> quit
ttyp1:makoto@yoshimi 16:03:56/060717(/mnt)> sudo find . -inum 1792
./var/db/pkg/libexif-0.6.12/+REQUIRED_BY
ttyp1:makoto@yoshimi 16:04:01/060717(/mnt)> sudo find . -inum 1793
./var/db/pkg/librsvg2-2.9.5/+BUILD_VERSION
ttyp1:makoto@yoshimi 16:04:04/060717(/mnt)> sudo find . -inum 1794
./var/db/pkg/librsvg2-2.9.5/+BUILD_INFO
ttyp1:makoto@yoshimi 16:04:06/060717(/mnt)> sudo find . -inum 1794



最近の日記
2024年03月10日
停電 (瞬電)
2024年03月03日
the second try on bare-metal
useradd
2024年02月29日
opendkim and senmail
2024年01月24日
chat/iam 0.0.8
2024年01月21日
uselocale vs setlocale (textproc/R-readxl)
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)