You are not logged in.

#1 2006-01-19 10:03:18

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

[HOWTO] Repair Broken system, system without a kernel

Hello

This guide is dedicated for those who having troubles booting, maybe they removed the kernel by fault or replaced kernel/initrd images accidently

Requirement: 1 arch CD, minimal or full cd, you just need to boot!!

Now let's consider your root parition is at /dev/hda6 , replace it with whatever is your kernel!!

Now go ahead put CD in dive and boot with it, once it has booted type

km

[b]If|/b] your keyboard isn't english to change the layout

then mount ur root partition under /mnt/arch

mkdir /mnt/arch
mount /dev/hda6 /mnt/arch
mount --bind /dev /mnt/arch/dev 

check if you have already the kernel in cache

ls /mnt/arch/var/cache/pacman/pkg | grep "kernel"

if it returned kernel26-2.6.15-2.pkg.tar.gz then u have it, if not u need to copy it

cp /mnt/cdrom/arch/pkg/kernel26-2.6.15-2.pkg.tar.gz /mnt/arch/var/cache/pacman/pkg/

You're ready to install it now, so chroot into it

chroot /mnt/arch /bin/bash
pacman -A /var/cache/pacman/pkg/kernel26-2.6.15-2.pkg.tar.gz

That's it, hope that helps whom had problems with 2.6.15-archck2-2

Offline

#2 2006-01-19 15:36:08

Beetlenut
Member
From: Taipei Taiwan
Registered: 2004-11-04
Posts: 126

Re: [HOWTO] Repair Broken system, system without a kernel

Can this be done with Knoppix. I checked and I do have the old kernel in cache

Offline

#3 2006-01-19 15:37:30

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: [HOWTO] Repair Broken system, system without a kernel

If u have the kernel in cache then it can be done from any *nix system that can mount ext3 (or whatever is ur HDD type) so yes it will work with Knoppix

Offline

#4 2006-01-19 15:52:56

Beetlenut
Member
From: Taipei Taiwan
Registered: 2004-11-04
Posts: 126

Re: [HOWTO] Repair Broken system, system without a kernel

But how can I run pacman from Knoppix?

Offline

#5 2006-01-19 15:54:34

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: [HOWTO] Repair Broken system, system without a kernel

When u chroot /mnt/arch /bin/bash u will be in Arch system and not in the system u are running (Knoppix)

Offline

#6 2006-01-19 17:09:28

Beetlenut
Member
From: Taipei Taiwan
Registered: 2004-11-04
Posts: 126

Re: [HOWTO] Repair Broken system, system without a kernel

Everything is fine but I don't have grub in boot. How can I reinstall grub without an internet connection.

Offline

#7 2006-01-19 19:07:44

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: [HOWTO] Repair Broken system, system without a kernel

Offline

#8 2006-01-19 20:32:21

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: [HOWTO] Repair Broken system, system without a kernel

_Gandalf_ wrote:

When u chroot /mnt/arch /bin/bash u will be in Arch system and not in the system u are running (Knoppix)

Just a clarification, you will be using the arch binaries but not the arch kernel at this point - you will still be using the Knoppix kernel after a chroot, and therefore module loading will probably fail.

Offline

#9 2006-01-20 04:15:04

Beetlenut
Member
From: Taipei Taiwan
Registered: 2004-11-04
Posts: 126

Re: [HOWTO] Repair Broken system, system without a kernel

could you expand on that. What are the limits to this method? Just trying to learn more.

Offline

#10 2006-01-20 04:18:28

Beetlenut
Member
From: Taipei Taiwan
Registered: 2004-11-04
Posts: 126

Re: [HOWTO] Repair Broken system, system without a kernel

Gandalf. There is no text at that link.

Offline

#11 2006-01-20 17:27:07

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: [HOWTO] Repair Broken system, system without a kernel

it could be a debian problem, but this method did not work fully for me:
as I grew sick of debian, I reinstalled arch using archbootstrap, but when I installed the kernel the way you posted above, the install script always printed:

ERROR: All of your loopback devices are in use!

The soultion is quite simple, run this before chrooting:

mount --bind /dev /mnt/arch/dev

Offline

#12 2006-01-20 18:39:34

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: [HOWTO] Repair Broken system, system without a kernel

Beetlenut wrote:

Gandalf. There is no text at that link.

oops sorry about that, link fixed!

@cmp, hmmm roll u get that error using which command?

Offline

#13 2006-01-20 19:18:20

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: [HOWTO] Repair Broken system, system without a kernel

I did this:

mkfs.ext3 /dev/hdb2
mount /dev/hdb2 /mnt/arch
/tmp/archbootstrap /mnt/arch
chroot /mnt/arch /bin/bash
vim /etc/rc.conf # set networking to dhcp
/etc/rc.d/network start
pacman -Syu
pacman -S kernel26

and now there was the error ("ERROR: All of your loopback devices are in use! "). I guessed you need loopback devices in /dev. So I continued:

exit 
mount --bind /dev /mnt/arch/dev
chroot /mnt/arch /bin/bash
pacman -S kernel26

and now it worked.

Offline

#14 2006-01-20 19:23:46

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: [HOWTO] Repair Broken system, system without a kernel

Oh that's why, u defined lo network and tried to start it, in this case u surely need that, this guide was only destinied if u have a system and do installing a file locally without any internet connection

so yeah to have internet (not only lo, but u need also eth0..) so u need to mount /dev too!!

Offline

#15 2006-01-21 09:56:50

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: [HOWTO] Repair Broken system, system without a kernel

no the networking works actually without mounting dev, it's just the kernel isntallation part, even if the package is cached and no internet connection is established.

Offline

Board footer

Powered by FluxBB