Changes between Version 24 and Version 25 of install_debian/server


Ignore:
Timestamp:
Jan 17, 2019, 10:03:00 PM (5 years ago)
Author:
Jamie McClelland
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • install_debian/server

    v24 v25  
    5353Repeat for sdb.
    5454
    55 When done, type:
    56 
    57 {{{
    58 parted /dev/sda -- unit s p
    59 }}}
    60 
    61 
    6255SATA disks:
    6356
     
    7467Repeat for sdd.
    7568
    76 When done, type:
    77 
    78 {{{
    79 parted /dev/sda -- unit s p
    80 }}}
    81 
    82 And you should get:
    83 
    84 {{{
    85 0 sittingbull:~# parted /dev/sda unit s p
    86 Model: ATA Hitachi HUA72303 (scsi)
    87 Disk /dev/sda: 5860533168s
    88 Sector size (logical/physical): 512B/512B
    89 Partition Table: gpt
    90 
    91 Number  Start     End          Size         File system  Name      Flags
    92  1      8192s     16383s       8192s                     biosboot  bios_grub
    93  2      16384s    1015807s     999424s                   boot      raid
    94  3      1015808s  5860533134s  5859517327s               pv
    95 
    96 0 sittingbull:~#
    97 }}}
    98 
    99 You should be able to return to the graphical installer to do the rest.
    100 
    101 === Using the Installer ===
    102 
    103 Choose manual partition in the Debian Installer. Then:
    104 
    105  * Choose "Congifure software RAID" (skip step if one disk system)
    106   * Choose "Create MD Device"
    107   * Choose RAID1 for boot partition and RAID10 for big partition
    108   * Number of active devices: 4
    109   * Number of spare devices: 0
    110   * Now select the second partition on each device.
    111   * Click Continue. Repeat for third partition on each device but select RAID10 instead of RAID1.
    112   * When you are done, click Finish. Now you are back at the partition menu.
    113  * 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
    114  * Encrypt the larger, remaining device. Save passphrase in [wiki:keyringer].
    115  * Choose "Congifure LVM" (selecting the device encrypted in the previous step)
    116  * Create a volume group called `vg_`''nameofserver''`0`
    117  * Create logical volumes in this volume group based on your needs. Suggestions: 3GB for /, 1GB swap.
    118 
    119  * 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.
    120  * Enter root password. Save in [wiki:keyringer].
    121  * Do not install the server package or the base package - deselect all of them.
    122 
    123 ==== Views of Disk Configuration ====
    124 
    125  * all partitions set to use '''physical volume for RAID'''
    126 {{{
    127   ┌────────────────────────┤ [!!] Partition disks ├─────────────────────────┐
    128   │                                                                         │
    129   │ You are editing partition #1 of SCSI1 (0,0,0) (sda). No existing file   │
    130   │ system was detected in this partition.                                  │
    131   │                                                                         │
    132   │ Partition settings:                                                     │
    133   │                                                                         │
    134   │               Use as:         physical volume for RAID                  │
    135   │                                                                         │
    136   │               Bootable flag:  off                                       │
    137   │                                                                         │
    138   │               Copy data from another partition                          │
    139   │               Delete the partition                                      │
    140   │               Done setting up the partition                             │
    141   │                                                                         │
    142   │     <Go Back>                                                           │
    143   │                                                                         │
    144   └─────────────────────────────────────────────────────────────────────────┘
    145 }}}
    146 
    147 === You can also install everything manually using debootstrap ===
    148 
    149 Picking up from where we left off partitioning the disks...
    150 
    15169RAID:
    15270
    15371{{{
    154 mdadm --create --raid-devices=4 --level=1 --metadata=1.0 --verbose /dev/md0 /dev/sd[abcd]2
    155 mdadm --create --raid-devices=4 --level=10 --metadata=1.0 --verbose /dev/md1 /dev/sd[abcd]3
     72mdadm --create --raid-devices=2 --level=1 --metadata=1.0 --verbose /dev/md0 /dev/sd[cd]2
     73mdadm --create --raid-devices=2 --level=1 --metadata=1.0 --verbose /dev/md1 /dev/sd[cd]3
    15674}}}
    15775
     
    16482pvcreate /dev/mapper/md1_crypt
    16583vgcreate vg_nameofserver0 /dev/mapper/md1_crypt
    166 lvcreate --name swap --size 1GB vg_nameofserver0
     84lvcreate --name swap --size 1GB vg_$(hostname)0
    16785etc.
    16886}}}
     
    17896 * Repeat for each logical volume
    17997{{{
    180 mkfs -t ext4 /dev/mapper/vg_nameofserver0-nameofpartition
     98for part in var tmp root; do
     99  mkfs -t ext4 /dev/mapper/vg_$(hostname)0-${part}
    181100}}}
    182101
    183102 * Then, mount all partitions in /mnt
    184103{{{
    185 mount /dev/mapper/vg_cleaver0-root /mnt
    186 mkdir /mnt/{boot,var,proc,dev,sys}
     104mount /dev/mapper/vg_$(hostname)0-root /mnt
     105mkdir /mnt/{boot,var,proc,dev,sys,tmp}
    187106mount /dev/md0 /mnt/boot
    188 mount /dev/mapper/vg_cleaver0-var /mnt/var
     107mount /dev/mapper/vg_$(hostname)0-var /mnt/var
     108mount /dev/mapper/vg_$(hostname)0-tmp /mnt/tmp
    189109}}}
    190110
     
    218138
    219139
    220 
    221140 * Install a lot of necessary packages for booting:
    222141{{{