You are not logged in.

#1 2022-04-04 06:54:38

astanwar99
Member
Registered: 2021-05-31
Posts: 14

[SOLVED] Formatted boot partition by mistake, unable to boot system

I formatted my boot partition by mistake, which deleted my grub as well. I have tried multiple solutions after that but still facing some issues in getting the system to start:

My partitions:

  1. fdisk -l
    20220404-111912.jpg

  2. df -h
    20220404-112005.jpg

What i have tried:

  1. Booted arch through live usb

  2. Mounted my original arch system and installed grub and linux

    mkdir /mnt/arch
    mount -t auto /dev/sdb5 /mnt/arch
    arch-chroot /mnt/arch
    mount -t auto /dev/sdb3 /boot
    pacman -S grub
    pacman -S linux
    pacman -Syu
    grub-install --efi-directory=/boot --target=x86_64-efi /dev/sdb
    grub-mkconfig > /boot/grub/grub.cfg
  3. Rebooted and got this error (current status)
    20220404-031629.jpg

I had also tried this solution https://bbs.archlinux.org/viewforum.php?id=269588. I got this:
20220404-085019.jpg
This and most of the other which I found were solving for mismatch of kernel and boot versions. Some useful outputs:

  • uname -r

    5.17.1-arch1-1
  • pacman -Q linux

    linux 5.17.1-arch1-1
  • cat /etc/fstab
    20220404-120407.jpg

If you notice the output df -h, there i no boot partition. I think issue might be related to that. Let me know if any other outputs/logs are required.
Any help is appreciated and sorry for all the images and no text. Thanks.

Last edited by astanwar99 (2022-04-04 08:32:50)

Offline

#2 2022-04-04 07:11:58

astanwar99
Member
Registered: 2021-05-31
Posts: 14

Re: [SOLVED] Formatted boot partition by mistake, unable to boot system

I did lsblk -f and realized my boot partition's UUID was different from the entry in /etc/fstab, got the hint from here: https://bbs.archlinux.org/viewforum.php?id=233935,

I manually changed the entry and its working now. Although my problem is solved, I just want to know if could've solved this without a manual fix? Like regenerating fstab file or some sync command for actual partitions and fstab.

Thanks.

Offline

#3 2022-04-04 08:25:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: [SOLVED] Formatted boot partition by mistake, unable to boot system

You could've reran genfstab from arch-install-scripts like during the installation with the new partition mounted.

Please mark as [SOLVED] by editing the title in the first post, might have to shorten it a little

Offline

#4 2022-04-04 08:30:44

astanwar99
Member
Registered: 2021-05-31
Posts: 14

Re: [SOLVED] Formatted boot partition by mistake, unable to boot system

Cool, thanks for confirming.

Offline

Board footer

Powered by FluxBB