fdisk: cannot open disk /dev/ad0: No such file or directory

Jerry McAllister jerrymc at clunix.cl.msu.edu
Mon Oct 3 06:17:37 PDT 2005


> 
> Hi all,
> 
> I get this when I type 
> 
> /home/paul# fdisk -u
> 
> fdisk: cannot open disk /dev/ad0: No such file or directory
> 
>  
> 
> ad0 is there because it's just booted off it.  
> 
> I have also tried this from a live CD with no active mounts.
> 

You cannot fdisk the disk you are booted from or a mounted disk
other than just to read the information - but no updating.

If you need to modify the primary label of your boot disk, then
you will need to boot from something else, such as a 'fixit' CD.
In 4.xx and before, the fixit was the second CD.  In 5.xxx (and I
presume after), the fixit is the first CD.  

> This person had exactly the same problem:
> 
> http://www.linuxquestions.org/questions/showthread.php?s=
> <http://www.linuxquestions.org/questions/showthread.php?s=&threadid=357343>
> &threadid=357343
> 
> I too had used dd to transfer from a smaller HD.
> 

Not a good idea.
First, build your new (larger) disk properly with fdisk/disklabel/bsdlabel
and newfs first (or you can use /stand/sysinstall - see 'man 8 sysinstall).
Then use dump(8)/restore(8) to transfer the file systems.

////jerry

> 
> Additional info:
> 
>  
> 
> /home/paul# df -h
> 
> Filesystem     Size    Used   Avail Capacity  Mounted on
> 
> /dev/ad0s1a    193M     92M     86M    52%    /
> 
> devfs          1.0K    1.0K      0B   100%    /dev
> 
> /dev/ad0s1d    242M    432K    222M     0%    /tmp
> 
> /dev/ad0s1f    4.8G    3.0G    1.4G    68%    /usr
> 
> /dev/ad0s1e    242M    163M     59M    73%    /var
> 
> devfs          1.0K    1.0K      0B   100%    /var/named/dev
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Thanks.
> 
>  
> 
> Paul
> 
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> 



More information about the freebsd-questions mailing list