Changes between Version 10 and Version 11 of install_debian/server


Ignore:
Timestamp:
Dec 11, 2014, 5:36:03 PM (5 years ago)
Author:
Jamie McClelland
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • install_debian/server

    v10 v11  
    2929  * Create standard partitions as logical volume
    3030
    31 === Details ===
    32 
    33   Since we are using disks at are 2TB or bigger, we need to ensure that the partitions are created properly. Also, we leave 100MB at the end in case a replacement disk is a smidge smaller (thanks bug magnet!). Open a new ssh session and choose to switch to console.
     31=== Details - Using the Installer or manually via debootstrap ===
     32
     33Since we are using disks at are 2TB or bigger, we need to ensure that the partitions are created properly. Also, we leave 100MB at the end in case a replacement disk is a smidge smaller (thanks bug magnet!). Open a new ssh session and choose to switch to console.
     34
    3435{{{
    3536parted /dev/sda -- mklabel gpt
     
    6970You should be able to return to the graphical installer to do the rest.
    7071
    71 For the record - here's how you can do it by hand:
    72 
    73 RAID:
    74 
    75 {{{
    76 mdadm --create --raid-devices=4 --level=1 --metadata=1.0 --verbose /dev/md0 /dev/sd[abcd]2
    77 mdadm --create --raid-devices=4 --level=10 --metadata=1.0 --verbose /dev/md1 /dev/sd[abcd]3
    78 }}}
    79 
    80 Now cryptsetup:
    81 
    82 {{{
    83 anna-install cryptsetup-udeb
    84 cryptsetup luksFormat /dev/md1
    85 cryptsetup luksOpen /dev/md1 md1_crypt
    86 
    87 pvcreate /dev/mapper/md1_crypt
    88 vgcreate vg_nameofserver0 /dev/mapper/md1_crypt
    89 lvcreate --name swap --size 1GB vg_nameofserver0
    90 etc.
    91 }}}
     72=== Using the Installer ===
    9273
    9374Choose manual partition in the Debian Installer. Then:
     
    10788 * Create logical volumes in this volume group based on your needs. Suggestions: 3GB for /, 1GB swap.
    10889
    109 == Last steps ==
    110 
    11190 * 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.
    11291 * Enter root password. Save in [wiki:keyringer].
    11392 * Do not install the server package or the base package - deselect all of them.
    11493
    115 == Views of Disk Configuration ==
     94==-- Views of Disk Configuration ====
     95
    11696 * all partitions set to use '''physical volume for RAID'''
    11797{{{
     
    135115  └─────────────────────────────────────────────────────────────────────────┘
    136116}}}
     117
     118=== You can also install everything manually using debootstrap ===
     119
     120Picking up from where we left off partitioning the disks...
     121
     122RAID:
     123
     124{{{
     125mdadm --create --raid-devices=4 --level=1 --metadata=1.0 --verbose /dev/md0 /dev/sd[abcd]2
     126mdadm --create --raid-devices=4 --level=10 --metadata=1.0 --verbose /dev/md1 /dev/sd[abcd]3
     127}}}
     128
     129Now cryptsetup:
     130
     131{{{
     132cryptsetup luksFormat /dev/md1
     133cryptsetup luksOpen /dev/md1 md1_crypt
     134
     135pvcreate /dev/mapper/md1_crypt
     136vgcreate vg_nameofserver0 /dev/mapper/md1_crypt
     137lvcreate --name swap --size 1GB vg_nameofserver0
     138etc.
     139}}}
     140
     141Then, create fileystems:
     142
     143 * For the boot partition
     144
     145{{{
     146mkfs -t ext4 /dev/md0
     147}}}
     148
     149 * Repeat for each logical volume
     150{{{
     151mkfs -t ext4 /dev/mapper/vg_nameofserver0-nameofpartition
     152}}}
     153
     154 * Then, mount all partitions in /mnt
     155{{{
     156mount /dev/mapper/vg_cleaver0-root /mnt
     157mkdir /mnt/{boot,var,proc,dev,sys}
     158mount -o bind /proc /mnt/proc
     159mount -o bind /sys /mnt/sys
     160mount -o bind /dev /mnt/dev
     161mount /dev/md0 /mnt/boot
     162mount /dev/mapper/vg_cleaver0-var /mnt/var
     163}}}
     164
     165 * Run debootstrap
     166{{{
     167debootstrap wheezy /mnt
     168}}}
     169
     170 * chroot
     171{{{
     172chroot /mnt
     173}}}
     174 
     175 * Add and populate the following files (use an existing system to compare format etc.)
     176  * /etc/network/interfaces
     177        * /etc/fstab
     178        * /etc/crypttab
     179        * /etc/mdadm/mdadm.conf
     180
     181 * Install a lot of necessary packages for booting:
     182{{{
     183apt-get install mdadm lvm2 cryptsetup grub-pc linux-image-amd64
     184}}}
     185
     186
    137187
    138188== Additional Steps ==