Quantcast
Channel: Royal Windows
Viewing all 288 articles
Browse latest View live

PR: 新設学部!新たなビジネス系資格取得をめざす!

$
0
0
e-ラーニングでコーチングやマネジメント等が学べる。2013年4月入学生募集中!

IODATA WN-G300DGR OpenWrt #2

$
0
0

WN-G300DR が wr512-3gn の OpenWrt イメージで動いているとの情報をいただいた。
WN-G300DGR は,WN-G300DR のギガビット版。 WN-G300DGR #1
DGR では,tftp ブートでOpenWrt の起動は成功したが,LANが使用できない状況となった。以下がその経緯である。

シリアル接続では,tftp ブートの選択のみ可能で,ファームウェアのフラッシュ書き込みができない。
また,オリジナルの Web管理画面にあるファームウェア更新では「ファイルが正しくありません」でエラーとなった。

openwrt-ramips-rt305x-wr512-3gn-4M-initramfs-uImage.bin を ImageWN-G300DGR にリネームして,/tftpboot にコピーした。
つぎに,DGR にシリアルとLANで接続した。

minicom –s
/dev/ttyUSB0, 57600 8N1, no, no

すぐに1を押して,tftpブートを選んだ。

U-boot Ver:1.0.5.17 2010/06/10


Board: Ralink APSoC DRAM: 32 MB 2*16 MB
============================================
ASIC 3052_MP2 (Port5<->GigaSW)
Product Name: WN-G300DGR
SDRAM CAS = 3(d1835272)
============================================

Please choose the operation:
1: Load system code to SDRAM via TFTP.
UbootDate[2010/06/10]UbootDate
UbootVer[1.0.5]UbootVer

1: System Load Linux to SDRAM via TFTP.
Please Input new ones /or Ctrl-C to discard
Input device IP (192.168.99.9) ==:

Input server IP (192.168.99.8) ==:

Input Linux Kernel filename (uImageWN-G300DGR) ==:

Using Eth0 device
TFTP from server 192.168.99.8; our IP address is 192.168.99.9
Filename 'uImageWN-G300DGR'.
Loading: *
ArpTimeoutCheck
Got ARP REPLY, set server/gtwy eth addr (b8:88:e3:54:7c:a6)
Got it
TftpTimeoutCount=0,max_retry:10
T #
first block received
################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################Got ARP REQUEST, return our IP
################################################
#################
done
Bytes transferred = 2745461 (29e475 hex)




LAN接続は,PCを 192.168.99.8 にして,atftpd を起動した。

ifconfig eth0 192.168.99.8

atftpd –demon /tftpboot

tftpブートで,以下OpenWrtの起動メッセージが表示された。


[    0.000000] Linux version 3.7.5 (atc500@bt) (gcc version 4.6.4 20121210 (prerelea3
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[ 0.000000] Ralink RT3052 id:1 rev:3 running at 384.00 MHz
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 02000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x00000000-0x01ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00000000-0x01ffffff]
[ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8
[ 0.000000] Kernel command line: board=WR512-3GN console=ttyS1,57600 mtdparts=ph2
[ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] __ex_table already sorted, skipping sort
[ 0.000000] Writing ErrCtl register=0003005e
[ 0.000000] Readback ErrCtl register=0003005e
[ 0.000000] Memory: 27840k/32768k available (1969k kernel code, 4928k reserved, 4)
[ 0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:48
[ 0.000000] console [ttyS1] enabled, bootconsole disabled
[ 0.000000] console [ttyS1] enabled, bootconsole disabled
[ 0.010000] Calibrating delay loop... 255.59 BogoMIPS (lpj=1277952)
[ 0.090000] pid_max: default: 32768 minimum: 301
[ 0.100000] Mount-cache hash table entries: 512
[ 0.110000] NET: Registered protocol family 16
[ 0.120000] MIPS: machine is WR512-3GN-like router
[ 0.140000] bio: create slab <bio-0> at 0
[ 0.150000] Switching to clocksource MIPS
[ 0.160000] NET: Registered protocol family 2
[ 0.170000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.180000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.200000] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.210000] TCP: reno registered
[ 0.220000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.230000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.240000] NET: Registered protocol family 1
[ 4.020000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 4.030000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (.
[ 4.060000] msgmni has been set to 54
[ 4.060000] io scheduler noop registered
[ 4.070000] io scheduler deadline registered (default)
[ 4.080000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 4.100000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[ 4.110000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[ 4.130000] physmap platform flash device: 00800000 at bf000000
[ 4.140000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufactu7
[ 4.160000] Amd/Fujitsu Extended Query Table at 0x0040
[ 4.170000] Amd/Fujitsu Extended Query version 1.1.
[ 4.180000] physmap-flash.0: Swapping erase regions for top-boot CFI table.
[ 4.190000] number of CFI chips: 1
[ 4.200000] 6 cmdlinepart partitions found on MTD device physmap-flash.0
[ 4.210000] Creating 6 MTD partitions on "physmap-flash.0":
[ 4.230000] 0x000000000000-0x000000030000 : "u-boot"
[ 4.240000] 0x000000030000-0x000000040000 : "u-boot-env"
[ 4.250000] 0x000000040000-0x000000050000 : "factory"
[ 4.270000] 0x000000050000-0x000000130000 : "kernel"
[ 4.280000] 0x000000130000-0x000000400000 : "rootfs"
[ 4.290000] mtd: partition "rootfs" set to be root filesystem
[ 4.300000] split_squashfs: no squashfs found in "physmap-flash.0"
[ 4.310000] 0x000000050000-0x000000400000 : "firmware"
[ 4.340000] ramips-wdt ramips-wdt: timeout value must be 0 < timeout <= 33, using3
[ 4.350000] TCP: cubic registered
[ 4.360000] NET: Registered protocol family 17
[ 4.370000] 8021q: 802.1Q VLAN Support v1.8
[ 4.390000] Freeing unused kernel memory: 1972k freed
[ 5.090000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/i0
[ 5.120000] Button Hotplug driver version 0.4.1
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
- init -

Please press Enter to activate this console. [ 7.720000] Compat-drivers backport 3
[ 7.730000] Backport based on wireless-testing.git master-2013-01-07
[ 7.740000] compat.git: wireless-testing.git
[ 7.780000] cfg80211: Calling CRDA to update world regulatory domain
[ 7.790000] cfg80211: World regulatory domain updated:
[ 7.800000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, m)
[ 7.820000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 m)
[ 7.830000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 m)
[ 7.850000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 m)
[ 7.870000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 m)
[ 7.880000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 m)
[ 8.040000] usbcore: registered new interface driver usbfs
[ 8.050000] usbcore: registered new interface driver hub
[ 8.060000] usbcore: registered new device driver usb
[ 8.330000] PPP generic driver version 2.4.2
[ 8.390000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 8.530000] NET: Registered protocol family 24
[ 8.560000] nf_conntrack version 0.5.0 (465 buckets, 1860 max)
[ 8.800000] dwc_otg: version 2.72a 24-JUN-2008
[ 8.810000] dwc_otg: Core Release: 2.66a
[ 9.020000] dwc_otg: Periodic Transfer Interrupt Enhancement - disabled
[ 9.030000] dwc_otg: Multiprocessor Interrupt Enhancement - disabled
[ 9.050000] dwc_otg: Using DMA mode
[ 9.050000] dwc_otg: Device using Buffer DMA mode
[ 9.060000] dwc_otg dwc_otg.0: DWC OTG Controller
[ 9.070000] dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 1
[ 9.090000] dwc_otg dwc_otg.0: irq 26, io mem 0x101c0000
[ 9.100000] dwc_otg: Init: Port Power? op_state=1
[ 9.110000] dwc_otg: Init: Power Port (0)
[ 9.120000] hub 1-0:1.0: USB hub found
[ 9.120000] hub 1-0:1.0: 1 port detected
[ 12.470000] device eth0.1 entered promiscuous mode
[ 12.480000] device eth0 entered promiscuous mode
[ 12.500000] br-lan: port 1(eth0.1) entered forwarding state
[ 12.510000] br-lan: port 1(eth0.1) entered forwarding state
[ 13.530000] ramips-wdt: timeout value 60 must be 0 < timeout <= 33, using 33
[ 14.510000] br-lan: port 1(eth0.1) entered forwarding state



BusyBox v1.19.4 (2013-02-02 15:43:46 JST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
BARRIER BREAKER (Bleeding Edge, r35420)
-----------------------------------------------------
* 1/2 oz Galliano Pour all ingredients into
* 4 oz cold Coffee an irish coffee mug filled
* 1 1/2 oz Dark Rum with crushed ice. Stir.
* 2 tsp. Creme de Cacao
-----------------------------------------------------
root@OpenWrt:/# cd /proc
root@OpenWrt:/proc# cat mtd
dev: size erasesize name
mtd0: 00030000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00010000 00010000 "factory"
mtd3: 000e0000 00010000 "kernel"
mtd4: 002d0000 00010000 "rootfs"
mtd5: 003b0000 00010000 "firmware"




OpenWrt起動後,LANが不通だった。 

ビルド時にカーネルモジュール RTL8366RB の組み込みも行っている。

mtdレイアウトは,192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,896k(kernel),2880k(rootfs),3776k@0x50000(firmware)
GENERIC_4M と同じ,標準的なレイアウトだった。


PR: 日産「ノート」の中古車をお探しのアナタ

IODATA WN-G300DGR OpenWrt #3 イーサネットNG

$
0
0

WN-G300DGR での OpenWrt ファームウェアのフラッシュ書き込みは,シリアル接続で 2 を入力して,
2: System Load Linux Kernel then write to Flash via TFTP.
で行うことができた。
以下のとおり 1 の選択しか表示されないが,2 の入力も可能だった。また,入力 4 でコマンドプロンプトも可能だった。
Please choose the operation:
   1: Load system code to SDRAM via TFTP.

OpenWrt ファームウェアは,DGRと構成がそっくりな Sitecom WL-351 用を利用した。
openwrt-ramips-rt305x-wl-351-squashfs-sysupgrade.bin

U-boot Ver:1.0.5.17 2010/06/10


Board: Ralink APSoC DRAM: 32 MB 2*16 MB
============================================
ASIC 3052_MP2 (Port5<->GigaSW)
Product Name: WN-G300DGR
SDRAM CAS = 3(d1835272)
============================================

Please choose the operation:
1: Load system code to SDRAM via TFTP.
UbootDate[2010/06/10]UbootDate
UbootVer[1.0.5]UbootVer

2: System Load Linux Kernel then write to Flash via TFTP.
Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N)
Please Input new ones /or Ctrl-C to discard
Input device IP (192.168.99.9) ==:

Input server IP (192.168.99.8) ==:

Input Linux Kernel filename (uImageWN-G300DGR) ==:firmware.bin
Using Eth0 device
TFTP from server 192.168.99.8; our IP address is 192.168.99.9
Filename 'firmware.bin'.
Loading: *
ArpTimeoutCheck
TftpTimeoutCount=0,max_retry:10
T
ArpTimeoutCheck
TftpTimeoutCount=1,max_retry:10
T
ArpTimeoutCheck
TftpTimeoutCount=2,max_retry:10
T
ArpTimeoutCheck
TftpTimeoutCount=3,max_retry:10
T Got ARP REPLY, set server/gtwy eth addr (b8:88:e3:54:7c:a6)
Got it
TftpTimeoutCount=4,max_retry:10
T #
first block received
################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##################Got ARP REQUEST, return our IP
###############################################
#################################################################
####
done
Bytes transferred = 3014660 (2e0004 hex)
Erase linux kernel block !!
From 0xBF050000 To 0xBF33FFFF










エラーもなく起動するが,イーサネットが使えず,シリアルからの操作しかできない。  

起動シーケンスは以下のとおり。 


Boot from KERNEL 1  !!
[ 0.000000] Linux version 3.7.5 (atc500@bt) (gcc version 4.6.4 20121210 (prerele3
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[ 0.000000] Ralink RT3052 id:1 rev:3 running at 384.00 MHz
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 02000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x00000000-0x01ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00000000-0x01ffffff]
[ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages:8
[ 0.000000] Kernel command line: board=WL-351 console=ttyS1,57600 mtdparts=phys2
[ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] __ex_table already sorted, skipping sort
[ 0.000000] Writing ErrCtl register=0003a250
[ 0.000000] Readback ErrCtl register=0003a250
[ 0.000000] Memory: 29632k/32768k available (1969k kernel code, 3136k reserved, )
[ 0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes1
[ 0.000000] NR_IRQS:48
[ 0.000000] console [ttyS1] enabled, bootconsole disabled
[ 0.000000] console [ttyS1] enabled, bootconsole disabled
[ 0.010000] Calibrating delay loop... 255.59 BogoMIPS (lpj=1277952)
[ 0.090000] pid_max: default: 32768 minimum: 301
[ 0.100000] Mount-cache hash table entries: 512
[ 0.110000] NET: Registered protocol family 16
[ 0.120000] MIPS: machine is Sitecom WL-351 v1 002
[ 0.140000] bio: create slab <bio-0> at 0
[ 0.150000] Switching to clocksource MIPS
[ 0.160000] NET: Registered protocol family 2
[ 0.170000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.180000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.200000] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.210000] TCP: reno registered
[ 0.220000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.230000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.240000] NET: Registered protocol family 1
[ 0.280000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.290000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) .
[ 0.310000] msgmni has been set to 57
[ 0.320000] io scheduler noop registered
[ 0.330000] io scheduler deadline registered (default)
[ 0.340000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.350000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[ 0.370000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[ 0.380000] physmap platform flash device: 00800000 at bf000000
[ 0.390000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufact7
[ 0.420000] Amd/Fujitsu Extended Query Table at 0x0040
[ 0.430000] Amd/Fujitsu Extended Query version 1.1.
[ 0.440000] physmap-flash.0: Swapping erase regions for top-boot CFI table.
[ 0.450000] number of CFI chips: 1
[ 0.460000] 6 cmdlinepart partitions found on MTD device physmap-flash.0
[ 0.470000] Creating 6 MTD partitions on "physmap-flash.0":
[ 0.480000] 0x000000000000-0x000000030000 : "u-boot"
[ 0.490000] 0x000000030000-0x000000040000 : "u-boot-env"
[ 0.510000] 0x000000040000-0x000000050000 : "factory"
[ 0.520000] 0x000000050000-0x000000130000 : "kernel"
[ 0.530000] 0x000000130000-0x000000400000 : "rootfs"
[ 0.550000] mtd: partition "rootfs" set to be root filesystem
[ 0.560000] mtd: partition "rootfs_data" created automatically, ofs=310000, len=
[ 0.570000] 0x000000310000-0x000000400000 : "rootfs_data"
[ 0.590000] 0x000000050000-0x000000400000 : "firmware"
[ 0.610000] ramips-wdt ramips-wdt: timeout value must be 0 < timeout <= 33, usin3
[ 0.630000] TCP: cubic registered
[ 0.630000] NET: Registered protocol family 17
[ 0.640000] 8021q: 802.1Q VLAN Support v1.8
[ 0.660000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[ 0.670000] Freeing unused kernel memory: 180k freed
[ 2.580000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/0
[ 2.690000] Button Hotplug driver version 0.4.1
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
jffs2 not ready yet; using ramdisk
- init -

Please press Enter to activate this console. [ 7.600000] Compat-drivers backport3
[ 7.610000] Backport based on wireless-testing.git master-2013-01-07
[ 7.620000] compat.git: wireless-testing.git
[ 7.660000] cfg80211: Calling CRDA to update world regulatory domain
[ 7.680000] cfg80211: World regulatory domain updated:
[ 7.690000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, )
[ 7.700000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 )
[ 7.720000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 )
[ 7.740000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 )
[ 7.750000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 )
[ 7.770000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 )
[ 8.260000] usbcore: registered new interface driver usbfs
[ 8.280000] usbcore: registered new interface driver hub
[ 8.290000] usbcore: registered new device driver usb
[ 8.870000] PPP generic driver version 2.4.2
[ 9.040000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 9.280000] NET: Registered protocol family 24
[ 9.310000] nf_conntrack version 0.5.0 (465 buckets, 1860 max)
[ 9.620000] Realtek RTL8366RB ethernet switch driver version 0.2.3
[ 9.640000] rtl8366rb rtl8366rb: using GPIO pins 1 (SDA) and 2 (SCK)
[ 9.650000] rtl8366rb rtl8366rb: RTL5937 ver. 3 chip found
[ 9.730000] libphy: rtl8366rb: probed
[ 9.820000] dwc_otg: version 2.72a 24-JUN-2008
[ 9.830000] dwc_otg: Core Release: 2.66a
[ 10.040000] dwc_otg: Periodic Transfer Interrupt Enhancement - disabled
[ 10.050000] dwc_otg: Multiprocessor Interrupt Enhancement - disabled
[ 10.060000] dwc_otg: Using DMA mode
[ 10.070000] dwc_otg: Device using Buffer DMA mode
[ 10.080000] dwc_otg dwc_otg.0: DWC OTG Controller
[ 10.090000] dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 1
[ 10.100000] dwc_otg dwc_otg.0: irq 26, io mem 0x101c0000
[ 10.120000] dwc_otg: Init: Port Power? op_state=1
[ 10.120000] dwc_otg: Init: Power Port (0)
[ 10.130000] hub 1-0:1.0: USB hub found
[ 10.140000] hub 1-0:1.0: 1 port detected
[ 14.910000] device eth0.1 entered promiscuous mode
[ 14.920000] device eth0 entered promiscuous mode
[ 14.940000] br-lan: port 1(eth0.1) entered forwarding state
[ 14.950000] br-lan: port 1(eth0.1) entered forwarding state
[ 15.850000] ramips-wdt: timeout value 60 must be 0 < timeout <= 33, using 33
[ 16.950000] br-lan: port 1(eth0.1) entered forwarding state
[ 31.480000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[ 31.510000] jffs2_build_filesystem(): unlocking the mtd device... done.
[ 31.520000] jffs2_build_filesystem(): erasing all blocks after the end marker....
[ 43.210000] jffs2: notice: (1025) jffs2_build_xattr_subsystem: complete building.



BusyBox v1.19.4 (2013-02-02 15:43:46 JST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
BARRIER BREAKER (Bleeding Edge, r35420)
-----------------------------------------------------
* 1/2 oz Galliano Pour all ingredients into
* 4 oz cold Coffee an irish coffee mug filled
* 1 1/2 oz Dark Rum with crushed ice. Stir.
* 2 tsp. Creme de Cacao
-----------------------------------------------------
root@OpenWrt:/#




ifconfig コマンドで確認するとパケットの受信ができていないようだ。  

br-lan    Link encap:Ethernet  HWaddr 00:A0:B0:B4:CA:74  
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:402 (402.0 B)

eth0 Link encap:Ethernet HWaddr 00:11:22:33:44:55
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:7155 (6.9 KiB)
Interrupt:5

eth0.1 Link encap:Ethernet HWaddr 00:11:22:33:44:55
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:402 (402.0 B)

eth0.2 Link encap:Ethernet HWaddr 00:A0:B0:B4:CA:75
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:6681 (6.5 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:192 errors:0 dropped:0 overruns:0 frame:0
TX packets:192 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:13056 (12.7 KiB) TX bytes:13056 (12.7 KiB)




PCから DGR への ping は以下のとおりだった。 


root@bt:~# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.3 icmp_seq=1 Destination Host Unreachable
From 192.168.1.3 icmp_seq=2 Destination Host Unreachable
From 192.168.1.3 icmp_seq=3 Destination Host Unreachable
From 192.168.1.3 icmp_seq=4 Destination Host Unreachable
From 192.168.1.3 icmp_seq=5 Destination Host Unreachable










同じような問題をフォーラムで見かけたが,イーサネットが使えないとなにもできない。継続調査中である。  
https://forum.openwrt.org/viewtopic.php?id=28986 

https://forum.openwrt.org/viewtopic.php?id=40280  

IODATA WN-G300DGR OpenWrt #4 イーサネット

$
0
0

WN-G300DGR のイーサネットは,ブリッジを止めて,eth0 にIPアドレスを設定したら,PC と接続できた。

root@OpenWrt:/# ifconfig br-lan down
[   40.020000] br-lan: port 2(wlan0) entered disabled state
[   40.040000] br-lan: port 1(eth0.1) entered disabled state
root@OpenWrt:/# ifconfig eth0 192.168.1.1
root@OpenWrt:/# ping 192.168.1.3
PING 192.168.1.3 (192.168.1.3): 56 data bytes
64 bytes from 192.168.1.3: seq=0 ttl=64 time=0.636 ms
64 bytes from 192.168.1.3: seq=1 ttl=64 time=0.595 ms
64 bytes from 192.168.1.3: seq=2 ttl=64 time=0.545 ms
64 bytes from 192.168.1.3: seq=3 ttl=64 time=0.572 ms

スイッチポートのWAN用とLAN用が,それぞれ別のVLANになるみたいだが,そのポートVLANの設定が正しくないのではとにらんでいる。
使っているOpenWrtファームウェアはWL-351 用で,WL-351はスイッチポートが6ポートあるが,WN-G300DGRは4ポートしかない。

IODATA WN-G300DGR OpenWrt #5 一旦終了

$
0
0

WN-G300DGR の OpenWrt ファームウェアは Sitecom WL-351 のプロファイルでビルドされたものを使ったが,やはり難しかった。
#1 でシリアル接続方法が分かり,#2で tftpブートでOpenWrtの起動ができた。
さらに#3で,ファームウェア更新ができ,#4でLANを有効にする操作が分かった。
結局,問題は残ったが,ビルドは一旦終わりにした。
無線LANやLANは使用できるが,スイッチの全4ポートがLANとなる。WANポートはアサインできなかった。

wng300dgr

スイッチのポートVLANで,WAN/LANポートを分けるみたいだが,どうやって設定しているのか分からなかった。

ソースは以下を少し変更した。意味は分かっていない。
~/trunk/target/linux/ramips/base-files/etc/uci-defaults/02_network

rt-n15 | \
wl-351)
        # ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
        # ucidef_add_switch "switch0" "1" "1"
        # ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 6t"
        # ucidef_add_switch_vlan "switch0" "2" "4 6t"
        ucidef_add_switch "switch0" "1" "0"
        ucidef_set_interface_lan "eth0"

        ;;

swconfig コマンドの結果
WN-G300DGRは4ポートしかないのに7ポート分ある。これも意味が分からない。
なお,WN-G300DGRは RTL8366RB というギガビットスイッチモジュールを使っている。

root@OpenWrt:~# swconfig dev switch0 show
Global attributes:
enable_vlan: 1
alternate_vlan_disable: 0
Port 0:
disable: 0
doubletag: 0
untag: 0
led: 5
lan: 1
recv_bad: 0
recv_good: 0
pvid: 0
link: port:0 link:down
Port 1:
disable: 0
doubletag: 0
untag: 0
led: 5
lan: 1
recv_bad: 0
recv_good: 0
pvid: 0
link: port:1 link:down
Port 2:
disable: 0
doubletag: 0
untag: 0
led: 5
lan: 1
recv_bad: 0
recv_good: 0
pvid: 0
link: port:2 link:down
Port 3:
disable: 0
doubletag: 0
untag: 0
led: 5
lan: 1
recv_bad: 0
recv_good: 0
pvid: 0
link: port:3 link:down
Port 4:
disable: 0
doubletag: 0
untag: 0
led: 5
lan: 1
recv_bad: 0
recv_good: 0
pvid: 0
link: port:4 link:down
Port 5:
disable: 0
doubletag: 0
untag: 0
led: ???
lan: 1
recv_bad: 0
recv_good: 18
pvid: 0
link: port:5 link:up speed:1000baseT full-duplex
Port 6:
disable: 0
doubletag: 0
untag: 0
led: ???
lan: ???
recv_bad: ???
recv_good: ???
pvid: 0
link: port:6 link:up speed:1000baseT full-duplex





OpenWrt でのスイッチ設定やポートVLANについて,ご存知の方,お教えください。

WANポートをアサインできないので,LANルータとしては使えないが,無線もLANも有効だ。

WN-G300DGRには,USBポートがあるので,カメラやUSBストレージなどを試してみたい。


vmware vcenter converter !!! Could not recognize any disks !!!

$
0
0

vcenter converter のオンラインLinuxサーバのP2Vが,ソースマシン情報の取得で中断された。
converter は,Linuxサーバのディスク情報取得に parted ライブラリを使っているが,それが中断の原因であり,libparted の入れ替えで対応できた。
解決方法のソースはこちら。
http://communities.vmware.com/message/1837992#1837992

converter は,Linux サーバの /tmp に,sshでvmware-sysinfo-lin32.tar.gz を転送して vmware-sysinfo-lin32.sh を実行する。その中でバイナリの sysinfo-vmware-lin32 が実行され,Linux サーバのシステム情報を xml 出力する仕組みになっている。

確認のため,vmware-sysinfo-lin32.tar.gz を winscp で,/tmp に転送した。
ファイルは,C:\Program Files\VMware\VMware vCenter Converter
Standalone\vmware-sysinfo-lin32.tar.gz

mkdir sysinfo && cd sysinfo
tar xvzf ../vmware-sysinfo-lin32.tar.gz

展開したファイル。

-bash-2.05b# ls
libgcc_s.so.1       libuuid.so.1          vmware-sysinfo-lin32.sh
liblog4cpp.so.4     libxml2.so.2          vmware-sysinfo.log.config
libparted-1.8.so.8  libz.so.1
libstdc++.so.6      vmware-sysinfo-lin32

vmware-sysinfo-lin32.sh を実行。

./vmware-sysinfo-lin32.sh

vmware-sysinfo.log にエラーが書かれていた。

-bash-2.05b# cat vmware-sysinfo.log
[2013-02-22 16:33:06,309 INFO storage ]: Probing for disks using parted
[2013-02-22 16:33:06,310 INFO storage ]: Parted returned device with
path: /dev/sda, type: 1
[2013-02-22 16:33:06,343 ERROR storage ]: Parted failed to probe
device with path: /dev/sda, type: 1
[2013-02-22 16:33:06,343 ERROR storage ]: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2013-02-22 16:33:06,343 ERROR storage ]: !!! Could not recognize any disks !!!
[2013-02-22 16:33:06,343 ERROR storage ]: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2013-02-22 16:33:06,343 INFO storage ]: LVM1 executables found
[2013-02-22 16:33:06,354 ERROR storage.lvm ]: Command '/sbin/vgdisplay
-c 2>/dev/null'
failed with exit code 25088
[2013-02-22 16:33:06,355 INFO storage ]: Got mount table entry:
fsname: /dev/sda3, dir: /, type: ext3
[2013-02-22 16:33:06,355 INFO storage ]: Looking for device with major
8 and minor 3
[2013-02-22 16:33:06,355 INFO storage ]: Got mount table entry:
fsname: none, dir: /proc, type: proc
[2013-02-22 16:33:06,355 INFO storage ]: Got mount table entry:
fsname: usbdevfs, dir: /proc/bus/usb, type: usbdevfs
[2013-02-22 16:33:06,355 INFO storage ]: Got mount table entry:
fsname: /dev/sda1, dir: /boot, type: ext3
[2013-02-22 16:33:06,355 INFO storage ]: Looking for device with major
8 and minor 1
[2013-02-22 16:33:06,355 INFO storage ]: Got mount table entry:
fsname: none, dir: /dev/pts, type: devpts
[2013-02-22 16:33:06,355 INFO storage ]: Got mount table entry:
fsname: /dev/sda6, dir: /home, type: ext3
[2013-02-22 16:33:06,355 INFO storage ]: Looking for device with major
8 and minor 6
[2013-02-22 16:33:06,355 INFO storage ]: Got mount table entry:
fsname: none, dir: /dev/shm, type: tmpfs
[2013-02-22 16:33:06,355 INFO storage ]: Got mount table entry:
fsname: /dev/sda2, dir: /var, type: ext3
[2013-02-22 16:33:06,355 INFO storage ]: Looking for device with major
8 and minor 2
[2013-02-22 16:33:06,355 INFO storage ]: Got mount table entry:
fsname: /proc, dir: /var/lib/named/proc, type: none
[2013-02-22 16:33:06,355 INFO storage ]: Looking for device with major
0 and minor 0
[2013-02-22 16:33:06,355 INFO storage ]: Getting stats for swap device /dev/sda5
[2013-02-22 16:33:06,355 INFO storage ]: Swap device /dev/sda5 has
block device number (major,minor): (8,5)
[2013-02-22 16:33:06,356 ERROR storage ]:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2013-02-22 16:33:06,356 ERROR storage ]: !!! Could not recognize any
volumes !!!
[2013-02-22 16:33:06,356 ERROR storage ]:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[2013-02-22 16:33:06,356 ERROR storage ]: Cannot find a boot directory
(searched for '/boot'); the final system may not be bootable
-bash-2.05b#




Linux サーバの /usr/lib/libparted-1.6.so.0.0.3 を /tmp/sysinfo ディレクトリにコピーして,libparted-1.8.so.8 にリネームした。 


再度 vmware-sysinfo を実行すると,xml が出力された。


-bash-2.05b# cat vmware-sysinfo.log
[2013-02-22 16:37:26,538 INFO storage ]: Probing for disks using parted
[2013-02-22 16:37:26,538 INFO storage ]: Parted returned device with
path: /dev/sda, type: 1
[2013-02-22 16:37:26,572 INFO storage ]: Parted successfully probed
device with path: /dev/sda, type: 1, disk type: msdos
[2013-02-22 16:37:26,572 INFO storage.disk ]: Creating SCSI disk with
path: /dev/sda
[2013-02-22 16:37:26,683 INFO storage ]: LVM1 executables found
[2013-02-22 16:37:26,702 ERROR storage.lvm ]: Command '/sbin/vgdisplay
-c 2>/dev/null'
failed with exit code 25088
[2013-02-22 16:37:26,702 INFO storage ]: Got mount table entry:
fsname: /dev/sda3, dir: /, type: ext3
[2013-02-22 16:37:26,702 INFO storage ]: Looking for device with major
8 and minor 3
[2013-02-22 16:37:26,703 INFO storage ]: Found device /dev/sda3
[2013-02-22 16:37:26,703 WARN storage.volume ]: Creating volume with
mountPoint: /, device path: /dev/sda3, fsType: ext3,
_blockSizeInBytes: 4096, _capacityInBlocks: 1031777, _blocksFree:
764247
[2013-02-22 16:37:26,703 INFO storage ]: Got mount table entry:
fsname: none, dir: /proc, type: proc
[2013-02-22 16:37:26,703 INFO storage ]: Got mount table entry:
fsname: usbdevfs, dir: /proc/bus/usb, type: usbdevfs
[2013-02-22 16:37:26,703 INFO storage ]: Got mount table entry:
fsname: /dev/sda1, dir: /boot, type: ext3
[2013-02-22 16:37:26,703 INFO storage ]: Looking for device with major
8 and minor 1
[2013-02-22 16:37:26,703 INFO storage ]: Found device /dev/sda1
[2013-02-22 16:37:26,703 WARN storage.volume ]: Creating volume with
mountPoint: /boot, device path: /dev/sda1, fsType: ext3,
_blockSizeInBytes: 1024, _capacityInBlocks: 124427, _blocksFree:
113537
[2013-02-22 16:37:26,704 INFO storage ]: Got mount table entry:
fsname: none, dir: /dev/pts, type: devpts
[2013-02-22 16:37:26,704 INFO storage ]: Got mount table entry:
fsname: /dev/sda6, dir: /home, type: ext3
[2013-02-22 16:37:26,704 INFO storage ]: Looking for device with major
8 and minor 6
[2013-02-22 16:37:26,704 INFO storage ]: Found device /dev/sda6
[2013-02-22 16:37:26,704 WARN storage.volume ]: Creating volume with
mountPoint: /home, device path: /dev/sda6, fsType: ext3,
_blockSizeInBytes: 4096, _capacityInBlocks: 35551036, _blocksFree:
34879116
[2013-02-22 16:37:26,705 INFO storage ]: Got mount table entry:
fsname: none, dir: /dev/shm, type: tmpfs
[2013-02-22 16:37:26,705 INFO storage ]: Got mount table entry:
fsname: /dev/sda2, dir: /var, type: ext3
[2013-02-22 16:37:26,705 INFO storage ]: Looking for device with major
8 and minor 2
[2013-02-22 16:37:26,705 INFO storage ]: Found device /dev/sda2
[2013-02-22 16:37:26,705 WARN storage.volume ]: Creating volume with
mountPoint: /var, device path: /dev/sda2, fsType: ext3,
_blockSizeInBytes: 4096, _capacityInBlocks: 1031777, _blocksFree:
893361
[2013-02-22 16:37:26,705 INFO storage ]: Got mount table entry:
fsname: /proc, dir: /var/lib/named/proc, type: none
[2013-02-22 16:37:26,705 INFO storage ]: Looking for device with major
0 and minor 0
[2013-02-22 16:37:26,706 INFO storage ]: Getting stats for swap device /dev/sda5
[2013-02-22 16:37:26,706 INFO storage ]: Swap device /dev/sda5 has
block device number (major,minor): (8,5)
[2013-02-22 16:37:26,706 WARN storage.volume ]: Cannot use statvfs()
for the swap volume with device path: /dev/sda5, so the volume size
statistics will not be set.
[2013-02-22 16:37:26,706 WARN storage.volume ]: Creating volume with
mountPoint: , device path: /dev/sda5, fsType: linux-swap,
_blockSizeInBytes: 0, _capacityInBlocks: 0, _blocksFree: 0
[2013-02-22 16:37:26,708 WARN network ]: Ignoring interface 'lo'
because it is not an ethernet interface
[2013-02-22 16:37:26,716 INFO distribution ]: /etc/redhat-release file
line: 'NetSHAKER BlueRack Ver.1.2'
[2013-02-22 16:37:26,735 WARN hardwareInfo ]: No "physical id" lines
found in /proc/cpuinfo, defaulting to one socket with one core
[2013-02-22 16:37:26,735 INFO grub ]: Trying to create device map file
/tmp/vmware-sysinfo-grub-device.map
[2013-02-22 16:37:26,735 INFO grub ]: Running command: grub --batch
--no-floppy --device-map=/tmp/vmware-sysinfo-grub-device.map >
/dev/null 2>&1
[2013-02-22 16:37:31,439 INFO sysinfo ]: <?xml version="1.0" encoding="UTF-8"?>
<sysinfo>
<storage>
<volume mountPoint="/" blockSizeInBytes="4096"
capacityInBlocks="1031777" blocksFree="764247" blocksUsed="267530"
devicePath="/dev/sda3" fileSystemType="ext3" isBootVolume="false"
label="/">
<extfsFeatures dirIndex="false" filetype="true" hasJournal="true"
journalDev="false" resizeInode="false" sparseSuper="true"/>
</volume>
<volume mountPoint="/boot" blockSizeInBytes="1024"
capacityInBlocks="124427" blocksFree="113537" blocksUsed="10890"
devicePath="/dev/sda1" fileSystemType="ext3" isBootVolume="true"
label="/boot">
<extfsFeatures dirIndex="false" filetype="true" hasJournal="true"
journalDev="false" resizeInode="false" sparseSuper="true"/>
</volume>
<volume mountPoint="/home" blockSizeInBytes="4096"
capacityInBlocks="35551036" blocksFree="34879116" blocksUsed="671920"
devicePath="/dev/sda6" fileSystemType="ext3" isBootVolume="false"
label="/home">
<extfsFeatures dirIndex="false" filetype="true" hasJournal="true"
journalDev="false" resizeInode="false" sparseSuper="true"/>
</volume>
<volume mountPoint="/var" blockSizeInBytes="4096"
capacityInBlocks="1031777" blocksFree="893361" blocksUsed="138416"
devicePath="/dev/sda2" fileSystemType="ext3" isBootVolume="false"
label="/var">
<extfsFeatures dirIndex="false" filetype="true" hasJournal="true"
journalDev="false" resizeInode="false" sparseSuper="true"/>
</volume>
<volume mountPoint="" blockSizeInBytes="0" capacityInBlocks="0"
blocksFree="0" blocksUsed="0" devicePath="/dev/sda5"
fileSystemType="linux-swap" isBootVolume="false" label=""/>
<disk type="msdos" controllerType="scsi" bus="0" deviceId="11"
capacityInSectors="312236033">
<device path="/dev/sda" major="8" minor="0"/>
<hwGeometry cylinders="19435" heads="255" sectors="63"/>
<biosGeometry cylinders="19435" heads="255" sectors="63"/>
<partition number="1" type="primary" isActive="true" fileSystemType="ext3">
<device path="/dev/sda1" major="8" minor="1"/>
<lba start="63" length="256977" end="257039"/>
</partition>
<partition number="2" type="primary" isActive="false" fileSystemType="ext3">
<device path="/dev/sda2" major="8" minor="2"/>
<lba start="257040" length="8385930" end="8642969"/>
</partition>
<partition number="3" type="primary" isActive="false" fileSystemType="ext3">
<device path="/dev/sda3" major="8" minor="3"/>
<lba start="8642970" length="8385930" end="17028899"/>
</partition>
<partition number="4" type="extended" isActive="false" fileSystemType="">
<device path="/dev/sda4" major="8" minor="4"/>
<lba start="17028900" length="295194375" end="312223274"/>
</partition>
<partition number="5" type="logical" isActive="false"
fileSystemType="linux-swap">
<device path="/dev/sda5" major="8" minor="5"/>
<lba start="17028963" length="2056257" end="19085219"/>
</partition>
<partition number="6" type="logical" isActive="false" fileSystemType="ext3">
<device path="/dev/sda6" major="8" minor="6"/>
<lba start="19085283" length="288945027" end="308030309"/>
</partition>
<partition number="7" type="logical" isActive="false" fileSystemType="ext3">
<device path="/dev/sda7" major="8" minor="7"/>
<lba start="308030373" length="4192902" end="312223274"/>
</partition>
</disk>
</storage>
<network>
<interface label="eth0" nicId="00:11:22:33:44:55" status="up">
<ip address="1.2.3.4" mask="255.255.255.0"/>
</interface>
<interface label="eth1" nicId="00:11:22:33:44:55" status="up">
<ip address="192.168.10.12" mask="255.255.255.0"/>
</interface>
</network>
<operatingSystem>
<hostname>civilsv1.civil.cxx.xxx-u.ac.jp</hostname>
<distribution name="linux" version=""/>
<kernel release="2.4.20-42.9.nsk41.3" is64bit="false" SMP="false"/>
</operatingSystem>
<hardwareInfo>
<firmwareType>bios</firmwareType>
<cpuCount>1</cpuCount>
<coresCount id="0">1</coresCount>
<memoryInKb>524288</memoryInKb>
</hardwareInfo>
<grub>
<devicemap>
<device biosNumber="0" path="/dev/sda"/>
</devicemap>
</grub>
</sysinfo>

-bash-2.05b#




libparted を置き換えた内容で,tar xvzf ../vmware-sysinfo-lin32.tar.gz を作り直した。

cd /tmp/sysinfo
tar cvzf ../vmware-sysinfo-lin32.tar.gz *

作り直した vmware-sysinfo-lin32.tar.gz を winscp でPCに転送。

C:\Program Files\VMware\VMware vCenter Converter Standalone\vmware-sysinfo-lin32.tar.gz を置換.。

vm converter を再度実行で,P2Vが成功した。


PR: THE ALL-NEW VOLVO V40 デビュー


vmware vcenter converter コンバートが99%でエラー

$
0
0

IBM xseries 225 の ubuntu 10.10 Server を P2V したが,99%でエラーとなった。

失敗: 変換中にエラーが発生しました: 「GrubInstaller::InstallGrub:
/usr/lib/vmware-converter/installGrub.sh failed with return code: 127,
and message: Installing GRUB1 on (hd0)... /vmware-updateGrub.sh: 59:
grub:
not found Error installing GRUB Error running vmware-updateGrub.sh
through chroot into /mnt/p2v-src-root 」

grub のインストールで失敗しているようなので,LiveCD から grub を再インストールすることにした。

ubuntu desktop liveCD の iso を winscp で ESXi の datastore にコピーした後,仮想BIOS のブートオーダーを CD 優先にして ubuntu desktop liveCD を起動した。

ubuntu server は,sda1 –> boot, sda2 –> swap, sda3 –> /(root) なので,ubuntu server のディスクをマウントして,chroot, grub-install を行った。

sudo –s
mount /dev/sda3 /mnt
mount /dev/sda1 /mnt/boot
mount –bind proc /mnt/proc
mount –bind dev /mnt/dev
chroot /mnt
grub-install /dev/sda

これで grub メニューから ubuntu server をブートできるが,ルートファイルシステムが見つからず,initramfs で起動が停止した。ディスクのUUIDが変わったのが原因だ。
再度 ubuntu desktop liveCD を起動して,/boot/grub/grub.cfg を変更した。
root=UUID=xxx を root=/dev/sda3 に書き替えた。

mount /dev/sda1 /mnt
cd /mnt/boot && cd grub && vi grub.cfg

linux /vmlinuz-2.6.35-22-generic-pae
root=UUID=199be76a-f4a5-4387-9b3a-9ff9d5760c1f ro quiet
linux   /vmlinuz-2.6.35-22-generic-pae root=/dev/sda3 ro quiet
initrd  /initrd.img-2.6.35-22-generic-pae

これで ubuntu server が起動したが,/boot がマウントできない旨のエラーが出た。
/etc/fstab に UUID とマウントポイントの対応が書かれているので,/dev/sdaX に変更した。

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda3 during installation
/dev/sda3       /               ext3    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
/dev/sda1       /boot           ext3    defaults        0       2
# swap was on /dev/sda2 during installation
/dev/sda2       none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

テストして問題なかったので,最後に vmware tools をインストールした。

vmware でサーバを整理統合して,ラックがすっきりきれいになる。数年位前に流行ったブレードサーバもすたれてしまった。もうすぐサポート終了だ。
長時間待たされて99%で失敗はがっくりだったが,ファイル交換ソフトのようだと言ってた人もいた。

PR: 工事不要で即日インターネットを使うならWiMAX

$
0
0
速度制限がない!テザリングより便利!バッテリーが長持ち!高速エリアが広い!

IODATA WN-G300DGR OpenWrt #6 WANポートが有効に

$
0
0

フォーラムに解決方法があったので,WN-G300DGR の OpenWrt を再設定した。
https://forum.openwrt.org/viewtopic.php?pid=192105#p192105

起動して luci で確認すると,WAN/LAN ポートが正しくアサインされており,問題はほぼ解決した。 (WAN/LAN,APのある無線LANルータの基本形になった)
OpenWrt - Interfaces - LuCI

WN-G300DGR は,rt305x 組み込みのスイッチと,RTL8366RB スイッチの 2 つのスイッチを持っている。
OpenWrt - Switch - LuCI-2
rt305xスイッチ の#6がCPUとリンクしている内部ポートで,rt305xスイッチの#5がRTL8366RB の#5とリンクしている。 RTL8366RBのポートが実際の接続用ポートだ。
vlan1 がLAN,vlan2 がWANで,#5,#6はトランクポートになっている。
実際のポートは #0,#1,#2 がLAN,#3がWANになる。(WN-G300DGR は0123の4ポート)
(RTL8366RB の カーネルモジュールを組み込んでおく。)
image
以上を設定に反映するため,/etc/config/network を以下のとおり書き換えた。

config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'

config interface 'lan'
option ifname 'eth0.1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option macaddr '00:a0:b0:b4:ca:74'

config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'
option macaddr '00:a0:b0:b4:ca:75'

config switch
option name 'switch1'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch1'
option vlan '1'
option ports '0 1 2 5t'

config switch_vlan
option device 'switch1'
option vlan '2'
option ports '3 5t'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '5t 6t'

config switch_vlan
option device 'switch0'
option vlan '2'
option ports '5t 6t'




これで動いたので,ソースも書き換えた。 

~/trunk/target/linux/ramips/base-files/etc/uci-defaults/02_network


wl-351)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch1" "1" "1"
ucidef_add_switch_vlan "switch1" "1" "0 1 2 5t"
ucidef_add_switch_vlan "switch1" "2" "3 5t"
ucidef_add_switch "switch0" "1" "1"
ucidef_add_switch_vlan "switch0" "1" "5t 6t"
ucidef_add_switch_vlan "switch0" "2" "5t 6t"
;;

 





5t,6t などtが付く数字は tagged ポートの番号だ。 


sitecom WL-351 用のOpenWrtファームウェアを使っているので,ボード名に WL-351 が表示される。 
ボード名が WN-G300DGR になるよう OpenWrt のソースを変更追加している。 


PR: クリエイティブ関連の求人・転職支援はマスメディアン

IODATA WN-G300DGR OpenWrt #7 専用ファームウェア作成

$
0
0

OpenWrt trunk のソースを追加,変更して,WN-G300DGR 用のファームウェアを作成した。sitecom WL-351 のソースコードに追加,変更したが,LED やWPSボタン等,GPIO関係は変更していない。
dmesg でマシン名が正しく表示された。
[    0.000000] Kernel command line:  board=WN-G300DGR console=ttyS1,57600 mtdparts=physmap-flash.0:192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,896k(kernel),2880k(rootfs),3776k@0x
[    0.120000] MIPS: machine is IODATA WN-G300DGR

root@OpenWrt:/# dmesg
[ 0.000000] Linux version 3.7.9 (wn@bt) (gcc version 4.6.4 20121210 (prerelease) (Linaro GCC 4.6-2012.12) ) #4 Fri Mar 8 09:09:04 JST 2013
[ 0.000000] prom: fw_arg0=00000001, fw_arg1=01f5ffb0, fw_arg2=01f603b0, fw_arg3=00000000
[ 0.000000] env[0]: memsize=32
[ 0.000000] env[1]: initrd_start=0x00000000
[ 0.000000] env[2]: initrd_size=0x0
[ 0.000000] env[3]: flash_start=0xBF000000
[ 0.000000] env[4]: flash_size=0x400000
[ 0.000000] env[0]: memsize=32
[ 0.000000] env[1]: initrd_start=0x00000000
[ 0.000000] env[2]: initrd_size=0x0
[ 0.000000] env[3]: flash_start=0xBF000000
[ 0.000000] env[4]: flash_size=0x400000
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[ 0.000000] Ralink RT3052 id:1 rev:3 running at 384.00 MHz
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 02000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x00000000-0x01ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00000000-0x01ffffff]
[ 0.000000] On node 0 totalpages: 8192
[ 0.000000] free_area_init_node: node 0, pgdat 80255c70, node_mem_map 81000000
[ 0.000000] Normal zone: 64 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 8128 pages, LIFO batch:0
[ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
[ 0.000000] Kernel command line: board=WN-G300DGR console=ttyS1,57600 mtdparts=physmap-flash.0:192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,896k(kernel),2880k(rootfs),3776k@0x50000(firmware) rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] __ex_table already sorted, skipping sort
[ 0.000000] Writing ErrCtl register=00030414
[ 0.000000] Readback ErrCtl register=00030414
[ 0.000000] Memory: 29632k/32768k available (1970k kernel code, 3136k reserved, 472k data, 180k init, 0k highmem)
[ 0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:48
[ 0.000000] console [ttyS1] enabled, bootconsole disabled
[ 0.010000] Calibrating delay loop... 255.59 BogoMIPS (lpj=1277952)
[ 0.090000] pid_max: default: 32768 minimum: 301
[ 0.100000] Mount-cache hash table entries: 512
[ 0.110000] NET: Registered protocol family 16
[ 0.120000] MIPS: machine is IODATA WN-G300DGR
[ 0.140000] bio: create slab <bio-0> at 0
[ 0.150000] Switching to clocksource MIPS
[ 0.160000] NET: Registered protocol family 2
[ 0.170000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.180000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.200000] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.210000] TCP: reno registered
[ 0.220000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.230000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.240000] NET: Registered protocol family 1
[ 0.280000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.290000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.310000] msgmni has been set to 57
[ 0.320000] io scheduler noop registered
[ 0.330000] io scheduler deadline registered (default)
[ 0.340000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.350000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[ 0.370000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[ 0.380000] physmap platform flash device: 00800000 at bf000000
[ 0.390000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a7
[ 0.420000] physmap-flash.0: Found an alias at 0x400000 for the chip at 0x0
[ 0.420000] Amd/Fujitsu Extended Query Table at 0x0040
[ 0.430000] Amd/Fujitsu Extended Query version 1.1.
[ 0.440000] physmap-flash.0: Swapping erase regions for top-boot CFI table.
[ 0.450000] number of CFI chips: 1
[ 0.460000] 6 cmdlinepart partitions found on MTD device physmap-flash.0
[ 0.470000] Creating 6 MTD partitions on "physmap-flash.0":
[ 0.480000] 0x000000000000-0x000000030000 : "u-boot"
[ 0.490000] 0x000000030000-0x000000040000 : "u-boot-env"
[ 0.510000] 0x000000040000-0x000000050000 : "factory"
[ 0.520000] 0x000000050000-0x000000130000 : "kernel"
[ 0.530000] 0x000000130000-0x000000400000 : "rootfs"
[ 0.550000] mtd: partition "rootfs" set to be root filesystem
[ 0.560000] mtd: partition "rootfs_data" created automatically, ofs=2F0000, len=110000
[ 0.570000] 0x0000002f0000-0x000000400000 : "rootfs_data"
[ 0.590000] 0x000000050000-0x000000400000 : "firmware"
[ 0.610000] ramips-wdt ramips-wdt: timeout value must be 0 < timeout <= 33, using 33
[ 0.630000] TCP: cubic registered
[ 0.630000] NET: Registered protocol family 17
[ 0.640000] 8021q: 802.1Q VLAN Support v1.8
[ 0.660000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[ 0.670000] Freeing unused kernel memory: 180k freed
[ 2.750000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/input0
[ 2.860000] Button Hotplug driver version 0.4.1
[ 2.930000] Registered led device: wl-351:amber:power
[ 2.930000] Registered led device: wl-351:amber:unpopulated
[ 2.930000] Registered led device: wl-351:blue:unpopulated
[ 7.750000] Compat-drivers backport release: compat-drivers-2013-01-21-1
[ 7.770000] Backport based on wireless-testing.git master-2013-02-22
[ 7.780000] compat.git: wireless-testing.git
[ 7.820000] cfg80211: Calling CRDA to update world regulatory domain
[ 7.830000] cfg80211: World regulatory domain updated:
[ 7.840000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 7.860000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 7.870000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 7.890000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 7.900000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 7.920000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 8.410000] usbcore: registered new interface driver usbfs
[ 8.420000] usbcore: registered new interface driver hub
[ 8.430000] usbcore: registered new device driver usb
[ 8.760000] phy0 -> rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'soc_wmac.eeprom'.
[ 8.940000] phy0 -> rt2x00lib_request_eeprom_file: Error - Failed to request EEPROM.
[ 8.950000] rt2800_wmac: probe of rt2800_wmac.0 failed with error -2
[ 9.010000] PPP generic driver version 2.4.2
[ 9.180000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 9.420000] NET: Registered protocol family 24
[ 9.450000] nf_conntrack version 0.5.0 (465 buckets, 1860 max)
[ 9.760000] Realtek RTL8366RB ethernet switch driver version 0.2.3
[ 9.770000] rtl8366rb rtl8366rb: using GPIO pins 1 (SDA) and 2 (SCK)
[ 9.790000] rtl8366rb rtl8366rb: RTL5937 ver. 3 chip found
[ 9.870000] libphy: rtl8366rb: probed
[ 9.960000] dwc_otg: version 2.72a 24-JUN-2008
[ 9.970000] dwc_otg: Core Release: 2.66a
[ 10.180000] dwc_otg: Periodic Transfer Interrupt Enhancement - disabled
[ 10.190000] dwc_otg: Multiprocessor Interrupt Enhancement - disabled
[ 10.200000] dwc_otg: Using DMA mode
[ 10.210000] dwc_otg: Device using Buffer DMA mode
[ 10.220000] dwc_otg dwc_otg.0: DWC OTG Controller
[ 10.230000] dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 1
[ 10.240000] dwc_otg dwc_otg.0: irq 26, io mem 0x101c0000
[ 10.250000] dwc_otg: Init: Port Power? op_state=1
[ 10.260000] dwc_otg: Init: Power Port (0)
[ 10.270000] hub 1-0:1.0: USB hub found
[ 10.280000] hub 1-0:1.0: 1 port detected
[ 14.920000] device eth0.1 entered promiscuous mode
[ 14.930000] device eth0 entered promiscuous mode
[ 14.950000] br-lan: port 1(eth0.1) entered forwarding state
[ 14.960000] br-lan: port 1(eth0.1) entered forwarding state
[ 15.910000] ramips-wdt: timeout value 60 must be 0 < timeout <= 33, using 33
[ 16.960000] br-lan: port 1(eth0.1) entered forwarding state
[ 30.710000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[ 30.750000] jffs2_build_filesystem(): unlocking the mtd device... done.
[ 30.760000] jffs2_build_filesystem(): erasing all blocks after the end marker... done.
[ 43.490000] jffs2: notice: (957) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.



SQLserver 互換レベルでスナップショットレプリケーションが失敗

$
0
0

SQLServer 2008 のレプリケーションが以下のメッセージで失敗した。

Message: テーブル 'dbo.A06_Kousya' のスクリプトに失敗しました。 

Source: Microsoft.SqlServer.Smo
Target Site: System.Collections.Generic.IEnumerable`1[System.String] ScriptWithList(Microsoft.SqlServer.Management.Smo.DependencyCollection, Microsoft.SqlServer.Management.Smo.SqlSmoObject[])
Message: テーブル 'dbo.A_Ktbl' のスクリプトに失敗しました。
Stack: 場所 Microsoft.SqlServer.Management.Smo.Scripter.ScriptWithList(DependencyCollection depList, SqlSmoObject[] objects)
場所 Microsoft.SqlServer.Management.Smo.Scripter.ScriptWithList(SqlSmoObject[] objects)
場所 Microsoft.SqlServer.Replication.Snapshot.TransSmoScriptingManager.GenerateLogBasedArticleSchScript(Scripter scripter, BaseArticleWrapper articleWrapper, Table smoTable)
場所 Microsoft.SqlServer.Replication.Snapshot.TransSmoScriptingManager.GenerateLogBasedArticleScripts(ArticleScriptingBundle articleScriptingBundle)
場所 Microsoft.SqlServer.Replication.Snapshot.TransSmoScriptingManager.GenerateArticleScripts(ArticleScriptingBundle articleScriptingBundle)
場所 Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.GenerateObjectScripts(ArticleScriptingBundle articleScriptingBundle)
場所 Microsoft.SqlServer.Replication.Snapshot.SmoScriptingManager.DoScripting()
場所 Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.DoScripting()
場所 Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
場所 Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
場所 Microsoft.SqlServer.Replication.AgentCore.Run() (ソース: Microsoft.SqlServer.Smo, エラー番号: 0)
ヘルプの表示: http://help/0
Source: Microsoft.SqlServer.Smo
Target Site: Void CheckCollation(System.String, Microsoft.SqlServer.Management.Smo.ScriptingOptions)
Message: 照合順序 'Japanese_90_BIN2' は、SQL Server 2000 ではサポートされていません。
Stack: 場所 Microsoft.SqlServer.Management.Smo.SqlSmoObject.CheckCollation(String collationName, ScriptingOptions so)
場所 Microsoft.SqlServer.Management.Smo.Column.ScriptDdlCreateImpl(StringBuilder sb, ScriptingOptions so)
場所 Microsoft.SqlServer.Management.Smo.Column.ScriptDdl(StringCollection queries, ScriptingOptions so)
場所 Microsoft.SqlServer.Management.Smo.Table.ScriptTableInternal(ScriptingOptions so, StringBuilder sb, ColumnCollection columns, IndexCollection indexes)
場所 Microsoft.SqlServer.Management.Smo.Table.GetTableCreationScript(ScriptingOptions so, StringBuilder sb)
場所 Microsoft.SqlServer.Management.Smo.Table.ScriptCreate(StringCollection queries, ScriptingOptions so)
場所 Microsoft.SqlServer.Management.Smo.SqlSmoObject.ScriptCreateInternal(StringCollection query, ScriptingOptions so)
場所 Microsoft.SqlServer.Management.Smo.Scripter.ScriptWithListWorker(DependencyCollection depList, SqlSmoObject[] objects)
場所 Microsoft.SqlServer.Management.Smo.Scripter.ScriptWithList(DependencyCollection depList, SqlSmoObject[] objects) (ソース: Microsoft.SqlServer.Smo, エラー番号: 0)
ヘルプの表示: http://help/0




レプリケーション元もレプリケーション先も同じ SQL2008 だが,レプリケーション対象のDBの互換レベルが SQL2000(80) だった。 

レプリケーション元のSQLではパブリッシャーとディストリビューターが動作するが,ディストリビューターは,SQL2000(80)のDBをサポートしていないようだ。
レプリケーション対象の DB を alter database で,互換レベル SQL2008(100)に上げると,レプリケーションは成功した。 

互換レベルは照合順序などでアプリケーションに影響するので簡単には上げれない。
レプリケーション時に一時的に互換レベルを上げて,終わったら元に戻すような設定もできるが,万一互換レベルが戻らないとアプリケーションに影響が出る可能性がある。


PR: 広告・Webの求人情報・転職支援はマスメディアン

$
0
0
宣伝会議グループの人材紹介会社。広告・Webの求人数・転職支援実績NO.1クラス

Kali linux リリース backtrack の後継?

$
0
0

Kali 5days
3月13日に Kali linux 1.0 がリリースされていた。
http://www.backtrack-linux.org/backtrack/kali-linux-has-been-released/
http://www.kali.org/

backtrack は,windows とデュアルブートにしており,デスクトップ linux はほとんどこれしか使っていない。backtrack 2から使っているが,3までは slax で,4から ubuntu になった。

Kali linux は backtrack の後継なのかはっきりとは分からないが龍のマークも一緒だしたぶん後継だと思う。Kali is a complete re-build of BackTrack Linux とか backtrack reborn なので,Kali は backtrack とは別物として,1から再開発されたようだ。 

分かっていることは,backtrack はubuntu ベースだが Kali は debian ベース。backtrack 同様無償提供される。ペネトレーションツールはbacktrack にあったツールを見直して選定しなおしている。

デフォルトで,シングルユーザ root のみのところやネットワークサービスが非起動になっているところは backtrack と同じだ。

未だダウンロードしてないが,GNOMEしか選択できなかった。KDEは無くなったみたいだ。

mysql csv エキスポート シェルスクリプト

$
0
0

mysql のテーブルを csv ファイルにエキスポートするシェルスクリプト。

#! /bin/sh

if [ -e /tmp/tabledata.csv ]; then
rm /tmp/tabledata.csv
fi

mysql -u [USER] --password='[PASS]' [DB名]<< EOF
select * from datatable
into outfile "/tmp/tabledata.csv"
character set SJIS
fields terminated by ','
lines terminated by '\r\n' ;
exit
EOF

select 文の結果を CSV ファイルに出力する。ただしこのままでは,テーブルの項目名は出力されない。select ‘id’,’name’,’birth’ union select id,name,birth from datatable の様に,union でつなげる。

上記の例では,SJISへの変換,項目区切りカンマ,改行 LF+CR にしている。

linux から windows 共有フォルダ ファイル転送 シェルスクリプト

$
0
0

linux から windows 共有フォルダにファイルを転送するシェルスクリプト。

#! /bin/sh

if [ -e /tmp/data.dat ]; then
cd /tmp
smbclient \\\\[SERVER]\\[SHARE] --workgroup=[WORKGROUP]
--user=[USER] [PASS]  -c "put data.dat"
fi

¥マークの数に注意が必要だ。
ファイルの存在を確認後,smbclient コマンドでファイル転送を行う。

 

毎日4時15分にシェルスクリプト起動

$
0
0

cron で,毎日4時15分にシェルスクリプト起動,結果をログファイルに出力

crontab -e
# m h dom mon dow command
15 4 * * * /var/www/csv_exp.sh >> /var/log/csv_exp.log 2>&1

UNIXという考え方

$
0
0

UNIX という考え方(オーム社)は,平成13年2月に第1版第1刷が出版,平成24年6月に第16刷。
UNIX の考え方は,そのまま Linux,FreeBSD の考え方なので,現在それらを勉強したり,仕事で使っている人にも十分有用な内容だ。

生まれてから何十年もの間,移植性やずっと上手くやってきた UNIX の考え方は,参考になるノウハウがいっぱいで,どんな分野でも生かせると思う。
UNIX の考え方を事務処理,文書整理,スケジュール管理,その他いろんな日々の仕事で生かせれば,いろんなことが上手く行くような気がする。

Viewing all 288 articles
Browse latest View live