You are not logged in.

#1 2009-05-10 11:16:48

jjjaime
Member
Registered: 2009-02-19
Posts: 24

[SOLVED] How to restore kernel image after wrong /etc/mkinitcpio.conf

I wanted to learn a bit more about the kernel and boot, and I'm afraid I cannot start up my ArchLinux anymore.
I updated the /etc/mkinitcpio.conf to make the boot faster (with this reference: http://kmandla.wordpress.com/2007/01/30 … initcpio/) and executed #mkinitcpio -p kernel26
I thought that if there was any problem, I could start up with the "fallback image". Certainly, there was a problem (probably I didn´t loaded all the modules required) and when I tried the fallback image, I experimented the same problem:

Root device '/dev/disk/by-uuid/...' doesn´t exist
...
ramfs$

In fact, both images are the same (or at least they have the same size)

I tried the ArchLinux liveCD to recover my system. There's no recovery service, so I started up the CD-ROM, mounted my ArchLinux partitions, generated the images and copied into the /boot of my Archlinux partitions. But the same problem is still there.

What could I do to fix it?

Thank you in advance

Last edited by jjjaime (2009-05-10 15:45:45)

Offline

#2 2009-05-10 12:30:36

red_erik
Member
Registered: 2009-01-27
Posts: 9

Re: [SOLVED] How to restore kernel image after wrong /etc/mkinitcpio.conf

I have a similar problem, (read more in this thread), and I solve it by booting off the Live CD, and doing the following:

(replace sda1 with your / partition)

 cd /
mount -t ext3   /dev/sda1 /mnt
mount -t proc   proc      /mnt/proc
mount -t sysfs  sys       /mnt/sys
mount -o bind   /dev      /mnt/dev
 
chroot /mnt /bin/bash

mkinitcpio -p kernel26

after that, I exit chroot, unmount all of my partitions and reboot...:

cd /
umount -a
exit
cd /
umount -a
reboot

hope this helps...

Last edited by red_erik (2009-05-10 12:30:59)

Offline

#3 2009-05-10 14:05:43

wsduvall
Member
From: Blacksburg
Registered: 2009-02-05
Posts: 54
Website

Re: [SOLVED] How to restore kernel image after wrong /etc/mkinitcpio.conf

Looks like I fixed it myself. Turns out that my /boot partition wasn't mounted, and so m7 kernel wasn't getting fixed. Yay!


My 5 node 9 CPU cluster: www.amenrecluster.com
OS: Arch Linux
Machines:Fujitsu T4210 and IBM eServer xSeries 335

Offline

#4 2009-05-10 15:45:06

jjjaime
Member
Registered: 2009-02-19
Posts: 24

Re: [SOLVED] How to restore kernel image after wrong /etc/mkinitcpio.conf

Thank you. I follow your instructions and it worked (perhaps it would be simpler with a "#pacman -Sy kernel26"). I didn't know the command chroot and it's really interesting.

red_erik wrote:

I have a similar problem, (read more in this thread), and I solve it by booting off the Live CD, and doing the following:

(replace sda1 with your / partition)

 cd /
mount -t ext3   /dev/sda1 /mnt
mount -t proc   proc      /mnt/proc
mount -t sysfs  sys       /mnt/sys
mount -o bind   /dev      /mnt/dev
 
chroot /mnt /bin/bash

mkinitcpio -p kernel26

after that, I exit chroot, unmount all of my partitions and reboot...:

cd /
umount -a
exit
cd /
umount -a
reboot

hope this helps...

Offline

Board footer

Powered by FluxBB