Remaster Linux Mint 17 (With Squashfstools)
Remaster Linux Mint 17 (With Squashfstools)
1andpersonalizingtheliveusersession
Commentsandsuggestions:
https://plus.google.com/u/0/116931501236891367172/posts
or
Testoutmy
remastereddistro
Tokeepthisguidesimple,justcopyandpasteeachlineoneatatime,foranexplanationofwhateachstepisfor,
checkouttheoriginalpostwhereIfoundthesquashfsinstructions:
LinuxMintForums
Note:afewofthecommandsaresolongthattheygotomultiplelinesdependingonyourscreensizeandword
wrap,whichmaycausesomeconfusionanderrorsifnotcopiedcompletely.SoI'vealternatedbetween2colorsfor
eachcommand.Forexample,ifacommandispurpleandtakeup3lines,copythewholethingtoyourterminal.
Shortcutstodifferentsectionsoftheguide
1.Acquirethenecessarysoftware
2A.Createprojectfromscratch
2B.Resume/continueyourproject
2C.Exitchrootenvironment
2D.Build.iso
3.Modifythesystem
4.Personalizingthedesktop/theme
1.Acquirethenecessarysoftware
1a.Installpackagesfromtherepository
Openaterminalandtype:
sudoaptgetinstallsquashfstoolsgenisoimageresolvconf
1b.DownloadLinuxMint
(IuseMint17Mate,32bitforcompatibilitywitholderpcs,butyoucanuseanyversion)
link:
LinuxMintDownloadpage
movethedownloaded.isofilefromyour/Downloadsfoldertoyour/home/userfolder
2.Settingup,resuming,andbuilding.iso
2A.Createprojectfromscratch
Openaterminalandtype/copy:
mkdir~/livecdtmp
cd~/livecdtmp
mkdirextractcdmnt
sudomountoloop~/linuxmint17matedvd32bit.isomnt
sudorsyncexclude=/casper/filesystem.squashfsamnt/extractcd
sudounsquashfsmnt/casper/filesystem.squashfs
sudomvsquashfsrootedit
sudocp/etc/resolv.confedit/etc/
sudocp~/.config/userdirs.dirs~/livecdtmp/edit/etc/skel/.config/userdirs.dirs
sudomountbind/dev/edit/dev
sudochrootedit
mounttprocnone/proc&&mounttsysfsnone/sys&&mounttdevptsnone/dev/pts
exportHOME=/root&&exportLC_ALL=C
mkdirDesktopDocumentsDownloadsMusicPicturesPublicTemplatesVideos
Yourprojectisreadyformodifications,makewhateverchangesyouwantlikeaddingorremovingsoftware
Jumptostep3:Modifythesystem
2B.Resume/continueyourproject
(Tocontinueyourprojectafteryouhaverebootedorjustneedtomakeadditionalchanges)
Openaterminalandtype/copy:
cdlivecdtmp
(ifyou'renotintherealready)
sudomountbind/dev/edit/dev
sudochrootedit
mounttprocnone/proc&&mounttsysfsnone/sys&&mounttdevptsnone/dev/pts
Atthispointyouarereadytoresumeyourremasterproject
Youcanadd/removeprogramsandmakewhateverchangesyouwant.
Jumptostep3.Modifythesystem
2C.Exitchrootenvironment
Whenyouredonemakingchangesinthechrootenvironmentandarestillinthechrootenvironment,
type/copy:
aptgetclean
aptgetautoremove
rmrf/tmp/*~/.bash_history
umount/proc
umount/sys
umount/dev/pts
exit
sudoumountedit/dev
sudoumountmnt
Theprojectisreadytobuildoryoucouldgobacklatertomakemorechangesbyrepeatingstep2B
Jumptostep2B:Resume/continueyourproject
2D.Build.iso
Openaterminalandtype/copy:
sudorm~/livecdtmp/extractcd/casper/filesystem.squashfs
(onlyifrebuildingaproject)
cdlivecdtmp
(ifyou'renotintherealready)
sudomksquashfseditextractcd/casper/filesystem.squashfs
sudonanoextractcd/README.diskdefines
cdextractcd
sudormmd5sum.txt
findtypefprint0|sudoxargs0md5sum|grepvisolinux/boot.cat|sudoteemd5sum.txt
cd..
sudomkisofsrV"Linux_Mint_Remaster"cacheinodesJlbisolinux/isolinux.binc
isolinux/boot.catnoemulbootbootloadsize4bootinfotableo
../Mint17Mate32bit_Remaster.isoextractcd
cd..
sudochmod777Mint17Mate32bit_Remaster.iso
Yourprojectisreadytotest
3.Modifythesystem(rightaftersteps2Aand2B)
Mostmodificationsaredoneviathechrootterminal.
Inthechrootterminalyoucantypecommands,installandremovepackages.ThiswillmodifytheISOyou
create.
Ifyoujustneedtoeditatextfileoradd/deletefilesanddon'twanttousetheterminal,youcanperformthis
byusingafilemanagerasrootinstead.
Toopenafilemanagerasrootinmate,pressalt+f2fortheruncommandandrun
gksucaja
ThefollowingstepsreflectsoftwarethatIwantedtoadd/removeandchangesthatIliked
Youcanperformthesetoo,orchooseyourown
3A.Getallthelatestupdates
inthechrootedterminalcopy/pastethefollowing:
aptgetupdate
then
aptgetupgrade
note:Itsagoodideatorebootrightnow,afterperformingallthesesystemupdates,the/devpartitionwont
unmountsoyouhavetoreboottogetthingsbacktonormal.
Togetbacktoworkingonyourproject,gobacktostep
2B:Resume/continueyourproject
p
3B.Installsoftwarefromtherepository
inthechrootedterminal,installnewsoftware,forexample
aptgetinstallcheesecairodockinkscapetestdiskunetbootingrsyncgprenameshikiwisetheme
shikibravethemelaptopmodetoolspreloadgnomediskutilityskypeaudacitychntpwextlinux
onboardgufwpythongpgmegpodderphatch
3C.Turnonthefirewallbydefault
inthechrootedterminalcopy/pastethefollowing:
nano/etc/ufw/ufw.conf
(changethenotoyes,
example:ENABLED=
yes)
saveandexit
3D.Removethe"InstallMint"iconfromthedesktop
(Onceremovedtheinstallerwillstillbeinthecontrolpanel)
inthechrootedterminalcopy/pastethefollowing:
mv/usr/share/applications/ubiquitygtkui.desktop/usr/share/applications/InstallMint.desktop
3E.Customizefstabtoreducediskwriteswiththenoatimeoption
inthechrootedterminalopenthefollowingfiletoedit:
nano/lib/partman/fstab.d/ext3
findthelines:
options="errors=remountro"
else
options="${options},errors=remountro"
add(withoutthequotes)noatime,nodiratime,rightbeforeerrors.
Itshouldlooklikethis:
options="noatime,nodiratime,errors=remountro"
else
options="${options},noatime,nodiratime,errors=remountro"
saveandexit
3F.Changemintupdatefrequencytoevery15days(orlonger)
(becauseupdatingeverydaygetsannoying)
fromarunningsystemorliveCDsession
opentheupdatemanagerandchangethesettingstoyourliking.
copythefile
~/.config/linuxmint/mintupdate.conf
ontoausbstick
pastethefileintoyourremasterdirectorytothesamelocation
~/livecdtmp/edit/home/mint/.config/linuxmint/mintupdate.conf
Youcanalsoeditthefilemanually,findthelines:
[refresh]
timer_minutes=0
timer_hours=0
timer_days=
15
changetoyourliking
saveandexit
3G.Installextraprogramsfromweb:
GoogleChrome:
https://dl.google.com/linux/direct/googlechromestable_current_i386.deb
Hangoutsplugin:
https://www.google.com/tools/dlpage/hangoutplugin/download.html
Teamviewer:
http://www.teamviewer.com/download/teamviewer_linux.deb
Truecrypt:
https://www.grc.com/misc/truecrypt/truecrypt.htm
Insync:
https://www.insynchq.com
Dropbox:
https://www.dropbox.com/install?os=lnx
note:toinstallthe.debfiles,copythefilesto~/livecdtmp/edit/
theninthechrootterminaltype
dpkgiapplication_name.deb
onceitisdoneinstallingyoucandeletetheinstallerfilewiththiscommand
rmapplication_name.deb
toinstalltruecrypt,copythedownloadedfileto~/livecdtmp/edit/
uncompressthefilewiththiscommand
tarxvftruecrypt7.1alinuxx86.tar.gz
thenruntheinstaller
./truecrypt7.1alinuxx86
thenyoucandeletetheinstallerandcompressedfile
3H.removeautostartprograms
(stopthingslikeremotedesktopsharinganduploadmanagerfromstartingatboottime)
inthechrootedterminalcopy/pastethefollowing:
cd/etc/xdg/autostart
deleteanyshortcutstoprogramsthatyoudontwanttoautostart
3I.settimezone
(otherwisetimewillbeshowninUTC)
inthechrootedterminalcopy/pastethefollowing:
dpkgreconfiguretzdata
thenchooseyourtimezonefromtheoptions
3J.Enableautomaticupdatesonaalreadyinstalledsystem
**note**Dontdothisonaremaster.itwillperformupdateseverytimeyoubootfromtheLiveCD/USB
inthechrootedterminal
Installthepackageunattendedupgrades
aptgetinstallunattendedupgrades
editthesourcesfile
nanoetc/apt/apt.conf.d/50unattendedupgrades
copy/pastethefollowingrightbelowthelineUnattendedUpgrade::AllowedOrigins{
"${distro_id}:${distro_codename}security"
"${distro_id}:${distro_codename}updates"
"linuxmint:rebecca"
"Ubuntu:trustysecurity"
"Ubuntu:trustyupdates"
"Google\,Inc.:stable"
"Canonical:trusty"
"Insynchq,Inc.:"
Ifyouhaveaddedanyrepositoriesandyouwantthemtoautoupdate,youneedtoaddittothislist.
saveandexit
createtheschedulerconfigfile
touch/etc/apt/apt.conf.d/10periodic
openthenewscheduleconfigfileforediting
nano/etc/apt/apt.conf.d/10periodic
copy/pastethefollowingintothefile(thiswillcheckforupdatesonceaday)
APT::Periodic::UpdatePackageLists"1"
APT::Periodic::DownloadUpgradeablePackages"0"
APT::Periodic::AutocleanInterval"30"
APT::Periodic::UnattendedUpgrade"1"
saveandexit
performadryruntoseeifthingsareworking,type
unattendedupgradedryrun
openthelogfiletoseetheresultsofthedryrun
nano/var/log/unattendedupgrades/unattendedupgrades.log
youshouldseesomethinglikethis:
2014090419:20:09,974INFOInitialblacklistedpackages:
2014090419:20:09,974INFOStartingunattendedupgradesscript
2014090419:20:09,975INFOAllowedoriginsare:['o=LinuxMint,a=qianasecurity',
'o=LinuxMint,a=qianaupdates','o=Ubuntu,a=trustysecurity','o=Ubuntu,a=trustyupdates',
'o=Google\\,Inc.,a=stable']
2014090419:20:12,187INFONopackagesfoundthatcanbeupgradedunattended
exitnano,thislogfilewillbeupdatedeverytimetheprogramruns
Atthispointyouaredone,justwaitadaytoseeifyourupdatesareperformed
Ifyouwanttomanuallyruntheupdatetypethefollowing:
unattendedupgrades
openthelogfiletoseetheresultsoftheupgrade
nano/var/log/unattendedupgrades/unattendedupgrades.log
3K.Mounttemporarydirectoriestoraminsteadoftodisk,ifprivacy/securityisdesired
(youshouldalsodisableyourswapfileifprivacy/securityisdesired)
**note**Thisissomethingyoudoonanalreadyinstalledsystem
pressALT+F2,enterthecommandgksucaja
navigateto/etc/andopenfstab
addthefollowing3linestotheendofthetextdocument
tmpfs
/tmp
tmpfs defaults,noatime,nodiratime,mode=1777
00
tmpfs
/var/tmp
tmpfs defaults,noatime,nodiratime,mode=1777
00
tmpfs
/var/log
tmpfs defaults,noatime,nodiratime,mode=0755
00
saveandrebootforchangestotakeeffect
4.Personalizingthedesktop/theme
Thesestepswillallowyoutocustomizetheliveusersession.Thecustomizationswillalsocarryovertousersif
yourremasterisinstalledtoadisk.
Boottoyournewlycreated.iso
Customizeit:
afteryouhavebootedintotheremasteredlivesessiongoaheadandcustomizethedesktoptoyourliking.
youcanrearrangethepanel,changewallpaper,addiconstodesktop,additemstotheautostartlist.pretty
muchanything.
Logoutandbackinagain
Forallyourchangestotakeeffect,youmustlogofffromtheliveusersession.
Logbackin.username:mintpassword:__________(nopassword,justpressenter)
Saveconfigurationfiles
haveaUSBstickhandytocopyfilesinto
openafilemanager
youshouldnowbeinthehomefolderoftheusermint
press
ctrl+h
toseethehiddenfiles
copythefollowingfoldersfromtheminthomefolderontotheUSBflashdrive:
.config,.gconf,.mateconf,and.mateconfd
Ifyouhavefilesonthedesktopthencopyoverthe
Desktop
foldertoo.
Reboot
bootbackintoyourownlinuxinstallationwhereyouareremasteringLinuxMint
openafilemanagerasroot.InMintMateedition,press
alt+F2
tobringuptherunwindow.Enter
gksu
caja
,pressenterandenteryourpasswordwhenprompted
copytheconfigurationfilesthatyoucopiedontotheUSBdriveandpastethemintoyourworkingdirectory
inthefollowinglocation:
~/livecdtmp/edit/etc/skel/
ofcourse,youneedtofindyourownusernameandworkingdirectoryname
Rebuild
oncethefileshavebeencopiedover,justrebuildtheimagelikeyoudidthefirsttime
Jumptostep
2D.Build.iso
Test
whentheimageisfinishedbuilding,burnittodisk,oruse
unetbootin
tomakeabootableUSBstick.
bootintoitandtestitout.
thedesktopshouldlookexactlyasitdidwhenyoucustomizeditonthesecondstepabove.
~
fin
~