Date: Fri, 3 Aug 2001 17:43:34 -0500 From: Mike Meyer <mwm@mired.org> To: "Aaron" <click46@webpimps.net> Cc: questions@freebsd.org Subject: Re: How does sysinstall know? Message-ID: <15211.10518.161611.131978@guru.mired.org> In-Reply-To: <21296088@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
Aaron <click46@webpimps.net> types: > Hello, > While busily reading up on my forgotten cdrom mounting skills, it > occured to me. /stand/sysinstall knows just where to find my CD, > regardless of its bus type or number of drives. So I ask you, if > sysinstall knows where to look intuitively...why doesnt the kernel (or > maybe thats the wrong word - my unix terminology is still in its > infancy). For just simple cdrom mounts...why not - mount_cd9660 /mnt - no > device or anything. Let the computer sort it out. Um - why bother specifying the file system type? If you set it up right - and I believe the default install will try and do that for you - you can just say "mount /cdrom" and it'll work. That's how all my systems are. Most of them also accept either "mount /cdrom2" or "mount /cdrw" as well. > In anyevent, if someone has the knowledge and the free time, I'd > really like to know how sysinstall does it. Its...nifty. Last time I looked at sysinstall, it knows because you *told* it. It probes the world and finds all the devices it might need during the installation, including any CDROM drives. You then get asked which device you're going to install from, and it lists them. The kernel does the same kind of probes to find the devices, only what it probes for is controlled by the config file. It knows where the CDROM drives (most of the systems I deal with have more than one of them) are. The problem I think you're trying to fix - that of not knowiong the device name - is cause by by the Unix practice of putting the controller name in the device name. Thus, the first cdrom drive in the system could be any of /dev/cd0, /dev/acd0, /dev/matcd0, /dev/mcd0, /dev/scd0 or /dev/wcd0 - and that's without installing anything but the base system. I claim that this is a good thing. On FreeBSD, if I add an atapi drive to a scsi system, my scsi disks are all where they were before: /dev/da something. The atapi drive is /dev/ad0. On Linux, they throw away that information, so my scsi disks would have been /dev/hda and /dev/hdb. What adding the atapi drive does probably depends on the BIOS that came with the scis controller, but it could well become /dev/hda, with my two drives moving to /dev/hdb and /dev/hdc. This breaks not merely /etc/fstab, but could well cause the system to fail to boot if the kernel is looking for a root file system on /dev/hda. Just for the record, FreeBSD isn't immune to that kind of relocation problem. Umass devices look like scsi, and so are da - and get numbered before the scsi disks unless you fix it in the kernel. Which means that adding a umass drive breaks things as described above unless you fix it in the config file. <mike -- Mike Meyer <mwm@mired.org> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15211.10518.161611.131978>