On Monday 28 February 2011 20:42:04 John Nielsen wrote:

> mounting /sys on/ root/sys failed: no such file
> mounting/ proc on/root/proc failed: no such file
> Targer file system doesn't have /sbin/init
> No init found. Try passin init=bootarg

Ouch. Either the boot is using the wrong partition (fixable by editing in grub 
if you can figure out the right device identifier) or somebody has removed 
everything from your root drive.

With this kind of error you will normally be dropped out to a shell - "ls -sl 
/root" might give you an idea if the first problem is present. If not, you're 
hosed and need to reinstall

If this is your problem (which usually means something has changed - most 
likely an upgrade to grub, the kernel or the motherboard):

 # mkdir /tmp/mnt
 # ls -sl /dev/?d??

Make a list of the files, and their device numbers (2 numbers in each line, 
separated by commas). Then for each file:

 # mount -o ro filename /tmp/mnt
 # ls -sl /tmp/mnt/sbin/init
 # umount /tmp/mnt

When you find one that has an "init", take its device numbers, convert them 
both to hexadecimal, make the second one 2 digits, and string them together. 
For example, if the device numbers were "3, 11", you get "30b".

Reboot, edit the command line for the boot, and add "root=0x###", eg 
"root=0x30b". You might not need the 0x - I don't want to reboot a system to 
figure that out, and couldn't be bothered googling, however when you are 
editing the command line you *might* see a hint as to that (and you will need 
to delete any other "root=" parameter anyway). Try it one way, if it doesn't 
work try the other.

Make sure you write down the parameter that works because you will likely have 
to reboot several times before it all works right.

Once you get the system up, you will need to work on fixing it. Without having 
looked it up (I tend to muddle my way through it when this sort of thing 
happens) I would start by identifying the kernel package for the installed 
kernel and dpkg-reconfigure it. Same for "grub, grub2, grub-pc, grub-common". 
If you do not have any of the last 3, and grub2 or grub-pc is installable, you 
could try installing that which might also fix the problem.

While this might all seem complex, it beats the Windows solution (which is 
that when this sort of thing happens you can only reinstall).

If you are not dropped out to a shell, boot from a live CD (all Ubuntu install 
CDs are now, I think, live CDs) and you will be able to inspect the drives, 
but there is no guarantee that the device numbers will be the same.

-- 

Regards, 
Troy Rollo 
Solicitor 
Parry Carroll 
Commercial Lawyers 
Direct: (02) 8257 3177 
Fax: (02) 9221 1375 
Switch: (02) 9221 3899 
E-mail: [email protected] 
Web: www.parrycarroll.com.au 

Liability limited by a scheme approved under Professional Standards 
Legislation 

This message and any attachments are confidential to Parry Carroll. If you 
have received it my mistake, please let us know by reply and then delete it 
from your system. You must not copy the message, alter it or disclose its 
contents to anyone. Thank you.

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to