root@LS-VL815:~# date Sun Nov 28 23:25:00 JST 2010 root@LS-VL815:~#あってる。そういえばあってる
root@LS-VL815:~# tail -f /var/log/messages Nov 28 23:26:46 LS-VL815 kernel: usb 1-1: new high speed USB device using ehci_marvell and address 2 Nov 28 23:26:47 LS-VL815 kernel: usb 1-1: configuration #1 chosen from 1 choice Nov 28 23:26:47 LS-VL815 kernel: scsi2 : SCSI emulation for USB Mass Storage devices Nov 28 23:26:52 LS-VL815 kernel: scsi 2:0:0:0: Direct-Access ViPowER VP-89118(SD1) 2.10 PQ: 0 ANSI: 4 Nov 28 23:26:52 LS-VL815 kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0 Nov 28 23:26:52 LS-VL815 kernel: sd 2:0:0:0: [sdb] 488283264 512-byte logical blocks: (250 GB/232 GiB) Nov 28 23:26:52 LS-VL815 kernel: sd 2:0:0:0: [sdb] Write Protect is off Nov 28 23:26:52 LS-VL815 kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through Nov 28 23:26:52 LS-VL815 kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through Nov 28 23:26:52 LS-VL815 kernel: sdb: sdb1 sdb2 sdb3 sdb4 < sdb5 sdb6 > Nov 28 23:26:52 LS-VL815 kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through Nov 28 23:26:52 LS-VL815 kernel: sd 2:0:0:0: [sdb] Attached SCSI disk
root@LS-VL815:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 4989952 517540 4472412 10% / udev 10240 124 10116 1% /dev /dev/ram1 15360 140 15220 1% /mnt/ram /dev/sda1 992504 209352 783152 21% /boot /dev/disk1_6 473337664 104688 473232976 0% /mnt/disk1 tmpfs 8192 2020 6172 25% /mnt/ram/com.kernel.org root@LS-VL815:~#マウントされていない。
root@LS-VL815:~# 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 root@LS-VL815:~# fdisk -l /dev/sdb 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 /dev/sdb1 2 27 208845 83 Linux /dev/sdb2 28 78 409657+ 83 Linux /dev/sdb3 79 210 1060290 82 Linux swap /dev/sdb4 211 30394 242452980 5 Extended /dev/sdb5 211 276 530144+ 83 Linux /dev/sdb6 277 30394 241922834+ 83 Linux root@LS-VL815:~#パーティションがあるので、まずは消す。
root@LS-VL815:~# parted -s /dev/sdb rm 6 Error: Error informing the kernel about modifications to partition /dev/sdb5 -- Device or resource busy. This means Linux won't know about any changes you made to /dev/sdb5 until you reboot -- so you shouldn't mount it or use it in any way before rebooting. root@LS-VL815:~#なんで、sdb6 を消そうとしているのに、sdb5 がエラーになる??
root@LS-VL815:~# df Filesystem 1k-blocks Used Available Use% Mounted on /dev/sda2 4989952 517540 4472412 10% / udev 10240 120 10120 1% /dev /dev/ram1 15360 140 15220 1% /mnt/ram /dev/sda1 992504 209352 783152 21% /boot /dev/disk1_6 473337664 104688 473232976 0% /mnt/disk1 tmpfs 8192 2020 6172 25% /mnt/ram/com.kernel.org root@LS-VL815:~#マウントされたわけでもない。。。
root@LS-VL815:~# parted -s /dev/sdb rm 6 Error: Partition doesn't exist. root@LS-VL815:~# 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 root@LS-VL815:~#消えていた。謎
root@LS-VL815:~# parted -s /dev/sdb rm 5 root@LS-VL815:~# parted -s /dev/sdb rm 4 root@LS-VL815:~# parted -s /dev/sdb rm 3 root@LS-VL815:~# parted -s /dev/sdb rm 2 root@LS-VL815:~# parted -s /dev/sdb rm 1 root@LS-VL815:~# 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 root@LS-VL815:~# fdisk -l /dev/sdb 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 root@LS-VL815:~#パーティションテーブルを作る
root@LS-VL815:~# parted -s /dev/sdb mklabel gpt root@LS-VL815:~#パーティションを作る。
root@LS-VL815:~# parted -s /dev/sdb mkpart primary ext3 0 1024M root@LS-VL815:~# parted -s /dev/sdb mkpart primary xfs 1024MB 6144MB root@LS-VL815:~# parted -s /dev/sdb mkpart primary linux-swap 6144MB 7168MB root@LS-VL815:~# parted -s /dev/sdb mkpart primary xfs 7168MB 250GB root@LS-VL815:~# 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 root@LS-VL815:~#
root@LS-VL815:~# cd /mnt/disk1/share/hackkit/ root@LS-VL815:/mnt/disk1/share/hackkit# echo ADDRESS=192.168.2.55 > hackkit_config root@LS-VL815:/mnt/disk1/share/hackkit# echo HOSTNAME=vl >> hackkit_config root@LS-VL815:/mnt/disk1/share/hackkit#
root@LS-VL815:/mnt/disk1/share/hackkit# cp hackkit_091128.sh hackkit_101128.sh root@LS-VL815:/mnt/disk1/share/hackkit#おー。ちょうど1年。
root@LS-VL815:/mnt/disk1/share/hackkit# vi hackkit_101128.sh : : 0x00000016) MACHINE=LSVL ;; : :
root@LS-VL815:/mnt/disk1/share/hackkit# sh hackkit_101128.sh PRODUCTID = 0x00000016 MACHINE LSVL 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 30 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/ : : ./sys/ ./selinux/ ./srv/ ./opt/ ./media/ ./initrd/ creating miconapl ... creating kernelmon ... copying /lib/modules ... lib/modules/ lib/modules/2.6.22.7-88f5182/ : : lib/modules/2.6.31.8-svn22059/modules.order lib/modules/2.6.31.8-svn22059/modules.ofmap lib/modules/2.6.31.8-svn22059/modules.symbols lib/modules/2.6.31.8-svn22059/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 ... 170752+1 records in 170752+1 records out gunziping /mnt/debinst/boot/initrd.gz ... gziping /mnt/debinst/boot/initrd ... wait 5 minutes Image Name: initrd Created: Sun Nov 28 23:46:47 2010 Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 10875374 Bytes = 10620.48 kB = 10.37 MB Load Address: 0x00000000 Entry Point: 0x00000000 unmount /boot ... root@LS-VL815:/mnt/disk1/share/hackkit#
Debian GNU/Linux 5.0 vl login: guest Password: Linux vl 2.6.31.8-svn22059 #67 Mon Sep 13 09:42:55 JST 2010 armv5tel 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@vl:/$good going!
|
← initrd の /linuxrc を見る |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ 7周年 |