今日はいっぱい作業できてうれしいなぁ!(ぇ
玄箱のfedora ARMに新しいHDDを繋いで、マウントします。
ぁ、fedora ARMのカーネルも新しいのに差し替えてからね。
# mount -t ext4 /dev/sdb2 /mnt/debroot
ぉ、マウントできた!
マウント先でdebootstrapの2段階目を実行です!
# cd /mnt/debroot/debootstrap # export DEBOOTSTRAP_DIR=`pwd` # ./debootstrap --second-stage --second-stage-target=/mnt/debroot/
debootstrap完了♪
あとは、マニュアルどおりな感じです。
http://www.debian.org/releases/stable/arm/apds03.html.ja
chrootします。
# LANG=C chroot /mnt/debroot /bin/bash # export TERM=xterm-color
デバイスファイルを作ります。
# cd /dev MAKEDEV generic
マウントの定義を用意しましょう。
# vi /etc/fstab /dev/sda2 / ext4 defaults 0 1 /dev/sda1 /boot ext3 ro,nosuid,nodev 0 2 /dev/sda3 none swap sw 0 0 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0 devpts /dev/pts devpts gid=4,mode=620 0 0
よし、/procをマウントします。
# mount -t proc proc /proc
タイムゾーンを設定します。
# vi /etc/default/rcS # tzconfig WARNING: the tzconfig command is deprecated, please use: dpkg-reconfigure tzdata
古いといわれるので、言われたとおりのコマンドを実行っと。
# dpkg-reconfigure tzdata
/etc/network/interfaces, /etc/resolv.conf, /etc/hostname, /etc/hosts を編集して、
/etc/apt/sources.listを編集したら、パッケージ更新します。
# aptitude update
良い感じにできあがってきて、テンション上がってきたw
ロケールを設定しよー。
# aptitude install locales # dpkg-reconfigure locales
/etc/inittabを編集して、シリアルコンソールを玄箱PROに併せます。
# vi /etc/inittab - #T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 + T0:12345:respawn:/sbin/getty -L ttyS0 115200 vt100 # MAKEDEV ttyS0 # MAKEDEV ttyS1
/etc/default/halt もhaltに書き換え。
rootユーザーのパスワードを変えようと…
# passwd
selinuxに拒否られたw
selinux用のパッケージをインストールしておいて、リブート後に設定しよう…
# aptitude install selinux-basics selinux-policy-default selinux-utils
これで一通り終了のハズ…
# apt-get clean # umount /proc # exit
kernelを新しいHDDの方にコピーしておきます。
# tar -xjvf modules.tar.bz2 -C /mnt/debroot/lib/modules # umount /mnt/debroot # rmdir /mnt/debroot # mkdir /mnt/debboot # mount -t ext3 /dev/sdb1 /mnt/debboot # cp /boot/uImage.buffalo /mnt/debboot # umount /mnt/debboot # rmdir /mnt/debboot # shutdown -h now
とうとうやってきました。。。
HDDを入れ替えて…ブート!
Orion1 CPU = Low === KURO U-Boot. === ** LOADER ** ** KUROBOX BOARD: KURO_BOX LE (CFG_ENV_ADDR=fffff000) U-Boot 1.1.1 (Apr 10 2007 - 18:10:08) Marvell version: 1.12.1 - TINY DRAM CS[0] base 0x00000000 size 128MB DRAM Total size 128MB [256kB@fffc0000] Flash: 256 kB Addresses 20M - 0M are saved for the U-Boot usage. Mem malloc Initialization (20M - 16M): Done NAND: 256 MB Soc: 88F5182 A2 CPU: ARM926 (Rev 0) running @ 500Mhz Orion 1 streaming disabled SysClock = 250Mhz , TClock = 166Mhz USB 0: host mode USB 1: host mode PCI 0: PCI Express Root Complex Interface PCI 1: Conventional PCI, speed = 33000000 Net: egiga0 [PRIME] Using 88E1118 phy hit any key to switch tftp boot. Hit any key to stop autoboot: 0 <<system_bootend>> Hit any key to stop autoboot: 0 Reset IDE: Marvell Serial ATA Adapter Integrated Sata device found Device 0: OK Model: Hitachi HDT721010SLA360 Firm: ST6OA31B Ser#: STF604MR25E45P Type: Hard Disk Supports 48-bit addressing Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512) Using device ide0, partition 1 Loading from block device ide device 0, partition 1: Name: hda1 Type: U-Boot File:/uImage.buffalo 2132328 bytes read <<stop_sound>> ## Booting image at 00100000 ... Image Name: Linux-2.6.29.1-090411 Created: 2009-04-10 17:31:32 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2132264 Bytes = 2 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK OK Starting kernel ... arg:console=ttyS0,115200 mem=128M root=/dev/sda2 rw panic=5 BOOTVER=1.09 Uncompressing Linux........................................................................................................................................... done, booting the kernel. Linux version 2.6.29.1-090411 (webmaster@srv01.love2hina.net) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #3 PREEMPT Sat Apr 11 02:31:18 JST 2009 CPU: Feroceon [41069260] revision 0 (ARMv5TEJ), cr=a0053177 CPU: VIVT data cache, VIVT instruction cache Machine: Buffalo/Revogear Kurobox Pro Clearing invalid memory bank 0KB@0xffffffff Clearing invalid memory bank 0KB@0xffffffff Clearing invalid memory bank 0KB@0xffffffff Ignoring unrecognised tag 0x00000000 Ignoring unrecognised tag 0x00000000 Ignoring unrecognised tag 0x00000000 Ignoring unrecognised tag 0x41000403 Memory policy: ECC disabled, Data cache writeback Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512 Kernel command line: console=ttyS0,115200 mem=128M root=/dev/sda2 rw panic=5 BOOTVER=1.09 PID hash table entries: 512 (order: 9, 2048 bytes) Console: colour dummy device 80x30 Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 128MB = 128MB total Memory: 125296KB available (4072K code, 275K data, 116K init) Calibrating delay loop... 266.24 BogoMIPS (lpj=1331200) Security Framework initialized SELinux: Initializing. Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok net_namespace: 724 bytes NET: Registered protocol family 16 Orion ID: MV88F5182-A2. TCLK=166666667. Applying Orion-1/Orion-NAS PCIe config read transaction workaround PCI: bus0: Fast back to back transfers disabled bio: create slab <bio-0> at 0 SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 4096 (order: 3, 32768 bytes) TCP bind hash table entries: 4096 (order: 2, 16384 bytes) TCP: Hash tables configured (established 4096 bind 4096) TCP reno registered NET: Registered protocol family 1 NetWinder Floating Point Emulator V0.97 (extended precision) audit: initializing netlink socket (disabled) type=2000 audit(0.310:1): initialized JFFS2 version 2.2. (NAND) c 2001-2006 Red Hat, Inc. SGI XFS with security attributes, large block/inode numbers, no debug enabled msgmni has been set to 245 alg: No test for stdrng (krng) io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered (default) Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 3) is a 16550A console [ttyS0] enabled serial8250.1: ttyS1 at MMIO 0xf1012100 (irq = 4) is a 16550A brd: module loaded loop: module loaded MV-643xx 10/100/1000 ethernet driver version 1.4 mv643xx_eth smi: probed eth0 (mv643xx_eth_port): not using net_device_ops yet net eth0: port 0 with MAC address 00:16:01:a4:d3:4f tun: Universal TUN/TAP device driver, 1.6 tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com> Driver 'sd' needs updating - please use bus_type methods Driver 'sr' needs updating - please use bus_type methods sata_mv sata_mv.0: version 1.25 sata_mv sata_mv.0: slots 32 ports 2 scsi0 : sata_mv scsi1 : sata_mv ata1: SATA max UDMA/133 irq 29 ata2: SATA max UDMA/133 irq 29 ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) ata1.00: ATA-8: Hitachi HDT721010SLA360, ST6OA31B, max UDMA/133 ata1.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32) ata1.00: configured for UDMA/133 scsi 0:0:0:0: Direct-Access ATA Hitachi HDT72101 ST6O PQ: 0 ANSI: 5 sd 0:0:0:0: [sda] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 0:0:0:0: [sda] 1953525168 512-byte hardware sectors: (1.00 TB/931 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sda: sda1 sda2 sda3 sda4 sd 0:0:0:0: [sda] Attached SCSI disk sd 0:0:0:0: Attached scsi generic sg0 type 0 ata2: SATA link down (SStatus 0 SControl 300) physmap platform flash device: 00040000 at f4000000 Found: SST 39LF020 physmap-flash.0: Found 1 x8 devices at 0x0 in 8-bit bank number of JEDEC chips: 1 cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. RedBoot partition parsing not available ftl_cs: FTL header not found. NAND device: Manufacturer ID: 0x20, Chip ID: 0xda (ST Micro NAND 256MiB 3,3V 8-bit) Scanning device for bad blocks Creating 3 MTD partitions on "orion_nand": 0x000000000000-0x000000400000 : "uImage" ftl_cs: FTL header not found. 0x000000400000-0x000004400000 : "rootfs" ftl_cs: FTL header not found. 0x000004400000-0x000010000000 : "extra" ftl_cs: FTL header not found. ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver orion-ehci orion-ehci.0: Marvell Orion EHCI orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1 orion-ehci orion-ehci.0: irq 17, io mem 0xf1050000 orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00 usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected orion-ehci orion-ehci.1: Marvell Orion EHCI orion-ehci orion-ehci.1: new USB bus registered, assigned bus number 2 orion-ehci orion-ehci.1: irq 12, io mem 0xf10a0000 orion-ehci orion-ehci.1: USB 2.0 started, EHCI 1.00 usb usb2: configuration #1 chosen from 1 choice hub 2-0:1.0: USB hub found hub 2-0:1.0: 1 port detected ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver uhci_hcd: USB Universal Host Controller Interface driver Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. mice: PS/2 mouse device common for all mice i2c /dev entries driver rtc-rs5c372 0-0032: rs5c372a found, 24hr, driver version 0.6 rtc-rs5c372 0-0032: rtc core: registered rtc-rs5c372 as rtc0 cpuidle: using governor ladder cpuidle: using governor menu usbcore: registered new interface driver usbhid usbhid: v2.6:USB HID core driver TCP cubic registered NET: Registered protocol family 17 VFP support v0.3: not present rtc-rs5c372 0-0032: setting system clock to 2009-04-11 03:52:32 UTC (1239421952) EXT3-fs: sda2: couldn't mount because of unsupported optional features (240). EXT2-fs: sda2: couldn't mount because of unsupported optional features (240). EXT4-fs: barriers enabled kjournald2 starting: pid 381, dev sda2:8, commit interval 5 seconds EXT4 FS on sda2, internal journal on sda2:8 EXT4-fs: delayed allocation enabled EXT4-fs: file extents enabled EXT4-fs: mballoc enabled EXT4-fs: mounted filesystem sda2 with ordered data mode VFS: Mounted root (ext4 filesystem) on device 8:2. Freeing init memory: 116K SELinux: class kernel_service not defined in policy SELinux: the above unknown classes and permissions will be denied type=1403 audit(1239421952.914:2): policy loaded auid=4294967295 ses=4294967295 INIT: version 2.86 booting Setting the system clock. Cannot access the Hardware Clock via any known method. Use the --debug option to see the details of our search for an access method. Unable to set System Clock to: Sat Apr 11 12:52:35 JST 2009 (warning). Activating swap...Adding 996020k swap on /dev/sda3. Priority:-1 extents:1 across:996020k done. Checking root file system...fsck 1.41.3 (12-Oct-2008) /dev/sda2: clean, 15895/625856 files, 172086/2500115 blocks done. EXT4 FS on sda2, internal journal on sda2:8 Setting the system clock. Cannot access the Hardware Clock via any known method. Use the --debug option to see the details of our search for an access method. Unable to set System Clock to: Sat Apr 11 12:52:36 JST 2009 (warning). Cleaning up ifupdown.... Loading kernel modules...done. Checking file systems...fsck 1.41.3 (12-Oct-2008) /dev/sda1: clean, 12/32128 files, 11818/128488 blocks done. Setting kernel variables (/etc/sysctl.conf)...done. Mounting local filesystems...kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. done. Activating swapfile swap...done. Checking SELinux contexts: selinux-basics selinux contexts incorrect, please try relabeling and a reboot (init should not be running as kernel_t) failed! . Setting up networking.... Configuring network interfaces...Internet Systems Consortium DHCP Client V3.1.1 Copyright 2004-2008 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ type=1400 audit(1239421961.474:3): avc: denied { associate } for pid=633 comm="dhclient3" name="dhclient.eth0.leases" scontext=system_u:object_r:unlabeled_t:s0 tcontext=system_u:object_r:fs_t:s0 tclass=filesystem Listening on LPF/eth0/00:16:01:a4:d3:4f Sending on LPF/eth0/00:16:01:a4:d3:4f Sending on Socket/fallback eth0: link up, 1000 Mb/s, full duplex, flow control disabled DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5 DHCPOFFER from 192.168.0.1 DHCPREQUEST on eth0 to 255.255.255.255 port 67 DHCPACK from 192.168.0.1 bound to 192.168.0.137 -- renewal in 16400 seconds. done. INIT: Entering runlevel: 2 Starting enhanced syslogd: rsyslogdtype=1400 audit(1239421971.274:4): avc: denied { execstack } for pid=727 comm="rsyslogd" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process type=1400 audit(1239421971.298:5): avc: denied { execmem } for pid=727 comm="rsyslogd" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process . Starting file context maintaining daemon: restorecond. Starting periodic command scheduler: crond. Debian GNU/Linux 5.0 home.love2hina.net ttyS0 home.love2hina.net login:
とりあえずキター!
SELinuxのルール作りはとりあえず、置いておいて…
ハードウェアクロックのwarningは気になるけどw
あとは環境設定を気づいたところからぼちぼちとやりますか。