From: Jim C. <ji...@ma...> - 2005-03-24 21:57:56
|
On Sun, 20 Mar 2005, Zev Benjamin wrote: > a 2.6.10 UML, that file shows devices with names like ubda and ubdb1. Under a > 2.4.27 UML, that file shows devices with names like ubd/disc0/disk and > ubd/disc1/part1. The problem is that I'm trying to do the install under > 2.6.10 (afs drivers don't seem to work under 2.4) and /dev only has devices > that look like /dev/ubd/0 (/dev/ubd/disc0, etc.). Without devfs, there are > only /dev/ubdX (X an integer). In other words, /dev/ubd[abc,etc] don't exist. > Do I have to make symlinks, is this a bug in uml, or is this an ongoing naming > migration issue? Can someone tell me what's going on with ubd naming? Between kernels 2.4.x and 2.6.x the naming scheme got changed. Formerly there were only 8 discs named ubd0..7. Now these are referred to as ubda..h, and they can (but are not required to) have partitions, i.e. ubda1, ubda2... The minor device is 16*$disc + $partition, i.e. for ubdb2 (partition 2, disc b) you need to do "mknod /dev/ubdb2 b 98 18". I don't know if you've always been able to do this in kernel 2.4.x (but nobody ever did it). To partition your disc you can use Gnu parted from within UML, or you can do it on the host, specifying the image file name, and reassuring parted that it's OK to write on the boot sector of a plain file. The only problem is, there's no easy way on the host to mount a partition (that I know of). You need a working UML, and you temporarily attach the image file to it and do your thing. uml_mconsole only knows about the ubd0..7 names, at the moment. If you're using devfs or udev, and kernel 2.6.x in the guest, the device inodes are auto-created as /dev/ubd[a-h] and /dev/ubd[a-h][0-9], the latter only if a partition table is present. But if you're hand-creating inodes you can call them anything you want, for the convenience of the 2.4.x-style installation scripts you mention. James F. Carter Voice 310 825 2897 FAX 310 206 6673 UCLA-Mathnet; 6115 MSA; 405 Hilgard Ave.; Los Angeles, CA, USA 90095-1555 Email: ji...@ma... http://www.math.ucla.edu/~jimc (q.v. for PGP key) |