chroot segfaults (attemptig to fix grub)

You can report problems, make suggestions, about the new BETA versions in this forum. For stuff related to final releases, please post a message in other forums
Post Reply
ilya
Posts: 3
Joined: 26 Jun 2010, 19:44
Location: Russia

chroot segfaults (attemptig to fix grub)

Post by ilya » 26 Jun 2010, 20:04

Beta systemrescuecd-x86-1.5.7-beta7.iso . When I tried to rescue debian 5.0 by reinstalling grub, doing everything step by step the system print out mistake.

Code: Select all

[email protected] /root % chroot /mnt/linux /bin/bash
zsh: segmentation fault  chroot /mnt/linux /bin/bash
First solution in the article ain't working in my case. And sadly, the second one.

I apologize for my very bad english.

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Re: possible bug

Post by admin » 26 Jun 2010, 20:35

1) Can you check whether /mnt/linux/bin/bash is a 32bit or 64bit binary using the "file" command on it ?
If you chroot to a 64bit system (it /bin/bash is a 64bit binary) then you have to check that you are running a 64bit kernel (using "uname -m")
The two 64bit kernels are rescue64 and altker64 in SystemRescueCd. The default is rescuecd and it's 32bit

2) You can try with bash:

Code: Select all

exec bash
chroot /mnt/linux /bin/bash
3) You can strace to see what happens:

Code: Select all

strace -o /var/tmp/strace.log chroot /mnt/linux /bin/bash

ilya
Posts: 3
Joined: 26 Jun 2010, 19:44
Location: Russia

Re: possible bug

Post by ilya » 27 Jun 2010, 06:13

admin,
1. It's 32 bit, for sure. Processor is athlon xp.
2. I've tried before the first posting.

Code: Select all

sysresccd ~ # chroot /mnt/linux /bin/bash
Segmentation fault
3.

Code: Select all

sysresccd ~ # strace -o /var/tmp/strace.log chroot /mnt/linux /bin/bash
Segmentation fault
Anyway, thanks.

Maybe it's because I was trying to recover debian 5.0 with boot cd from debian 4.0. And the installer copied some old files, i.e. kernel and basic system, above the later versions from 5.0. I was trying to reinstall grub with bootable cd, but it have to copy files, before install grub.
Reinstall system is much easier then fixing a lot of errors. Looks like it's time for me to try a new os. Maybe freebsd or gentoo.

ps Your project SystemRescueCd is great, guys. Thank you very much.

gernot
Posts: 1130
Joined: 07 Apr 2010, 16:19

Re: possible bug

Post by gernot » 27 Jun 2010, 07:19

looks like your system is real corrupted.
You can try to boot it using the supergrubdiscimage which is on sysrcd to boot debian.

Gernot.

ilya
Posts: 3
Joined: 26 Jun 2010, 19:44
Location: Russia

Re: possible bug

Post by ilya » 27 Jun 2010, 09:54

gernot wrote:looks like your system is real corrupted.
You can try to boot it using the supergrubdiscimage which is on sysrcd to boot debian.

Gernot.
I've tried. Kernel error.
Well, if somebody find this useful, I'll try to tell what I've done.
I've backed up some files from /boot and / and reformatted them. Now it is possible to install a new os.

Post Reply