You are not logged in.
I like to have a customized version of slitaz livecd that has decent web fonts installed, flash installed, smbfs installed (so can read and write from windows shares or my freenas box), a single windows-like bar on the bottom only, and removal of the 8 second boot delay for the slitaz menu. I use virtualbox to get things the way i like, and it allows me to test the resulting iso without burning a bunch of test cds.
This is just a quick post to share with others interested in doing something similar:
1) install virtualbox
2) create new vdi (click on new, go through the wizard)
- 256MB ram (512 is better if you can), 2GB dynamicexpanding harddrive (tried smaller and my iso's failed to boot - see below)
3) mount slitaz4.iso
settings, storage, click on cd under idecontroller, under attributes rightclick icon far right, choose..., select slitaz4.iso, ok
4) start your virtualbox (click start icon)
5) boot up, choose your language and keyboard (you won't have to deal with this once you create your custom iso - yay)
6) install slitaz onto your virtual hard drive
a) use systools/gparted to
- create a partiton table on virtual hd
- create a 1GB parttion on the virtual hd (ext3)
(note only used 1GB but can expand to 2GB later if desired, I originally tried with 500MB and my created isos would not boot, slitaz's tazlito tool has very poor error recovery it seems - this may also have been related to my not applying updates which i did subsequently and will do below, didnt verify so YMMV)
- run sysutils/pkgmgr
- search for and install updates (yes i know you are on the cd at the moment but there are updates for the tools to install onto the harddrive so might as well play it safe)
-install onto hd
sysutils/slitazpanel root root
install/install slitaz
skip gparted since already done, click continue
uncheck format partition since already done with gparted above
leave defaults (root,root, tux,<blankpasswd>) but check install grub
click proceed
x out
power down rather than reboot (need to manually eject cd frm virtualbox)
after powered down, settings/storage/click-cd-onleft/click-cd-icononright-removedisk ok
hit start button
If all goes well you now have a slitaz image you can customize and generate isos from. Go have a beer and come back and see the following posts for what you might want to do next.
Step 2 - smbfs
=========
The first thing I like to have installed is something called smbfs. Getting virtualbox to read and write to real world hard drives and real world usb drives is a pain in the a** so I use smbfs to mount a real world drive over the network (which virtualbox connects to very well) instead and life is good. No virtualbox guest additions required. Yes you could also use the built in gftp of slitaz if you prefer to save some space on your custom iso but you need a server you can ftp to/from. For me, I'm running on windows, and I have a freenas box as well so smbfs is great. I can share a folder under windows and connect to it with smbfs. You can build your custom slitaz iso, it is saved on your virtual hard drive, and you can then copy it to your real world hard drive.
Open a terminal window (click on the black box icon with X in it).
Change to superuser
>su
root
#tazpkg get-install smbfs
(wait for it to complete its thing)
#mkdir -p /mnt/nas
(or you might want to call it /mnt/share)
#vi /etc/rcS.conf
(replace vi with your favorite editor, edit as root,
note you can simply "modprobe cifs" on a cmd line every time you reboot but I prefer to
have this happen automatically every time I boot so
add cifs to LOAD_MODULES
the line should look something like:)
LOAD_MODULES=" e1000 snd_intel8x0 cifs"
(save and quit)
#vi /etc/nssswitch.conf
( change
hosts: files dns
to
hosts: files dns wins
this will allow Windows Internet Name Server to also run after you reboot
which does for your local home network what DNS does for the internet
and allows you to use the names of your devices instead of ip addresses
to access them, useful when the ip addresses are randomly assigned via
DHCP)
now reboot your virtual installed version of slitaz
create a shared folder on windows or power up your nasbox
create a mount script to simplify life in the future
open a terminal
>su
root
#vi /home/tux/mount
!/bin/sh
#following shouldn't be necessary but won't hurt
modprobe cifs
#following shouldn't be necessary but won't hurt
mkdir -p /mnt/nas
#change name and path as appropriate
mount.cifs //myfreenasbox/disk1 /mnt/nas
#or if names don't seem to work try something like (changing ip address to correct value, disk1 to whatever)
#mount.cifs //192.168.1.123/disk1 /mnt/nas
<esc> :wq
# chmod 777 /home/tux/mount
# /home/tux/mount
password:
# cd /mnt/nas
# touch blah
# ls
With luck you now have smbfs working on your system! Go have another beer and come back for more later.
Step 3 - Better Fonts, Flash
================
We all know that web pages can look like cr*p without the proper fonts. And more often than not there will be a web video you want to watch since the info isn't available in text readable form. I contemplated loading firefox too but so far the standard Midori browser is working out fine for me and the firefox browser available (at least in slitaz 3, wasn't really up to date anyway).
open up a terminal window
> su
root
# tazpkg get-install get-msttcorefonts
(wait for it to complete, note in this case you have to run the script that is downloaded next)
# get-msttcorefonts
# tazpkg get-install get-flash-plugin
# get-flash-plugin
That's it, if you open midori now you should get somewhat better fonts on pages that used to look poor, and if you go to youtube.com you should be able to play videos.
As a bonus let's tweak the boot time of your installed slitaz down a bit. This is only so your virtualbox hard drive install boots up a bit quiker.
# vi /boot/grub/menu.lst (tweak down to 2 secs)
(edit the timeout line to something like:)
timeout 1
Reboot, test it out.. Have another beer.
Step 3 - One less bar
============
I'm not sure why so many linux distros have a bar at the top and a bar at the bottom wasting valuable screen real estate. It bugs me, so I have to fix it. I also use windows mostly so I like things to look as windows-like as possible to get work done faster. The GUI folks at Canonical are a bunch of ***ing ***'s in my opinion for not realizing this simple fact (have a Windows-like GUI version and a Mac-like GUI version if you want to draw people over who have better things to do with their time than learn your new GUI). Sorry, had to rant there.
Fortunately for you, this one is easy, simply backup your existing panels and copy mine in place. I have put the logout/power button under the spider menu in the bottom left to make it windows like. You can also right click on the desktop right now (part of std slitaz) to logout so don't worry about messing up your logout button.
As root inside
/home/tux/.config/lxpanel/slitaz/panels
make a folder called originals and move panel and bottom in this dir to the new folder
copy the new file called bottom to this dir (file as text below, sorry couldn't upload file)
do the same in the following dir if you want users who install from your iso to have the same menu bar
/etc/lxpanel/slitaz/panels
I also wanted to get rid of the text "applications" which was beside the spider so I edited the
following file:
/usr/share/desktop-directories/SlitazMenu.directory
edited name inside to be a single space so it doesn't show up on the bar
was Name=Applications
now Name=
--My file called "bottom" start (don't include this line) ---------------------------------------
# lxpanel <profile> config file. Manually editing is not recommended.
# Use preference dialog in lxpanel to adjust config when you can.
Global {
edge=bottom
allign=center
margin=0
widthtype=percent
width=100
height=24
transparent=1
tintcolor=#351a0a
alpha=255
autohide=0
heightwhenhidden=2
setdocktype=0
setpartialstrut=1
usefontcolor=1
fontcolor=#ffffff
background=0
backgroundfile=/usr/share/images/panel-background.png
iconsize=24
}
Plugin {
type = menu
Config {
name=SliTazMenu.directory
image=slitaz-menu
name=SliTazMenu.directory
name=SliTazMenu.directory
name=SliTazMenu.directory
name=SliTazMenu.directory
name=SliTazMenu.directory
name=SliTazMenu.directory
name=SliTazMenu.directory
#tintcolor=orange
system {
}
separator {
}
item {
image=exec
command=run
}
item {
image=slitaz-logout
action=/usr/bin/tazbox logout
name=Log Out
}
#item {
#image=img
#name=Item name
#action=progname
#}
}
}
Plugin {
type = launchbar
Config {
Button {
id=/usr/share/applications/midori.desktop
}
Button {
id=/usr/share/applications/sakura.desktop
}
}
}
Plugin {
type = space
Config {
Size=8
}
}
Plugin {
type = taskbar
Config {
tooltips=1
IconsOnly=1
ShowAllDesks=0
UseMouseWheel=1
UseUrgencyHint=1
FlatButton=1
MaxTaskWidth=200
spacing=2
GroupedTasks=1
}
}
Plugin {
type = space
expand=1
Config {
Size=2
}
}
Plugin {
type = tray
}
Plugin {
type = cpu
}
Plugin {
type = netstatus
Config {
iface=wlan0
configtool=browser http://tazpanel:82/network.cgi
}
}
Plugin {
type = volumealsa
}
Plugin {
type = dclock
Config {
ClockFmt=%R
TooltipFmt=%A %d %B %Y - %T
BoldFont=1
IconOnly=0
}
}
Plugin {
type = pager
}
---My file called "bottom" end (don't include this line) -----------------------------
Step 4 - Create your custom LiveCD
=====================
Note that you can perform the following at any time. You don't have to do the customizations that I did above other than perhaps smbfs which will make your life easier.
The cool thing about Slitaz is that it gives you the tools to easily create your own livecd after you have customized things to your liking. You can then boot from that livecd and have everthing as you like it without having to install to a hard drive, or if you do install to a hard drive, once you do it, it is the way you like it.
So a few comments before we start.
1) in virtualbox you need to make sure that you booted up with no cd mounted (so you powered down, went into settings/storage/click-cd-onleft/click-cd-icononright-removedisk ok, then clicked the start button to boot the virtual hard drive.
2) the midori web browser will crash often if you only have 256MB of ram configured in your virtualbox AND you boot that virtualbox from CD. so for testing purposes of the isos you create, make sure you have a virtualbox with 512MB+ of ram.
3) for testing it is good to have a brand new seperate virtualbox vdi file. since we are only testing the cd you do not need to have a large hard drive so my test linux with hard drive is only 512MB (not big enough for generating isos to but large enough to test install my newly created isos onto if i choose to) and as stated above make sure it also has 512MB of ram.
The process is quite simple, but you do have to mount the slitaz4.iso AFTER you boot up. I kept forgetting to do this which wasted a lot of time so I created a simple script to do what needs to be done:
---- start of file called "writeiso" (do not include this line) ----
#!/bin/sh
#steps to create iso file
#first check to make sure the cd is mounted
if [ -e "/media/cdrom/boot/gpxe" ] ; then
echo " looks like the slitaz cd is mounted. good!"
else
echo " slitaz cd not mounted!"
exit 0
fi
#next remove mac address file which causes networking to fail on livecd
#writeiso should do this but doesnt (a bug IMHO)
mv /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-junk
#start clean and fresh
rm -rf /home/slitaz
tazlito clean-distro
#create the iso file
tazlito writeiso lzma xyz
---- end of file called "writeiso" (do not include this line) ----
Note that this script does a couple things:
- checks that the slitaz cd is mounted, if not quits before it starts
- moves 70-persistent.. file which if you do not do will cause your created isos network to fail (this IMHO is a bug in writeiso)
- cleans things up before starting to create the iso file
How do I mount the Slitaz4.iso?
- press right-ctrl to get out of virtual box
- go to the devices/cddvddevices menu (on top of the window you just exited)and choose the slitaz4.iso file
- click back into the virtual box
- click on the spider/sysutils/mountdevices (password root)
- click on the cdrom in the top pane
- click on mount button (lower left)
- x out
So create the writeiso shell script file in /home/tux and copy the text above into it.
open a terminal window
>chmod 777 writeiso
> su
root
#/home/tux/writeiso
(It will take a while to complete but when it does you can copy the file over)
#/home/tux/mount
#cp /home/slitaz/distro/xyz.iso /mnt/nas
Once you have the iso in the real world, you can test it with your second virtualbox as described above.
With changes described, the iso is 52MB.
Step 5 - Faster LiveCD Splash Screen
======================
I don't like to wait for the splash screen so that I can just hit the enter key to save 8 seconds of delay. So I tweaked the iso created above.
Double click on mydocs folder on the desktop, navigate up to the iso just created /home/slitaz/distro and double click on it.
This will open the iso inside iso master.
In the bottom pane double click on boot then isolinux. Scroll down until you see isolinux.cfg and click on it to highlight.
Make sure the top pane is at /home/tux.
Click the cd with the arrow up to copy isolinux.cfg to your /home/tux directory.
Now edit that file and change TIMEOUT 80 to TIMEOUT 01. Note if you change the timeout to zero it will not timeout and will not zip past the splash screen but will instead wait forever for your selection.
Save the file. Note this is in /home/tux, need to put it into the iso file.
Back in isomaster window, make sure in the bottom pane isolinux.cfg is still selected then click on the trash can (deletes the original file). Now click on the isolinux.cfg in the top pane and click the cd with the down arrow to put your newly edited isolinux.cfg file into the iso.
Now this doesn't actually change the original iso file, you need to save it with a new name so file/saveas
and save it to /home/tux/blahblah.iso
Try it out (copy it to /mnt/nas, boot up on virtualbox).
Once you have everything to your liking, burn it to a CD and enjoy!!
That's it, hope this helps others....
first, thanks for the tutorial, this was very helpful!
i have one question. i would like to keep the option to select language/keyboard during startup. just like when you load the slitaz live cd where the graphical menu pops up asking you to select both language and keyboard. is it possible to keep that? i know i can set lang= kmap= but i would prefer slitaz prompt the user to select it.
Offline
Remove the settings from /etc/keymap.conf and /etc/locale.conf so the files are empty before [c]tazlito writeiso lzma[/c]
Offline
You guys rock, glad it was that easy, thanks so much.
Offline
[ Generated in 0.019 seconds, 7 queries executed - Memory usage: 1.57 MiB (Peak: 1.77 MiB) ]