1 Jan 2006 02:32
Device minor numbers conversion in COMPAT_NETBSD32
Quentin Garnier <cube <at> cubidou.net>
2006-01-01 01:32:00 GMT
2006-01-01 01:32:00 GMT
Hi folks, A very unfortunate overlook (I can't blame anyone, though, it just had to happen considering the hack that made it happen) introduced what is now a rather hairy situation in amd64's COMPAT_NETBSD32. It seems rather small, but I think it is hard to work around. What happens is that i386 has a very hacky way of defining minor device numbers for disk devices. In order to remain compatible with /dev entries from the time i386's MAXPARTITIONS was 8, the 20th bit of the minor number is used to code partitions 9-16 for each disk device. I.e., on i386: % ls -l /emul/netbsd32/dev/wd1[gi] brw-(Continue reading)r----- 0, 14 /emul/netbsd32/dev/wd1g brw-r----- 0, 524296 /emul/netbsd32/dev/wd1i Whereas, on amd64: % ls -l /dev/wd1[gi] brw-r----- 0, 22 /dev/wd1g brw-r----- 0, 24 /dev/wd1i I noticed that trying to boot an amd64 kernel over an i386 partition which was on wd1g. Booting an installed i386 partition with an amd64 kernel is something I'd really like to achieve, but this issue actually makes it difficult. So my first question is, do we want to allow this? I.e., using a /dev
RSS Feed