# Added new ide hard drive system is missing /dev entry



## fuzzynco (Oct 9, 2009)

How do I define (what do I put in mknod) to properly 
create /dev/ad1 (primary slave ide hard drive) and its
slices?

After rebooting with the added drive, sysinstall 
was able to slice and bsdlabel but when i tried to 
mount the new /dev/ad1s1 it couldn't find the /dev file.
I looked in /dev and /dev/ad1 & /dev/ad1s1 are not there.

I remembered there being a shell script to define the 
mknod's for a newly added device, but that was before
devfs? I didn't see the script in /dev where I remembered
it being.

thanks


----------



## ale (Oct 10, 2009)

Did you tried running `# sysctl kern.geom.debugflags=16` before starting sysinstall?


----------



## aragon (Oct 10, 2009)

mknod is dead since FreeBSD 5.

The device nodes aren't showing up because sysinstall is probably not creating the slices.  Setting debugflags to 16 should only make a difference if something is mounted from the device.

Personally I find sysinstall a pain to use.  I recommend you learn how to use fdisk(8) and bsdlabel(8) directly.


----------



## jb_fvwm2 (Oct 10, 2009)

More information in later post, below this one...

Here, unable to mount_msdosfs a drive on _8 (sata) that
I was able to mount while using _7. Coincidentally, 
sysinstall could not install to it (/dev/da10). (v8 that is, on a live ISO). Someday I may discover a problem with
partition size, sysinstall, the CLI I re-used, the 
driver, or some other issue...
................................
Iirc the /dev entries totalled 2 when there should have been 3, 4, or 5.


----------



## fuzzynco (Oct 10, 2009)

Aragon, 

When I do fdisk from shell prompt in root, it says the bsd slice is there. When it do the bsdlabel from shell prompt it lists the bsd partitions are there as setup in sysinstall. there just isn't a /dev 
node so I can't mount it (mount point is available) mount complains the 
device isn't there and it isn't. 

Is sysinstall or fdisk/bsdlabel supposed to create the device node(s) as needed?


----------



## aragon (Oct 10, 2009)

Mmm, no, the kernel is supposed to automatically, as far as I understand.  Whenever a disk util updates the partition table or a bsdlabel, the kernel magically notices it and updates /dev accordingly.  The only manual intervention you should ever need to do is setting permissions in /dev with devfs.rules(5).

So when you boot this system fresh, you get a /dev/ad1, but after using sysinstall that device node disappears?  Does it reappear after a reboot?


----------



## jb_fvwm2 (Oct 10, 2009)

Maybe related to the problem: on the "current usenet"
usenet discussion group, there is a similar 
"will not install to" followup, the answerer says
that nearly-a-FAQ in v8 is that the installer will
not install to "dangerously dedicated" disks.  And
the post includes a link (not perused because I was
in text mode). If that thread continues, maybe more
information related to this problem(s) may be
forthcoming...


----------



## jb_fvwm2 (Nov 5, 2009)

*Partially Fixed, _8*



			
				jb_fvwm2 said:
			
		

> Here, unable to mount_msdosfs a drive on _8 (sata) that
> I was able to mount while using _7. Coincidentally,
> sysinstall could not install to it (/dev/da10). (v8 that is, on a live ISO). Someday I may discover a problem with
> partition size, sysinstall, the CLI I re-used, the
> ...




```
kldload geom_label.ko 
kldload geom_bsd.ko
kldload geom_mbr.ko
```
Now I can mount the dos partition.  Created 2nd
and 3rd (bsd) partition with fdisk.  Still  checking
if one of the too-numerous new /dev entries 
can be mountable (invalid argument so far) by
bsdlabelling a few of them...
!  used a configuration file in fdisk to be sure to only operate on a certain
space > slice of the disk
!  bsdlabel -w ad10s2, ad10s3, ad10s4  (and a subsequent newfs, tested
on one of them, enables mounting.  (Confused by the many dev entries.) 
(Sorry no time to write down the procedure(s) verbatim, another post(s) somewhere
here on this or the other forum has more detail, posted today.)


----------

