hostonly: add root_type
This commit is contained in:
parent
ee9cc1c56e
commit
72aabc6a60
2
config
2
config
@ -12,7 +12,7 @@
|
||||
root="UUID=07729c48-25d8-4096-acaf-ce5322915680"
|
||||
|
||||
# root type
|
||||
#root_type=""
|
||||
#root_type="ext4"
|
||||
|
||||
# root mount options
|
||||
#root_args=""
|
||||
|
8
generate
8
generate
@ -124,11 +124,19 @@ install_luks() {
|
||||
install_drivers() {
|
||||
modker="${moddir}${kernel}"
|
||||
if [ "$hostonly" = 1 ]; then
|
||||
[ -n "$root_type" ] || panic "hostonly mode required root_type option to be configured"
|
||||
for modalias in $(find /sys/devices -name modalias -exec sort -u "{}" "+"); do
|
||||
for driver in $(modprobe -D $modalias 2>/dev/null | cut -d " " -f 2); do
|
||||
install -Dm644 "$driver" "${tmpdir}${driver}"
|
||||
done
|
||||
done
|
||||
|
||||
for root_driver in $(modprobe -D $root_type 2>/dev/null | cut -d " " -f 2); do
|
||||
install -Dm644 "$root_driver" "${tmpdir}${root_driver}"
|
||||
done
|
||||
|
||||
# TODO LUKS
|
||||
# TODO LVM
|
||||
else
|
||||
find \
|
||||
"${modker}/kernel/drivers/virtio" \
|
||||
|
Loading…
Reference in New Issue
Block a user