Okay, this just another tutorial from many other tutorials on google which i make based on what i do.
Firstly sure, read the archiso wiki first.”here“
Then after read, just make simple…
1. Install some packages
2. Clone the archiso git
3. Install the archiso
4. Make the directory to make our custom iso
5. Copy the archiso profile to the directory “to make the custom one copy the releng profile”
Simply like this…
# pacman -S make patch git libisoburn squashfs-tools dosfstools rsync lynx --needed # git clone git://projects.archlinux.org/archiso.git # make -C archiso install $ mkdir ~/archlive # cp -r /usr/share/archiso/configs/PROFILE/ ~/archlive
Instead using the manual way on archiso, i prefer using the automatic, because we just need little work to do.
If you want try to manual way… let it flow… here i will describe the automatic way…
first we need to edit file package.i686 or packages.x86_64 , don’t delete anything packages which already listed there, except you already what are doing… You just need add some or many packages depend on your needed.
Example of my packages.x86_64
arch-install-scripts b43-fwcutter btrfs-progs crda darkhttpd ddrescue dhclient dialog dmraid dnsmasq dnsutils dosfstools efibootmgr elinks gnu-netcat gptfdisk grml-zsh-config grub-bios grub-efi-x86_64 haveged hdparm ipw2100-fw ipw2200-fw irssi lftp lilo linux-atm mtools netcfg nfs-utils nilfs-utils nmap ntfs-3g ntfsprogs ntp openconnect openssh openvpn parted pptpclient refind-efi-x86_64 rp-pppoe rsync smartmontools speedtouch sudo tcpdump usb_modeswitch vpnc wget wireless_tools wpa_actiond wvdial xl2tpd zd1211-firmware zsh firefox xfce4 xfsprogs xbindkeys geany wicd xlockmore xorg-server xorg-util-macros xorg-utils xorg-xdpyinfo xorg-xfontsel xorg-xinit xorg-xkb-utils xorg-xkbevd xorg-xkbutils xorg-xkill xorg-xrandr xf86-input-keyboard xf86-input-mouse xf86-input-synaptics xf86-video-intel xf86-video-v4l xf86-video-vesa pidgin intel-dri libgl sakura guake xdelta3 cantarell-fonts wicd wicd-gtk gtk-engine-murrine bash pam pambase sylpheed clementine terminus-font xfce4-notifyd parcellite xchat mate-polkit gksu terminal xfce4-screenshooter mirage udisks2 consolekit gstreamer0.10-plugins vlc volumeicon gnome-themes-standard gtk-engine-unico alsa-utils xterm conky
See there was many packages… i make a live CD which… give X (init 5) to start instead using the terminal version (init 3), from the packages listed you will know i’m create a xfce4 live CD. Yes that’s true.
So what we need to do next?
Simple make a skel… Skel is a directory which contain your config for the desktop later.
so just make it…
$ mkdir ~/archlive/root-image/etc $ mkdir ~/archlive/root-image/etc/skel
already created ? just continue...
for example, i wan’t my ‘terminal’ (xfce4 default term applications) config to included in the live CD, so i must know where is the terminal applications config is. So its under
“/home/USERNAME/.config/terminal/”
So what to do know? because it is skel, also you can add the .config directory there, then copy the terminal config folder which we had found before.
Just like that xchat sakura or even your current xfce4 setup, but with notice “some setup won’t work due because the applications doesn’t exist or because different directory structure.” So i hope you can check the xfce4 config again to match with your live xfce4 user and applications.
To make the live CD start “X” automatically there was a simple trick. use .zprofile , and yah sure, place it in the skel.
vt=$(fgconsole 2>/dev/null)
(( vt == 1 )) && startx -- vt$vt &> ~/.xlog
unset vt
Well, that the .zprofile
then the other thing we must use is the .xinitrc , because this custom also place it in skel. Fill it with, this taken with default xfce4 xinitrc, due the ck session bug.
#!/bin/sh
# fix broken $UID on some system...
if test "x$UID" = "x"; then
if test -x /usr/xpg4/bin/id; then
UID=`/usr/xpg4/bin/id -u`;
else
UID=`id -u`;
fi
fi
# set $XDG_MENU_PREFIX to "xfce-" so that "xfce-applications.menu" is picked
# over "applications.menu" in all Xfce applications.
if test "x$XDG_MENU_PREFIX" = "x"; then
XDG_MENU_PREFIX="xfce-"
export XDG_MENU_PREFIX
fi
# set DESKTOP_SESSION so that one can detect easily if an Xfce session is running
if test "x$DESKTOP_SESSION" = "x"; then
DESKTOP_SESSION="xfce"
export DESKTOP_SESSION
fi
# $XDG_CONFIG_HOME defines the base directory relative to which user specific
# configuration files should be stored. If $XDG_CONFIG_HOME is either not set
# or empty, a default equal to $HOME/.config should be used.
if test "x$XDG_CONFIG_HOME" = "x" ; then
XDG_CONFIG_HOME=$HOME/.config
fi
[ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"
# $XDG_CACHE_HOME defines the base directory relative to which user specific
# non-essential data files should be stored. If $XDG_CACHE_HOME is either not
# set or empty, a default equal to $HOME/.cache should be used.
if test "x$XDG_CACHE_HOME" = "x" ; then
XDG_CACHE_HOME=$HOME/.cache
fi
[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"
# set up XDG user directores. see
# http://freedesktop.org/wiki/Software/xdg-user-dirs
if which xdg-user-dirs-update >/dev/null 2>&1; then
xdg-user-dirs-update
fi
# Modify libglade and glade environment variables so that
# it will find the files installed by Xfce
GLADE_CATALOG_PATH="$GLADE_CATALOG_PATH:"
GLADE_PIXMAP_PATH="$GLADE_PIXMAP_PATH:"
GLADE_MODULE_PATH="$GLADE_MODULE_PATH:"
export GLADE_CATALOG_PATH
export GLADE_PIXMAP_PATH
export GLADE_MODULE_PATH
# For now, start with an empty list
XRESOURCES=""
# Has to go prior to merging Xft.xrdb, as its the "Defaults" file
test -r "/etc/xdg/xfce4/Xft.xrdb" && XRESOURCES="$XRESOURCES /etc/xdg/xfce4/Xft.xrdb"
test -r $HOME/.Xdefaults && XRESOURCES="$XRESOURCES $HOME/.Xdefaults"
BASEDIR=$XDG_CONFIG_HOME/xfce4
if test -r "$BASEDIR/Xft.xrdb"; then
XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
elif test -r "$XFCE4HOME/Xft.xrdb"; then
mkdir -p "$BASEDIR"
cp "$XFCE4HOME/Xft.xrdb" "$BASEDIR"/
XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
fi
# merge in X cursor settings
test -r "$BASEDIR/Xcursor.xrdb" && XRESOURCES="$XRESOURCES $BASEDIR/Xcursor.xrdb"
# ~/.Xresources contains overrides to the above
test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources"
# load all X resources (adds /dev/null to avoid an empty list that would hang the process)
cat /dev/null $XRESOURCES | xrdb -nocpp -merge -
# load local modmap
test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
# run xfce4-session if installed
if which xfce4-session >/dev/null 2>&1; then
# check if we start xfce4-session with ck-launch-session. this is only
# required for starting from a console, not a login manager
if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
if which ck-launch-session >/dev/null 2>&1; then
ck-launch-session xfce4-session
else
echo
echo "You have tried to start Xfce with consolekit support, but"
echo "ck-launch-session is not installed."
echo "Aborted startup..."
echo
exit 1
fi
else
# start xfce4-session normally
xfce4-session
fi
exit 0
fi
##################
# IMPORTANT NOTE #
##################
# Everything below here ONLY gets executed if you are NOT using xfce4-session
# (Xfce's session manager). If you are using the session manager, everything
# below is handled by it, and the code below is not executed at all. If you're
# not sure if you're using the session manager, type 'ps -e|grep xfce4-session'
# in a terminal while Xfce is running.
##################
# Use dbus-launch if installed.
if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
if which dbus-launch >/dev/null 2>&1; then
eval `dbus-launch --sh-syntax --exit-with-session`
# some older versions of dbus don't export the var properly
export DBUS_SESSION_BUS_ADDRESS
else
echo "Could not find dbus-launch; Xfce will not work properly" >&2
fi
fi
# this is only necessary when running w/o xfce4-session
xsetroot -solid black -cursor_name watch
# or use old-fashioned startup script otherwise
xfsettingsd &
xfwm4 --daemon
# start up stuff in $XDG_CONFIG_HOME/autostart/
if test -d "$XDG_CONFIG_HOME/autostart"; then
for i in ${XDG_CONFIG_HOME}/autostart/*.desktop; do
grep -q -E "^Hidden=true" "$i" && continue
if grep -q -E "^OnlyShowIn=" "$i"; then
# need to test twice, as lack of the line entirely means we still run it
grep -E "^OnlyShowIn=" "$i" | grep -q 'XFCE;' || continue
fi
grep -E "^NotShowIn=" "$i" | grep -q 'XFCE;' && continue
# check for TryExec
trycmd=`grep -E "^TryExec=" "$i" | cut -d'=' -f2`
if test "$trycmd"; then
which "$trycmd" >/dev/null 2>&1 || continue
fi
cmd=`grep -E "^Exec=" "$i" | cut -d'=' -f2`
if test "$cmd" && which "$cmd" >/dev/null 2>&1; then
$cmd &
fi
done
fi
xfdesktop&
orage &
panel=`which xfce4-panel`
case "x$panel" in
x|xno*)
;;
*)
$panel
ret=$?
while test $ret -ne 0; do
xmessage -center -file - -timeout 20 -title Error <<EOF
A crash occured in the panel
Please report this to the xfce4-dev@xfce.org list
or on http://bugs.xfce.org
Meanwhile the panel will be restarted
EOF
cat >&2 <<EOF
A crash occured in the panel
Please report this to the xfce4-dev@xfce.org list
or on http://bugs.xfce.org
Meanwhile the panel will be restarted
EOF
$panel
ret=$?
done
;;
esac
xsetroot -bg white -fg red -solid black -cursor_name watch
amixer set "Master" 80% unmuted
if you using alsa, maybe after you start the GUI, the speaker will be muted. So the last line “amixer bla…” is to set the speaker level.
Then you will need rc.local , rc.local created after the etc/ directory just one directory right before skel…
#Copy udisks2 conf to mount as normal user mv /etc/10-storage-group-mount-override.pkla /etc/polkit-1/localauthority/50-local.d/10-storage-group-mount-override.pkla #Make some dir mkdir /home/live/Documents mkdir /home/live/Downloads mkdir /home/live/Musics mkdir /home/live/Videos mkdir /home/live/Pictures mkdir /home/live/Desktop chown -R live:users /home/live/ # Copy files over to home su -c "cp -R /etc/skel/.[a-zA-Z0-9]* /home/live/" live
So that’s my rc.local , that’s you know im using the live user. Another thing you can setup is timezone, locale.conf, vconsole.conf.
Because im using udisks2 and there was a problem with auth, because live CD i think it's don't store password, so we must override the udisks2 setup , so here is the 10-storage-group-mount-override.pkla
[storage group mount override] Identity=unix-group:users Action=org.freedesktop.udisks2.* ResultAny=yes ResultInactive=yes ResultActive=yes
then , what?
# ./build.sh -v build single netinstal Just it... make the iso, somehow may be you will some experiment with you setup.
One last hint, you can change your live CD, username just edit part ofbuild.sh
‘useradd -m -p “” -g users -G “audio,disk,optical,wheel,root,users” -s /bin/zsh live’
the last one “live” words it your username, happy ISO-ing..??? Hints : #./build.sh clean single core
to clean your iso setup before, if you using single all, just replace with single all.