Solved

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

Posted on 2010-11-22
6
1,121 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Users are often faced with high disk consumption without really knowing where the largest amount of data resides. Disk Usage Analyzer (aka Baobab) is is a graphical, menu-driven application to analyse disk usage in any Gnome environment and can e…
In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
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…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 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

27 Experts available now in Live!

Get 1:1 Help Now