Changes between Version 60 and Version 61 of install_debian


Ignore:
Timestamp:
Jun 22, 2012, 4:55:07 PM (7 years ago)
Author:
Jamie McClelland
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • install_debian

    v60 v61  
    11[[PageOutline]]
     2
    23= Installing Debian =
    34
    4 === Install Strategy ===
     5Nearly all May First/People Link servers and support team workstations are running [http://debian.org Debian Gnu/Linux]. We support Debian because the project has an [http://www.debian.org/intro/free ideological commitment to free software], organizes labor in a [http://www.debian.org/intro/organization transparent way], is volunteer-based and therefore not dependent on any single corporate entity, and is available on a wide variety of computers.
    56
    6 ==== USB Stick ====
    7 Come with a bootable USB stick with Debian Squeeze installed (as of 2010-05-25, all physical servers are being installed with squeeze and will be creating KVM virtual servers).
     7MFPL administrators may want to [wiki:install_debian/server skip to quick and dirty directions for installing Debian on MFPL servers].
    88
    9 To create a USB installer for Debian Squeeze...
     9Anyone can install Debian! The installer is fairly well designed and most questions it asks of the user are ones most regular users can answer.
    1010
    11  * Download [http://ftp.nl.debian.org/debian/dists/testing/main/installer-amd64/current/images/hd-media/boot.img.gz boot.img.gz].
    12  * Plug in USB stick (don't mount) - run dmesg | tail to figure out which device (e.g. sdb)
    13  * zcat boot.img.gz > /dev/DEVICE
    14  * mount /dev/DEVICE /mnt/
    15  * Download [http://www.debian.org/devel/debian-installer/ netinst ISO]
    16  * Copy ISO image to /mnt/
    17  * Download BNX drivers (optional): aptitude download firmware-bnx2x; aptitude download firmware-bnx2
    18  * Copy the debs to /mnt/
    19  * umount /mnt
    20  * Done!
     11The two hardest parts are:
    2112
    22 ==== PXE Boot ====
     13== Booting to a system from which to install Debian ==
    2314
    24 Or, you can install using our [wiki:pxeboot_from_naomi naomi pxe install] or [wiki:pxe_boot_from_telehouse telehouse pxe install].
     15The first step in installing Debian on your computer is to boot your computer into an environment from which you can install Debian.
    2516
    26 === Initial steps ===
     17Read more about [wiki:install_debian/boot booting into an environment to install Debian].
    2718
    28  * Plug in monitor and keyboard
    29  * Boot machine while USB stick is inserted (or while a network cable is plugged directly into the PXE boot machine)
    30  * Enter Bios/Setup. Specify that Bios should output to serial console and make our [wiki:bios_changes standard bios changes]
    31  * Ensure that server skips errors like no keyboard attached
    32  * Reboot and select Boot Options and choose to boot to USB stick (or network)
    33  * Choose Expert install
    34  * For DNS servers,  use:
    35 {{{
    36 Telehouse: 209.51.163.29 209.51.169.83
    37 XO: 209.234.253.168
    38 }}}
    39  * When prompted for component to use, include all of them to be safe (but be sure to include the SSH server one)
    40  * When given the option - choose to continue your installation via ssh - this will give you the ability to easily set and record pass phrases
    41 === Drive partioning/Disk setup ===
     19Note: If you are installing Debian on a machine already running Microsoft Windows, you might be able to skip this step by installing the Debian windows installer from the [http://www.goodbye-windows.com/ goodbye windows web site].
    4220
    43 Our servers are now coming with four hot swappable disks.
     21FIXME: if you are installing onto removable media (like an external hard disk or a compact flash card) and you already have a working Debian system, you can skip this step and install using debootstrap.
    4422
    45 ==== The big picture is ====
     23== Disk Partitioning ==
    4624
    47   * One approximately 512MB partition on all four disks: configured as RAID1, used as boot partition
    48   * The rest of the space on each disk: configured as RAID10, used as encrypted disk
    49   * Encrypted disk: used as physical volume for LVM
    50   * Create on volume group: vg_${server_name}0
    51   * Create standard partitions as logical volume
     25Unlike most Windows and Macintosh computers, with Linux you can divide your hard disk into partitions. Separate partitions can prevent one program from taking up all the space on your hard disk, allow you to dynamically create encrypted partitions, help you more easily manage virtual machines as well as providing many other advantages to a single disk partition.
    5226
    53 ==== Details ====
     27More information on disk partitioning is available on our [wiki:install_debian/partition partition page].
    5428
    55   Since we are using disks at are 2TB or bigger, we need to ensure that the partitions are created properly. Open a new ssh session and choose to switch to console.
    56 {{{
    57 parted /dev/sda -- mklabel gpt
    58 parted /dev/sda -- unit s mkpart biosboot 8192 16383
    59 parted /dev/sda -- set 1 bios_grub on
    60 parted /dev/sda -- unit s mkpart boot 16384 1015807
    61 parted /dev/sda -- set 2 raid on
    62 parted /dev/sda -- unit s mkpart pv 1015808 -1
    63 parted /dev/sda -- set 3 raid on
    64 
    65 parted /dev/sdb -- mklabel gpt
    66 parted /dev/sdb -- unit s mkpart biosboot 8192 16383
    67 parted /dev/sdb -- set 1 bios_grub on
    68 parted /dev/sdb -- unit s mkpart boot 16384 1015807
    69 parted /dev/sdb -- set 2 raid on
    70 parted /dev/sdb -- unit s mkpart pv 1015808 -1
    71 parted /dev/sdb -- set 3 raid on
    72 }}}
    73 
    74 When done, type:
    75 
    76 {{{
    77 parted /dev/sda -- unit s p
    78 parted /dev/sdb -- unit s p
    79 }}}
    80 
    81 And you should get:
    82 
    83 {{{
    84 0 sittingbull:~# parted /dev/sda unit s p
    85 Model: ATA Hitachi HUA72303 (scsi)
    86 Disk /dev/sda: 5860533168s
    87 Sector size (logical/physical): 512B/512B
    88 Partition Table: gpt
    89 
    90 Number  Start     End          Size         File system  Name      Flags
    91  1      8192s     16383s       8192s                     biosboot  bios_grub
    92  2      16384s    1015807s     999424s                   boot      raid
    93  3      1015808s  5860533134s  5859517327s               pv
    94 
    95 0 sittingbull:~#
    96 }}}
    97 
    98 You should be able to return to the graphical installer to do the rest.
    99 
    100 For the record - here's how you can do it by hand:
    101 
    102 RAID:
    103 
    104 {{{
    105 mdadm --create --raid-devices=4 --level=1 --metadata=1.0 --verbose /dev/md0 /dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sdd2
    106 mdadm --create --raid-devices=4 --level=10 --metadata=1.0 --verbose /dev/md1 /dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3
    107 }}}
    108 
    109 Now cryptsetup:
    110 
    111 {{{
    112 anna-install cryptsetup-udeb
    113 cryptsetup luksFormat /dev/md1
    114 cryptsetup luksOpen /dev/md1 md1_crypt
    115 
    116 pvcreate /dev/mapper/md1_crypt
    117 vgcreate vg_nameofserver0 /dev/mapper/md1_crypt
    118 lvcreate --name swap --size 1GB vg_nameofserver0
    119 etc.
    120 }}}
    121 
    122 Choose manual partition in the Debian Installer. Then:
    123 
    124  * Choose "Congifure software RAID" (skip step if one disk system)
    125   * Choose "Create MD Device"
    126   * Choose RAID1
    127   * Number of active devices: 4
    128   * Number of spare devices: 0
    129   * Now select the second partition on each device.
    130   * Click Continue. Repeat for third partition on each device but select RAID10 instead of RAID1.
    131   * When you are done, click Finish. Now you are back at the partition menu.
    132  * Scroll down to the raid devices (or apply straight to your partitions if it's a one disk system). Modify the 512 MB RAID device: Filesystem: ext3, mount on /boot
    133  * Encrypt the larger, remaining device. Save passphrase in [wiki:keyringer].
    134  * Choose "Congifure LVM" (selecting the device encrypted in the previous step)
    135  * Create a volume group called `vg_`''nameofserver''`0`
    136  * Create logical volumes in this volume group based on your needs. Suggestions: 3GB for /, 1GB swap.
    137 
    138 === Last steps ===
    139 
    140  * After returning to the main disk config menu, click on each logical volume that you create and specify how it should be formatted and mounted.
    141  * Enter root password. Save in [wiki:keyringer].
    142  * Do not install the server package or the base package - deselect all of them.