armadillo220でchroot

やろうとおもってやってなかったのでやった。
とりあえず手順は
Debianのセットアップ | 組み込みLinuxのArmadilloサイト
これの1をまんまやる。
んでそのあとは

# mount /dev/hdc1 /mnt
# cd /mnt

でマウントしてやって。
Index of /armadillo-9/debian
にある。tgzファイルを全部落とす。んで

tar zxvf [ファイル名]

で全部解凍。
解凍したらtgzは邪魔なので消しといてアンマウント
ここからはarmadilloで作業。
USBメモリをさして適当にマウント

mount -t ext2 /dev/sda1 /mnt

んでchrootしたいところなんだけど個々でchrootとすると

# chroot /mnt/
chroot: cannot execute /bin/ash: No such file or directory

と怒られる。ashがないとおこれられる。すこし解決策に悩んだが
Armadilloでchroot - odawaraの「はてな de メモ」の記事をみて、

# ln -s /mnt/bin/bash /mnt/bin/ash

をすれば良いことに気づく。
これでchrootすれば無事成功した。
最後に

# mount /proc /proc -t proc

を忘れずにやれば完了。
ただapt-get updateがどうもできない。なんで?

 apt-get update
Err http://security.debian.org etch/updates Release.gpg
  Temporary failure resolving 'security.debian.org'
Err http://ftp.jp.debian.org etch Release.gpg
  Temporary failure resolving 'ftp.jp.debian.org'
Failed to fetch http://ftp.jp.debian.org/debian/dists/etch/Release.gpg  Temporary failure resolving 'ftp.jp.debian.org'
Failed to fetch http://security.debian.org/dists/etch/updates/Release.gpg  Temporary failure resolving 'security.debian.org'
Reading package lists... Done
W: Couldn't stat source package list http://ftp.jp.debian.org etch/main Packages (/var/lib/apt/lists/ftp.jp.debian.org_debian_dists_etch_main_binary-arm_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://security.debian.org etch/updates/main Packages (/var/lib/apt/lists/security.debian.org_dists_etch_updates_main_binary-arm_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://security.debian.org etch/updates/contrib Packages (/var/lib/apt/lists/security.debian.org_dists_etch_updates_contrib_binary-arm_Packages) - stat (2 No such file or directory)
W: You may want to run apt-get update to correct these problems
E: Some index files failed to download, they have been ignored, or old ones used instead.

こんな感じにエラー。


WEB拍手