某 Windows 系の開発者が多く集まる勉強会で、
「あなた達は、
新品の HDD と Windows のインストール CD を使って、
fdisk して、format して cab ファイルを手で解いて、
regedit でレジストリを全部手動で設定して、
c:\Program Files を手で作って、
c:\Document and Settings を手で作って、
Windows が動く HDD を作れますよね?」
と言ったら、誰もできるとは言わなかった(そりゃそーだ
冗談はさておき、、、
今回は、LS-XHL を使う
Jun 26 15:52:47 UNINSPECT8DF kernel: usb 1-1: new high speed USB device using ehci_marvell and address 2 Jun 26 15:52:47 UNINSPECT8DF kernel: usb 1-1: configuration #1 chosen from 1 choice Jun 26 15:52:47 UNINSPECT8DF kernel: scsi2 : SCSI emulation for USB Mass Storage devices Jun 26 15:52:52 UNINSPECT8DF kernel: scsi 2:0:0:0: Direct-Access ViPowER VP-89118(SD1) 2.10 PQ: 0 ANSI: 4 Jun 26 15:52:52 UNINSPECT8DF kernel: sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB) Jun 26 15:52:52 UNINSPECT8DF kernel: sd 2:0:0:0: [sdb] Write Protect is off Jun 26 15:52:52 UNINSPECT8DF kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through Jun 26 15:52:52 UNINSPECT8DF kernel: sd 2:0:0:0: [sdb] 976773168 512-byte hardware sectors (500108 MB) Jun 26 15:52:52 UNINSPECT8DF kernel: sd 2:0:0:0: [sdb] Write Protect is off Jun 26 15:52:52 UNINSPECT8DF kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through Jun 26 15:52:52 UNINSPECT8DF kernel: sdb: sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 Jun 26 15:52:52 UNINSPECT8DF kernel: sd 2:0:0:0: [sdb] Attached SCSI disk Jun 26 15:52:52 UNINSPECT8DF kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0 Jun 26 15:52:53 UNINSPECT8DF kernel: FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive! Jun 26 15:52:54 UNINSPECT8DF kernel: kjournald starting. Commit interval 5 seconds Jun 26 15:52:54 UNINSPECT8DF kernel: EXT3 FS on sdb1, internal journal Jun 26 15:52:54 UNINSPECT8DF kernel: EXT3-fs: mounted filesystem with ordered data mode. Jun 26 15:53:00 UNINSPECT8DF nmbd[1243]: [2010/06/26 15:53:00, 0] nmbd/nmbd.c:terminate(58) Jun 26 15:53:00 UNINSPECT8DF nmbd[1243]: Got SIGTERM: going down... Jun 26 15:53:14 UNINSPECT8DF mt-daapd[12090]: Starting rendezvous daemon Jun 26 15:53:14 UNINSPECT8DF mt-daapd[12092]: Starting signal handler Jun 26 15:53:14 UNINSPECT8DF mt-daapd[12092]: Loading playlists Jun 26 15:53:14 UNINSPECT8DF mt-daapd[12092]: Initializing database Jun 26 15:53:14 UNINSPECT8DF mt-daapd[12092]: Starting mp3 scan Jun 26 15:53:14 UNINSPECT8DF mt-daapd[12092]: Starting web server from /usr/local/share/mt-daapd/admin-root on port 3689 Jun 26 15:53:14 UNINSPECT8DF mt-daapd[12092]: Registering rendezvous names Jun 26 15:53:14 UNINSPECT8DF mt-daapd[12092]: Scanned 0 songs in 1 seconds
sh-3.2# mkdir /tmp/boot sh-3.2# mount /dev/sdb1 /tmp/boot sh-3.2# ls /tmp/boot conf_save.tgz initrd.buffalo uImage.buffalo hddrootfs.buffalo.updated.done log.tgz sh-3.2#
sh-3.2# mkdir /mnt/disk1/LS-AVL sh-3.2# (cd /tmp; tar cf - boot)|(cd /mnt/disk1/LS-AVL/; tar xvf -) boot/ boot/initrd.buffalo boot/uImage.buffalo boot/log.tgz boot/hddrootfs.buffalo.updated.done boot/conf_save.tgz sh-3.2#
sh-3.2# umount /tmp/boot sh-3.2#
sh-3.2# mkdir /tmp/root sh-3.2# mount /dev/sdb2 /tmp/root sh-3.2# ls /tmp/root bin boot dev etc home initrd lib mnt proc root sbin sys tmp usr var www sh-3.2#
sh-3.2# (cd /tmp/root; tar cf - lib/modules)|(cd /mnt/disk1/LS-AVL/; tar xvf -) lib/modules/ lib/modules/2.6.22.7-88f5182/ : : lib/modules/2.6.22.18-88f6281/modules.dep lib/modules/2.6.22.18-88f6281/modules.ofmap lib/modules/2.6.22.18-88f6281/modules.symbols lib/modules/2.6.22.18-88f6281/modules.seriomap sh-3.2#
sh-3.2# umount /tmp/root sh-3.2#
sh-3.2# cd /mnt/disk1/share/hackkit/ sh-3.2# ls hackkit_091122.tar.gz hackkit_091128.sh hackkit_config.sample mkimage sh-3.2#
インストーラである hackkit_091128.sh を修正する。
sh-3.2# cp hackkit_091128.sh hackkit_100626_LS-AVL.sh sh-3.2# vi hackkit_100626_LS-AVL.sh : : sh-3.2# diff hackkit_091128.sh hackkit_100626_LS-AVL.sh Binary files hackkit_091128.sh and hackkit_100626_LS-AVL.sh differ sh-3.2# diff -a hackkit_091128.sh hackkit_100626_LS-AVL.sh --- hackkit_091128.sh Sat Nov 28 21:57:38 2009 +++ hackkit_100626_LS-AVL.sh Sat Jun 26 16:12:54 2010 @@ -377,7 +377,8 @@ echo copying /lib/modules ... cd / - tar cf - lib/modules | (cd $MOUNTPOINT ; tar xvf -) +# tar cf - lib/modules | (cd $MOUNTPOINT ; tar xvf -) + tar cf - /mnt/disk1/LS-AVL/boot/lib/modules | (cd $MOUNTPOINT ; tar xvf -) } #--------------------------------------------------------- @@ -594,7 +595,8 @@ fi echo copying /boot ... - (cd /boot ; tar cf - initrd.buffalo uImage.buffalo)|(cd $MOUNTPOINT/boot; tar xvf -) +# (cd /boot ; tar cf - initrd.buffalo uImage.buffalo)|(cd $MOUNTPOINT/boot; tar xvf -) + (cd /mnt/disk1/LS-AVL/boot/boot ; tar cf - initrd.buffalo uImage.buffalo)|(cd $MOUNTPOINT/boot; tar xvf -) } #--------------------------------------------------------- @@ -765,6 +767,9 @@ DATAPARTITION="" RAID=yes + ;; +0x80000080) + MACHINE=LSAVL ;; *) echo unknown PRODUCTID = "$PRODUCTID" sh-3.2#こんなところか
Jun 26 16:18:06 UNINSPECT8DF kernel: usb 1-1: new high speed USB device using ehci_marvell and address 3 Jun 26 16:18:06 UNINSPECT8DF kernel: usb 1-1: configuration #1 chosen from 1 choice Jun 26 16:18:06 UNINSPECT8DF kernel: scsi3 : SCSI emulation for USB Mass Storage devices Jun 26 16:18:11 UNINSPECT8DF kernel: scsi 3:0:0:0: Direct-Access ViPowER VP-89118(SD1) 2.10 PQ: 0 ANSI: 4 Jun 26 16:18:11 UNINSPECT8DF kernel: sd 3:0:0:0: [sdb] 488283264 512-byte hardware sectors (250001 MB) Jun 26 16:18:11 UNINSPECT8DF kernel: sd 3:0:0:0: [sdb] Write Protect is off Jun 26 16:18:11 UNINSPECT8DF kernel: sd 3:0:0:0: [sdb] Assuming drive cache: write through Jun 26 16:18:11 UNINSPECT8DF kernel: sd 3:0:0:0: [sdb] 488283264 512-byte hardware sectors (250001 MB) Jun 26 16:18:11 UNINSPECT8DF kernel: sd 3:0:0:0: [sdb] Write Protect is off Jun 26 16:18:11 UNINSPECT8DF kernel: sd 3:0:0:0: [sdb] Assuming drive cache: write through Jun 26 16:18:11 UNINSPECT8DF kernel: sdb: sdb1 sdb2 sdb3 sdb4 < sdb5 sdb6 > Jun 26 16:18:11 UNINSPECT8DF kernel: sd 3:0:0:0: [sdb] Attached SCSI disk Jun 26 16:18:11 UNINSPECT8DF kernel: sd 3:0:0:0: Attached scsi generic sg1 type 0 Jun 26 16:18:12 UNINSPECT8DF kernel: FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive! Jun 26 16:18:12 UNINSPECT8DF kernel: EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended Jun 26 16:18:18 UNINSPECT8DF nmbd[22370]: [2010/06/26 16:18:18, 0] nmbd/nmbd.c:terminate(58) Jun 26 16:18:18 UNINSPECT8DF nmbd[22370]: Got SIGTERM: going down...何やらパーティションがある
sh-3.2# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 4993984 376192 4617792 8% / /dev/ram1 15360 112 15248 1% /mnt/ram /dev/sda1 996052 159832 836220 16% /boot /dev/disk1_6 187419036 323676 187095360 0% /mnt/disk1 /dev/usbdisk1_1 202208 125880 74244 63% /mnt/usbdisk1 sh-3.2# umount /mnt/usbdisk1/ sh-3.2# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 4993984 376192 4617792 8% / /dev/ram1 15360 112 15248 1% /mnt/ram /dev/sda1 996052 159832 836220 16% /boot /dev/disk1_6 187419036 323676 187095360 0% /mnt/disk1 sh-3.2#
sh-3.2# parted -s /dev/sdb print Model: ViPowER VP-89118(SD1) (scsi) Disk /dev/sdb: 250GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 8225kB 222MB 214MB primary ext2 2 222MB 642MB 419MB primary ext3 3 642MB 1727MB 1086MB primary linux-swap 4 1727MB 250GB 248GB extended 5 1727MB 2270MB 543MB logical ext3 6 2270MB 250GB 248GB logical sh-3.2# parted -s /dev/sdb rm 4 sh-3.2# parted -s /dev/sdb rm 3 sh-3.2# parted -s /dev/sdb rm 2 sh-3.2# parted -s /dev/sdb rm 1 sh-3.2# parted -s /dev/sdb print Model: ViPowER VP-89118(SD1) (scsi) Disk /dev/sdb: 250GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags sh-3.2# fdisk /dev/sdb The number of cylinders for this disk is set to 30394. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/sdb: 250.0 GB, 250001031168 bytes 255 heads, 63 sectors/track, 30394 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System Command (m for help): q sh-3.2#
sh-3.2# parted -s /dev/sdb mklabel gpt sh-3.2#
sh-3.2# parted -s /dev/sdb mkpart primary ext3 0 1024M sh-3.2# parted -s /dev/sdb mkpart primary xfs 1024MB 6144MB sh-3.2# parted -s /dev/sdb mkpart primary linux-swap 6144MB 7168MB sh-3.2# parted -s /dev/sdb mkpart primary xfs 7168MB 250GB sh-3.2# parted -s /dev/sdb print Model: ViPowER VP-89118(SD1) (scsi) Disk /dev/sdb: 250GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 17.4kB 1024MB 1024MB primary 2 1024MB 6144MB 5120MB primary 3 6144MB 7168MB 1024MB primary 4 7168MB 250GB 243GB primary sh-3.2#File system が表示されていないが、、、
sh-3.2# cd /mnt/disk1/share/hackkit/ sh-3.2# ls hackkit_091122.tar.gz hackkit_091128.sh hackkit_100626_LS-AVL.sh hackkit_config.sample mkimage sh-3.2# cp hackkit_config.sample hackkit_config sh-3.2# vi hackkit_config : : sh-3.2# cat hackkit_config ADDRESS=192.168.2.54 HOSTNAME=av sh-3.2#
sh-3.2# sh hackkit_100626_LS-AVL.sh PRODUCTID = 0x80000080 MACHINE LSAVL formating hard drive ... mke2fs 1.40.5 (27-Jan-2008) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 62720 inodes, 249995 blocks 12499 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=260046848 8 block groups 32768 blocks per group, 32768 fragments per group 7840 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 20 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. meta-data=/dev/sdb2 isize=256 agcount=8, agsize=156250 blks = sectsz=512 attr=0 data = bsize=4096 blocks=1250000, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=2560, version=1 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=4096 blocks=0, rtextents=0 Setting up swapspace version 1, size = 1023995904 bytes meta-data=/dev/sdb4 isize=256 agcount=16, agsize=3705337 blks = sectsz=512 attr=0 data = bsize=4096 blocks=59285392, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal log bsize=4096 blocks=28947, version=1 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=4096 blocks=0, rtextents=0 mounting root file system ... extracting hackkit archive ... ./ ./var/ ./var/lib/ ./var/lib/apt/ ./var/lib/apt/lists/ : : ./selinux/ ./srv/ ./opt/ ./media/ ./initrd/ creating miconapl ... creating kernelmon ... copying /lib/modules ... tar: Removing leading `/' from member names mnt/disk1/LS-AVL/lib/modules/ mnt/disk1/LS-AVL/lib/modules/2.6.22.7-88f5182/ mnt/disk1/LS-AVL/lib/modules/2.6.22.7-88f5182/modules.ieee1394map : : mnt/disk1/LS-AVL/lib/modules/2.6.22.18-88f6281/modules.seriomap creating usb ... checking /dev/sdb1 fsck 1.40.5 (27-Jan-2008) e2fsck 1.40.5 (27-Jan-2008) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/sdb1: 11/62720 files (9.1% non-contiguous), 6399/249995 blocks mounting /boot ... copying /boot ... initrd.buffalo uImage.buffalo editing initrd ... 138855+1 records in 138855+1 records out gunziping /mnt/debinst/boot/initrd.gz ... gziping /mnt/debinst/boot/initrd ... wait 5 minutes Image Name: initrd Created: Sat Jun 26 16:38:07 2010 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 8834189 Bytes = 8627.14 kB = 8.42 MB Load Address: 0x00000000 Entry Point: 0x00000000 unmount /boot ... sh-3.2#できたみたい。
Debian GNU/Linux 5.0 av login: guest Password: Linux av 2.6.22.18-88f6281 #102 Tue May 11 19:14:05 JST 2010 armv5tejl The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. No directory, logging in with HOME=/ guest@av:/$きたー
OSC Kansai 2010 @ Kyoto に間に合った。
|
← 第三世代 LinkStation ハックキット |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ analog のインストール |