You are not logged in.

#1 2025-02-01 23:01:32

MAYBL8
Member
Registered: 2022-01-14
Posts: 286

I did something stupid with my boot partition

I didn't follow the instructions on how to resize the boot partition and can't recreate it now.
I copied the files to a folder on a usb drive.
Then I deleted the partition then recreated it to a larger size and made it formatted it with gparted and flagged the partition boot and esp.
Tried to copy the boot files back to the partition and it gives me errors and can't copy the files.
The PC has Arch on it and Windows 11.
It now can't find a bootable drive of course.
Without reinstalling both OS's is there a way to rebuild the boot files needed to boot the pc.

I imagine I need to boot to the bootable arch usb I have and arch-chroot
But I don't know the commands to use once I get there.
Is all of that in GRUB wiki to cove what I have done?
Thanks
Sorry for the stupid question.

Last edited by MAYBL8 (2025-02-02 12:18:20)

Online

#2 2025-02-01 23:38:07

eriefisher
Member
Registered: 2025-02-01
Posts: 10

Re: I did something stupid with my boot partition

If you boot the arch usb and arch-chroot like you say, you could try grub-install. It may work for you. grub-install uses efibootmgr to write the uefi entries.


I Am Canadian!

Offline

#3 2025-02-02 01:09:00

jonno2002
Member
Registered: 2016-11-21
Posts: 735

Re: I did something stupid with my boot partition

MAYBL8 wrote:

Then I deleted the partition then recreated it to a larger size and made it formatted it with gparted and flagged the partition boot and esp.

what exactly did you do ? if you made it bigger you must have resized other partitions too ? and flagging as "boot" is usually for MBR and "ESP" is for GPT/UEFI

can you boot off arch usb and chroot and post the output of the following ?

fdisk -l && lsblk -f 

you may want to use a pastebin service since you wont have a way to post the outputs

fdisk -l | curl -F 'file=@-' 0x0.st
lsblk -f | curl -F 'file=@-' 0x0.st

then post the links here.

EDIT: you dont even need to chroot in just boot the installer and run those last 2 commands

Last edited by jonno2002 (2025-02-02 01:14:05)

Offline

#4 2025-02-02 01:27:48

mackin_cheese
Member
Registered: 2025-01-07
Posts: 175

Re: I did something stupid with my boot partition

If you are a beginner and want to use Arch, you must be willing to invest time into learning a new system, and accept that Arch is designed as a 'do-it-yourself' distribution; it is the user who assembles the system.

Before asking for help, do your own independent research by searching the Web, the forum and the superb documentation provided by the Arch Wiki. There is a reason these resources were made available to you in the first place. Many thousands of volunteered hours have been spent compiling this excellent information.

(yes, the grub article in the wiki should give you the solutions)

Online

#5 2025-02-02 04:08:51

cryptearth
Member
Registered: 2024-02-03
Posts: 1,228

Re: I did something stupid with my boot partition

@OP
yes, there are ways to restore your system back to working order even without reinstalling two OSs - as all you need is restoring thier bootloaders
as for windows: as we don'T support windows here all I can do here is to point you "windows pre-installation environment" and "bcdboot" - these two key words should help you to restore your windows bootloader
as for arch: what bootloader had you installed? systemd-boot? grub? refind? basically you boot an install medium and reinstall the bootloader just as you did when you installed arch the first time

mackin_cheese wrote:

If you are a beginner and want to use Arch, you must be willing to invest time into learning a new system, and accept that Arch is designed as a 'do-it-yourself' distribution; it is the user who assembles the system.

Before asking for help, do your own independent research by searching the Web, the forum and the superb documentation provided by the Arch Wiki. There is a reason these resources were made available to you in the first place. Many thousands of volunteered hours have been spent compiling this excellent information.

(yes, the grub article in the wiki should give you the solutions)

what the F is wrong with you?
https://bbs.archlinux.org/viewtopic.php … 8#p2223358
https://bbs.archlinux.org/viewtopic.php … 6#p2223356
https://bbs.archlinux.org/viewtopic.php … 1#p2223311
https://bbs.archlinux.org/viewtopic.php … 7#p2222107
https://bbs.archlinux.org/viewtopic.php … 2#p2221782
https://bbs.archlinux.org/viewtopic.php … 2#p2221752
reported for trolling

Last edited by cryptearth (2025-02-02 04:11:52)

Offline

#6 2025-02-02 10:42:12

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,743
Website

Re: I did something stupid with my boot partition

MAYBL8 wrote:

Sorry for the stupid question

I would rather have questions that can't be answered than answers that can't be questioned :-)

Restoring /boot/ is actually very simple — load the live ISO, mount the root & /boot/ partitions, use arch-chroot, reinstall the kernel package(s) then re-run the grub-install and grub-mkconfig commands. No need for backups.

@cryptearth: I don't think mackin_cheese is a troll, they have made some useful contributions here along with their string of superfluous comments.


Para todos todo, para nosotros nada

Offline

#7 2025-02-02 12:15:35

MAYBL8
Member
Registered: 2022-01-14
Posts: 286

Re: I did something stupid with my boot partition

Head_on_a_Stick wrote:
MAYBL8 wrote:

Sorry for the stupid question

I would rather have questions that can't be answered than answers that can't be questioned :-)

Restoring /boot/ is actually very simple — load the live ISO, mount the root & /boot/ partitions, use arch-chroot, reinstall the kernel package(s) then re-run the grub-install and grub-mkconfig commands. No need for backups.

This is what I did and now I can boot to arch.
Thanks
Now onto Windows to get it to work.

Sorry spoke too soon.
I think I have to correct existing fstab file. Pointing to wrong /boot UUID name.

Last edited by MAYBL8 (2025-02-02 12:19:20)

Online

#8 2025-02-03 23:34:23

mackin_cheese
Member
Registered: 2025-01-07
Posts: 175

Re: I did something stupid with my boot partition

cryptearth wrote:

@OP
yes, there are ways to restore your system back to working order even without reinstalling two OSs - as all you need is restoring thier bootloaders
as for windows: as we don'T support windows here all I can do here is to point you "windows pre-installation environment" and "bcdboot" - these two key words should help you to restore your windows bootloader
as for arch: what bootloader had you installed? systemd-boot? grub? refind? basically you boot an install medium and reinstall the bootloader just as you did when you installed arch the first time

mackin_cheese wrote:

If you are a beginner and want to use Arch, you must be willing to invest time into learning a new system, and accept that Arch is designed as a 'do-it-yourself' distribution; it is the user who assembles the system.

Before asking for help, do your own independent research by searching the Web, the forum and the superb documentation provided by the Arch Wiki. There is a reason these resources were made available to you in the first place. Many thousands of volunteered hours have been spent compiling this excellent information.

(yes, the grub article in the wiki should give you the solutions)

what the F is wrong with you?
https://bbs.archlinux.org/viewtopic.php … 8#p2223358
https://bbs.archlinux.org/viewtopic.php … 6#p2223356
https://bbs.archlinux.org/viewtopic.php … 1#p2223311
https://bbs.archlinux.org/viewtopic.php … 7#p2222107
https://bbs.archlinux.org/viewtopic.php … 2#p2221782
https://bbs.archlinux.org/viewtopic.php … 2#p2221752
reported for trolling

I noticed your concern regarding my recent posts. I want to clarify that my intention isn’t to troll anyone but rather to follow the guidelines that many of us in the Arch community appreciate. As stated in the Arch FAQ:

    "If you are a beginner and want to use Arch, you must be willing to invest time into learning a new system, and accept that Arch is designed as a 'do-it-yourself' distribution; it is the user who assembles the system.

    Before asking for help, do your own independent research by searching the Web, the forum and the superb documentation provided by the Arch Wiki. There is a reason these resources were made available to you in the first place. Many thousands of volunteered hours have been spent compiling this excellent information."

And the Arch Linux Code of Conduct emphasizes:

    "When asking for help, read the manual, do your research and provide details for those you are asking for assistance."

My approach of asking, "what research have you done so far regarding this issue?" is directly based on these principles. It’s meant to encourage thorough research and ensure that discussions remain productive and focused on finding solutions. I understand that sometimes this may come off as blunt, but it's rooted in the Arch Linux philosophy that values self-reliance and active engagement with the documentation.

If my tone has seemed abrasive, I’m open to feedback and happy to adjust my phrasing. My goal is to help and to foster an environment where everyone is encouraged to make the most out of our community resources.

Online

#9 2025-02-04 21:15:57

Halano
Member
From: Egypt
Registered: 2023-02-07
Posts: 47
Website

Re: I did something stupid with my boot partition

You should RTFM but unfortunately you didn't
right now you should chroot from the iso and mount the drive then install the bootloader again avoid overwrite any data or do any mistakes always double check
then reboot.


.:HalanoTheSmartMoth:.

Offline

Board footer

Powered by FluxBB