Beruflich Dokumente
Kultur Dokumente
le:///home/student/Desktop/LiveCDCustomization ...
Search Search
LiveCDCustomization WhycustomizeLiveCDs
YoumaywishtocustomisetheUbuntuDesktopLiveCdto: makeyourownLinux/Ubuntudistribution showoffaparticularapplication localisetoacertainlanguage removesoftwarepackages addsoftwarepackages updatesoftwarepackages changesystemdefaults(theme,icons,desktopbackground,panels, browserhomepage,etc)
Contents 1. 2. 3. 4. 5. WhycustomizeLiveCDs HowtoCustomisetheUbuntuDesktopCD SystemRequirements Installpre-requisities Obtainthebasesystem 1. ExtracttheCD.isocontents 2. ExtracttheDesktopsystem 3. Prepareandchroot Customizations 1. Apt-get 1. Prerequisites 2. Tasks 2. CustomBackgroundforGNOME 3. Changegconfvalues(fonts,panels etc.) 1. Makingseveralgconfchanges 4. Changedefaultlanguageofgfxboot 5. Customizationlimits 6. MiscellaneousDefaults 7. AdvancedCustomizations 1. LiveCDKernel 2. Removingthe(Casper) Autologin 3. Bootinit 4. Rebuildinginitrd Cleanup ProducingtheCDimage 1. Assemblingthefilesystem 2. TestingtheCD 1. Troubleshooting 3. BurningtheimagetoCD Additionalusesfortheimage Comments
6.
HowtoCustomisetheUbuntu DesktopCD
TheeasiestwaytocreateacustomLiveCDistouseUbuntuCustomization Kit.Whatfollowsisthemanualwayofaccomplishingthesame. YoumightalsowanttocreateaLiveCDfromanexistinginstallation;inthis case,Remastersysisforyou.
7. 8.
SystemRequirements
Atleast3-5GBoffreespace Atleast512MBRAMand1GBswap(recommended) squashfs-tools genisoimage,whichprovidesmkisofs
9. 10.
1 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
AnUbuntukernelwithsquashfssupport(presentinUbuntu6.06andlater) QEMU/KVM,VirtualBoxorVMwarefortesting(optional)
Installpre-requisities
Makesurethatyouhaveinstalledtheneededtools
sudo aptitude install squashfs-tools genisoimage
Obtainthebasesystem
DownloadanofficialDesktopCDfromhttp://releases.ubuntu.com/ Note:theexampleshownhereusestheubuntu-9.04-desktop-i386.isoDesktopCD.Replaceitwiththenameofyouriso.For example,ifyouhaveaubuntu-11.04-desktop-i386.isoimage,thecommand:
mv ubuntu-9.04-desktop-i386.iso ~/livecdtmp
wouldbechangedto:
mv ubuntu-11.04-desktop-i386.iso ~/livecdtmp
Moveorcopyitintoanemptydirectory
mkdir ~/livecdtmp mv ubuntu-9.04-desktop-i386.iso ~/livecdtmp cd ~/livecdtmp
ExtracttheCD.isocontents
MounttheDesktop.iso
mkdir mnt sudo mount -o loop ubuntu-9.04-desktop-i386.iso mnt
Extract.isocontentsintodir'extract-cd'
mkdir extract-cd sudo rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd
ExtracttheDesktopsystem
ExtracttheSquashFSfilesystem
sudo unsquashfs mnt/casper/filesystem.squashfs sudo mv squashfs-root edit
Prepareandchroot
2 of 19 08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
Dependingonyourconfiguration,youmayalsoneedtocopythehostsfile
sudo cp /etc/hosts edit/etc/ sudo mount --bind /dev/ edit/dev sudo chroot edit mount -t proc none /proc mount -t sysfs none /sys mount -t devpts none /dev/pts
Customizations
Apt-get
Prerequisites
In9.10,beforeinstallingorupgradingpackagesyouneedtorun
dbus-uuidgen > /var/lib/dbus/machine-id
and
dpkg-divert --local --rename --add /sbin/initctl ln -s /bin/true /sbin/initctl
Tasks
Toviewinstalledpackagesbysize
dpkg-query -W --showformat='${Installed-Size}\t${Package}\n' | sort -nr | less
Whenyouwanttoremovepackagesremembertousepurge
aptitude purge package-name
CustomBackgroundforGNOME
Generallybackgroundfilesarelocatedin/usr/share/backgrounds.Copyyourpngfilethere,adjustownerandfileaccess,and editthefiles: 1. /usr/share/gnome-background-properties/ubuntu-wallpapers.xmland 2. /usr/share/gconf/defaults/16_ubuntu-wallpapersorotherfilesinthesamedirectory.bychangingthestring/usr/share /backgrounds/warty-final-ubuntu.pngtopointtoyourfile Eventuallychangeoraddattributestootherconfigurationfilessuchas:/var/lib/gconf/debian.defaults/%gconf-tree.xmlor /etc/gconf/gconf.xml.defaults/%gconf-tree.xml). Historical:MoreforDapper...
3 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
Changegconfvalues(fonts,panelsetc.)
Tomakeanychangeonthegconfattributesyoumustaddthevaluethatyouwantinthefile/etc/gconf/gconf.xml.defaults /%gconf-tree.xml.AddingavalueinthatfilewillchangethedefaultvaluesofGnomeorotherapplications,soyoucanchange fonts,backgrounds,themes,cursorsetc. Insteadofeditingthefilewithgeditoranothertexteditor,youcanusethegconftool-2,underthechrootenvironment,runningthe followingline:
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type string --set yourkey "yourvalue"
wherestring,yourkeyandyourvaluemustbethetype,keyandvaluethatyouwanttochange...
Makingseveralgconfchanges
Editinggconfbysettingeachvalueseparatelytakestoomuchtime.Thereisabetterway: Makeatestuserandadjustthesettingsasyouwish.Run
gconftool-2 --dump /the/settings/branch/you/need > ~/live/your-new-settings.xml sudo chown root:root ~/live/your-new-settings.xml sudo mv ~/live/your-new-settings.xml ~/live/edit/your-new-settings.xml
andthen,inthechrootenvironment,run
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --load /your-new-settings.xml rm /your-new-settings.xml
Changedefaultlanguageofgfxboot
Thiscustomizationmustbedoneoutsidethechroot.
sudo aptitude install dpkg-dev uck apt-get source gfxboot-theme-ubuntu gfxboot cd gfxboot-theme-ubuntu*/ make DEFAULT_LANG=fi sudo cp -af boot/* ../extract-cd/isolinux/
Customizationlimits
AftercustomizationmakesurethattherearenouserswithanUID>999.Otherwiseyourimagewon'tbootbecausenoinitialuser isavailable(see/usr/share/initramfs-tools/scripts/casper-bottom/10adduser).Whileinchroot:
awk -F: '$3 > 999' /etc/passwd
Ifyougetanyhits,trychangingtheuid:
usermod -u 500 $hit
MiscellaneousDefaults
4 of 19 08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
Ifyouhaveaddedalocaleandwishtomakeitthedefault,update/etc/default/locale.Youmayhavetocompilethelocale:
locale-gen new_locale update-locale LANG=new_locale LANGUAGE=new_locale LC_ALL=new_locale
Thesechangesmustbemadeasrootinthechrootenvironment.
AdvancedCustomizations
LiveCDKernel
Ifyouwanttocustomizefurtherthebootprocess,youcanchangethelivecdkernel,bycopyingthevmlinuzandinitrdyouwantin placeoftheonesyoufindinextract-cd/casper. i.e.
sudo cp edit/boot/vmlinuz-2.6.15-26-k7 extract-cd/casper/vmlinuz sudo cp edit/boot/initrd.img-2.6.15-26-k7 extract-cd/casper/initrd.gz
Notethattheinitialramdiskfilenamefornewerreleases(since9.10)iscasper/initrd.lz(not.gz).
Removingthe(Casper)Autologin
TheautologinfeatureoftheJaunty/9.04liveCDisabitofanon-the-flyboot-hack.Afterextractingtheinitrd.gz,youneedtoedit thecasper-bottom/25configure_initscriptandthenrecreatetheinitrd.gzfile,replacingtheoriginalinextract-cd/casper.Theprocess todosogoeslikethis:
# # # # # # cd extract-cd/casper mkdir tempdir cd tempdir gunzip -dc ../initrd.gz | cpio -imvd --no-absolute-filenames cp scripts/casper-bottom/25configure_init scripts/casper-bottom/25configure_init.orig vi scripts/casper-bottom/25configure_init
Aftermakingthechange,line25willlooklikethis:
25:if [ -n "" ]; then
Savethefileandquittheeditor.Then,fromextract-cd/casper/tempdirrunthefollowingcommandtore-createtheinitrd.gzfile.
5 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
Thereareothermethodsforre-creatingtheinitrd.gzfileonthispagewhichmayworkalso.:
# cp ../initrd.gz ../initrd.gz.orig # find . | cpio -o -H newc | gzip -9 > ../initrd.gz
Andtore-createtheinitrd.lzfile:
# cp ../initrd.lz ../inird.lz.orig # find . | cpio --quiet --dereference -o -H newc | lzma -7 > ../initrd.lz
Bootinit
Youhavetoeditthefilesinedit/usr/share/initramfs-tools/scripts/casper-bottom/*Forexampleyoucanchangethehostnameorthe livecduser. i.e.
sudo nano edit/usr/share/initramfs-tools/scripts/casper
andedittheusernameorhostname
sudo nano edit/usr/share/initramfs-tools/scripts/casper-bottom/10adduser
Rebuildinginitrd
Afteryou'vemodifiedthekernel,initscriptsoraddednewkernelmodules,youneedtorebuildtheinitrd.gzfileandsubstituteit intothecasperdirectory.
sudo chroot edit mkinitramfs -o /initrd.gz 2.6.15-26-k7
Cleanup
Besuretoremoveanytemporaryfileswhicharenolongerneeded,asspaceonaCDislimited.Aclassicexampleisdownloaded packagefiles,whichcanbecleanedoutusing:
6 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
Ordeletetemporaryfiles
rm -rf /tmp/* ~/.bash_history
Ordeletehostsfile
rm /etc/hosts
Ornameserversettings
rm /etc/resolv.conf
Ifyouinstalledsoftware,besuretorun
rm /var/lib/dbus/machine-id
and
rm /sbin/initctl dpkg-divert --rename --remove /sbin/initctl
fromwithinthechrootenvironment. nowumount(unmount)specialfilesystemsandexitchroot
umount /proc || umount -lf /proc umount /sys umount /dev/pts exit sudo umount edit/dev
Note:if"umount/proc"commandfails,"umount-lf/proc"willbeusedtoretryautomatically.
ProducingtheCDimage
Assemblingthefilesystem
Regeneratemanifest
chmod +w extract-cd/casper/filesystem.manifest sudo chroot edit dpkg-query -W --showformat='${Package} ${Version}\n' > extract-cd/casper/filesystem.manifest sudo cp extract-cd/casper/filesystem.manifest extract-cd/casper/filesystem.manifest-desktop sudo sed -i '/ubiquity/d' extract-cd/casper/filesystem.manifest-desktop sudo sed -i '/casper/d' extract-cd/casper/filesystem.manifest-desktop
Compressfilesystem
sudo rm extract-cd/casper/filesystem.squashfs sudo mksquashfs edit extract-cd/casper/filesystem.squashfs -nolzma
Updatethefilesystem.sizefile,whichisneededbytheinstaller:
printf $(sudo du -sx --block-size=1 edit | cut -f1) > extract-cd/casper/filesystem.size
7 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
(youcanuse"sudonanoextract-cd/README.diskdefines"ifyouhavedifficultiesunderstandingvim) Removeoldmd5sum.txtandcalculatenewmd5sums
cd extract-cd sudo rm md5sum.txt find -type f -print0 | sudo xargs -0 md5sum | grep -v isolinux/boot.cat | sudo tee md5sum.txt
CreatetheISOimage
TestingtheCD
Testusingqemuemulator
qemu -cdrom ubuntu-9.04.1-desktop-i386-custom.iso -boot d -m 512
Orifyouhavehardwareaccelerationforkvm
kvm -cdrom ubuntu-9.04.1-desktop-i386-custom.iso -boot d -m 512
Youcanalsotestwithvirtualbox-ose,whichisfreesoftwareandavailableintheUbuntuuniverserepository.
Troubleshooting
Someexperienceproblemsvirtualizingtheisoafterchangingthelivecdlinuxkernel.Ifyoudo,goclickF6whenthebootscreen isshowing.Movethecursorbetweensplashquietand--andwrite:all_generic_ide
BurningtheimagetoCD
Simple!Justdo
cdrecord dev=/dev/cdrom ubuntu-9.04-desktop-i386-custom.iso
Additionalusesfortheimage
InstallUbuntufromaUSBstick InstallationFromImageLoadedOnHardDrive
Comments
Ifyouhaveanycommentsorquestions,pleasefeelfreetoaddthemhere. Ifyouareansweringaquestion,pleaserewritethequestionintoatipthatanswersthequestion.(tohelpkeepthingstothepoint.) Newquestionsatthebottom(Iguess.) IhavecreatedansmallCustomizationExample(namedFirebirdLiveCD)byaddinganfirebird2.1-superandflamerobinpackages (thisapplytoubuntuHardyHeronalsoitwastestedwithxubuntu8.04)http://flamerobin.blogspot.com/2008/08/creatingflamerobinfirebird-livecd-with.html Warning:qemudidnotworkformeasgivenintheguideabove.Eventhenormal8.04livecdwouldnotbootcorrectly.Every
8 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
time,Iwouldgetthrownintotheashshell(busybox,initramfs)andwhilethere,a"cat/casper.log"wouldrevealthatitwas "Unabletofindamediumcontainingalivefilesystem".Justusevirtualbox-ose.Itactuallyworkswithvirtualbox.However,after usingapt-gettoinstallvirtualbox-ose,Ihadtorun"sudodepmod"againinorderforthevboxdrvmoduletobefoundby modprobe.Hopethathelps! -rocketman768 Warning:Squashfsiscurrentlyindevelopmentandisthusnotfinalizedasaformat.Thismeansyoucannotassumea filesystem.squashfscreatedusingtheUbuntu9.04versionofmakesquashfswillbecompatiblewiththesquashfsdriveanolder liveCD.IwascustomizinganUbuntu7.10LiveCDandwhentestingitalwaysbooteditan(initramfs)prompt--thesquashfswas notgettingmountedas/.IhadtobuildfromwithinanUbuntu7.10chroottogetittowork. --Bob/Paul IhavecreatedansmallCustomizationExample(namedFirebirdLiveCD)byaddinganfirebird-super-serverandflamerobin packages(thisapplytoubuntudapperdrake)http://flamerobin.blogspot.com/2006/05/creating-flamerobinfirebird-live-cd.html I createdanupdatedguidewithUbuntuFestyFawnalsowithanisodownloadfortheFirebird/Flamerobinlivecd http://flamerobin.blogspot.com/2007/09/creating-flamerobinfirebird-livecd-with.html IhavecreatedtoolforautomaticremasteringofliveCDimages.Seehttp://uck.sourceforge.net/. Features: GUIforsimplecreationoflocalizedCDs(includingchanginggfxbootandinstallinglanguagepacks) ScriptforcustomizationofISO,SquashFSandinitrdonliveCD. http://www.atworkonline.it/~bibe/ubuntu/custom-livecd.htmseemstohavesomeniceinfo.nolicensethatIcanseesowewould needtoaskpermissionfromtheauthortousitsmaterial. IfyouwanttomaketheCDbootfaster,youmighttrysortingthefilessothattheyareintheCDintheorderthattheyare accessed:http://lichota.net/%7Ekrzysiek/projects/kubuntu/dapper-livecd-optimization/ GreatHowTo.Iamhavingoneissuehowever.Iwouldliketousecustomxorg.confandsources.listfiles.Anytipsondoing this?Thanks. Simply,copythefilestoedit/etc/inthesameway(andatthesametime)thatyoucopyintheresolv.confandhostsfiles. Ihavefoundthatcopyingxorg.confdoesn'twork,astheboot-timescriptsoverwriteit.Besides,youcan'tguaranteethata particularxorg.confwillrunonallhosts.I'mcurrentlytryingtogetthebinaryNVIDIAdriverstoworkoutoftheboxifan NVIDIAcardispresent.IfIfigureouthowtofixthexorg.conf,I'llpostithere.--JeremyVisser I'vemanagedtogetSynapticrunningfromwithinthechrootenvironment,butitdoeshangwhenItrytoapplypackages.What youdoisrun"Xnest-ac:1"togetanXnestservertorunondisplay:1withoutaccesscontrolsoanyonecanconnecttoit.Then, inthechrootenvironment,run"exportDISPLAY=:1"togetprogramstousethedisplay.Then,type"metacity&"tobeableto movewindows.Finally,run"synaptic". Itworksfineuntilyoutrytoapplypackages,whereithangsforme.--JeremyVisser Shouldn'tthemkinitramfscommandusethecasperscripts,like"mkinitramfs-oinitrd.gz2.6.15-23-386-d/usr/share/initramfstools"? TherearetricksonhowyoucangettofeeltheGNOMEsysteminyourchrootenvironment. 1.Copyyourxorg.confinthechrooted"etc/X11/"directory.
9 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
2.CreategenericdevicesonyourchrootsystemusingMAKEDEV
cd /dev/ MAKEDEV generic
3.StartXorrestartgdm
/etc/init.d/gdm start
SupposedyouwanttomakemodificationsontheDesktop,thatwillbeusedbyallthenewusers,justchangeyour$HOMEto /etc/skel/andstartgdmorX.
export HOME=/etc/skel/
IfyouwanttoloadalltheotherstuffGNOMEneeds(i.e,dbus,avahi,network-manager),justbootas(single-usermode),and startdbusinyourchrootedenvironment.
/etc/init.d/dbus start
Anexampleofthewholeprocedure.(undersingle-usermode)
sudo /etc/init.d/networking restart sudo cp /etc/resolv.conf edit/etc/ sudo cp /etc/X11/xorg.conf edit/etc/X11/ sudo chroot edit mount -o none /proc mount -o none /sys export HOME=/etc/skel/ cd /dev/ MAKEDEV generic /etc/init.d/dbus start /etc/init.d/gdm start
---joelbryan Hello, IamabouttobuildanewLivecdandhaveaquestion:WhenIchangetheusername,hostnameandtheuser'spasswordtheuser loginautomaticallyduringbootingthelivesystem.Butthisisnotdesired.Isitcorrect,thatIhavetoenterapasswordundera DesktopLiveCDwhenIdelettheencryptedpasswordin/usr/share/initramfs-tools/scripts/casper-bottom/10adduser? Thanks Changingusernameandpasswordwillnotchangeloginbehaviour,becausethisisdonein/usr/share/initramfs-tools/scripts /casper-bottom/15autologin ---AlexanderHosfeld HavingtroublestartingaMySQLserverfromwithinthechrootjail.Anysuggestions? -Dave Hey, IamtryingtomakeacustomizedlivecdofKubuntu6.06thatwillbecompletlypreconfigured,sothatwhentheuserclicksonthe installicononKDEtheinstallershoulddoeverythingbyitself,meaningthattheinstallershouldnotaskanyquestionstotheuser. TodothisIamtryingtowriteapreseedfiletotelltheinstallertheinformationthatitneeds. TheproblemisthatevenwiththispreseedfileIcouldonlytelltheinstallerwhatistheusernamethatitshoulduse,therestofthe informationissimplyignoredbytheinstaller.
10 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
Imustbedoingsomethingwrongandwouldappreciateanyandallhelpgivenme. Thanks,Komyg PS:ShouldIpostmypreseedfilehere? Ifthelivecdisnotgoingtobeusedforthepurposesofinstallingwhatfilescanberemoved?Canthe"pool"filescontainingthe .debsberemovedtoo? -Mike IfIwanttoputinmyLiveCDapplicationsthataren'tinthesources.list(likeooffice2.2orperlaudioconverter),whatcainIdo? -Isoldanne Whenyou'reinthechrootyoucaninstallapplicationsjustlikeyouwouldonalivesystem.Ifyouinstallfromsourceyoucanfeel freetodeletethesourcetarbalandmakefoldersafteryoudo'makeinstall'. -Bob/Paul Togetdesired/etc/X11/xorg.confonecanmodifythe/usr/bin/dexconf.Thisscriptgeneratesxorg.conf automaticallyinliveCDsessionaccordingtothebootedmachine. Forexample:
# diff ~/bin/dexconf /usr/bin/dexconf 268,269c268 < Option "XkbLayout" "us,il" < Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll" --> Option "XkbLayout" "$XKB_LAYOUT"
11 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
# mount compressed filesystem mnt "-t squashfs $WDIR/cd/casper/filesystem.squashfs -o ro,loop" sq # create joined writable filesystem for the new CD mnt "-t aufs -o br:$WDIR/cd-w=rw:$WDIR/cd=ro none" cd-u cd-w # create joined writable filesystem for the new compressed squashfs filesystem mnt "-t aufs -o br:$WDIR/sq-w=rw:$WDIR/sq=ro none" sq-u sq-w echo ">>> Updating CD content" ( cd sq-u # DO YOUR CUSTOMIZATION STUFF HERE, CHROOT, MODIFY FILES, ETC. # ... # ... ) echo ">>> Compressing filesystem" mksquashfs $WDIR/sq-u/ $WDIR/cd-u/casper/filesystem.squashfs -noappend
echo ">>> Recomputing MD5 sums" ( cd $WDIR/cd-u && find . -type f -not -name md5sum.txt -not -path '*/isolinux/*' -print0 | xargs -0 -- md5sum > md5sum.txt echo ">>> Creating ISO image $ISO" mkisofs \ -V "Custom KUbuntu Live CD" \ -r -cache-inodes -J -l \ -b isolinux/isolinux.bin \ -c isolinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table \ -o "$ISO" \ $WDIR/cd-u # The trap ... callbacks will unmount everything.
12 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
Iwouldsuggestcreatinganext3filesystemwithinyourNTFSpartition.Tocreatethefile,type ddif=/dev/zeroof=/mnt/hda1/workspace.imgbs=1024count=$((1024*1024*15)) WhereIassumedyourNTFSpartitionwasonhda1,andyouwantedtocallthenewfilesystemworkspace.img(it'sreallyjusta filewithinNTFS),andthatyouwanted15Gbofroomtowork.(Youdon'tneedthatmuch,butwith15Gbyoushouldhaveplenty ofroom.)Thenyouformatthenewfilesystemwiththecommand sudo/sbin/mkfs.ext3/mnt/hda1/workspace.img thencreateamountpoint sudomkdir/mnt/workspace thenmountthenewfilesystem sudomount-oloop/mnt/hda1/workspace.img/mnt/workspace YoucanthenuseasmuchspaceontheNTFSpartitionasyouwant,andhaveallthebenefitsofext3(likegettingthe***thingto work).--Tom Editinggconfbysettingeachvalueseparatelytakestoomuchtime.Thereisabetterway: Makeatestuserandadjustthesettingsasyouwish.Run
gconftool-2 --dump /the/settings/branch/you/need > ~/live/your-new-settings.xml sudo chown root:root ~/live/your-new-settings.xml sudo mv ~/live/your-new-settings.xml ~/live/edit/your-new-settings.xml
andthen,inthechrootenvironment,run
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --load /your-new-settings.xml rm /your-new-settings.xml
13 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
Inordertogetthelivecdtobootfromastaticaddressfoundinthe/etc/network/interfacesfile. Ieditthe/etc/network/interfacesfileandaddastaticaddressfortheinterfaceeth0.
auto eth0 iface eth0 inet static address 10.xxx.xxx.xxx netmask 255.255.255.0 gateway 10.xxx.xxx.1
editsomepath/isolinux/text.cfgaddip=frommediaaftersplash
label live menu label ^Try Ubuntu without any change to your computer kernel /casper/vmlinuz append file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.gz quiet splash ip=frommedia --
Toputthedefaultuserinthe"video"group,
printf "\nADD_EXTRA_GROUPS=1\nEXTRA_GROUPS="video"\n" >> /etc/adduser.conf
--CarlKarsten
InordertoeditaKarmicLiveCDinanyreleasepriortoKarmic,itlookslikeyouwillneedtoupgradesquashfs-toolstosupport SquashFSv4.0:
root@maxwell:/home/Z_Custom# unsquashfs mnt/casper/filesystem.squashfs Filesystem on mnt/casper/filesystem.squashfs is (4:0), which is a later filesystem version than I support!
Hi..HowcanIaddanaPostInstallationscript?Imean,Iwanttoexecuteascriptjustaftertheinstallationprocess.THisscriptis simpleandsetafewthingstocustomizetheinstallation.
14 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
Hello,whatisthebestwaytoremastertheKarmicreleaseLiveCD(inVirtualBox)toincludeallthelatestupdates(morethan150) includingnewkernelandudev?Thekernelchangedfrom2.6.31-14to2.6.31-16andalsoudev. apt-get autoremoveremovestheoldheaders,butIhavetopurgetheoldkernelmanually(apt-get purge linuximage-2.6.31-14-generic). Thefirstproblemis,update-initramfs -u -k allstillrunsfortheoldkernel,too.Only aptitude reinstall udevseemstostopthis (depmod -a && dpkg --configure -a && dpkg-reconfigure udevdoesnothelp). Thesecondproblemis,howdoIprepareinitrdandisolinuxtorunandinstallfromasubdirectory(tocreateamulti-bootDVD)? ThebaseoftheDVDisUbuntu,so/containsubuntu-9.10-desktop-i386.iso,/kubuntucontainskubuntu-9.10-desktop-i386.iso andsoon.MostthingsrunfinewhenIintroducetheprefixtoscripts/casperand/isolinux/text.cfg:
LIVE_MEDIA_PATH=casper $path/.disk/casper-uuid append file=/cdrom/preseed/kubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --
becomes
LIVE_MEDIA_PATH=kubuntu/casper $path/kubuntu/.disk/casper-uuid append file=/cdrom/kubuntu/preseed/kubuntu.seed boot=casper initrd=/kubuntu/casper/initrd.lz quiet splash --
ButtheprefixeddistributionsshowonlyanInstallUbuntu9.10linkonthedesktop,notKubuntu(Xubuntu,LUbuntu,...). Thanks,RenLeonhardt
IupdatedtheKarmicLiveCDwiththelatestupdatesinsidechrootusingaptitudewithupdate,dist-upgrade,purgelinux-image2.6.31-14-generic,installzshzsh-doc,installubuntu-restricted-extras,andenabledDVDplayback.
15 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
SinceKarmicusesinitrd.lz,Ihadtouncompressthe.gzfileandputitbackin.lzformat.
cd extract-cd/casper sudo mv initrd.lz inird.lz.orig gzip -dc initrd.gz | sudo lzma -7 > initrd.lz cd ~/live
Toconservespace,youcanremovetheoriginalinitrdfilesbeforechangingthedirectoryback
sudo rm -f inird.lz.orig initrd.gz
Best,PradeepSekar
Ihaveafewquestions,Iamremasteringacopyof9.04foracommunityschoolprogramiranintoafewproblems #1howdoyouremovetheoptiontoupdateto9.10intheupdatemanager#2howdoyougettheCDtoberecongnizedin ubiquityinstallerasthenameddistroinsteadofubuntu9.04(whenigotoreinstallthesoftarestillsaysitisaubuntu9.04cd) #3howdoyouinstallanewkernelintothelivecdandinstallpart,iwasabletoupgradeitto28.18butwhenitryputting31onit ...itjustwontboot. #4ihaveareposserver,ieditthesources.listbutubuntureposarestilltheprimary,howdoichangethatover? #5finally,itookoutgnomegames,andiwanttoaddalistofeduacationalgames,butiwantthatasaoptionalinstall.(some computerswonhavegamesonthere)isthereawaytoaddthe/.Gamesfolderwithoutactaullyhavingdatainit?itrieddoingthis inthechrootadnrootmenuanditstilldoesnotshowuponinstall... Thankyou ashlessburn
Youcaneditthebootoptionsinextract-cd/isolinux/text.cfgDeletealllinesandsub-linesofalabelyoudon'tlike:Forexampleyou candelete:
label live-install menu label ^Install Ubuntu kernel /casper/vmlinuz append file=/cdro...
--jancelis
Toremovetheautologin,youmakeusworkintheextract-cddirectory.Doesthismeanthatthisprocesshastobethelastone? Dowehavetodoitafterallthemodificationsontheeditdirectory?Dowehavetofirstcreatethenewuserinthechroot?thx
16 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
I'mhavingtroubleproperlyaddingarepository.Howdoyouaddonetoalivecd?--Muscovy
Icustomizethelivecdandinstallapache2,webmin,,,buthowtomakeitstartaftertheautomatic-login? Gordon
IuseaversionofUbuntuthatdoesnotautomaticallyStartthegraphicalsystem(startxcommand)HowcanIaddthattoberunat boot? RJ
17 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
Thenjustupdatedaptandinstalledasnormal:
apt-get update apt-get install dcfldd
Sorryifeveryonealreadyknewthis.Ijustfigureditmaybehelpfultouserslikemyself. mrgrant
HiNick:) Thislinkmighthelp https://help.ubuntu.com/community/LiveCDCustomizationFromScratch butiwouldavoidit.It'snotdumb,justtricky. Insteadyoucanback-upallyoursettings,configfiles/foldersanddatabybackingupthe/homefolder.Youcanmoveyour/home toanewpartitiontoseparateyourdata(includingconfigsandstuff)fromtheOperatingSystem.Thatallowsyoutore-installthe OSwithoutmessinganythingup https://help.ubuntu.com/community/Partitioning/Home/Moving It'sevenpossibletohave2differentOperatingSystemssharingthesame/homealthoughit'snotrecommended. Betterplacestoaskquestionsare
18 of 19
08/15/2012 04:22 AM
le:///home/student/Desktop/LiveCDCustomization ...
19 of 19
08/15/2012 04:22 AM