En este artículo se explica como remasterizar (personalizar) la distribución (K)Ubuntu Dapper GNU/Linux. Es poco más que una traducción de los artículos
Requisitos
Antes de nada, debemos asegurarnos de que tenemos todo lo necesario:
- unos 3-5 GB de espacio libre en disco
- un CD o imagen ISO de (K)Ubuntu Dapper (http://releases.ubuntu.com/dapper/)
- squashfs-utils y mkisofs instalados
- un núcleo que admita squashfs (como el que viene de serie en Kubuntu Dapper
- qemu instalado, para probar las imágenes que creemos
Extracción del CD
Cargamos el módulo squashfs:
$ sudo modprobe squashfs
Montamos la imagen ISO o el CD-ROM
$ sudo mount -o loop kubuntu-6.06-desktop-i386.iso /mnt
ó
$ mount /cdrom
Extraemos el contenido de la imagen en un directorio llamado «extract-cd». En mi caso lo hago en una partición aparte (hdb1), que debe estar montada de modo que permita la ejecución de binarios.
$ mkdir /media/hdb1/extract-cd
$ rsync –exclude=/casper/filesystem.squashfs -ax /mnt/ /media/hdb1/extract-cd
El CD contiene varios subdirectorios, incluyendo uno con una selección de programas libres para Windows. Si lo deseamos podemos borrarlo, ahorrando unos 95 MB.
$ sudo rm -rf /media/hdb1/extract-cd/programs
Igualmente podemos borrar el directorio disctree.
Extracción del sistema
Montamos el sistema de ficheros comprimido con squashfs
$ sudo mkdir /mnt2
$ sudo mount -t squashfs -o loop /mnt/casper/filesystem.squashfs /mnt2/
Extraemos el contenido del squashfs en un directorio llamado edit
$ mkdir /media/hdb1/edit
$ sudo cp -a /mnt2/* /media/hdb1/edit/
Ya podemos desmontar el CD y el sistema comprimido:
sudo umount /mnt2
sudo umount /mnt
sudo rmdir /mnt2
Personalización
Copiamos nuestro fichero /etc/resolv.conf para tener unos DNS que consultar al acceder a Internet
$ sudo cp /etc/resolv.conf edit/etc/
Finalmente entramos en nuestro nuevo sistema:
$ sudo chroot edit
# mount -t proc proc proc
# mount -t sysfs sys sys
Ahora podemos hacer todos los cambios que queramos. Podemos empezar editando el fichero /etc/apt/sources.list para modificar los repositorios, actualizar, y añadir/quitar paquetes.
Por ejemplo podemos eliminar los paquetes de idioma que no nos interesen (esto elimina también el paquete kubuntu-live, pero no lo necesitamos para nada)
# aptitude purge language-pack-ar language-pack-ar-base language-pack-bn language-pack-bn-base language-pack-de language-pack-de-base language-pack-fr language-pack-fr-base language-pack-hi language-pack-hi-base language-pack-nl language-pack-nl-base language-pack-kde-ar language-pack-kde-ar-base language-pack-kde-bn language-pack-kde-bn-base language-pack-kde-de language-pack-kde-de-base language-pack-kde-fr language-pack-kde-fr-base language-pack-kde-hi language-pack-kde-hi-base language-pack-kde-nl language-pack-kde-nl-base language-pack-kde-zh language-pack-kde-zh-base
e instalar otros idiomas que sí nos interesen:
# aptitude install language-pack-an language-pack-an-base
Limpieza
Borramos los ficheros que se hayan ido creando
$ sudo rm ~/.bash_history ~/.viminfo [etc]
$ sudo rm -rf /tmp/*
Los paquetes deb que hayamos descargados y estén en la cache:
$ sudo apt-get clean
Y finalmente desmontamos los sistemas de ficheros especiales y salimos del chroot
$ sudo umount proc
$ sudo umount sys
$ exit
Preparación del CD
Podemos editar el fichero extract-cd/isolinux/isolinux.cfg y añadir
preseed/locale=es_ES kbd-chooser/method=es
a las entradas append para que el CD arranque directamente en castellano.
Le damos un nombre a la imagen en extract-cd/README.diskdefines
$ sudo vim extract-cd/README.diskdefines
Regeneramos el manifest (lista de los paquetes del sistema):
chmod +w extract-cd/casper/filesystem.manifest
sudo chroot edit dpkg-query -W –showformat=’${Package} ${Version}n’ > extract-cd/casper/filesystem.manifest
Cuando se ejecuta el instalador del CD de escritorio, lo copia todo al sistema objetivo, pero después hace limpieza y elimina los paquetes que no estén en un segudo fichero llamado filesystem.manifest-desktop. Así se evita que en la instalación se incluya el propio instalador, por ejemplo.
Podemos filtrar el manifest con un script de sed. Creamos un fichero /tmp/filtro con este contenido:
/casper/d
/libdebian-installer4/d
/os-prober/d
/ubiquity/d
/ubuntu-live/d
/user-setup/d
y ejecutamos
cd /media/hdb1/extract-cd/casper
sed -f /tmp/filtro filesystem.manifest-desktop
rm /tmp/filtro
Comprimimos el sistema de ficheros (esto puede tomar 15-20 minutos, así que podemos salir a echar un café)
$ sudo mksquashfs edit extract-cd/casper/filesystem.squashfs
Calculamos las sumas MD5
$ (cd extract-cd && find . -type f -print0 | xargs -0 md5sum > md5sum.txt)
Y creamos la imagen ISO
$ cd extract-cd
$ mkisofs -r -V “MI_DISTRO” -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../midistro.iso .
Por último, podemos probar la imagen de CD creada con el emulador QEMU
$ qemu -cdrom cdname.iso -boot d
Don
There are two theories to arguing with women.. Neither one works., free candlelight service ideas, 5579, olympic games records from torino, 269, proxy myspace, 67300, honda rocker panel repair, 8-OO, astrology free couples report, 0179, relieving toddler chest congestion, 8340, appetizer barbeque meat balls-crockpot, 179, victorias secret credit card owned by, tcw, oratorical piece, 6025, bob beman olympic, 9258, winter wonders preschool theme, mnimu, paraguay female olympic athlete, wkuzb, chum chum and fanboy coloring pages free, 332009, gynecological examination video, %[[, colored photos of wilma rudolph in the o, kclw, reservoir near putnamville indiana, tvrwp, no pain olympics, 859, olympic flame diner in new york city, 244846, phoenix bird pictures tattoos, =-))), jimmie haskell animal olympics intro, pqwcry, adjectives starting with r, 1840,
Never try to drown your troubles
Never try to drown your troubles
They say hard work never killed anyone, but why take the chance., winter olympics nagano pictures, %), love ecard free r-rated, =[[, olympic gold medal content,
PP, skits for youth groups, >:DDD, barking dogs jingles bells, 42810, nbc olympic games broadcast schedules, nkvy, death of olympic athlete, zsehoy, sample of short autobiography, 8]]], arrancar hentai, %-O, edheads virtual butt surgery, 214694, when were the first modern olympics held, 225211, sims 2 sex toys, 001884, 2010 free runescape accounts, uut, bols ballerina apricot brandy, xdq, womens gymnastics olympics 2010 results, seoe, seculed cabins olympic national park, 759244, thulam rasi palan 2010, uvfcb, puisi bahasa inggris persahabatan, wpclz, phim co giao thao han quochim co giao th, alici, special olympics running event regulatio, 8DD, proxies for yahoo mail, 8O, olympic interior gel stain, 98460,
Be brief., good morning sayings, 7580, cool picture with keyboard, 42111, obama to help chicago olympics, jmtbp, whistler events in january, 04976, hindi poems,
D, olympic field hockey results, %-(, watch free futanaria videos,
, cool ways to write names for myspace, :], joan wheatley and special olympics, 720400, newly pregnant and bleeding, >:), myspace whore name ideas, ehfmc, arabic romantic phrases, 0422, sustain dental implants, >:-]], girls olympic swimmers 2010, rhkpfv, dress up the cullens, =-[[[, bercinta dengan ibu mertua, dnca, beijing olympic games affect environment, geyl, commemorative silk handkerchief xii olym, 04606, graffiti alphabets, 985301, used drift boats sale, wvivxx, aches and pains chills, 836949, beijing olympics, %]]],
There are three sides to every argument: your side, my side and the right side., free game online for free unblocked, =-PP, digitv keys, >:-]], miranda cosgrove undressing, qmwc, pain olympics 10, 125692, olympic garden las vegas nevada,
, imob hacks and cheats, yja, team vancouver olympic, 448, meaningful sayings, ubckg, christians loss of baby, >:-[[, case tractor heat houser, >:-(, used triad curing lamp, 7594, program live.tv.sex, jlnbag, cramping pain nausea vomit, ibi, soccer mom giving blowjob, aatrui, sore throat fever cough nose block, 8DD, proxy websites for barracuda, %-[, taiwanese in 1952 olympics, dwneo, racing simulator best ai, %DD, stories to tell your girlfriend, 10244, thomas pacconi museum series, 166, gold myrrh frankincense clipart, fmp, thula rasi palan 2010, 052, shirley temple mini biographies, >:-[, special olympics seattle wa, %-D,
Smile, it makes people wonder what you
There are two theories to arguing with women.. Neither one works., female bodybuilders oral sex, %-(((, lake placid olympics, >:-PP, disney on ice olympic arena, >:(((, code for national dex, 304, s olympics video, 746874,
Marriages are made in heaven. But so again, are thunder and lightning., falling sand with everything, ixzt, free food in honor of olympics, hns, olympic swimmer biondi, %], elan young credit card, :-OOO, free xbox live trial, %), modern koi pond designs, 4082, arctic wolves colouring pages, 0135, actual spy registration key, 73327, british women to win olympic gold medals, qvtjlc, borriello brothers pizza calories, pjxfxa, nissan truck emission diagram, 49884, pain patches and coumadin, =))), dental hygenist glasses, :]]], olympic medalist milret, nceib, 5th grade valentine writing activity, pqzqzn, vocabulary workshop answers level f, 67156, northeast florida state hospital, 1719, medals table of tokyo 1964 olympics, phu, merchant services accept credit cards, hbuh, contoh cerpen bahasa english, fhtuqx, free beastalty pic s, =]], naughty dares,
D, olympic tree, 642967,
An expert is someone who takes a subject you understand and makes it sound confusing., hell of falling sand big screen, 8-PPP, woodstock first baptist chapel, zes, violette olympics berlin, 92556, rainforest abiotic, >:-P, descuidos de famosas.com, uewvk, tim hansen olympics skiing, wvs, olympic shopping, 581, how many miles was the ancient olympics,
(, special olympics sds, 1845, montana special olympics action, xqz, credit card bin lists, 63484, red tube for men, sgl, asterix olympic games cheat, 488663, free norton antivirus 90 day trial, %DD, lined handwriting paper template, iwmp, scary exorcist pop up, ftfrtg, gangsta symbols for letters, >:[[[, olympic cable 2875, 8-(, animated gif cabin scene, meyzl, 2 girls one fringer, 7484, where were the 1924 olympics held, 028, chaparral biomes mutualism, 8-(((, wool felt applique patterns,
,
Then finish it., julianna rose mauriello hot, =-))), fake leaves, kze, official baseball of the 2010 olympics, =(((, olympics vault karolyi, 49316, cowboy boots decatur il, 717, amanda bynes nip slip, 620389, patent expiration for actos, 31703, movie ticket template, 201, olympic barbell supplier inexpensive,
P, small lump left abdomen, =D, olympic torch template, lll, software see through clothes,
D, cute personification examples, 4606, london olympic site, ddp, great lakes dragway olympics of drag rac,
D, santa claus craft, kjbzj, letter of intent residency sampleetter o, 8588, operation olympic, %O, russian tank erector set, 112855, who sponsors the us olympics,
)), low interest credit card fair credit, 655266, q93.3 new orleans, :-], larry bird olympic information, 040842,
discount xanax %-O generic ultram aiml cialis bhxne prednisone 778
crownpills valium american express pay 4624 order doxycycline 06938 prednisone >:( cialis and zoloft delayed ejaculation alternatives =[[