chl:~# mkdir /tmp/boot chl:~# mount /dev/sdb1 /tmp/boot chl:~# cd /tmp/boot chl:/tmp/boot# ls conf_save.tgz log.tgz uImage.buffalo hddrootfs.buffalo.updated.done u-boot.buffalo initrd.buffalo u-boot.buffalo.org chl:/tmp/boot#
chl:/tmp/boot# ftp ude.yamasita.jp Connected to ude.yamasita.jp. 220 ude FTP server (GNU inetutils 1.5) ready. Name (ude.yamasita.jp:guest): yasunari 331 Password required for yasunari. Password: 230- Linux ude 2.6.16.16-arm1 #37 Tue May 20 10:01:57 JST 2008 armv5tejl 230- 230- The programs included with the Debian GNU/Linux system are free software; 230- the exact distribution terms for each program are described in the 230- individual files in /usr/share/doc/*/copyright. 230- 230- Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent 230- permitted by applicable law. 230 User yasunari logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> cd /srv/tftp 250 CWD command successful. ftp> mkdir LS-CHL_1.21 257 (unknown absolute name) new directory created. ftp> cd LS-CHL_1.21 250 CWD command successful. ftp> bin 200 Type set to I. ftp> hash Hash mark printing on (1024 bytes/hash mark). ftp> put initrd.buffalo ############################(略) 226 Transfer complete. 8942705 bytes sent in 1.39 secs (6303.9 kB/s) ftp> put uImage.buffalo ############################(略) 226 Transfer complete. 2085680 bytes sent in 0.14 secs (14851.6 kB/s) ftp> ls 200 PORT command sucessful. 150 Opening ASCII mode data connection for '/bin/ls'. total 10776 -rw-r----- 1 root 8942705 Oct 4 22:36 initrd.buffalo -rw-r----- 1 root 2085680 Oct 4 22:36 uImage.buffalo 226 Transfer complete. ftp> bye 221 Goodbye. chl:/tmp/boot#
chl:/tmp/boot# cd / chl:/# umount /tmp/boot chl:/#
まずは、parted を使ってパーティションを消す
chl:/# parted -s /dev/sda print -su: parted: command not found chl:/#ふんがぁ
chl:/# apt-get install parted Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libparted1.8-10 Suggested packages: libparted1.8-dev libparted1.8-i18n parted-doc The following NEW packages will be installed: libparted1.8-10 parted 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 270kB of archives. After this operation, 623kB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://ftp.jp.debian.org lenny/main libparted1.8-10 1.8.8.git.2008.03.24-11.1 [202kB] Get:2 http://ftp.jp.debian.org lenny/main parted 1.8.8.git.2008.03.24-11.1 [67.6kB] Fetched 270kB in 1s (245kB/s) Selecting previously deselected package libparted1.8-10. (Reading database ... 8591 files and directories currently installed.) Unpacking libparted1.8-10 (from .../libparted1.8-10_1.8.8.git.2008.03.24-11.1_armel.deb) ... Selecting previously deselected package parted. Unpacking parted (from .../parted_1.8.8.git.2008.03.24-11.1_armel.deb) ... Processing triggers for man-db ... Setting up libparted1.8-10 (1.8.8.git.2008.03.24-11.1) ... Setting up parted (1.8.8.git.2008.03.24-11.1) ... chl:/#今度こそ、パーティションをつぶす
chl:/# parted -s /dev/sda rm 4 Error: Partition /dev/sda4 is being used. You must unmount it before you modify it with Parted. chl:/#parted って、マウントされていることちゃんと見てて、 つぶせないようになっている。。。
fdisk でつぶす
chl:/# fdisk /dev/sda WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted. The number of cylinders for this disk is set to 24792. 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/sda: 203.9 GB, 203928109056 bytes 255 heads, 63 sectors/track, 24792 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sda1 1 24793 199148543+ ee EFI GPT Command (m for help): d Selected partition 1 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks. chl:/# fdisk -l /dev/sda WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted. Disk /dev/sda: 203.9 GB, 203928109056 bytes 255 heads, 63 sectors/track, 24792 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System chl:/#これでつぶせた?
yasunari@ude:~$ cd /srv/tftp/ yasunari@ude:/srv/tftp$ ls HS-DHGL_1.20 LS-GL_1.15 LS-QL_1.10b LS-XHL_1.10 LS-CHL_1.10 LS-HGL_1.07b LS-WSGL_1.06 SheevaPlug_1.2 LS-CHL_1.21 LS-LGL_2.01 LS-XHL_1.02 initrd.buffalo LS-CL+HackKit LS-QL_1.05+telnet LS-XHL_1.02+telnet uImage.buffalo LS-CL_1.07 LS-QL_1.07b LS-XHL_1.04b yasunari@ude:/srv/tftp$ rm initrd.buffalo uImage.buffalo rm: remove write-protected regular file `initrd.buffalo'? y rm: remove write-protected regular file `uImage.buffalo'? y yasunari@ude:/srv/tftp$ ln LS-CHL_1.21/* . yasunari@ude:/srv/tftp$ ls HS-DHGL_1.20 LS-GL_1.15 LS-QL_1.10b LS-XHL_1.10 LS-CHL_1.10 LS-HGL_1.07b LS-WSGL_1.06 SheevaPlug_1.2 LS-CHL_1.21 LS-LGL_2.01 LS-XHL_1.02 initrd.buffalo LS-CL+HackKit LS-QL_1.05+telnet LS-XHL_1.02+telnet uImage.buffalo LS-CL_1.07 LS-QL_1.07b LS-XHL_1.04b yasunari@ude:/srv/tftp$
yasunari@ude:/srv/tftp$ tail -f /var/log/daemon.log : : Oct 4 22:50:23 ude ntpd[628]: time reset +0.257797 s Oct 4 22:50:23 ude ntpd[628]: frequency error 512 PPM exceeds tolerance 500 PPM Oct 4 22:50:25 ude in.tftpd[739]: connect from 192.168.11.150 (192.168.11.150) Oct 4 22:50:25 ude tftpd[740]: tftpd: trying to get file: uImage.buffalo Oct 4 22:50:25 ude tftpd[740]: tftpd: serving file from /srv/tftp Oct 4 22:50:25 ude in.tftpd[741]: connect from 192.168.11.150 (192.168.11.150) Oct 4 22:50:25 ude tftpd[742]: tftpd: trying to get file: initrd.buffalo Oct 4 22:50:25 ude tftpd[742]: tftpd: serving file from /srv/tftpしばらくして、LED が青点滅から、、、、かわらない!
HDD がつぶせてない???
シリアルコンソールがないと、何もわからない
|
← NFS サーバ(2) |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ まっさらにする(2) |