Create and mount the system for debootstrap
This commit is contained in:
parent
6339ec9c16
commit
9de6015afb
|
@ -57,3 +57,51 @@ done
|
||||||
mkswap /dev/mapper/"${vgname}"-swap
|
mkswap /dev/mapper/"${vgname}"-swap
|
||||||
## }}}
|
## }}}
|
||||||
# }}}
|
# }}}
|
||||||
|
# Debootstrap {{{
|
||||||
|
## Create and mount the system {{{
|
||||||
|
### Root
|
||||||
|
mkdir -p -- /target
|
||||||
|
mountpoint -q /target || mount -- /dev/mapper/"${vgname}"-root /target
|
||||||
|
|
||||||
|
### boot - grub
|
||||||
|
mkdir -p -- /target/boot
|
||||||
|
mountpoint -q /target/boot || mount -- ${hdd}1 /target/boot
|
||||||
|
|
||||||
|
### home LV
|
||||||
|
mkdir -p -- /target/home
|
||||||
|
mountpoint -q /target/home || mount -- /dev/mapper/"${vgname}"-home /target/home
|
||||||
|
### opt LV
|
||||||
|
mkdir -p -- /target/opt
|
||||||
|
mountpoint -q /target/opt || mount -- /dev/mapper/"${vgname}"-opt /target/opt
|
||||||
|
### srv LV
|
||||||
|
mkdir -p -- /target/srv
|
||||||
|
mountpoint -q /target/srv || mount -- /dev/mapper/"${vgname}"-srv /target/srv
|
||||||
|
#### bkp LV
|
||||||
|
mkdir -p -- /target/srv/backup
|
||||||
|
mountpoint -q /target/srv/backup || mount -- /dev/mapper/"${vgname}"-bkp /target/srv/backup
|
||||||
|
### tmp LV
|
||||||
|
mkdir -p -- /target/tmp
|
||||||
|
mountpoint -q /target/tmp || mount -- /dev/mapper/"${vgname}"-tmp /target/tmp
|
||||||
|
### usr LV
|
||||||
|
mkdir -p -- /target/usr
|
||||||
|
mountpoint -q /target/usr || mount -- /dev/mapper/"${vgname}"-usr /target/usr
|
||||||
|
### var LV
|
||||||
|
mkdir -p -- /target/var
|
||||||
|
mountpoint -q /target/var || mount -- /dev/mapper/"${vgname}"-var /target/var
|
||||||
|
#### vz LV
|
||||||
|
mkdir -p -- /target/var/lib/vz
|
||||||
|
mountpoint -q /target/var/lib/vz || mount -- /dev/mapper/"${vgname}"-vz /target/var/lib/vz
|
||||||
|
|
||||||
|
### Swap
|
||||||
|
swapon -- /dev/mapper/"${vgname}"-swap
|
||||||
|
|
||||||
|
### System
|
||||||
|
mkdir -p -- /target/dev/pts
|
||||||
|
mountpoint -q /target/dev/pts || mount -o bind -- /dev/pts /target/dev/pts
|
||||||
|
mkdir -p -- /target/proc
|
||||||
|
mountpoint -q /target/proc || mount -t proc -- proc /target/proc
|
||||||
|
mkdir -p -- /target/sys
|
||||||
|
mountpoint -q /target/sys || mount -o bind -- /sys /target/sys
|
||||||
|
## }}}
|
||||||
|
|
||||||
|
# }}}
|
||||||
|
|
Loading…
Reference in New Issue