From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <725B0528-2ACD-49BF-B09C-8A0625C89080@fb.com> References: <725B0528-2ACD-49BF-B09C-8A0625C89080@fb.com> Date: Sat, 18 Jan 2014 11:33:40 -0800 Message-ID: From: Steven Stallion To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [9fans] mechanism to bind partitions in /dev? Topicbox-Message-UUID: b3e99672-ead8-11e9-9d60-3106f5b1d025 On Fri, Jan 17, 2014 at 10:57 PM, Yoann Padioleau wrote: > Hi, > > Can someone explain how the partitions in /dev/sdC0/xxx are populated? Who > create those device files? I have a small plan9 kernel running a small shell (sh.Z) > in memory and when I do 'bind #S/sdC0 /dev/' I just see the 'data', 'ctl', and 'raw' files. > There is no 9fat or plan9 or whatever partitions there is on this disk. In fact I've > tried to make on MACos via the Utility disk some fat images and when I do > qemu -hdb dosdisk.img I can not access again the fat partition on this disk > (I've tried dossrv and then mount /srv/dos/ /mnt #sdC1/data but it does not work). > I can access it though when it's on a floppy disk (mount /srv/dos /mnt /dev/fd0disk > works). How fd0disk is different from #sdC1/data? Hi Yoann, sdC0 and friends are populated by devsd (#S) as a part of some bootstrap goop. What you will typically find is that only the drive/partitions used to boot are populated, this is the reason for the readparts= plan9.ini variable. There are other ways to prompt devsd to create fs entries at boot - I'd suggest looking through /sys/src/9/port/devsd.c. Steve