Fix fstab for btrfs filesystem
This commit is contained in:
parent
695012520f
commit
a58cff12bd
|
@ -125,13 +125,12 @@ mkswap -L sw01 -- /dev/mapper/"${vgname}"-swap || exit 4
|
||||||
### Root
|
### Root
|
||||||
mkdir -p -- /target
|
mkdir -p -- /target
|
||||||
mountpoint -q /target || mount -- /dev/mapper/"${vgname}"-root /target
|
mountpoint -q /target || mount -- /dev/mapper/"${vgname}"-root /target
|
||||||
### Prepare an fstab file
|
|
||||||
printf '%b\n' "/dev/mapper/${vgname}-root / ext4 defaults 0 0" > /tmp/target.fstab
|
|
||||||
|
|
||||||
### boot - grub
|
### boot - grub
|
||||||
mkdir -p -- /target/boot
|
mkdir -p -- /target/boot
|
||||||
mountpoint -q /target/boot || mount -- ${hdd}1 /target/boot
|
mountpoint -q /target/boot || mount -- ${hdd}1 /target/boot
|
||||||
printf '%b\n' "${hdd}1 /boot ext3 defaults 0 0" >> /tmp/target.fstab
|
### Prepare an fstab file
|
||||||
|
printf '%b\n' "${hdd}1 /boot ext3 defaults 0 0" > /tmp/target.fstab
|
||||||
|
|
||||||
### Prepare the base system tree according to the expected file system
|
### Prepare the base system tree according to the expected file system
|
||||||
if [ "${manage_btrfs}" -eq 0 ]; then
|
if [ "${manage_btrfs}" -eq 0 ]; then
|
||||||
|
@ -139,7 +138,12 @@ if [ "${manage_btrfs}" -eq 0 ]; then
|
||||||
wget -O /tmp/part.btrfs.sh "https://git.101010.fr/gardouille-dotfiles/scripts/raw/master/debian/part.btrfs.sh"
|
wget -O /tmp/part.btrfs.sh "https://git.101010.fr/gardouille-dotfiles/scripts/raw/master/debian/part.btrfs.sh"
|
||||||
#### Create several subvolumes
|
#### Create several subvolumes
|
||||||
chmod +x /tmp/part.btrfs.sh && /tmp/part.btrfs.sh
|
chmod +x /tmp/part.btrfs.sh && /tmp/part.btrfs.sh
|
||||||
|
|
||||||
|
#### root
|
||||||
|
grep "btrfs" /etc/mtab >> /tmp/target.fstab
|
||||||
else ### Or for ext4, create mountpoint and mount LV
|
else ### Or for ext4, create mountpoint and mount LV
|
||||||
|
#### root
|
||||||
|
printf '%b\n' "/dev/mapper/${vgname}-root / ext4 defaults 0 0" >> /tmp/target.fstab
|
||||||
#### home LV
|
#### home LV
|
||||||
mkdir -p -- /target/home
|
mkdir -p -- /target/home
|
||||||
mountpoint -q /target/home || mount -- /dev/mapper/"${vgname}"-home /target/home
|
mountpoint -q /target/home || mount -- /dev/mapper/"${vgname}"-home /target/home
|
||||||
|
|
Loading…
Reference in New Issue