linux:slitaz:chroot
Differences
This shows you the differences between two versions of the page.
linux:slitaz:chroot [2010/04/16 22:51] – created 74.125.75.19 | linux:slitaz:chroot [2016/05/05 13:07] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | 制作LiveCD的时候,最简单的方法就是直接chroot到slitaz的系统环境中去,官方已经提供了一个脚本,只要稍微更改一下路径就可以了: | ||
+ | ROOTFS="/ | ||
+ | <file bash chroot_in_env.sh> | ||
+ | #!/bin/sh | ||
+ | # Chroot in SliTaz to hack. | ||
+ | # | ||
+ | ROOTFS="/ | ||
+ | |||
+ | # Mount virtual Kernel file systems and chroot. | ||
+ | # | ||
+ | #mount --bind /dev $ROOTFS/dev | ||
+ | #mount --bind /tmp $ROOTFS/tmp | ||
+ | mount -t proc proc $ROOTFS/ | ||
+ | mount -t sysfs sysfs $ROOTFS/sys | ||
+ | mount -t devpts devpts $ROOTFS/ | ||
+ | mount -t tmpfs shm $ROOTFS/ | ||
+ | |||
+ | echo " | ||
+ | #chroot $ROOTFS /bin/sh --login | ||
+ | chroot $ROOTFS / | ||
+ | |||
+ | # Unmount virtual Kernel file systems on exit. | ||
+ | # | ||
+ | umount $ROOTFS/ | ||
+ | umount $ROOTFS/ | ||
+ | umount $ROOTFS/sys | ||
+ | umount $ROOTFS/ | ||
+ | #umount $ROOTFS/tmp | ||
+ | #umount $ROOTFS/dev | ||
+ | |||
+ | echo " | ||
+ | </ |