SliTaz GNU/Linux official and community documentation wiki.
.png

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
en:handbook:hacklivecd [2010/02/20 21:43]
jozee created
en:handbook:hacklivecd [2010/08/17 22:20]
linea
Line 1: Line 1:
-====== ​Introduction ​======+====== ​Hacking SliTaz LiveCD ​====== 
 + 
 +===== Introduction ​=====
  
 //Hacking SliTaz LiveCD// or how to have fun with the LiveCD ISO image. Note that you can also create a custom flavor with //​Tazlito//​. Creating your own bootable ISO image is easily achievable and the steps are carefully described here. The manipulation of a personal ISO image can add new files or modify existing ones found on the SliTaz Live CD. The SliTaz ISO image is less than 30 MB and a CD-R or CD-RW provides around 700 MB, so there'​s plenty of scope for expansion. For example, you could store your images and even provide a live slideshow using //GQview//. The hacking of the ISO image allows you to modify boot loader configuration files (boot loader), splash images and GRUB itself. You could also add the //​Memtest86//​ utility (tool used to test system RAM). Using the same techniques it's even possible to modify the filesystem - this does however require some extra manipulation and a bit more time. //Hacking SliTaz LiveCD// or how to have fun with the LiveCD ISO image. Note that you can also create a custom flavor with //​Tazlito//​. Creating your own bootable ISO image is easily achievable and the steps are carefully described here. The manipulation of a personal ISO image can add new files or modify existing ones found on the SliTaz Live CD. The SliTaz ISO image is less than 30 MB and a CD-R or CD-RW provides around 700 MB, so there'​s plenty of scope for expansion. For example, you could store your images and even provide a live slideshow using //GQview//. The hacking of the ISO image allows you to modify boot loader configuration files (boot loader), splash images and GRUB itself. You could also add the //​Memtest86//​ utility (tool used to test system RAM). Using the same techniques it's even possible to modify the filesystem - this does however require some extra manipulation and a bit more time.
Line 14: Line 16:
 </​code>​ </​code>​
  
-===== Getting the contents of the ISO =====+=== Getting the contents of the ISO ===
  
 Now that you are in the working directory, we must create the root of the amended CD-ROM and retrieve the files contained on the original SliTaz ISO - namely, the Linux Kernel (bzImage), the compressed filesystem (rootfs.gz) and the isolinux bootloader files. To recover these files you have two options, either take them from a burned CD or from an ISO image stored locally. To create the root of your CD (rootcd) and copy files from the cdrom device ///​dev/​cdrom//​ mounted on ///​media/​cdrom//:​ Now that you are in the working directory, we must create the root of the amended CD-ROM and retrieve the files contained on the original SliTaz ISO - namely, the Linux Kernel (bzImage), the compressed filesystem (rootfs.gz) and the isolinux bootloader files. To recover these files you have two options, either take them from a burned CD or from an ISO image stored locally. To create the root of your CD (rootcd) and copy files from the cdrom device ///​dev/​cdrom//​ mounted on ///​media/​cdrom//:​
Line 42: Line 44:
 The addition of various files and directories to the ISO image simply consists of copying data to the root of the cdrom (rootcd/) and generating a new image. The data may be classified in one or two directories created in the root of the CD. Once the ISO image is burned to a CD-R/CD-RW, you can use SliTaz as before, mounted on ///​media/​cdrom//​ and navigate through your data using emelFM2, Clex or the command line. Your data will also be legible from all GNU/Linux systems, BSD or even ... Windows. The addition of various files and directories to the ISO image simply consists of copying data to the root of the cdrom (rootcd/) and generating a new image. The data may be classified in one or two directories created in the root of the CD. Once the ISO image is burned to a CD-R/CD-RW, you can use SliTaz as before, mounted on ///​media/​cdrom//​ and navigate through your data using emelFM2, Clex or the command line. Your data will also be legible from all GNU/Linux systems, BSD or even ... Windows.
  
-===== Create directories and copy data =====+=== Create directories and copy data ===
  
 To create and copy files, you can start by using the command line and then continue on graphically as a simple user. We will create an images/ directory as root and change the permissions so that all users have write access: To create and copy files, you can start by using the command line and then continue on graphically as a simple user. We will create an images/ directory as root and change the permissions so that all users have write access:
Line 61: Line 63:
 === Configuration file isolinux.cfg === === Configuration file isolinux.cfg ===
  
-The //​isolinux.cfg//​ file found on the standard LiveCD of SliTaz, begins with the value display, this will either display a text file or a (//​isolinux.msg//​) file using 24 ASCII characters and a splash image. The default value defines the name of the label started by default after the (timeout) waiting time. Timeout is the number of seconds to wait before booting the system, you can make it 0 to start booting immediately or choose a waiting time as long as 80s. Finally the prompt can be deactivated using the value 0. F1, F2, F3 display help files and F4 displays a text file:+The //​isolinux.cfg//​ file found on the standard LiveCD of SliTaz, begins with the value display, this will either display a text file or a (//​isolinux.msg//​) file using 24 ASCII characters and a splash image. The default value defines the name of the label started by default after the (timeout) waiting time. Timeout is the number of seconds to wait before booting the system, you can make it 0 to start booting immediately or choose a waiting time as long as 80s. Finally the prompt can be deactivated using the value 0. F1, F2, F3 display help files and F4 displays a text file. Example configuration:
  
-<code>+<file>
 display isolinux.msg display isolinux.msg
 default slitaz default slitaz
Line 76: Line 78:
 F3 isolinux.msg F3 isolinux.msg
 F4 display.txt F4 display.txt
-</code>+</file>
  
 Example of a label //​slitazen//​ which you can add to the original to directly configure the language of the system as English and use the UK keyboard: Example of a label //​slitazen//​ which you can add to the original to directly configure the language of the system as English and use the UK keyboard:
  
-<code>+<file>
 label slitazen label slitazen
       kernel /​boot/​bzImage       kernel /​boot/​bzImage
       append initrd=/​boot/​rootfs.gz rw root=/​dev/​null lang=en kmap=en       append initrd=/​boot/​rootfs.gz rw root=/​dev/​null lang=en kmap=en
-</code>+</file>
  
 Once you've finished modifying the configuration file, don't forget to save your changes and generate a bootable ISO image with isolinux. Once you've finished modifying the configuration file, don't forget to save your changes and generate a bootable ISO image with isolinux.
Line 111: Line 113:
  # leafpad rootcd/​boot/​isolinux/​isolinux.cfg &  # leafpad rootcd/​boot/​isolinux/​isolinux.cfg &
 </​code>​ </​code>​
-<code>+ 
 +Adding the following lines: 
 + 
 +<file>
 label memtest label memtest
       kernel /​boot/​memtest       kernel /​boot/​memtest
-</code>+</file>
  
 Official website of [[http://​www.memtest86.com/​|Memtest86]] Official website of [[http://​www.memtest86.com/​|Memtest86]]
Line 146: Line 151:
 We'll add a command displaying a message and letting the system sleep for 4 seconds. Example using local script: We'll add a command displaying a message and letting the system sleep for 4 seconds. Example using local script:
  
-<code>+<file>
 echo "* Hacked SliTaz version booting..."​ echo "* Hacked SliTaz version booting..."​
 sleep 4 sleep 4
-</code>+</file>
  
-===== Rebuilding the image of the compressed system ​=====+=== Rebuilding the image of the compressed system ===
  
 Once the changes are completed, you can rebuild a compressed image of your system by using find to find the files, cpio for archiving, lzma and gzip for compression and the pipe | to connect everything together. This command must be launched from the root system (rootfs/) and creates a compressed file rootfs.gz in the preceding directory: Once the changes are completed, you can rebuild a compressed image of your system by using find to find the files, cpio for archiving, lzma and gzip for compression and the pipe | to connect everything together. This command must be launched from the root system (rootfs/) and creates a compressed file rootfs.gz in the preceding directory:
Line 180: Line 185:
 If you want to check the contents of the ISO before burning, just mount the image in loop and list the files. On SliTaz and most GNU/Linux systems, you can burn images in ISO format with the wodim utility. If you want to check the contents of the ISO before burning, just mount the image in loop and list the files. On SliTaz and most GNU/Linux systems, you can burn images in ISO format with the wodim utility.
  
-===== Generate a new ISO via a script ​=====+=== Generate a new ISO via a script ===
  
 If you wish to test out a lot of new possibilities and generate a lot of ISO images, you may want to semi-automate the process via a simple SHell script. This tiny script can be created on the command line or edited graphically,​ but don't forget to make it executable. You can create the script with cat; note that EOF signifies End Of File. To create the script gen_hacked_iso.sh using two variables to change the name of the ISO image and the path to the root directory of the cdrom: If you wish to test out a lot of new possibilities and generate a lot of ISO images, you may want to semi-automate the process via a simple SHell script. This tiny script can be created on the command line or edited graphically,​ but don't forget to make it executable. You can create the script with cat; note that EOF signifies End Of File. To create the script gen_hacked_iso.sh using two variables to change the name of the ISO image and the path to the root directory of the cdrom:
  
-<​code>​ +<​code>​ # cat > gen_hacked_iso.sh << "​EOF" ​</​code>​
- # cat > gen_hacked_iso.sh << "​EOF"​+
  
 +<​file>​
 #!/bin/sh #!/bin/sh
 # Gen a new hacked ISO image. # Gen a new hacked ISO image.
Line 198: Line 203:
  
 EOF EOF
 +</​file>​
  
-</​code>​ 
 To use the script, just make it executable and execute: To use the script, just make it executable and execute:
 +
 <​code>​ <​code>​
  # chmod +x gen_hacked_iso.sh  # chmod +x gen_hacked_iso.sh
  # ./​gen_hacked_iso.sh  # ./​gen_hacked_iso.sh
 </​code>​ </​code>​
 
en/handbook/hacklivecd.txt · Last modified: 2014/11/17 10:32 by brianperry