mirror of
https://github.com/Anduin2017/AnduinOS.git
synced 2025-09-19 18:56:00 +08:00
Add script to format and mount /dev/nvme0n1 in initramfs installation
This commit is contained in:
@ -2,6 +2,17 @@ set -e # exit on error
|
||||
set -o pipefail # exit on pipeline error
|
||||
set -u # treat unset variable as error
|
||||
|
||||
|
||||
# Automatically update /etc/casper.conf
|
||||
# Mount /dev/nvme0n1 to /cow
|
||||
mkdir -p /scripts/casper-premount
|
||||
echo << EOF > /scripts/casper-premount/10-format.cow
|
||||
#!/bin/sh
|
||||
set -euo pipefail
|
||||
mkfs.ext4 -F -L casper-rw /dev/nvme0n1p1
|
||||
EOF
|
||||
chmod +x /scripts/casper-premount/10-format.cow
|
||||
|
||||
# Update initramfs
|
||||
update-initramfs -u -k all
|
||||
judge "Update /etc/casper.conf"
|
Reference in New Issue
Block a user