Date: Sat, 25 Jan 2003 18:38:07 -0800 From: George Hartzell <hartzell@kestrel.alerce.com> To: freebsd-hackers@freebsd.org Subject: Problem opening /dev/ad0{,s2} O_RDWR (also disklabel, grub) on 5.0. Message-ID: <15923.18959.507300.156728@rosebud.alerce.com>
next in thread | raw e-mail | index | archive | help
Hi I'm trying to set up my first 5.0 machine, and I've run into a problem right off of the bat. The machine is a Dell OptiPlex GX110 that has three slices. The first contains Windows 2000, the second has historically contained FreeBSD 4.7,and the third contains Linux. Since I use the system to test stuff before I roll it onto my laptop, and since the laptop seems to need it's original MBR in place so that suspend to disk works properly, I've been running the Dell with GRUB installed in the beginning of the freebsd slice (which is active) [(hd0,1) or /dev/ad0s2] and it's been working great. I tried to do a standard install from the 5.0 release ISO images. After answering all of the standard questions and telling it to go ahead, it spat out an error message as it was presumably setting up the disk. The screen redraws fast enough that I cant' catch the message, but I've tried a couple of times and it's happened each time. When I tried to boot up, I get a message about an unbootable operating system from the code in the MBR. Booting from CD 2, interrupting the loader, setting currdev=disk1s2a: and then "boot /boot/kernel/kernel" brings the machine up just fine. I tried building grub and it wouldn't admit that there was an (hd0,1). Oddly enough, starting grub with --read-only made it able to see (hd0,1). Inside gdb, I noticed that an open of "/dev/ad0" with O_RDWR was returning -1 and setting errno = 1 (EPERM, "Operation not permitted"). Some playing with 'call open("/dev/ad0", 0)', 'call open("/dev/ad0", 1)', and 'call open("/dev/ad0", 2)' made it clear that anything that would write to the disk was failing. I stepped back and started digging around with disklabel, and got some results that seem similar. disklabel -B /dev/ad0s2 auto should reinstall the boot stuff on that slice, but instead it says disklabel: /dev/ad0s2: Operation not permitted and I get the same error message from disklabel -W /dev/ad0s2. So, my questions are: 1) does this ring a bell with anyone? 2) Is there something in 5.0 that requires special magic to write to the raw disk devices? 3) Am I being a bonehead? g. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15923.18959.507300.156728>