Q: How do I create a tiny (truly minimal) bootable Mandrake
LiveCD?
A: Here is a step by step process of creating your own Mandrake
installation and creating a LiveCD image from it. (You can
customise the process by adding additional packages, but the
underlying concepts should stay the same)
1. Login as root, using "su -c"
2. Create a base directory to hold the minimal installation:
"mkdir -p /tmp/minimal"
3. Install the Mandrake base system:
"urpmi basesystem devfsd harddrake --root /tmp/minimal"
4. Enable shadow passwords in the image by issuing:
"chroot /tmp/minimal /usr/sbin/pwconv"
5. Set your root password ('root') within the image:
"chroot /tmp/minimal"
"echo 'root' | passwd --stdin root"
"exit"
6. Create a LiveCD image from the minimal installation:
"mklivecd --rootdir /tmp/minimal minimal.iso"
7. Burn the resulting minimal.iso to CD-R and enjoy
结果是从第二步起就开始出错:
[root@Linux root]# urpmi basesystem devfsd harddrake --root /tmp/minimal
无法打开 rpmdb
error: cannot open lock file /tmp/minimal/var/lib/rpm/RPMLOCK in shared mode
error: cannot open Packages database in /tmp/minimal/var/lib/rpm
[root@Linux root]# chroot /tmp/minimal /usr/sbin/pwconv
chroot: /usr/sbin/pwconv: No such file or directory
[root@Linux root]# chroot /tmp/minimal
chroot: /bin/bash: No such file or directory
[root@Linux root]# echo 'root' | passwd --stdin root
Changing password for user root.
passwd: all authentication tokens updated successfully.
[root@Linux root]# mklivecd --rootdir /tmp/minimal minimal.iso
mklivecd, version 0.5.6, http://www.linuxminicd.org/mklivecd/
Copyright (C) 2002-2003, Jaco Greeff <[email protected]>
* Creating temporary directories...
* Creating initrd structure...
* Copying initrd kernel modules...
/usr/sbin/mklivecd: line 1: cd: /tmp/minimal/lib/modules/2.4.22-21mdkenterprise: No such file or directory
/usr/sbin/mklivecd: line 1: cd: /tmp/minimal/lib/modules/2.4.22-21mdkenterprise: No such file or directory
ERROR: unable to find kernel module cloop.o
[root@Linux root]#