mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
added script to generate initram filesystems and grub
This commit is contained in:
parent
3790cf30aa
commit
9a7028c886
1 changed files with 24 additions and 0 deletions
24
contrib/liveusb/update_boot.sh
Executable file
24
contrib/liveusb/update_boot.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
# author: Christian Berendt <mail@cberendt.net>
|
||||
|
||||
set -x
|
||||
|
||||
for kernel in $(find /boot/vmlinuz*); do
|
||||
version=$(basename $kernel)
|
||||
version=${version#*-}
|
||||
if [ ! -e /boot/initramfs-$version.img ]; then
|
||||
sudo /usr/bin/dracut /boot/initramfs-$version.img $version
|
||||
fi
|
||||
done
|
||||
|
||||
for image in $(find /boot/initramfs*); do
|
||||
version=${image%.img}
|
||||
version=${version#*initramfs-}
|
||||
if [ ! -e /boot/vmlinuz-$version ]; then
|
||||
sudo rm $image
|
||||
fi
|
||||
done
|
||||
|
||||
/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
|
Loading…
Add table
Reference in a new issue