Solved

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

Posted on 2010-11-22
6
1,118 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 87

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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 19

Accepted Solution

by:
jools earned 250 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

In order for businesses to be compliant with certain information security laws in some countries, you need to be able to prove that a user (which user it was becomes important to the business to take action against the user after an event has occurr…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
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…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now