# Mounting Root Failed after Update



## markfisher (Jun 11, 2012)

Hi

OS: FreeBSD 9.0 - i386
Method of Updating: http://www.wonkity.com/~wblock/docs/html/buildworld.html

After reboot I get:

```
Trying to mount root from ufs:/dev/ada0p2 [rw] ...
mountroot: waiting for device /dev/ada0p2 ...
Mounting from ufs:/dev/ada0p2 failed with error 19.

Loader variables:
  vfs.root.mountfrom=ufs:/dev/ada0p2
  vfs.root.mountfrom.options=rw

Manual root filesystem specification:
  <fstype>:<device> [options]
      Mount <device> using filesystem <fstype>
      and with the specified (optional) option list.

    eg. ufs:/dev/da0s1a
        zfs:tank
        cd9660:/dev/acd0 ro
          (which is equivalent to: mount -t cd9660 -o ro .dev.acd0 /)

  ?               List valid disk boot devices
  .               Yield 1 second (for background tasks)
  <empty line>    Abort manual input

mountroot>
```

When I type '?', the list is empty. Can someone please help me on how to fix this problem?

Thank you


----------



## kpa (Jun 11, 2012)

Boot from the 9.0 memstick or install cd and see what `# gpart show` says about the disk and partitions.


----------



## markfisher (Jun 11, 2012)

@kpa
Thanks for your reply.

[CMD=""]gpart show[/CMD] shows:

```
ada0  GPT
   1  freebsd-boot  (64k)     
   2  freebsd-ufs   (2.0G)
   3  freebsd-swap  (4.0G)
   4  freebsd-ufs   (5.0G)
   5  freebsd-ufs   (30G)
   6  freebsd-ufs   (20G)
   7  freebsd-ufs   (218G)
```


----------



## wblock@ (Jun 11, 2012)

Did you use a custom kernel?


----------



## markfisher (Jun 11, 2012)

@wblock@
Yes I did.


----------



## wblock@ (Jun 11, 2012)

Put the kernel config file on pastebin.com and post a link so we can see it.


----------



## markfisher (Jun 12, 2012)

Here is my Custom Kernel Configuration File:

http://pastebin.com/embed_iframe.php?i=zQvgCak9


----------



## wblock@ (Jun 12, 2012)

Instead of editing a copy of GENERIC, it's better to include it and disable devices and options.  See Simplifying FreeBSD Kernel Config Files for an example.

First guess at why it's not working is that too much has been removed.  For example, some of the SCSI devices are needed for USB mass storage.

PS: including cpu I586_CPU allows some assembly optimizations for better performance: http://lists.freebsd.org/pipermail/freebsd-questions/2011-June/230491.html.


----------



## kpa (Jun 12, 2012)

I think you would need at least this much more:

```
options         ATA_CAM         # Handle legacy controllers with CAM
options         ATA_STATIC_ID   # Static device numbering
```

For recovery you could just copy the GENERIC kernel off the install media over what is now installed, should work fine.


----------



## markfisher (Jun 16, 2012)

@kpa
Adding those two options fixed the problem.

Thank you.


----------



## je33 (Jun 16, 2012)

wblock@: I would like to turn off debug symbols for my kernel compliation however, I have not been able to locate the keyword to use in my MYKERNEL that will turn off compilation with debug symbols in the included GENERIC configuration file.

My MYKERNEL contains:

```
include GENERIC
nocpu   i486_CPU
ident   MYKERNEL

nooptions       INET6

nodevice        eisa

nodevice        fdc
```

Is there a full list of the directives that may be used to override?


----------



## wblock@ (Jun 17, 2012)

See config(5).  But start a new thread for this.


----------

