howto restore boot partition

Help with issues regarding installation of Debian

howto restore boot partition

Postby Onsemeliot » 2020-05-20 15:21

Unfortunately I was obviously very distracted today when I tried to wipe an usb stick. Unfortunately, I deleted my boot partition instead. Therefore (as to expect) the system kept going until I was done creating a backup and did attempt a reboot.

Looking back now I think it was a bad idea to leave the running system without need since it probably would have been easier to recreate the boot partition from the original system. Now I am unable to boot into my system again. I use a LUKS encrypted LVM. I booted my Debian stick in rescue mode but I am not familiar with what could be accomplished from ash. If possible I would prefer to re-use my existing system but if it is very complicated to fix a boot partition after deleting it I would be ready to do a clean installation instead. It might only be annoying since I would have to re-do quite some configuration because I made only a backup of the data I work with.

I am obviously not very well versed with system administration. Do you know a guide I could follow or would you recommend to just re-install my system?
User avatar
Onsemeliot
 
Posts: 277
Joined: 2010-12-15 14:43

Re: howto restore boot partition

Postby Head_on_a_Stick » 2020-05-20 15:53

/boot just holds the kernel and bootloader so re-install those packages from the rescue shell and create a new initramfs & grub.cfg, that should work.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12821
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: howto restore boot partition

Postby Onsemeliot » 2020-05-20 17:37

Head_on_a_Stick wrote:/boot just holds the kernel and bootloader so re-install those packages from the rescue shell and create a new initramfs & grub.cfg, that should work.

Thank you once more for your incredibly fast response. So far I was only able to get into the rescue stick shell because I couldn't select any one of the two available partitions as boot partition. What do you mean by "install"? I guess not just copying. I ask because when I typed help in the available ash I didn't see "apt" and "install" as options. In fact there are very few available commands.

I have never installed the kernel and boot loader by hand and also don't know how to create a new initramfs & grub.cfg.

I tried to use an Ubuntu live system to access the encrypted partition but this is the one Fujitsu Lifebook e781 where only the Debian stick can boot. Maybe I should download a Debian live image. Copying the whole user folder might work with this. But since I already removed the hard disk and put it in an external case I am sceptical becasue on my other Debain system the whole drive was just recognised as empty storage. This might indicate that I did not only delete the boot partition but also the lowest level for the LUKS encrypted LVM.

It seems I have no other option but to do a clean install. At least I have secured all my user data in time. This time I should have copied the whole user folder but I stopped doing that because I always felt that I might mess up a new system if I replace the whole user folder in the fresh install. On the other hand having it wouldn't force me to actually use all data in the user folder backup.
User avatar
Onsemeliot
 
Posts: 277
Joined: 2010-12-15 14:43


Return to Installation

Who is online

Users browsing this forum: No registered users and 15 guests

fashionable