月曜日, 4月 27, 2009

How to install etch on CompactFlash

母艦にDebianEtchをInstall。
tasksel全選択解除。
Network Update:No
Grub Install:Yes

再起動

vi /etc/apt/sources.list
cd行コメントアウト。
下記2行追加。
deb http://cdn.debian.or.jp/debian/ etch main
deb-src http://cdn.debian.or.jp/debian/ etch main

apt-get update
apt-get install ssh dosfstools
wget ftp://ftp.debian.org/debian/pool/main/l/live-helper/live-helper_1.0.4-1_all.deb
dpkg -i live-helper_1.0.4-1_all.deb
apt-get install debootstrap
apt-get -f install

lh_clean
mkdir -p config/chroot_sources
echo "deb http://live.debian.net/debian/ etch main" >config/chroot_sources/live.bootstrap
lh_config
lh_config -b iso -d etch --initramfs casper --tasksel tasksel --bootloader grub --hostname cfboot --packages "apache2 perl bridge-utils" --union-filesystem unionfs

vi config/chroot
適宜編集。


lh_build


fdisk /dev/hdb
n
p
1
1
505
t
0b
n
p
2
506
568
n
p
3
569
3884
a
1
w

# fdisk -l
Disk /dev/sdX: 2063 MB, 2063597568 bytes
64 heads, 62 sectors/track, 1015 cylinders
Units = cylinders of 3968 * 512 = 2031616 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 505 1001889 b W95 FAT32
/dev/hdb2 506 568 124992 83 Linux
/dev/hdb3 * 569 3884 ???????? 83 Linux


mkdosfs -F 32 /dev/hdb1
mkfs.ext3 /dev/hdb2 -L home-rw
mkfs.ext3 /dev/hdb3


mount /dev/hdb3 /mnt/hdb3/
cd /mnt/hdb3
mkdir -p boot/grub
cp /boot/grub/* boot/grub
echo '(hd1) /dev/hdb' > boot/grub/device.map
grub-install --root-directory=/mnt/hdb3 --no-floppy '(hd1)'

vi /mnt/hdb3/boot/grub/menu.lst
適宜編集。

# menu.lst - See: grub(8), info grub, update-grub(8)
default saved
timeout 5
color cyan/blue white/blue
#
title Debian live
kernel /casper/vmlinuz bootkbd=es vga=791 ramdisk_size=100000 boot=casper username=user hostname=debian persistent
initrd /casper/initrd.img
boot

title Debian live nopersistent
kernel /casper/vmlinuz bootkbd=es vga=791 ramdisk_size=100000 boot=casper username=user hostname=debian nopersistent
initrd /casper/initrd.img
boot

title Debian live-failsafe
kernel /casper/vmlinuz bootkbd=es ramdisk_size=100000 boot=casper username=user hostname=debian nopersistent noapic noapm nodma nomce nolapic nosmp vga=normal
initrd /casper/initrd.img
boot

title Memtest
kernel /casper/memtest
boot


mkdir /tmp/iso
mount -o loop binary.iso /tmp/iso
cp -a /tmp/iso/* /mnt/hdb3/
cd /mnt/hdb3
#rm -Rf isolinux(多分存在しない)
umount /dev/hdb3


mkdir /mnt/hdb2
mount /dev/hdb2 /mnt/hdb2
cp -a /home/* /mnt/hdb2/
umount /dev/hdb2

reboot