|
楼主 |
发表于 2004-11-10 12:13:34
|
显示全部楼层
英文技术文档:
http://slax.linux-live.org/doc_install.php#inst2disk
How to install SLAX to harddisk
As I said several times before, SLAX is a Linux Live CD and it shouldn't be isntalled to the disk. It runs directly from the CDrom without any need for installing. Nevertheless a lot of people still wish to install SLAX permanently, so I will try to describe it here.
At first, you have to decide if you wish to install SLAX as a classic Linux installation (500 MB unpacked), or if you wish just to copy SLAX LiveCD to the disk and run it from there as like it would be still a CD.
To achieve a regular installation, you have to find (create) suitable Linux partition (ext2 or ext3 or reiserfs filesystem is required at this time). If you have one, it will be automatically mounted in /mnt, let's say /mnt/disc3part5 for example. Then start the following script, it should do the work for you:
slax-install # this script is unsupported, use at your own risc
If you don't want to install full unpacked SLAX, but you wish just to copy SLAX to your disk and start it as a LiveCD from there, just copy all files from the CD to some existing partition (filesystem doesn't matter here) and make it boot somehow, for example by using syslinux, lilo, loadlin (from DOS) or by using SLAX CD. The easiest way is to boot by using SLAX CD, copy all files and directories from the CD to C:\SLAX and boot from the CD with the following parameter:
boot: slax fromhd=SLAX eject
You can also modify the file C:\SLAX\DOS\config like in the following example and finaly chdir to C:\SLAX\DOS and start linux.bat from DOS prompt:
\SLAX\vmlinuz # first value must be the filename of the Linux-kernel
root=/dev/ram0 # the device which gets mounted as root FS
rw # mount it read-write
initrd=\SLAX\initrd.gz # this file gets loaded as 'initial ramdisk'
init=linuxrc # start /linuxrc script from initrd.gz image
load_ramdisk=1 #
prompt_ramdisk=0 # we do not need to be prompted
ramdisk_size=9999 # our initrd.gz is 9999 KB of size when unpacked
max_loop=255 # overide default to allow inserting up to 127 modules
livecd_subdir=/SLAX/ # modify this if you copied LiveCD to some directory
# (for example livecd_subdir=/livedir/)
# you may need to change the first and 5th line too,
# adding \livedir\vmlinuz and initrd=\livedir\initrd.gz
^ top
How to run SLAX Linux from USB FlashDisk
Boot SLAX CD and plug your USB FlashDisk in. Change directory to /boot (or wherever your CDrom is) and start:
./create_bootdisk.sh . /dev/sda1 /dev/sda SLAX
This command will create a directory called SLAX on your flashdrive and it will copy all necessary data to it. The first argument (the dot ".") means that you wish to create a bootdisk from the current directory. Second parameter /dev/sda1 is your FlashDisk's first primary partition and the third parameter /dev/sda is the master boot record of your flashdrive.
You can also install SLAX to your hard disk this way. Just replace /dev/sda1 by /dev/hda1 and /dev/sda by /dev/hda. Or use the naming scheme from devfs - /dev/discs/disc0/part1 and /dev/discs/disc0/disc. Note that create_bootdisk.sh script will overwrite your MBR so you won't be able to boot any other existing OS from your USB FlashDisk (or harddisk). |
|