Linux/manual: Difference between revisions
Created page with " "sudo du -hsx / | sort -rh | head -20" What's the output of `df -h | nc termbin.com 9999` ? And this? sudo du -sh /var /usr /lib du -sh /lib /home ==> check both lib and home as well Your /var is a bit big too, maybe log is a lot; try: du -sh /var/* | sort -h You may continue with `sudo du -sh /var/lib/* | sort -h` if you wish to pinpoint it" |
No edit summary |
||
| Line 14: | Line 14: | ||
You may continue with `sudo du -sh /var/lib/* | sort -h` if you wish to pinpoint it | You may continue with `sudo du -sh /var/lib/* | sort -h` if you wish to pinpoint it | ||
how to purge and install efi: | |||
Okay, let's walk through the full steps start to finish to get your system booting properly again: | |||
Boot from a Debian live USB/CD in UEFI mode. | |||
Use fdisk or gdisk to verify your partition table - make sure you have partitions setup for EFI, root, and any others needed. | |||
Format the EFI partition as FAT32 if needed. | |||
Mount the root and EFI partitions: | |||
mount /dev/nvme0n1p2 /mnt # Root partition | |||
mount /dev/nvme0n1p1 /mnt/boot/efi # EFI partition | |||
Chroot into the mounted root partition: | |||
chroot /mnt /bin/bash | |||
Install the GRUB and Linux packages: | |||
apt update | |||
apt install grub-efi-amd64 grub-common linux-image-amd64 | |||
Generate an initramfs image: | |||
update-initramfs -c -k all | |||
Verify the kernel and initrd files now exist in /boot | |||
Edit /etc/fstab to match partitions if needed. | |||
Generate a GRUB config file and reinstall GRUB: | |||
grub-mkconfig -o /boot/grub/grub.cfg | |||
grub-install | |||
update-grub | |||
Reboot and verify you can boot into GRUB and then Linux! | |||
Let's take it step-by-step. Let me know if you get stuck or have any errors at any point in the process. | |||
Revision as of 18:20, 23 July 2023
"sudo du -hsx / | sort -rh | head -20"
What's the output of `df -h | nc termbin.com 9999` ?
And this? sudo du -sh /var /usr /lib
du -sh /lib /home ==> check both lib and home as well
Your /var is a bit big too, maybe log is a lot; try: du -sh /var/* | sort -h
You may continue with `sudo du -sh /var/lib/* | sort -h` if you wish to pinpoint it
how to purge and install efi:
Okay, let's walk through the full steps start to finish to get your system booting properly again:
Boot from a Debian live USB/CD in UEFI mode.
Use fdisk or gdisk to verify your partition table - make sure you have partitions setup for EFI, root, and any others needed.
Format the EFI partition as FAT32 if needed.
Mount the root and EFI partitions:
mount /dev/nvme0n1p2 /mnt # Root partition mount /dev/nvme0n1p1 /mnt/boot/efi # EFI partition Chroot into the mounted root partition: chroot /mnt /bin/bash Install the GRUB and Linux packages: apt update
apt install grub-efi-amd64 grub-common linux-image-amd64
Generate an initramfs image:
update-initramfs -c -k all
Verify the kernel and initrd files now exist in /boot
Edit /etc/fstab to match partitions if needed.
Generate a GRUB config file and reinstall GRUB:
grub-mkconfig -o /boot/grub/grub.cfg grub-install update-grub Reboot and verify you can boot into GRUB and then Linux! Let's take it step-by-step. Let me know if you get stuck or have any errors at any point in the process.