Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

howto restore boot partition

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
User avatar
Onsemeliot
Posts: 333
Joined: 2010-12-15 14:43
Has thanked: 20 times
Been thanked: 5 times

howto restore boot partition

#1 Post by Onsemeliot »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: howto restore boot partition

#2 Post by Head_on_a_Stick »

/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.
deadbang

User avatar
Onsemeliot
Posts: 333
Joined: 2010-12-15 14:43
Has thanked: 20 times
Been thanked: 5 times

Re: howto restore boot partition

#3 Post by Onsemeliot »

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.

Post Reply