Add support for multiple partitions
This commit is contained in:
parent
e1f6ac3123
commit
0d8a64eb96
1 changed files with 4 additions and 4 deletions
8
vps2arch
8
vps2arch
|
@ -39,7 +39,7 @@ download() {
|
||||||
}
|
}
|
||||||
|
|
||||||
download_and_extract_bootstrap() {
|
download_and_extract_bootstrap() {
|
||||||
local sha1 filename
|
local sha1 filename target
|
||||||
download iso/latest/sha1sums.txt | fgrep "$cpu_type.tar.gz" > "sha1sums.txt"
|
download iso/latest/sha1sums.txt | fgrep "$cpu_type.tar.gz" > "sha1sums.txt"
|
||||||
read -r sha1 filename < "sha1sums.txt"
|
read -r sha1 filename < "sha1sums.txt"
|
||||||
download "iso/latest/$filename" > "$filename"
|
download "iso/latest/$filename" > "$filename"
|
||||||
|
@ -50,9 +50,9 @@ download_and_extract_bootstrap() {
|
||||||
mount --rbind /dev "/root.$cpu_type/dev"
|
mount --rbind /dev "/root.$cpu_type/dev"
|
||||||
mount -t proc proc "/root.$cpu_type/proc"
|
mount -t proc proc "/root.$cpu_type/proc"
|
||||||
mount -t sysfs sys "/root.$cpu_type/sys"
|
mount -t sysfs sys "/root.$cpu_type/sys"
|
||||||
# FIXME support multiple partitions
|
findmnt -nlo TARGET -t btrfs,ext2,ext3,ext4,f2fs,jfs,nilfs2,reiser4,reiserfs,vfat,xfs,zfs | sort -u | while read -r target; do
|
||||||
mount --bind / "/root.$cpu_type/mnt"
|
mount --bind "$target" "/root.$cpu_type/mnt$target"
|
||||||
findmnt /boot >/dev/null && mount --bind /boot "/root.$cpu_type/mnt/boot"
|
done
|
||||||
# Workaround for Debian
|
# Workaround for Debian
|
||||||
mkdir -p "/root.$cpu_type/run/shm"
|
mkdir -p "/root.$cpu_type/run/shm"
|
||||||
# Workaround for OpenVZ
|
# Workaround for OpenVZ
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue