- Backup your system in case something goes wrong
- share your system with friends/family
- make additional installations on different hardware.
I am going to provide some instructions on doing all of these things using some simple tools provided by the Refracta distribution that are licensed for use through the GPL.
10. Prepare your system
Set up the Skeleton directory
The Skeleton directory is found at /etc/skel and contains the files and directories that are copied into a new user's home directory when that new user account is created. It is the equivalent of the Windows default user account. This is where you need to place any config files that determine the configuration of a user's session including:
- Desktop icons
- Desktop environment configuration eg panel, desktop, window theme
- Application menu layout
- Bash and terminal settings
- Application specific customization
In our Xubuntu themed example, we want to make sure each new user account will look identical to the one that we have worked so hard to set up. Here's how:
- Log in as root
- Open Thunar and browse to your home folder
- Enable hidden files in Thunar from the view menu
- Copy these directories into the existing /etc/skel directory :
- Desktop, Documents, Downloads, Music, Pictures, Public, Templates, Video
- Make sure the above directories are empty
- Now create these hidden directories:
- /etc/skel/.config
- /etc/skel/.local
- /etc/skel/.local/share
- And finally copy these directories into the hidden ones you've just created above:
- ~/.config/menus
- ~/.config/xfce4
- ~/.config/xfce4-session
- ~/.local/share/applications
- ~/.local/share/mime
Test the Skeleton and create a live session user account
- To test the Skeleton directory is correctly set up, simply create a new user account. As you will be creating a live ISO image of your installation later, you might as well make this the live user account, so use a simple username like "user" or "live" with an identical password.
- Still logged in as root, open a terminal and type adduser followed by the username you want to create eg:
adduser user
Adding user `user' ...
Adding new group `user' (1002) ...
Adding new user `user' (1001) with group `user' ...
Creating home directory `/home/user' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for test
Enter the new value, or press ENTER for the default
Full Name []: Live Session User
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y - Make sure your root password is now straightforward as well eg change it to root
passwd root
Changing password for root
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully - Log out and log in with your new user account and check that your theme has 'held'. In particular check the Whisker menu, check the file manager displays the home directory correctly. Check the icon and Window themes etc...
- You might also want to copy the skel files into the root account so that the root desktop has the same appearance. Some distros prefer to keep the root account theme different - it's up to you.
Download imaging tools from Refracta
- Before you attempt to install the imaging tools, you will need to install some dependencies. If you want to try the latest testing branch of the tools, then you will need to enable the sid repository and install the following packages first:
liblzo2-2
isolinux
squashfs-tools
Syslinux
Syslinux-common
Syslinux-utils - Install Yad for the GUI element of these tools to work:
https://github.com/RichJack/Xubuntu/raw/master/yad_0.26.1-1~webupd8~trusty1_i386.deb - Then download the tools from here:
http://distro.ibiblio.org/refracta/files/Testing/
refractainstaller-base_9.1.0_all.deb
refractainstaller-gui_9.1.0_all.deb
refractasnapshot-base_9.1.2_all.deb
refractasnapshot-gui_9.1.2_all.deb
refracta2usb-0.9.6.deb (optional) - Install the tools using gdebi or dpkg.
- Change the splash image at /usr/lib/refractasnapshot to the Xubutu wallpaper (Copy this 640x480 png image):
Clean your system
This bit is simple. All you need is about twice the hard disk space available as you have used space (in this instance 5GB of free space would be enough):
- Log back out and back in as root. Delete your original user account (after backing up any information you think you need). In a terminal:
userdel <yourusername> - Delete all files/directories that you don't want in the live system:
- Deleted user's home directories
- Remove old log files:
rm /var/log/*.gz
rm /var/log/*.old
rm /var/log/*/*.gz - Purge un-needed packages with apt-get autoremove
- Check in Synaptic under, Status/Residual Config and remove any packages there that you know you won't need.
- Install bleachbit and run it under the user and then root account.
- Remove any packages that you don't think a conventional user would need eg: bleachbit, gdebi...
- If you have created this in VirtualBox, you may now wish to remove the VirtualBox guest additions as they are not licensed under the GPL.
- If you are thinking of distributing your ISO internationally, then you might want to consider removing non-free software, drivers or codecs that are not freely distributable eg libdvdcss2, Adobe Flash Player...
- Remember, real hardware might require real drivers eg Wifi, video drivers. If these aren't installed on your system before you take the snapshot, they won't be available on the live image.
- You will probably want to have Gparted installed so that the live system has a graphical way of partitioning disks before installation.
11. Create a Live CD ISO
This bit is simple. All you need is about twice the hard disk space available as you have used space (in this instance 5GB of free space would be enough):
- Log in as root.
- Select Refracta Snapshot from the Applications Menu.
- Accept the defaults and let it run.
- The ISO will be created at /home/Snapshots and will have a filename based on the date/time (you can easily change this).
- I took a test snapshot of my Xubuntu/Debian installation and it was roughly 650MB in size, so just fits nicely on a CD and took about 30 minutes to generate.
- If you created it in VirtualBox, use shared folders to transfer it back to the host system, otherwise you can burn it straight to CD from your system or transfer it out using USB.
- You can then test the Snapshot in VirtualBox or on real hardware. You'll lose the boot splash as the live CD uses Syslinux to boot rather than Plymouth, but everything else should be as you configured it.
- The Live CD can be installed using the Refracta Installer or transferred to a USB using the Refracta2USB application or UNetbootin on Linux or Windows.
No comments:
Post a Comment