Usare debootstrap, Ovvero come installare la minimale col wifi!!

« Older   Newer »
  Share  
domx
view post Posted on 22/11/2010, 15:13




Ciao a tutti, dopo essere riuscito ad installare ubuntu minimale col wifi usando debootstrap, dato che in giro si trovano solo guide poco specifiche e obsolete, ho deciso di scrivere questa guida, che probabilmente sarà modificata, ampliata e migliorata in futuro.
Ci occorre solo avere un sistema operativo linux ed una partizione libera.
Sul sistema in uso dobbiamo installare il programma debootstrap, presente nei repo di ubuntu e di debian e in AUR per chi dovesse usare arch. Altrimenti bisogna scaricare i sorgenti e compilarlo.
Dopodiché dobbiamo montare da qualche parte la partizione che vogliamo usare, nel mio caso:
CODICE
sudo mkdir /media/hikari
sudo mount /dev/sda9 /media/hikari

naturalmente questa operazione, come tutte le successive, vanno svolte da root.
Ora per far installare il sistema minimale (senza neanche il kernel) non dobbiamo fare altro che dare:
CODICE
debootstrap --arch ARCH relase /punto/montaggio http://archive.ubuntu.com/ubuntu

e sostituire ARCH con l'architettura che ci interessa, relase con la relase voluta e /punto/montaggio con la posizione della nostra partizione; ad esempio, nel mio caso:
CODICE
debootstrap --arch i386 maverick /media/hikari http://archive.ubuntu.com/ubuntu

Finita questa operazione avremo un sistema ubuntu praticamente allo stato puro :lol:
ora i basta eseguire chroot e dare i pochi comandi che ci servono. Ecco qui:
CODICE
sudo chroot /media/hikari

subito impostate la tastiera italiana con:
CODICE
dpkg-reconfigure console-setup

e vedrete il classico menu grafico della minimale per la scelta della tastiera.
Dopodiché modificate il file /etc/fstab, che è completamente vuoto:
CODICE
editor /etc/fstab

l'editor predefinito è vi, se non avete confidenza potete subito installare nano con:
CODICE
apt-get install nano

e quindi sostituire "editor" con "nano" nei comandi.
Io per ora in /etc/fstab ci ho messo solo l'essenziale, cioè:
CODICE
/dev/sda9        /        ext4        defaults                0        1
proc                /proc        proc        nodev,noexec,nosuid        0        0

a questo punto si dovrebbe configurare la rete, ma io vi consiglio di lasciarlo fare a network-manager in seguito, per ora scrivete solo un nome qualsiasi seguito da .local in /ets/hosts, per evitare che all'avvio vi dia un errore per la mancanza dell'hostname.
Vi basterà dare:
CODICE
echo nome.local > /etc/hostname

io ad esempio ho scritto "hikari.local".
A questo punto è opportuno che configuriamo i repositories, dato che al momento in /etc/apt/sources.list c'è solo "deb http://it.archive.ubuntu.com/ubuntu maverick main"
io ho cancellato il main generico (che contiene pochi pacchetti) ed copiato quelli di ubuntu:
CODICE
deb http://it.archive.ubuntu.com/ubuntu maverick main restricted
deb-src http://it.archive.ubuntu.com/ubuntu/ maverick main restricted

deb http://it.archive.ubuntu.com/ubuntu/ maverick-updates main restricted
deb-src http://it.archive.ubuntu.com/ubuntu/ maverick-updates main restricted

deb http://it.archive.ubuntu.com/ubuntu/ maverick universe
deb-src http://it.archive.ubuntu.com/ubuntu/ maverick universe
deb http://it.archive.ubuntu.com/ubuntu/ maverick-updates universe
deb-src http://it.archive.ubuntu.com/ubuntu/ maverick-updates universe

deb http://it.archive.ubuntu.com/ubuntu/ maverick multiverse
deb-src http://it.archive.ubuntu.com/ubuntu/ maverick multiverse
deb http://it.archive.ubuntu.com/ubuntu/ maverick-updates multiverse
deb-src http://it.archive.ubuntu.com/ubuntu/ maverick-updates multiverse

e adesso possiamo installare i pacchetti lingua:
CODICE
apt-get install language-pack-it language-pack-gnome-it

preciso che io tuttora non sono comunque riuscito ad impostare la lingua italiana, se dovessi risolvere lo scriverò.
Infine la cosa più importante, il kernel:
CODICE
apt-cache search linux-image

e dalla lista scegliamo quello più aggiornato/che più ci aggrada, ad esempio:
CODICE
apt-get install linux-image-2.6.35-22-generic
.
Ora ci chiederà anche se vogliamo configurare grub, io gli ho detto di no e poi ho aggiornato il grub che uso sempre con l'ormai classico "update-grub".
Tocco finale: configurare l'utente e (se si vuole) impostare la password di root:
CODICE
adduser nomeutente
addgroup --system admin
adduser nomeutente admin
passwd root

naturalmente poi bisogna configuarare sudo, ma per questo vi rimando ad una delle tante guide che si trovano su google.
Ora il sistema è pronto, vi consiglio di installarci prima l'interfaccia grafica ed il network-manager, e poi potrete tranquillamente riavviarlo ;).
 
Top
vaillant
view post Posted on 22/11/2010, 18:56




Innanzitutto complimenti per la guida ;) Due domande: si lavora solo in chroot testuale oppure si può lavorare anche in chroot con GUI?

Inoltre, quando il sistema è "pronto" come si pacchettizza in iso includendo un installer, ecc.?
 
Top
shishimaru
view post Posted on 22/11/2010, 23:00




Capperi,questo mi consente di creare una Ubuntu davvero come dico io...
Complimentoni,Domx! :lol:
 
Top
domx
view post Posted on 23/11/2010, 18:57




Ragazzi, innanzitutto grazie dei complimenti! :D
Per quanto riguarda la pacchettizzazione della iso non saprei, si può usare un programma come si fa al solito (ad esempio remastersys), ma non escluderei che ci sia anche un modo per pacchettizzare la iso con debootstrap. Circa il chroot vale la stessa cosa che vale per qualsiasi altro sistema, una volta installato tutto il necessario, comunque il chroot grafico sarebbe anche inutile in quanto puoi entrare direttamente nel sistema, basta che aggiorni il grub per farlo rilevare ;)
 
Top
Eevan
view post Posted on 26/11/2010, 11:47




genisoimage
 
Top
vaillant
view post Posted on 26/11/2010, 12:00




CITAZIONE (Eevan @ 26/11/2010, 11:47) 
genisoimage

Sarebbe?
 
Top
Eevan
view post Posted on 26/11/2010, 12:00




un programma che genera immagini iso.
 
Top
vaillant
view post Posted on 26/11/2010, 12:06




Ok grazie, lo provo ;)
 
Top
Eevan
view post Posted on 26/11/2010, 12:09




questo è genisoimage --help:

CODICE
Usage: genisoimage [options] file...
Options:
 -nobak                      Do not include backup files
 -no-bak                     Do not include backup files
 -abstract FILE              Set Abstract filename
 -A ID, -appid ID            Set Application ID
 -biblio FILE                Set Bibliographic filename
 -cache-inodes               Cache inodes (needed to detect hard links)
 -no-cache-inodes            Do not cache inodes (if filesystem has no unique unides)
 -check-oldnames             Check all imported ISO9660 names from old session
 -check-session FILE         Check all ISO9660 names from previous session
 -copyright FILE             Set Copyright filename
 -debug                      Set debug flag
 -b FILE, -eltorito-boot FILE
                             Set El Torito boot image name
 -e FILE, -efi-boot FILE     Set EFI boot image name
 -eltorito-alt-boot          Start specifying alternative El Torito boot parameters
 -B FILES, -sparc-boot FILES Set sparc boot image names
 -sunx86-boot FILES          Set sunx86 boot image names
 -G FILE, -generic-boot FILE Set generic boot image name
 -sparc-label label text     Set sparc boot disk label
 -sunx86-label label text    Set sunx86 boot disk label
 -c FILE, -eltorito-catalog FILE
                             Set El Torito boot catalog name
 -C PARAMS, -cdrecord-params PARAMS
                             Magic paramters from cdrecord
 -d, -omit-period            Omit trailing periods from filenames (violates ISO9660)
 -dir-mode mode              Make the mode of all directories this mode.
 -D, -disable-deep-relocation
                             Disable deep directory relocation (violates ISO9660)
 -file-mode mode             Make the mode of all plain files this mode.
 -f, -follow-links           Follow symbolic links
 -gid gid                    Make the group owner of all files this gid.
 -graft-points               Allow to use graft points for filenames
 -root DIR                   Set root directory for all new files and directories
 -old-root DIR               Set root directory in previous session that is searched for files
 -help                       Print option help
 -hide GLOBFILE              Hide ISO9660/RR file
 -hide-list FILE             File with list of ISO9660/RR files to hide
 -hidden GLOBFILE            Set hidden attribute on ISO9660 file
 -hidden-list FILE           File with list of ISO9660 files with hidden attribute
 -hide-joliet GLOBFILE       Hide Joliet file
 -hide-joliet-list FILE      File with list of Joliet files to hide
 -hide-joliet-trans-tbl      Hide TRANS.TBL from Joliet tree
 -hide-rr-moved              Rename RR_MOVED to .rr_moved in Rock Ridge tree
 -gui                        Switch behaviour for GUI
 -i ADD_FILES                No longer supported
 -input-charset CHARSET      Local input charset for file name conversion
 -output-charset CHARSET     Output charset for file name conversion
 -iso-level LEVEL            Set ISO9660 conformance level (1..3) or 4 for ISO9660 version 2
 -J, -joliet                 Generate Joliet directory information
 -joliet-long                Allow Joliet file names to be 103 Unicode characters
 -jcharset CHARSET           Local charset for Joliet directory information
 -l, -full-iso9660-filenames Allow full 31 character filenames for ISO9660 names
 -max-iso9660-filenames      Allow 37 character filenames for ISO9660 names (violates ISO9660)
 -allow-limited-size         Allow different file sizes in ISO9660/UDF on large files
 -allow-leading-dots         Allow ISO9660 filenames to start with '.' (violates ISO9660)
 -ldots                      Allow ISO9660 filenames to start with '.' (violates ISO9660)
 -L, -allow-leading-dots     Allow ISO9660 filenames to start with '.' (violates ISO9660)
 -log-file LOG_FILE          Re-direct messages to LOG_FILE
 -m GLOBFILE, -exclude GLOBFILE
                             Exclude file name
 -exclude-list FILE          File with list of file names to exclude
 -pad                        Pad output to a multiple of 32k (default)
 -no-pad                     Do not pad output to a multiple of 32k
 -M FILE, -prev-session FILE Set path to previous session to merge
 -dev SCSIdev                Set path to previous session to merge
 -N, -omit-version-number    Omit version number from ISO9660 filename (violates ISO9660)
 -new-dir-mode mode          Mode used when creating new directories.
 -force-rr                   Inhibit automatic Rock Ridge detection for previous session
 -no-rr                      Inhibit reading of Rock Ridge attributes from previous session
 -no-split-symlink-components
                             Inhibit splitting symlink components
 -no-split-symlink-fields    Inhibit splitting symlink fields
 -o FILE, -output FILE       Set output file name
 -path-list FILE             File with list of pathnames to process
 -p PREP, -preparer PREP     Set Volume preparer
 -print-size                 Print estimated filesystem size and exit
 -publisher PUB              Set Volume publisher
 -P PUB, -publisher PUB      Set Volume publisher
 -quiet                      Run quietly
 -r, -rational-rock          Generate rationalized Rock Ridge directory information
 -R, -rock                   Generate Rock Ridge directory information
 -s TYPE, -sectype TYPE      Set output sector type to e.g. data/xa1/raw
 -alpha-boot FILE            Set alpha boot image name (relative to image root)
 -hppa-cmdline CMDLINE       Set hppa boot command line (relative to image root)
 -hppa-kernel-32 FILE        Set hppa 32-bit image name (relative to image root)
 -hppa-kernel-64 FILE        Set hppa 64-bit image name (relative to image root)
 -hppa-bootloader FILE       Set hppa boot loader file name (relative to image root)
 -hppa-ramdisk FILE          Set hppa ramdisk file name (relative to image root)
 -mips-boot FILE             Set mips boot image name (relative to image root)
 -mipsel-boot FILE           Set mipsel boot image name (relative to image root)
 -jigdo-jigdo FILE           Produce a jigdo .jigdo file as well as the .iso
 -jigdo-template FILE        Produce a jigdo .template file as well as the .iso
 -jigdo-min-file-size SIZE   Minimum size for a file to be listed in the jigdo file
 -jigdo-force-md5 PATTERN    Pattern(s) where files MUST match an externally-supplied MD5sum
 -jigdo-exclude PATTERN      Pattern(s) to exclude from the jigdo file
 -jigdo-map PATTERN1=PATTERN2
                             Pattern(s) to map paths (e.g. Debian=/mirror/debian)
 -md5-list FILE              File containing MD5 sums of the files that should be checked
 -jigdo-template-compress ALGORITHM
                             Choose to use gzip or bzip2 compression for template data; default is gzip
 -checksum_algorithm_iso alg1,alg2,...
                             Specify the checksum types desired for the output image
 -checksum_algorithm_template alg1,alg2,...
                             Specify the checksum types desired for the output jigdo template
 -sort FILE                  Sort file content locations according to rules in FILE
 -split-output               Split output into files of approx. 1GB size
 -stream-file-name FILE_NAME Set the stream file ISO9660 name (incl. version)
 -stream-media-size #        Set the size of your CD media in sectors
 -sysid ID                   Set System ID
 -T, -translation-table      Generate translation tables for systems that don't understand long filenames
 -table-name TABLE_NAME      Translation table file name
 -ucs-level LEVEL            Set Joliet UCS level (1..3)
 -udf                        Generate UDF file system
 -dvd-video                  Generate DVD-Video compliant UDF file system
 -uid uid                    Make the owner of all files this uid.
 -U, -untranslated-filenames Allow Untranslated filenames (for HPUX & AIX - violates ISO9660). Forces -l, -d, -N, -allow-leading-dots, -relaxed-filenames, -allow-lowercase, -allow-multidot
 -relaxed-filenames          Allow 7 bit ASCII except lower case characters (violates ISO9660)
 -no-iso-translate           Do not translate illegal ISO characters '~', '-' and '#' (violates ISO9660)
 -allow-lowercase            Allow lower case characters in addition to the current character set (violates ISO9660)
 -allow-multidot             Allow more than one dot in filenames (e.g. .tar.gz) (violates ISO9660)
 -use-fileversion LEVEL      Use file version # from filesystem
 -v, -verbose                Verbose
 -version                    Print the current version
 -V ID, -volid ID            Set Volume ID
 -volset ID                  Set Volume set ID
 -volset-size #              Set Volume set size
 -volset-seqno #             Set Volume set sequence number
 -x FILE, -old-exclude FILE  Exclude file name(depreciated)
 -hard-disk-boot             Boot image is a hard disk image
 -no-emul-boot               Boot image is 'no emulation' image
 -no-boot                    Boot image is not bootable
 -boot-load-seg #            Set load segment for boot image
 -boot-load-size #           Set numbers of load sectors
 -boot-info-table            Patch boot image with info table
 -XA                         Generate XA directory attruibutes
 -xa                         Generate rationalized XA directory attruibutes
 -z, -transparent-compression
                             Enable transparent compression of files
 -hfs-type TYPE              Set HFS default TYPE
 -hfs-creator CREATOR        Set HFS default CREATOR
 -g, -apple                  Add Apple ISO9660 extensions
 -h, -hfs                    Create ISO9660/HFS hybrid
 -map MAPPING_FILE           Map file extensions to HFS TYPE/CREATOR
 -H MAPPING_FILE, -map MAPPING_FILE
                             Map file extensions to HFS TYPE/CREATOR
 -magic FILE                 Magic file for HFS TYPE/CREATOR
 -probe                      Probe all files for Apple/Unix file types
 -mac-name                   Use Macintosh name for ISO9660/Joliet/RockRidge file name
 -no-mac-files               Do not look for Unix/Mac files (depreciated)
 -boot-hfs-file FILE         Set HFS boot image name
 -part                       Generate HFS partition table
 -cluster-size SIZE          Cluster size for PC Exchange Macintosh files
 -auto FILE                  Set HFS AutoStart file name
 -no-desktop                 Do not create the HFS (empty) Desktop files
 -hide-hfs GLOBFILE          Hide HFS file
 -hide-hfs-list FILE         List of HFS files to hide
 -hfs-volid HFS_VOLID        Volume name for the HFS partition
 -icon-position              Keep HFS icon position
 -root-info FILE             finderinfo for root folder
 -input-hfs-charset CHARSET  Local input charset for HFS file name conversion
 -output-hfs-charset CHARSET Output charset for HFS file name conversion
 -hfs-unlock                 Leave HFS Volume unlocked
 -hfs-bless FOLDER_NAME      Name of Folder to be blessed
 -hfs-parms PARAMETERS       Comma separated list of HFS parameters
 -prep-boot FILE             PReP boot image file -- up to 4 are allowed
 -chrp-boot                  Add CHRP boot header
 --cap                       Look for AUFS CAP Macintosh files
 --netatalk                  Look for NETATALK Macintosh files
 --double                    Look for AppleDouble Macintosh files
 --ethershare                Look for Helios EtherShare Macintosh files
 --exchange                  Look for PC Exchange Macintosh files
 --sgi                       Look for SGI Macintosh files
 --macbin                    Look for MacBinary Macintosh files
 --single                    Look for AppleSingle Macintosh files
 --ushare                    Look for IPT UShare Macintosh files
 --xinet                     Look for XINET Macintosh files
 --dave                      Look for DAVE Macintosh files
 --sfm                       Look for SFM Macintosh files
 --osx-double                Look for MacOS X AppleDouble Macintosh files
 --osx-hfs                   Look for MacOS X HFS Macintosh files


c'e' un bel po' da capire image
 
Top
vaillant
view post Posted on 26/11/2010, 12:35




:O :O vabbè, ci provo :D
 
Top
domx
view post Posted on 26/11/2010, 17:50




Se avessi tempo ci proverei, il punto è che ultimamente ho pochissimo tempo libero...
 
Top
10 replies since 22/11/2010, 15:13   454 views
  Share