table of Contents
installation
How to "install" CDLinux?
How to integrate CDLinux into my own CD?
How to install CDLinux on the hard disk?
How to install CDLinux to a U disk?
Introduction: CDLinux command line parameters
custom made
Introduction: The structure of CDLinux
How do I add other software to cdlinux?
How to make a "package" (package) for CDLINUX?
How to make a "module" for CDLINUX?
How to customize CDLinux according to my own taste?
Configure
How to configure a network?
How to configure RAID devices?
How to configure a mouse?
use
How to read / write, Japan, Korean?
How to exchange data with other computers?
How to change the partition size, modify the partition table?
how is it
repair
Be damaged
Partition table
?
How to recover an error-deleted file from an EXT2 file system?
LILO / GRUB is overwritten by Windows, how to fix it?
Windows 9x covers the guidance record of NT / 2K / XP, "Double Start Menu" is not seen, how to fix?
NT / 2K / XP administrator password is lost, what should I do?
installation
How to "install" CDLinux?
CDLinux is a small Linux that is started from the CD, which is published in the form of a standard ISO file. So the simplest "installation" method is to burn this ISO file to the disc and start the machine with it.
Of course, you can also install CDLinux to your hard drive or U disk, USB mobile hard disk (see below).
How to integrate CDLinux into my own CD?
Cdlinux itself is small, 0.4.8 only less than 19 megabytes, which is much more than a capacity of a car. So, if you are interested, you can do it yourself, integrate CDLinux with other software, don't have to be a single disk. You can also make multiple boot discs with other systems. The specific operation can be performed under Linux or under Windows:
Work with Linux (the following can be performed in CDLinux can also be performed in a general Linux system)
First, you have to display the content of CDLinux from the ISO image, first mount it:
# mount -o loop cdlinux-x.x.x.iso / Some / Where
The specific content in this cdlinux is all under the / Some / where directory. Suppose you have placed other software to be engraved into the disk in the / mycd directory, now copy CDLinux to that directory:
# cp -p -r / some / where / * / mycd
Next, CD / MyCD, open the mkisofs.sh file, and make the necessary modifications based on your own specific situation, the deployment exits. Finally, execute:
# ./mkisofs.sh
Generate new disc mirror, default, new mirror is /tmp/1.iso. Now it can be burned.
Note that the CDLINUX is directly entered when the optical disk made by the above steps, the startup effect is the same as the original ISO mirror. If you want to make multiple boot discs with menus, ISOLINUX needs to be used.
Syslinux's components such as how to use them, see their respective documents.
Wrunking method
I am not very familiar, but I don't want to be too trouble. Just pay attention to the following points:
You can use WinRAR to extract the contents of CDLinux in the optical disc image; CDLinux is started by boot / cdlinux / cdlinux.img this 2.88M floppy disk image; please keep CDLinux directory structure, do not change the case of file / directory name . How to install CDLinux on the hard disk?
Linux itself is very powerful and very flexible, and CDLinux also inherits this, so it can be installed on a wide variety of devices. And there are many plans to choose on the CDLinux to the hard disk, here we only introduce a solution: install CDLinux into a Windows FAT partition, use
Loadlin is launched.
In the following description, we assume that your Windows "C: Disc" is FAT16 or FAT32 format, and it corresponds to / dev / hda1 under Linux. We will install CDLINUX to "C: Disc".
Work with Linux (the following can be performed in CDLinux can also be performed in a general Linux system)
First, hang on the ISO mirroring and C: disk: disk:
# mount -o loop cdlinux-x.x.x.iso / mnt / cdrom
# mount / dev / hda1 / mnt / win
(If you don't want to install it to C: disk, or your C: disk is not / dev / hda1, please modify the above command)
Then copy the contents of the extra / directory to C:
# MKDIR / MNT / WIN / CDLINUX
# CP -R / MNT / CDROM / BOOT / CDLINUX / EXTRA / MNT / WIN / CDLINUX
Next, copy the kernel and initrd to C: Pat:
# mount -o loop /mnt/cdrom/boot/cdlinux/cdlinux.img / mnt / floppy
# CP / MNT / FLOPPY / BZIMAGE / MNT / FLOPPY/CDLINUX.GZ / MNT / WIN / CDLINUX
Finally, download
Loadlin (~ 10k) and bring it to C: disk:
# TAR-C / MNT / WIN / CDLINUX -ZXF Loadlin.tgz
(This will copy "loadlin.exe" and a "autoboot.bat" batch file to the / mnt / win / cdlinux directory. Please check the "autoboot.bat" file and make corresponding modifications according to your own specific circumstances .)
Now, you can restart to the pure DOS environment, start cdlinux with the following command:
C:
CD cdlinux
AUTOBOOT
Note that the above steps are just a simple example. The assumptions here may be inconsistent with your situation. So don't forget to make the necessary modifications according to your specific situation. Please refer to "
Introduction: CDLinux command line parameters "and"
Introduction: The structure of CDLinux. "
How to install CDLinux to a U disk?
There are also multiple scenarios to install CDLinux to the U disk. We still only say one: install it into a FAT partition on the U disk, and use
Syslinux is started.
In the following description, we assume that your USB disk (U disk or USB mobile hard disk) is set to a hard disk mode. The first partition above is FAT12, FAT16, or FAT32 format, and it corresponds to / DEV / SDA1.
Work with Linux (the following can be performed in CDLinux can also be performed in a general Linux system)
First, install syslinux on the USB disk: # syslinux / dev / sda1
Mount CDLinux ISO mirror and USB disk:
# mount -o loop cdlinux-x.x.x.iso / mnt / cdrom
# mount / dev / sda1 / mnt / win
(If your USB disk is not / dev / sda1, please make a corresponding modification)
Then, copy the contents of the EXTRA / directory to the USB disk:
# MKDIR / MNT / WIN / CDLINUX
# CP -R / MNT / CDROM / BOOT / CDLINUX / EXTRA / MNT / WIN / CDLINUX
Next, the kernel and initrd are also copied:
# mount -o loop /mnt/cdrom/boot/cdlinux/cdlinux.img / mnt / floppy
# cp / mnt / floppy / bzimage / mnt/floppy/cdlinux.gz / mnt / win
Finally, download
Syslinux configuration file (~ 2K) and disconnect it on USB Disk:
# TAR-C / MNT / WIN -ZXF SYSLINUX-CFG.TGZ
(This step will copy "syslinux.cfg" and some files such as display information to / mnt / win directory. Don't forget to check "Syslinux.cfg" and make a corresponding revision based on your own specific situation.)
You can now set your BIOS to start from USB-HDD or USB-ZIP. (The specifically is related to your BIOS and USB disk, try it.)
Note that the above steps are just a simple example. The assumptions here may be inconsistent with your situation. So don't forget to make the necessary modifications according to your specific situation. Please refer to "
Introduction: CDLinux command line parameters "and"
Introduction: The structure of CDLinux. "
Introduction: CDLinux command line parameters
In order to make CDLinux more flexible, it can not only start from the disc, but also start from other various devices; and not only mount the module to the memory (RAMDISK), in order to save memory, you can automatically use "loop" mode mount module We define the following three kernel command line parameters:
CDL_DEV =:
Tell CDLinux which device can find additional "package" and "module"
Default: / dev / cdrom
Example: CDL_DEV = / dev / hda1
CDL_DIR =:
Extra / directory in the directory of the file system of CDL_DEV?
Default: boot / cdlinux, cdlinux, zxh / cdlinux
Example: CDL_DIR = Apps / CDLinux
CDL_LOOP:
Do you force the "module" in "loop"?
Default: No, try to mount "Module" to memory.
Example: CDL_LOOP
These three parameters are optional, and when they are started from the CD, they can not be added, using the default value. If the module is too much or too large, CDLinux will automatically load them in "loop". But this way, you can't take the disc at CDLinux.
custom made
Introduction: The structure of CDLinux
Cdlinux is highly customizable. It consists of the following two parts:
1. "Basic" section: A 2.88M floppy disk image, cdlinux.img
2. "Additional" section: Other additional "package" and "module"
The "Basic" part is a 2.88M floppy disk image in a VFAT format. The above is included in the kernel and some of the most basic software, including: Bash (1.14.7), BFTPD (a small FTP server), Busybox, Bzip2, E2FSProgs, File, Find, Gawk, Grep, Gzip, Midnight Commander (4.1.35 ), Portmap, Sed, Tar and Vim (5.8), etc. If you just need a basic Linux environment, you can delete the other content of CDLinux, just keep this file, just run well. The "Additional" section includes other useful tool software, which are packed (package "or" module), placed in the extra / directory. When startup, CDLinux will automatically find and install them in the extra / directory.
Although cdlinux only needs CDLinux.img this file can run, but it is a big discount. So it is best to retain these additional packages and modules. Of course, you can also add the software you need to the extra / directory, and customize the CDLinux version you can't use.
How do I add other software to cdlinux?
Cdlinux is small, so there are many useful softwares that are not integrated. But you can customize it yourself, plus the software you need. You can make the software into a "package" or a "module". Which format is specifically used, depending on the size of the software, it needs to be initialized. Small, software that does not need to be initialized can be "package"; the contrary, it is best to make "module". For example, you can make F-PROT into a "module" added to the extra / directory so you can use cdlinux to antiche. (F-PROT is a very simple, very powerful anti-virus software, which is not integrated into cdlinux release, because I don't know if it's license is allowed.)
Precautions for adding software for cdlinux
CDLinux is compiled with GCC-2.95.3, and the link is GLIBC-2.2.5. The software you add is also compiled, link the same environment; if you add software needs other, CDLinux does not provide libraries, please add these libraries together.
How to make a "package" (package) for CDLINUX?
It is very simple to do a package. The so-called "package" is a standard .tar.gz file. About this .Tar.gz file directory structure, you can refer to those "xxx-cdl.tgz" files in the extra / directory. Just pay attention to the following:
The file name "package" must be "xxx-cdl.tgz", otherwise it will be ignored, will not be installed; if you want, you can also add a short instruction for your pack, and save it as zxh / SPEC. CDLinux will automatically integrate it into / var / log / packages. For the SPEC's format, please refer to the existing "xxx-cdl.tgz" file; all other content other than the SPEC will be ignored, not installed; CDLinux is running in a small RAM disk, So please try to make a small package. Documents such as MAN and DOCS can be placed in zxh / directory so they will not be installed, and you will be more convenient to find it later.
How to make a "module" for CDLinux (
Module?
If the software to be added is relatively large, you can make it "module." "Module" is a standard CRAMFS image, making it more troublesome than "Pack", need to use mkfs.cramfs commands. "Module" specific structure Please refer to the existing "xxx-cdl.md" file in extra / directory. CDLinux automatically automatically goes to extra / down to find these "xxx-cdl.md" and automatically mount them. Precautions when making modules
The file name of "Module" must be "xxx-cdl.md", otherwise it will be ignored, will not be installed; you must specify a mount point for the module. The method is to write the mount point to a file called ".mount_point" and put the file into the root of Cramfs. The specific format of the ".mount_point" file can refer to the existing "xxx-cdl.md" file under Extra /; if the software needs to perform some initialization operations, you can name the initializer or script ".init" to Cramfs Under the root directory and set the attribute to executable. CDLinux will automatically find and execute when CDLinux is started. Init; If you want to save more memory to run the program, you can add "CDL_LOOP" parameters in the kernel command line to force CDLinux to load all modules in "loop"; Cramfs is a read-only file system and does not log file Time information.
How to customize CDLinux according to my own taste?
If the default state of CDLinux is not your appetite, you can customize it. Customized approach is difficult:
"Difficult" approach is to hang the INITRD direct modification. Cdlinux's initrd is a standard EXT2 image that can be mounted, modified, and no problems. But I still recommend you try to use the following "simple" approach.
"Simple" method is to put the modified content into the extra / system-extra-cdl.tgz file. For example, if you modify / etc / profile, save the modified file as / etc / profile under System-extra-cdl.tgz. This way CDLinux will automatically use the new / etc / profile when it starts. Also, if you need, you can also add a /etc/rc.d/rc.local script in the System-extra-cdl.tgz file to perform some of the initialization operations you need. Here are some specific examples:
Modify Bash command line prompt
Modify which lines with "PS1 =" in the original / etc / profile file, save the modified results into system-extra-cdl.tgz, still / etc / profile.
Change the Bash command line editing mode by Emacs to VI
Edit / etc / inputrc, add "Set O Vi", save the new file to System-extra-cdl.tgz, still / etc / inputrc.
Let CDLinux automatically mount C: disk
Edit / etc / fstab saves the new file to System-extra-cdl.tgz.
Let CDLinux automatically load the driver of non-plug-and-play ISA devices
Suppose you have an old NE2000 compatible ISA network card, non-plug-and-play, the IO address is 0x300. In order to let CDLinux automatically recognize it, you can create a script, add "ModProbe Ne IO = 0x300", then store it as system-extra-cdl.tgz /etc/rc.d/rc.local . Let CDLinux set into a simple gateway / firewall
Modify the iptables-x.x.x-cdl.tgz package, plus a /etc/rc.d/init.d/iptables script, set the rules of the gateway / firewall in this script. For the format of this script, please refer to the extra / dcron-x.x.x-cdl.tgz package.
In fact, CDLinux will automatically find the executable of /etc/rc.d/init.d/ and run them. This is a bit like sysvinit mechanism, but cdlinux does not support the concept of running.
Configure
How to configure a network?
CDLinux automatically detects a lot of common Ethernet cards, but in order to make it small, more NIC drivers have not been entered in the kernel, but to make a kernel module. When startup, cdlinux will try to automatically detect your network card, but if the kernel has identified a piece or more than one network card, CDLinux will skip the network card automatic detection.
After startup, if you want to do your own to detect the NIC, you can do:
# nic-detect
This is a simple script file. The current feature is not very perfect. It may even cause crash during the test! So please use it. If there is any mistake, please invite the author, thank you!
With a DHCPC program in CDLinux, if you have a DHCP server in your network, you will automatically configure your IP address, gateway, domain name server, etc. You can also use your own command to configure IP, DNS, etc .:
# Net-config
Setting the proxy server to use:
# proxy-config
Modify the MAC address of the NIC:
# Mac-fake
How to configure RAID devices?
The drivers of SCSI and RAID devices have made a kernel module, and CDLinux cannot automatically detect them, you need to load their drivers (kernel modules). The following example assumes that you have a SCSI card based on AHA1542 chip, which has two SCSI discs, named / dev / sda, / dev / sdb. And make a RAID0 device through the software RAID / DEV / SDA1 and / DEV / SDB1. You can drive it by the following command:
# modprobe aha1542
# modProbe RAID0
# MDADM -A / DEV / MD0 / DEV / SDA1 / DEV / SDB1
Ok, now you can access this RAID0 device via / dev / md0.
How to configure a mouse?
Use the mouse-config command. (Support most COM / PS2 / USB mouse)
use
How to read / write, Japan, Korean?
Use CCE:
CCEGBK - Chinese (Simplified)
CCEB5 - Chinese (Traditional)
Ccejis - Japanese
Cceksc - Korean
In CCE, you can switch the input method with "Ctrl space" or "CTRL SHIFT". (If you don't need it, Japan, Korean support, you can delete the extra / cce-x.x.x-cdl.tgz file, no problem.)
How to exchange data with other computers?
FTP, SSH1, and NFS3 client / servers have been taken in CDLinux. The FTP and SSH servers have been started in the default state. So the simplest switching data is to use FTP and SCP. By default, the NFS server does not have an export any resource. You need to edit, modify / etc / exports, specify which directories, and how the export, then execute:
# /etc/rc.d/init.d/unfsd restart
NFS and Samba clients have also been taken in CDLinux. To mount NFS resources:
# mount -t nfs xx.xx.xx.xx: / exported / Resource / Some / Where
Mount SAMBA resources:
# mount -t smbfs -o usrname = xx // machine_name / resource_name / Some / Where
How to change the partition size, modify the partition table?
Please use "parted" or "resize2fs", etc..
How to fix the damaged partition table?
Use "gpart". (This version has already played Reiserfs-3.6 patch, you can use it with confidence)
How to recover an error-deleted file from an EXT2 file system?
Use "E2UNDEL".
LILO / GRUB is overwritten by Windows, how to fix it?
Installing Windows 9x overwrites the main boot record of the hard disk, causing the original installed Linux that cannot be started, then you can start CDLinux to fix.
First, hang the root partition of Linux, such as / dev / hda5:
# mount -t ext2 / dev / hda5 / mnt / local
Then, suppose you are booted by lilo:
# lilo -r / mnt / local
If you are not successful, you can try again:
# chroot / mnt / local / sbin / lilo
If you still don't do it, look carefully, for example, if it is not the path of LILO, it is not equal. Patience, as long as Linux partition is not damaged, it must be restored. If you use GRUB to boot the system, the method is similar to the above. For specific use methods of LILO / GRUB, please refer to their respective documents.
Windows 9x covers the guidance record of NT / 2K / XP, "Double Start Menu" is not seen, how to fix?
Suppose your "C: Dish" is / dev / hda1, the format is FAT32, the newly installed Windows 98 destroys the boot record of XP, now only 98. This situation can be fixed with CDLinux:
# MS-SYS -2 / DEV / HDA1
For specific usage of MS-SYS, see its documentation.
NT / 2K / XP administrator password is lost, what should I do?
If you forget the NT / 2K / XP administrator password, it is difficult to find it again. However, you can reset a password with cdlinux, or simply empty the password. carried out:
# Nukent
Then press the prompt operation. (Note: For newer versions of Windows, such as Windows XP SP1, modify the password function does not work, but the clever password is also good.)