Sortir d'un /boot débordant
Rédigé par dada / 11 septembre 2020 / 2 commentaires
1. Faire une sauvegarde
2. Sauvegarder /boot
root@ubuntu:/ mkdir /boot_bkp && cp -R /boot/* /boot_bkp/
3. Commenter le fstab
root@ubuntu:/home/user# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda3 during installation
UUID=392d55fd-d4e5-4a67-8834-5d29c7toto42 / ext4 noatime,errors=remount-ro 0 1
# /boot was on /dev/sda2 during installation
#UUID=1b7533ec-96c2-4eef-9eac-b117c0toto42 /boot ext4 noatime 0 2
# /home was on /dev/sda5 during installation
UUID=7545673f-5c08-4201-9e30-f56d32toto42 /home ext4 noatime 0 2
# swap was on /dev/sda4 during installation
UUID=9ad39928-283d-43d6-8ee5-98e296toto42 none swap sw 0
4. Démonter la partition
root@ubuntu:/home/user# umount /boot
root@ubuntu:/home/user# mount | grep boot
5. Refaire un /boot à la racine
root@ubuntu:/home/user# mkdir /boot && cp -R /boot_bkp/* /boot
6. Réinstallation de grub
root@ubuntu:/home/user# grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
7. Mettre à jour grub
root@ubuntu:/home/user# update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-47-generic
Found initrd image: /boot/initrd.img-5.4.0-47-generic
Found linux image: /boot/vmlinuz-5.4.0-45-generic
Found initrd image: /boot/initrd.img-5.4.0-45-generic
done