| 159 | |
| 160 | [[br]] |
| 161 | |
| 162 | == install minimum `debian` from `systemrescuecd` |
| 163 | {{{#!bash |
| 164 | export LANG='en_US.UTF-8' |
| 165 | export LANGUAGE='en_US.UTF-8' |
| 166 | export LC_ALL='en_US.UTF-8' |
| 167 | unset LC_ALL |
| 168 | lvremove -f vg_main |
| 169 | vgremove vg_main |
| 170 | pvremove /dev/sda2 |
| 171 | sgdisk -Z /dev/sda |
| 172 | sgdisk -g \ |
| 173 | -n 1:0:+512M \ |
| 174 | -t 1:ef02 \ |
| 175 | -c 1:boot \ |
| 176 | -n 2 \ |
| 177 | -t 2:8e00 \ |
| 178 | -c 2:main \ |
| 179 | /dev/sda |
| 180 | pvcreate -f /dev/sda2 |
| 181 | vgcreate -f vg_main /dev/sda2 |
| 182 | lvcreate -L 7G -n lv_swap vg_main |
| 183 | lvcreate -l 100%FREE -n lv_root vg_main |
| 184 | mke2fs -F -t ext3 -m 1 -L boot /dev/sda1 |
| 185 | mke2fs -F -t ext4 -m 1 -L root /dev/vg_main/lv_root |
| 186 | mount /dev/vg_main/lv_root /mnt |
| 187 | mkdir -vp /mnt/boot |
| 188 | mount /dev/sda1 /mnt/boot |
| 189 | mkdir -vp /mnt/{dev,sys,proc} |
| 190 | mount -o bind /dev /mnt/dev |
| 191 | mount -o bind /sys /mnt/sys |
| 192 | mount -o bind /proc /mnt/proc |
| 193 | curl -o - |
| 194 | http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.102.tar.gz | |
| 195 | tar xzf - |
| 196 | cd debootstrap-1.0.102 && |
| 197 | ./debootstrap --arch amd64 stretch /mnt http://mirror.yandex.ru/debian |
| 198 | }}} |