centos-bounces@xxxxxxxxxxx wrote on 03/17/2005 03:10:01 AM: > May I ask, if you would provide some more information on how you do it > under FC3? The process might be pretty much the same under CentOS4, > as they share a lot :) Ok, here's what my script for generating a root filesystem for UMl looks like. There are lots of things hardcoded and it assumes that the target system will be the same version as the host. The naming scheme for my home network is characters from "A Midsummer's Night Dream". Use at your own risk, etc. #!/bin/sh -x /bin/rm root_fs dd if=/dev/zero of=root_fs bs=1024 count=1 seek=3M mkfs.ext2 -j -F -v -q root_fs mount -o loop root_fs mnt rm swap dd if=/dev/zero of=swap bs=1024K count=128 mkswap swap yum -y -d 0 --installroot=`pwd`/mnt install rpm yum -y -d 0 --installroot=`pwd`/mnt install yum cp /etc/resolv.conf mnt/etc/resolv.conf cp /etc/yum.conf mnt/etc/yum.conf cat >>mnt/etc/fstab <<__END__ /dev/ubd0 / ext3 defaults 1 1 none /proc proc defaults 0 0 none /dev/pts devpts defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/ubd7 swap swap defaults 0 0 __END__ chroot mnt /bin/sh -x <<__END__ mount -t proc /proc proc for i in 0 1 2 3 4 5 6 7; do mknod /dev/ubd\$i b 98 \$[ \$i * 16 ]; done yum -y -d 0 install passwd ruby lynx vim-minimal \ openssh-server openssh man man-pages \ postfix yum clean all yum clean headers echo "abcdefg" | passwd --stdin root umount /proc __END__ for f in sysconfig/network hosts sysconfig/network-scripts/ifcfg-eth0 do cat /etc/$f | sed s/peaseblossom/mustardseed/g | \ sed s/65.70.204.73/65.70.204.69/ >>mnt/etc/$f done mkdir mnt/root/.ssh cat ~/.ssh/id*pub >>mnt/root/.ssh/authorized_keys chmod -R 600 mnt/root/.ssh umount mnt Matt Lawrence "Your friendly neighborhood sysadmin" 512.838.2645 T/L 678-2645 512.351.1061 (cell) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.caosity.org/pipermail/centos/attachments/20050317/c6e8fb0b/attachment.htm