[SOLVED] Deleted contents of /boot

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] Deleted contents of /boot

Postby lewisforlife » Apr 23rd, '12, 02:25

I am building a LFS system using Mageia as my host system. I thought that I was chrooted into /mnt/lfs but I was not, and as root I ran "rm -rf /boot". I am in my system right now, I will not reboot until I fix this issue. What is the best way to restore the contents of /boot so that I have no problems on my next boot up?

I feel really dumb right now, so please don't try to rub it in :-).
Last edited by lewisforlife on Apr 23rd, '12, 03:33, edited 1 time in total.
lewisforlife
 
Posts: 71
Joined: Apr 16th, '12, 20:52

Re: Deleted contents of /boot

Postby lewisforlife » Apr 23rd, '12, 02:31

I guess I can re-install grub, and then use urpmi to install a kernel. Which kernel package should I install?
lewisforlife
 
Posts: 71
Joined: Apr 16th, '12, 20:52

Re: Deleted contents of /boot

Postby lewisforlife » Apr 23rd, '12, 02:53

I reinstalled grub, and then I reinstalled:

urpmi kernel-desktop586-latest
urpmi kernel-desktop586-devel-latest

now when I do a ls -la /boot I get this:

Code: Select all
[root@localhost home]# ls -la /boot
total 4376
drwxr-xr-x  3 root root    4096 Apr 22 16:47 ./
drwxr-xr-x 23 root root    4096 Apr 22 16:23 ../
-rw-r--r--  1 root root  128981 Jan 25 05:23 config-2.6.38.8-desktop586-10.mga
drwxr-xr-x  2 root root    4096 Apr 22 16:36 grub/
lrwxrwxrwx  1 root root      37 Apr 22 16:47 initrd-desktop586.img -> initrd-2.6.38.8-desktop586-10.mga.img
-rw-r--r--  1 root root  205073 Jan 25 05:23 symvers-2.6.38.8-desktop586-10.mga.gz
-rw-r--r--  1 root root 1639468 Jan 25 05:23 System.map-2.6.38.8-desktop586-10.mga
-rw-r--r--  1 root root 2484304 Jan 25 05:23 vmlinuz-2.6.38.8-desktop586-10.mga
lrwxrwxrwx  1 root root      34 Apr 22 16:47 vmlinuz-desktop586 -> vmlinuz-2.6.38.8-desktop586-10.mga
[root@localhost home]#


The initrd stuff is blinking red, which I think means the link is broken. Do I need to run mkinitrd? I am not sure of what I will use for the command if so. Please help.

Thanks.
lewisforlife
 
Posts: 71
Joined: Apr 16th, '12, 20:52

Re: Deleted contents of /boot

Postby lewisforlife » Apr 23rd, '12, 02:56

Here is what I did:

[root@localhost home]# mkinitrd /boot/initrd-desktop586.img 2.6.38.8-desktop586-10.mga

I hope that is right, I am going to try a reboot, I hope it works!
lewisforlife
 
Posts: 71
Joined: Apr 16th, '12, 20:52

Re: Deleted contents of /boot

Postby lewisforlife » Apr 23rd, '12, 03:10

None of this worked, I just booted up with the live cd. Please help me resolve this.
lewisforlife
 
Posts: 71
Joined: Apr 16th, '12, 20:52

Re: Deleted contents of /boot

Postby lewisforlife » Apr 23rd, '12, 03:33

I reinstalled without formatting my partitions, this fixed everything.

Thanks.
lewisforlife
 
Posts: 71
Joined: Apr 16th, '12, 20:52

Re: [SOLVED] Deleted contents of /boot

Postby doktor5000 » Apr 27th, '12, 21:01

Next time you probably want to run
Code: Select all
bootloader-config --action rebuild-initrds
instead of just plain mkinitrd.
Also you might have used drakboot to fix this from within the running system. Just posting FYI, but otherwise LFS is a great opportunity to learn, as you have proved :)
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18055
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron