You are not logged in.
Hello, fellow Archers!
I've got a problem with a very basic issue here, the one I've dealt with successfully several times before, although not with Archlinux.
I had windows installed on a primary master and Archlinux on primary slave, with grub lying in MBR on the first disc (the windows one). Everything was working fine, until I had to fdisk/mbr for reasons not relevant to the problem. I wasn't worried, because I knew how to restore GRUB back to MBR, by chrooting to my Arch installation using any bootable Linux disk. However, when I attempting to do this, I've suffered a miserable failure, several times. I 've tried several different recipies, found on Google, a number of bootable Linux distros, including Knoppix and Arch 0.6 base and nothing. I am really desperate and hope anyone here can help me, PLEASE.
Now for technical details:
As I've said, I have windows on primary master disc - /dev/discs/disc0/part1 and Arch on primary slave:
/dev/discs/disc1/part1 - /boot (ext2)
/dev/discs/disc1/part2 - extended partition
/dev/discs/disc1/part3 - swap
/dev/discs/disc1/part4 - / (reiserfs)
/dev/discs/disc1/part5 - fat32 partition
Here are the steps I've tried to follow:
1. Boot from Arch 0.6 base cd.
2. mkdir /mnt/system
3. mount -t reiserfs rw /dev/discs/disc1/part4 /mnt/system
4. mkdir /mnt/system/boot
5. mount /dev/discs/disc1/part1 /mnt/system/boot
Everything goes fine so far until the next line:
6. chroot /mnt/system
Every time I do this I recieve an error: /bin/sh not found.
Trying to execute
chroot /mnt/system /bin/bash
fails as well.
I've also tried to mount proc before step 6:
mkdir /mnt/system/proc
mount -t proc none /mnt/system/proc
but that didn't help a bit.
I recieve exactly the same error on chroot, when using Knoppix.
Please, tell me what am I doing wrong, or how to restore Grub to MBR in a different way.
Thanks in advance for any tip/lead.
Offline
Have you tried booting straight into your Arch installation from the cd? At the boot prompt enter, for example:
arch root=/dev/discs/disc1/part1
Offline
Have you tried booting straight into your Arch installation from the cd? At the boot prompt enter, for example:
arch root=/dev/discs/disc1/part1
Hi, thanks for a quick reply!
Yes, I did, only my root partition is part4 and not part1, which is /boot. Or maybe this was my problem and I should have used root=/dev/discs/disc1/part1 as a boot param?
Offline
Well I wasn't too sure either - I don't use a separate boot partition - but I figured if you tried one you'd try both
One thing that's puzzling me, and I'm probably quite wrong here, is that if your swap and / partitions are within the extended partition, would they not be numbered part5 and part6 respectively? No doubt I must be wrong otherwise you would get an error when you try to mount part4 - unless you have another (primary) reiserfs partition which is numbered part4.
Other than that, I would try exploring the implications of the error message by seeing if you can confirm the presence or otherwise of /bin/sh.
Offline
My / and swap partitions are not part of the extended, they are both primary partitions.
Other than that, I would try exploring the implications of the error message by seeing if you can confirm the presence or otherwise of /bin/sh.
Well, lets see... I am pretty sure about the existance of /bin/sh on the boot CD, otherwise the shell won't work at all. I know that /bin/bash exists on my root partition because I am using a bash shell in my Arch installation, or at least used it before this problem.
I have a feeling, this has something to do with my / being a reiserfs partition, but I really don't know what else I could do, besides reinstalling.
Anybody else got any ideas?
Offline
1. Boot from Arch 0.6 base cd.
2. mkdir /mnt/system
3. mount -t reiserfs rw /dev/discs/disc1/part4 /mnt/system
4. mkdir /mnt/system/boot
5. mount /dev/discs/disc1/part1 /mnt/system/boot
leave out step 4 and 5 and try to chroot again, it doesn't look ok I guess,
maybe you can mount your boot partition later
arch + gentoo + initng + python = enlisy
Offline
leave out step 4 and 5 and try to chroot again, it doesn't look ok I guess,
maybe you can mount your boot partition later
chroot: cannot execute /bin/sh : No such file or directory
Well, I'll probably wait for Wombat and reinstall. I would like to know what the problem is though, cause I never had it before.
Offline
hello again
I've /bin/sh on my root, it's a symlink to /bin/bash
arch + gentoo + initng + python = enlisy
Offline
hello again
![]()
I've /bin/sh on my root, it's a symlink to /bin/bash
Not sure what you mean by that, but
chroot /mnt/system /bin/bash
also fails.
Offline
remember that knoppix use /dev/hdx scheme,
there are also other threads in the forum about chrooting,
and if you are going to reinstall there is no need for waiting for 0.7 final, 0.7betas should be ok, just reboot and "pacman -Syu" and you are uptodate,
good luck
arch + gentoo + initng + python = enlisy
Offline
You could download a floppy image of Grub, write it to a floppy; eg with Knoppix, then boot from the floppy to a grub prompt and enter the appropriate parameters for your Arch installation.
Offline
remember that knoppix use /dev/hdx scheme,
there are also other threads in the forum about chrooting,
good luck
Yes, I know that, of course. The fact that I recieve exactly the same error with other LiveCD's, leads me to the conclusion that there is some kind of problem in my partition configuration. Thanks anyway.
You could download a floppy image of Grub, write it to a floppy; eg with Knoppix, then boot from the floppy to a grub prompt and enter the appropriate parameters for your Arch installation.
Thanks! Maybe I'll give it a shot.
Offline
Hi there! It's me again.
Well, I must say I made a progress in an effort of solving my problem. I am still unable to restore grub to MBR.
The chroot problem had nothing to do with Arch, of course. It was all about me trying to chroot the wrong partition. :oops: My /dev/discs/disc1/part1 is root partition (without a separate /boot) and /dev/discs/disc1/part4 is used for /home.
After successfully chroot'ing into my installation, I typed "grub" to enter the Grub shell.
Typing
root (hd1,0)
and
setup (hd0)
failed. Grub didn't recognized any of my discs. After doing a little research I found out that the problem is in the /boot/grub/device.map file, that is supposed to contain the info about my discs for Grub's usage. Only in my case it contains a single line:
(fd0) /dev/fd0
. Trying to add additional lines manually had no effect.
I am probably doing something wrong here... again. Can you, please, tell me what?
Thank you, for putting up with me so far.
Offline
Try: grub-install (hd0)
You might need to append the --recheck option:
--recheck'
Recheck the device map, even if `/boot/grub/device.map' already
exists. You should use this option whenever you add/remove a disk
into/from your computer.
You will get there!
Offline
Try: grub-install (hd0)
You might need to append the --recheck option:
--recheck'
Recheck the device map, even if `/boot/grub/device.map' already
exists. You should use this option whenever you add/remove a disk
into/from your computer.You will get there!
It didn't work.
Apart from chrooting & executing the bootloader-installer, step 3 is crucial here, without it you'd have empty /dev directory within chroot environment. Did you mount this in your attempts?
I am using udev, but no, I haven't tried to mount the /dev yet. I am not sure this will work for udev, but I'll try anyway. Thanks!
Offline
Is device.map actually necessary? (I don't have one)
You might try deleting it and if that doesn't work regenerate the file with
grub --devicemap=device.map
Offline
dauphin
Thanks, man! Mounting /dev before chroot did the trick. Finally, I am able to use Arch again.
Offline
Nothing to do with me, it's Alwin who came up with that one!
Glad you got going again anyway.
Offline
Oh, I am sorry! :oops:
Alwin
Didn't mean to take the credit from you. Thank you!
Offline