On Wednesday 07 December 2005 01:38, Naveen Koppaka wrote:

> The device node /dev/ubd/0 for the root filesystem is missing,

A) devfs is evil.  Just don't go there.

B) The naming scheme in /sys goes more like /dev/ubda (and then there are 
partitions ala /dev/ubda2).  This is obviously the UML /sys, not the 
host /sys.

C) You gotta mknod the suckers or they won't exist.  Udev can do it for you, 
or here's my brain dead /dev mounty script.  (Attached).  Won't help you 
mount root, of course.

> CONTROL-D will exit from this shell and REBOOT the system.
>
> Give root password for maintenance
> (or type Control-D to continue):
> (none):~# ls
> (none):~#

Ah, you're booting Red Hat.  This is Red Hat's characteristic way of curling 
up into a ball and sucking its' thumb.

The contents of /etc/fstab don't match the mount points you're actually using.  
The kernel is indeed mounting /root correctly and booting from the ubd you 
fed it (or else you wouldn't have gotten this far), but Red Hat thinks it 
starts out with root mounted read-only (a holdover from the pre-journaling 
days), and when it tries to remount its root partition read-write it 
uses /etc/fstab instead of just doing a "remount -o remount,rw /", and 
when /etc/fstab is out of step with reality it all goes pear shaped.

Did I mention that Red Hat's init scripts are way overcomplicated, incredibly 
brittle, and verge on the incomprehensible?

The easy thing to do is fix /etc/fstab in your image to know about /dev/ubda.  
If you're not using udev you may also have to add the appropriate nodes 
to /dev.  I find building hostfs into the UML kernel and then doing the 
following to be quite useful:

./linux rootfstype=hostfs rw init=/bin/sh ubd0=/path/to/hda.img
$ whoami
$ mount -t sysfs /sys /sys
$ cd /sys/block
$ ls -l
$ ls -l ubda
$ cat ubda/dev # and here's your major/minor for that device.

Anything under /sys/block is a block device, anything under /sys/class is a 
char device.  See the attached script for more details.  Note that there 
won't _be_ a ubda under /sys/block unless the ubd0= argument you fed it on 
the command line could be found.  Also note you can mount your ubda (with 
partitions even, they'll be /sys/block/ubda/ubda1 and so on) and modify the 
fstab here.  Remember to umount it before exiting.  To exit without a "tried 
to kill init" panic, use "halt -f".

If you're using devfs, you're on your own.

> plz respond me what i have to do furthur

Learn your way around the guts of the system?

Rob
-- 
Steve Ballmer: Innovation!  Inigo Montoya: You keep using that word.
I do not think it means what you think it means.

Attachment: setupdev.sh
Description: application/shellscript

Reply via email to