]> git.ipfire.org Git - people/jschlag/ipfire-2.x.git/blobdiff - lfs/flash-images
flash-image: set RAMDISK_MODE=2
[people/jschlag/ipfire-2.x.git] / lfs / flash-images
index 530bf339b80b95ae2e86bec54ed7a0d91cd212f7..36a0425754d05e9be73bfc3c484591b3065c6d6d 100644 (file)
@@ -182,15 +182,19 @@ endif
        mkdir -pv $(MNThdd)/boot/grub
        chroot $(MNThdd) grub-mkconfig -o /boot/grub/grub.cfg
 
-       # Insert the UUID because grub-mkconfig fails to detect that correctly
+       # Insert the UUID because grub-mkconfig often fails to
+       # detect that correctly
        sed -i $(MNThdd)/boot/grub/grub.cfg \
-               -e "s/root=[a-z0-9\/]*/root=UUID=$$(blkid -o value -s UUID $(PART_ROOT))/g"
+               -e "s/root=[A-Za-z0-9=-\/]*/root=UUID=$$(blkid -o value -s UUID $(PART_ROOT))/g"
 
        # Install GRUB
        grub-install --force --recheck --no-floppy \
                --root-directory=$(MNThdd) $(DEVICE)
 endif
 
+       # Set ramdisk mode to automatic
+       echo RAMDISK_MODE=2 > $(MNThdd)/etc/sysconfig/ramdisk
+
        # Automatically resize the root partition to its maximum size at first boot
        touch $(MNThdd)/.partresize