Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-11-22
6
Medium Priority
?
1,143 Views
Last Modified: 2013-12-21
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
Comment
Question by:collo79
  • 3
  • 2
6 Comments
 
LVL 19

Expert Comment

by:jools
ID: 34196807
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
 
LVL 88

Expert Comment

by:rindi
ID: 34197221
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
 

Author Comment

by:collo79
ID: 34201975
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Accepted Solution

by:
jools earned 1000 total points
ID: 34202025
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
 

Author Comment

by:collo79
ID: 34202566
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
 
LVL 19

Expert Comment

by:jools
ID: 34203018
No Probs, I find EE quite good myself! :-)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating a Samba server for a small office. Ubuntu Linux and Samba can breathe new life into a retired PC and save an office money on new hardware/software. Our example server will have two hard disks, one exclusively for storing shared data. …
Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question