User Tools

Site Tools


doc:appunti:linux:sa:install

This is an old revision of the document!


Installazione Debian da altro O.S. (es. CD-Live)

Articoli interessanit:

Questa distribuzione live è abbastanza indicata allo scopo: Grml.

GRML

The following command will fail. There is a problem witht the --release lenny option because in /etc/apt/sources.list the script wrote etch instead of lenny.

grml-debootstrap --target /dev/md0 \ 
    --grub hd0 --groot hd0,0 \ 
    --mntpoint /mnt/md0 \ 
    --password pippo123 --release lenny

As a workaround set the option RELEASE='lenny' into /etc/debootstrap/config.

WARNING: Also the --password option does not work! The password on the resulting installation is blank, this will prevent remote login! So beware and set the root password before reboot, when in chroot mode.

Comandi utili

Dopo aver avviato l'host da CD-Live questi sono i comandi utili a preparare i dischi.

Creazione di un volume RAID1 (in modalità degradata, con una sola partizione):

mdadm --zero-superblock /dev/sda1
mdadm --create /dev/md0 --run --level=1 --raid-devices=2 /dev/sda1 missing

Avvia un volume RAID creato in precedenza:

mdadm --assemble --run /dev/m4 /dev/sda2 /dev/sdb2

Altri comandi

Dopo aver effettuato una installazione base, si può fare un chroot per sistemare alcune cose prima del reboot:

mount /dev/md0 /mnt/md0
#
# Check for existing virtual fs and remount them into the chroot:
mount -o bind /proc    /mnt/md0/proc
mount -o bind /dev     /mnt/md0/dev
mount -o bind /dev/shm /mnt/md0/dev/shm
mount -o bind /dev/pts /mnt/md0/dev/pts
#
chroot /mnt/md0 /bin/bash
export LC_ALL=C
cd /dev && ./MAKEDEV generic
vi /etc/apt/sources.list
apt-get update
apt-get install locales
dpkg-reconfigure locales
dpkg-reconfigure tzdata

# If using Linux raid:
apt-get install mdadm

# Configure console keyboard:
# For Debian Lenny:
#dpkg-reconfigure console-data
# For Debian Squeeze:
dpkg-reconfigure keyboard-configuration
dpkg-reconfigure console-setup

dpkg-reconfigure debconf
dpkg-reconfigure passwd
apt-get install grub linux-image-2.6.18-4-686 libc6-i686 less
grub-install --recheck /dev/hda
update-grub
vi /etc/fstab
apt-get install openssh-server
vi /etc/network/interfaces

L'hostname va modificato nei seguenti file:

  • /etc/hostname
  • /etc/hosts
  • /etc/motd
  • /etc/ssh/ssh_host_{dr}sa_key.pub

GRUB

La procedura per installare il boot loader è diversa a seconda che si usi GRUB legacy oppure GRUB2. Cambia anche lo schema di numerazione delle partizioni (in GRUB2 inizia da 1). Vedere la pagina GRUB come boot loader.

Sistemare /etc/mdadm/mdadm.conf

Dopo aver pasticciato con l'installazione conviene verificare che il contenuto di /etc/mdadm/mdadm.conf sia corretto.

ATTENZIONE lo UUID dei dischi RAID è quello mostrato da:

mdadm --detail /dev/md0

non quello che si vede in /dev/disk/by-uuid/.

Eventualmente eseguire:

/usr/share/mdadm/mkconf

che genera a video un nuovo file di configurazione.

Dopo aver aggiornato il contenuto del file, si deve aggiornare anche initramfs:

update-initramfs -u -k all
doc/appunti/linux/sa/install.1337100725.txt.gz · Last modified: 2012/05/15 18:52 by niccolo