Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1153
  • Last Modified:

Ubuntu recovery - mounting through liveCD: chroot cannot find bin/bash

Hi all,

Ok so I have exhausted all google searches about my problem so see if you guys can help me.

I have a dual boot windows xp and ubuntu 9.10 system. The Ubuntu is not booting with the following error: "Kernal Panic - not syncing VFS: Unable to mount root fs in unknown block (8,2)"

I have an ubuntu 9.04 CD which I have booted from the drive so that I can attempt to get into the file system. I have performed the following.

1. Started a terminal
sudo mkdir -p /media/ubuntu
sudo mount /dev/sda2 /media/ubuntu
sudo chroot /media/ubuntu

I get the following error:
"Cannot run command '/bin/bash': No such file or directory"

Now I have tried many combinations of the following.
1. I have checked the PATH and it points to the /bin directory.
2. I have attempted to mount /proc and /sys as well.
3. I have tried using a Knoppix live CD as well
4. Note that the bash file DOES exist in the /bin directory

Any suggestions??

Please note that I as very new to ubuntu and linux in general so please be specific in any replys!
Much appreciated.
0
collo79
Asked:
collo79
  • 3
  • 2
1 Solution
 
joolsCommented:
first things first...
is sda2 your root partition?
can you list any files in /media/ubuntu once you have mounted it?
for chroot to work you need to have an equivalent OS under the mounted partition including /dev /proc etc.

your initial error seems to indicate that the disk device does not exist.

Can you post fdisk -l output.
0
 
rindiCommented:
Also, why do you need to chroot to look at the file-system? You have mounted it, you should be able to access it...
0
 
collo79Author Commented:
Thanks for the replies!

Ok so I am starting to understand a little better. What I am trying to do is firstly access the file system and then access the root so that I can re-install the linux image to hopefully enable ubuntu to boot.

Mounting sda2 allows me to access and view the windows file system i.e. I am seeing folders that are available under c: in windows. However, I recall that when I installed ubuntu 6 months ago from CD, I was asked whether I wanted a separate partition and I said no. This has resulted in the presence of c:/ubuntu/disks/root.disk in windows that I believe contains ubuntu. If this is the case, I am not too sure how to access the ubuntu file system now given it is on the same partition as windows. Any suggestions or corrections if I am on the wrong path?

The output from fdisk -l is below.

Disk /dev/sda: 78.5 GB, 78518522880 bytes
255 heads, 63 sectors/track, 9546 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd0f4738c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1           5       40131   de  Dell Utility
/dev/sda2   *           6        9153    73481310    7  HPFS/NTFS
/dev/sda3            9154        9545     3148740   db  CP/M / CTOS / ...


Cheers!



0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
joolsCommented:
Well that explains the error, the ubuntu disk cant see the system because it's under the windows file system. A kind of chicken/egg scenario, you need to get access to root but the rescue media doesnt know how to handle root being on a windows disk without having access to the O/S.

whats sda3 for? I doubt it's for CP/M :-)

Have to say I've never setup Linux like that before, have you tried copying the root.disk file to something else and mounting it under the rescue system above using a loopback.

eg/
   mount -t loop /path/to/root.disk /mnt

Do you need access to the system or can you just reinstall?
0
 
collo79Author Commented:
Brilliant!

Thanks for the direction. I have now gotten access to my files  by mounting the root.disk as you indicated. I think I'll be performing a re-install from this point!

ubuntu@ubuntu:~$ sudo mkdir /media/ubuntu
ubuntu@ubuntu:~$ sudo mkdir /media/windows
ubuntu@ubuntu:~$ sudo mount /dev/sda2 /media/windows
ubuntu@ubuntu:~$ sudo mount -o loop /media/windows/ubuntu/disks/root.disk /media/ubuntu
ubuntu@ubuntu:~$

Thanks for the help. This was my first time using a forum for help and it has been a great learning experience. I appreciate your time and effort.

Cheer.
0
 
joolsCommented:
No Probs, I find EE quite good myself! :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now