Tuesday, April 24, 2007

Slax Bootable USB Drive----ZT by welv

Installing Slax in the pen drive

Now you choose between two options. You can mount the downloaded ISO image of Slax and follow a few steps, or you can burn the ISO image file to a CD-ROM and use the Slax Installer application. I suggest the first approach, because are some little things you must do to get Slax in the pen drive ready. To do so, create a directory -- say /slaxUSB -- on which to mount the ISO image file of Slax, then mount the ISO image:

mount -o loop slax-killbill-5.0.5.iso /slaxUSB/

Now, as root, mount the formated USB device:

mount -t vfat /dev/sda /mnt/sda/

Note that /mnt/sda/ can be any directory you want to use. Copy the entire contents of the directory mounted with the ISO image to the place where you have mounted the pen drive:

cp -ra /slaxUSB/* /mnt/sda/

The -r argument specifies a recursive copy including every directory, and the -a preserves as much as possible the structure of the data in the USB.

Now you need to copy some files in the folder /boot/ of the mounted pen drive to the root of the pen drive so you can boot from it:

cd /mnt/sda/boot/
cp vmlinuz /mnt/sda/
cp initrd.gz /mnt/sda/

Move to the directory where the memory stick is mounted -- in this case /mnt/sda/ -- and change the name of the file isolinux.cfg to syslinux.cfg. Edit the just-renamed syslinux.cfg and delete /boot/ or boot/ from the lines that contain vmlinuz and initrd.gz -- for example, /boot/vmlinuz and /boot/initrd.gz. This changes the location of the files vmlinuz and initrd.gz, making them visible to the bootloader at the time of boot.

Finally, use whereis to check whether you have Syslinux installed. If not, download and extract it to a directory, then run:

syslinux -s /dev/sda

Where /dev/sda is the location of your recent modified Slax with all the files.

Now, reboot your computer, enter the BIOS, and change the boot order. Set USB-ZIP as the first one, then the hard drive, and so on. If your machine is old it's possible that it won't let you boot from USB, in which case you can use a boot diskette or CD, or use Slax as a live CD."

1 comment:

Unknown said...

好用,相当好用!
选了256M的优盘,照着做,很好用!
SLAX KillBill Edition v5.1.8.1