ROOT MOUNT ERROR (in dual boot configuration)

Hi All,

I installed FreeBSD after installing Windows 7, and now when I try to boot FreeBSD it says

Code:
Trying to mount root from ufs:/dev/label/rootfs0
ROOT MOUNT ERROR:
If you have invalid mount options, reboot, and first try the following from the loader prompt:
  set vfs.root.mountfrom.options=rw

Loader variables:
vfs.root.mountfrom=ufs:/dev/label/rootfs0
vfs.root.mountfrom.options=rw,noatime

Manual root filesystem specification:
<fstype>:<device> Mount <device> using filesystem <fstype>
                               eg. ufs:/dev/da0s1a
                               eg. cd9660:/dev/acd0
                               This is equivalent to: mount -t cd9660 /dev/acd0 /

?                             List valid disk boot devices

When I type ?, I get:
Code:
List of GEOM managed disk devices:
cd0  ntfs/Silver  ad2s1  ad2  acd0

So when I use the syntax:
[CMD="mountroot>"]ufs:/dev/ad2[/CMD]
or
[CMD="mountroot>"]ufs:/dev/label/ad2[/CMD]
I can't mount any of the above listed GEOM devices.

I also tried [cmd=]set vfs.root.mountfrom.options=rw[/cmd] at the loader prompt like it suggests but no luck. Booting to any other option like single user mode or safe mode doesn't work either. I'm using the FreeBSD bootloader by the way if that helps.

When this problem happened the first time, I reinstalled FreeBSD and it has happened again, I've never been able to boot to FreeBSD. When I installed FreeBSD, it installed to ada1s3, but this isn't listed when I type ?. I tried:
[CMD="mountroot>"]ufs:/dev/ada1s3[/CMD]
and
[CMD="mountroot>"]ufs:/dev/label/ada1s3[/CMD]
just for kicks, but no luck.

Please help!
 
Windows 7 may have seen the FreeBSD boot manager and "repaired" it.

EasyBCD is, IMO, the easiest way to deal with dual-boot Vista/7 installs.
 
EasyBCD has no effect on the FreeBSD bootloader whatsoever, it simply loads the FreeBSD bootloader when the FreeBSD partition is selected. I do not believe Windows 7 has done anything to it, I tried to boot to FreeBSD directly after installing it. This is FreeBSD 8.0 by the way.

Can someone tell me how to empirically determine which partition to boot to, the syntax to manually boot it at the mountroot prompt, and how my fstab file needs to be changed to fix this problem? I can escape to the loader command prompt successfully, but I don't know what to do there. I typed "lsdev" to see all the listed disks and partitions. It lists the FreeBSD partitions as disk0s3a (FFS), disk0s3b (swap), disk0s3d (FFS), disk0s3e (FFS). I can't figure out how to boot any of these partitions. Is FFS the same as ufs as far as the loader is concerned? I've tried
[CMD="mountroot>"]ufs:/dev/disk0s3a[/CMD]
[CMD="mountroot>"]ufs:/dev/label/disk0s3a[/CMD]
[CMD="mountroot>"]ufs:/dev/0s3a[/CMD]
etc, etc, with no luck.

It's no problem for me to boot to a livecd and mount the FreeBSD partition to muck around with the files, but I have no idea what to do there, it's all trial and error.
 
Vista/7 BCD does not play well with others; this is why I suggested EasyBCD.

There's a clue to the device problem in the device names. ada1 is AHCI. Yet the prompt shows ad2. I can only guess that you loaded the ahci module before the install, but forgot to set it up to be loaded routinely. So you would enter
Code:
ufs:/dev/ad2s1a

But that's listed in the devices, and you said you tried them all, so I thought it didn't work.

There are label references in a couple of places, but they're to devices, not filesystems. UFS filesystem labels show up in /dev/ufs/. If the labels were created correctly--with newfs(8) or tunefs(8), you should be able to use
Code:
ufs:/dev/ufs/rootfs0
 
Thanks for baring with me, wblock, I'm still fairly new to BSD systems. It seems that setup and configuration is the most difficult part, despite the installation guides that are provided.

Neither of your above commands worked. How did you come up with ad2s1a? My hard drive is located on a SATA III port, where AHCI is the controller mode in the bios. I don't remember doing anything with AHCI during the installation of FreeBSD (perhaps that's the problem, but I thought it loaded the recommended settings based on my drive configuration).

During boot I spotted:
atapci0: AHCI called from vendor specific driver

I later escaped to the loader prompt and typed "lsmod" to get the list of loaded modules, one of them is:
0x1186000: /boot/kernel/ahci.ko (elf obj module, 0xb0b8)
modules: ahci.1
Is this not the module that should be loading routinely for my drive?

Thanks again for your help.
 
adcat said:
How did you come up with ad2s1a?

It's in your output in message #1. ad2 is the drive, s1 is the first DOS-type partition ("s" is for slice, the name FreeBSD uses for those), and a is the first FreeBSD partition on that slice. If you installed to the second slice/partition of a drive, it would be s2a, and so on. Can you verify if there were any other non-FreeBSD partitions (slices) on the drive you used?

My hard drive is located on a SATA III port, where AHCI is the controller mode in the bios. I don't remember doing anything with AHCI during the installation of FreeBSD (perhaps that's the problem, but I thought it loaded the recommended settings based on my drive configuration).

Possibly sysinstall loads ahci when it sees one of those drives. It does need to be loaded to use the device adaN.

If the BIOS is not set to AHCI or the achi module is not loaded, the same drive would appear as an "ad" device, and the drive number would likely not match. What happened with your installation I don't know, but if everything is correct, using ? at the mountroot prompt should show some adaN devices. N may have changed for some reason, particularly if you connected or disconnected drives in the meantime.

So what to do now... well, boot the system, try the ?, and see if the device names have changed. Based on message #3, I'm thinking it should actually be ufs:/dev/ada0s3a or maybe ufs:/dev/ad0s3a.

Additional: /etc/fstab will still be wrong, so only / will be mounted. Then you can
# mount /dev/ada0s3d /var
# mount /dev/ada0s3e /tmp
# mount /dev/ada0s3f /usr

and edit /etc/fstab so the device naming is correct.

After all that, see Moving A FreeBSD System To AHCI And Labeled Filesystems to label the filesystems and never have this problem again.
 
I've been working on this for 15+ hours since your last post and it's getting very frustrating. I had a detailed report to submit, but when I hit submit it told me I had been logged out, and now it's lost. x(

If you installed to the second slice/partition of a drive, it would be s2a, and so on. Can you verify if there were any other non-FreeBSD partitions (slices) on the drive you used?
Yes, well, a third re-install has verified ada1s1 and ada1s2 which are both ntfs partitions used by Windows 7. ada1s3a,b,d,e are used by FreeBSD similar to my report from post #3. My 3rd install has resulted in the same problem. Typing lsdev at the loader prompt shows an output in the format that I reported in post #3, and confirms the file system types in each partition.

NOTE: I did the 3rd re-install after all of the steps below, which results in the same mount error. The 3rd time I used custom partitioning, specifically choosing ada1s3, which has resulted in the same partition layout as before.

try the ?, and see if the device names have changed. Based on message #3, I'm thinking it should actually be ufs:/dev/ada0s3a or maybe ufs:/dev/ad0s3a.
They did not change, and these commands did not work.
The device names did not change, and these commands didn't work. I booted up a livecd of PC-BSD (FreeBSD v8.0 with KDE, 64-bit OS in my situation. This is also my install media - the PCBSD forums have proven less helpful) and I mounted the ufs partitions. I took a peak in /media/disk/dev and found 4 directories and a file called "md1". A directory called "pts" was the only directory containing a file, called, "5" (a character-device). "ufs" was not one of the 4 directories, neither was "label". There were no volume labels to be found, manual mounting would never have worked it seems.

Where does it get the list of GEOM managed devices? Things like "ad2" and "acd0" were not listed in /dev on the mounted partition, but they were present on /dev in the livecd.

After all that, see Moving A FreeBSD System To AHCI And Labeled Filesystems to label the filesystems and never have this problem again.
Now, navigating to /dev (the /dev of the livecd) showed all of the device labels, including ada1s3a,b,d,e. I proceeded to unmount the ufs partitions and followed the instructions in your above links. I rebooted (to the livecd) before editing the fstab file like it suggests, to find that the volume labels had been changed correctly, but instead of creating the "ufs" directory on the /media/disk/dev path, it was now listed in /dev of the livecd. I learned that you cannot simply copy them from one location to the other either, the process attempts to copy gigabytes of the file system rather than size-less labels.

I continued to edit the fstab file accordingly to the instructions, but it still failed to boot just the same. Is there some "chroot" trick I can try to generate the labels correctly from the livecd? I attempted it but I lost paths to needed binary files.

On a side note, at boot-up, there's an error that reads something like,
Code:
acd0: ILLEGAL REQUEST, operation not permitted!
I believe it's always been there, but I've just now taken notice of it. If I'm not using an install cd, then acd0 shouldn't be coming up at boot-time right?



Is it too much to ask to be able to boot up my system, oh great BSD daemon, Beastie?
 
adcat said:
Now, navigating to /dev (the /dev of the livecd) showed all of the device labels, including ada1s3a,b,d,e.

To be precise, those are device or slice or partition names, not labels.

I proceeded to unmount the ufs partitions and followed the instructions in your above links. I rebooted (to the livecd) before editing the fstab file like it suggests, to find that the volume labels had been changed correctly, but instead of creating the "ufs" directory on the /media/disk/dev path, it was now listed in /dev of the livecd.

This is good news. First, /dev is a dynamic device directory. It's created by the operating system based on whatever hardware it finds. It lives in memory, not on a disk.

I continued to edit the fstab file accordingly to the instructions, but it still failed to boot just the same.

The fstab that needs to be edited is the one on /dev/ada1s3a. Or, as a label, (assuming it's been labeled as "rootfs") /dev/ufs/rootfs.

So you're almost there. Boot with your liveCD. Make sure the labels all exist:
Code:
% ls /dev/ufs
rootfs	tmpfs	usrfs	varfs
% ls /dev/label
swap

Mount the "rootfs" partition so it can be edited:
# mkdir /tmp/myrootfs
# mount /dev/ufs/rootfs /tmp/myrootfs

Then, finally, edit /tmp/myrootfs/etc/fstab with vi or ee or whatever. Save changes and reboot.

I believe it's always been there, but I've just now taken notice of it. If I'm not using an install cd, then acd0 shouldn't be coming up at boot-time right?

/dev/acd0 is the device. Like the other stuff in /dev, it's created dynamically at startup based on what hardware is found. I see an "error" for my CD devices because they don't have any CDs loaded. It's more of an annoying warning.
 
Well, much to my frustration, I'm sorry to report that it did not work. It gives the same error, except now with the /dev/ufs/rootfs path that I gave it in fstab. Typing ?, lists the very same devices mentioned in post #1.

With the fresh, non-booting, installation, we see from booting to the livecd that:
Code:
% ls /dev/ufs
ROOTFS
% ls /dev/label
rootfs0 swap0 var0 usr0
(The fstab file correctly points to /dev/label at this time) Then, I followed your instructions in the link you supplied on creating labels, followed by your instructions in the last post on correctly editing fstab. It did not boot. After booting to the livecd I noticed:
Code:
% ls /dev/ufs
ROOTFS rootfs varfs usrfs
% ls /dev/label
swap rootfs0 var0 usr0
I tried "glabel destroy <name>" and "glabel clear <name>" to get rid of the old duplicates
but it doesn't work. Are these old duplicates keeping me from booting? I'm not sure what to do with them.

This is my current fstab file, the only thing I've changed are the device paths as per the instructions you gave me:
Code:
# Device          Mountpoint              FStype          Options Dump Pass
/dev/ufs/rootfs   /                       ufs             rw,noatime      1       1
/dev/label/swap   none                    swap            sw              0       0
/dev/ufs/var      /var                    ufs             rw,noatime      1       1
/dev/ufs/usr      /usr                    ufs             rw,noatime      1       1
procfs            /proc                   procfs          rw              0       0
linprocfs         /compat/linux/proc      linprocfs       rw              0       0
tmpfs             /tmp                    tmpfs           rw,mode=1777    0       0

x(
 
Same problem except BEFORE INSTALLATION

I have a similiar problem, except I get the following prompt before being able to install BSD:

Code:
GEOM: ad6: partition 2 does not start on a track boundary
GEOM: ad6: partition 2 does not end on a track boundary
GEOM: ad6: partition 1 does not start on a track boundary
GEOM: ad6: partition 1 does not end on a track boundary

Loader variables:
vfs.root.mountfrom=
vfs.root.mountfrom.options=

Manual root filesystem specification:
<fstype>:<device> Mount <device> using filesystem <fstype>
                               eg. ufs:/dev/da0s1a
                               eg. cd9660:/dev/acd0
                               This is equivalent to: mount -t cd9660 /dev/acd0 /

?                             List valid disk boot devices
mountroot>

Typing "?" results in this:
Code:
List of GEOM managed disk devices:
  ntfs/System  Reserved  ad6s2  ad6s1  ad6  iso9660/FreeBSD_Install acd0


Otherwise I'm in a similiar situation; I have Windows7 installed on my disk, and I want to install FreeBSD on the same disk for dualbooting.
However, when I put the FreeBSD_Install CD into the CD drive and restart my computer, I get to the boot screen of FreeBSD, from where I can select the default option or go to loader prompt etc.

So being the noob I am, I try the default option, hoping that it would start the installer (it's called sysinstall, right?), and I see the bootloader doing it's thing, figuring out the devices on my computer.

Then it just comes to the screen seen above in the code-block. This happens before I am able to install anything or before the installer program is started.

To me it seems weird that the bootloader tries to find a mountable root system, when I haven't even installed anything but Windows7. Notice that my view is a bit different than that of OP's, namely the "Loader Variables" are empty in my view.

I have tried all the disk devices listed by "?", even though it seems futile when I know I don't have freebsd installed yet. I tried them by typing [cmd=]ufs:/dev/foo[/cmd] and i tried [cmd=]ufs:foo[/cmd] and just "foo", etc.

I believe "ad6s2" & "ad6s1" are the partitions which hold my Windows7-installation, though I'm not sure.


Any ideas what to do? Do I need to do some configuring in the "boot loader prompt" so it would try to run sysinstall instead of looking for a mountable root system?


I am a total unix noob, so detailed instructions would be greatly appreciated.

Some related specs:
CPU: Intel i3 540
Mobo: GIGABYTE GA-H55N-USB3
Harddisk is SATA2 and has two existing partitions, "System Reserved" and "C: SYSTEM", both which are for Windows7, and then it has couple hundred gigs of unallocated space.
The installation disk I'm using is for FreeBSD 8.1-RELEASE and from the relnotes.txt on the installation disk I can see this for a more accurate version I believe:
Code:
$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/article.sgml,v
   1.1101.2.6.2.2 2010/07/17 00:12:41 hrs Exp $
 
adcat said:
Are these old duplicates keeping me from booting? I'm not sure what to do with them.

I don't think they're a problem. Should also add that this is definitely not a stock FreeBSD install. Probably PC-BSD, but I don't know. Please verify.

Given that ada1 isn't shown in the boot list, I still would point to a missing ahci module. The installer (not sysinstall) loaded it, but didn't set the installed system to load it. Again using your liveCD, mount /dev/ufs/rootfs and edit /boot/loader.conf, adding
Code:
ahci_load="YES"

This is my current fstab file, the only thing I've changed are the device paths as per the instructions you gave me:
Code:
# Device          Mountpoint              FStype          Options Dump Pass
/dev/ufs/rootfs   /                       ufs             rw[B],noatime[/B]      1       1
/dev/label/swap   none                    swap            sw              0       0
[B]/dev/ufs/var[/B]      /var                    ufs             rw[B],noatime[/B]      1       1
[B]/dev/ufs/usr[/B]      /usr                    ufs             rw[B],noatime[/B]      1       1
[B]procfs[/B]            /proc                   procfs          rw              0       0
[B]linprocfs[/B]         /compat/linux/proc      linprocfs       rw              0       0
[B]tmpfs[/B]             /tmp                    tmpfs           rw[B],mode=1777[/B]    0       0

Definitely not a stock FreeBSD fstab, and several problems in there (bolded sections to highlight problems or just differences from stock). Let me rewrite that:
Code:
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/label/swap         none            swap    sw              0       0
/dev/ufs/rootfs         /               ufs     rw              1       1
/dev/ufs/varfs          /var            ufs     rw              2       2
/dev/ufs/tmpfs          /tmp            ufs     rw              2       2
/dev/ufs/usrfs          /usr            ufs     rw              2       2
linproc                 /compat/linux/proc      linprocfs       rw      0       0
proc                    /proc           procfs  rw              0       0
 
Really? You want me to quote that? said:
I have a similiar problem, except I get the following prompt before being able to install BSD:

Code:
GEOM: ad6: partition 2 does not start on a track boundary
GEOM: ad6: partition 2 does not end on a track boundary
GEOM: ad6: partition 1 does not start on a track boundary
GEOM: ad6: partition 1 does not end on a track boundary

Loader variables:
vfs.root.mountfrom=
vfs.root.mountfrom.options=

Manual root filesystem specification:
<fstype>:<device> Mount <device> using filesystem <fstype>
                               eg. ufs:/dev/da0s1a
                               eg. cd9660:/dev/acd0
                               This is equivalent to: mount -t cd9660 /dev/acd0 /

?                             List valid disk boot devices
mountroot>

Typing "?" results in this:
Code:
List of GEOM managed disk devices:
  ntfs/System  Reserved  ad6s2  ad6s1  ad6  iso9660/FreeBSD_Install acd0


Otherwise I'm in a similiar situation]

sysinstall is a FreeBSD program; the install CD actually boots FreeBSD into RAM. The device should be cd9660:/dev/acd0

Why it's not finding that, I don't know. Windows 7 has made things more interesting by starting to use GPT partitions. An external USB CD drive can complicate things, and that's a motherboard with USB3. How is the CD drive connected?
 
wblock said:
I don't think they're a problem. Should also add that this is definitely not a stock FreeBSD install. Probably PC-BSD, but I don't know. Please verify.
Sorry, I casually mentioned that in post #7. Yes, this is PC-BSD 64-bit, and I've tried 8.0 and 8.2-beta now with the same effect. I've just created a thread in their forum here: http://forums.pcbsd.org/showthread.php?p=85036#post85036

Given that ada1 isn't shown in the boot list, I still would point to a missing ahci module. The installer (not sysinstall) loaded it, but didn't set the installed system to load it. Again using your liveCD, mount /dev/ufs/rootfs and edit /boot/loader.conf, adding
Code:
ahci_load="YES"
Yes, I've been checking that since it's mentioned in your instructions on labeling filesystems. It's never been set to "NO" in fact, since I've been checking the file.


Definitely not a stock FreeBSD fstab, and several problems in there (bolded sections to highlight problems or just differences from stock). Let me rewrite that:
Code:
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/label/swap         none            swap    sw              0       0
/dev/ufs/rootfs         /               ufs     rw              1       1
/dev/ufs/varfs          /var            ufs     rw              2       2
/dev/ufs/tmpfs          /tmp            ufs     rw              2       2
/dev/ufs/usrfs          /usr            ufs     rw              2       2
linproc                 /compat/linux/proc      linprocfs       rw      0       0
proc                    /proc           procfs  rw              0       0
Ok, I'll give this a try and report back.

Why it's not finding that, I don't know. Windows 7 has made things more interesting by starting to use GPT partitions. An external USB CD drive can complicate things, and that's a motherboard with USB3.
Interesting note, I'm also using a motherboard with USB3 and SATA-3. I have a USB mouse attached, 2 hard drives attached on SATA-3 ports, one more attached on a SATA-2 port.

In 8.2-beta, I have the option of installing with GPT, listed as "dedicated disk full install". I was leery of enabling anything that said "full install" when the disk contains another OS.

If it helps, my system specs are:
Intel i7 980x processor
MSI Big Bang-XPower motherboard
XFX HD-485X-ZNFC Radeon HD 4850 video card
16GB DDR3 2000 ram
(cd/dvd drive is a SATA-attached Samsung with LightScribe support, if that matters)
 
OK, I'm about to turn this back over as a FreeBSD bug. You can follow my above listed link to see what was tried. Here was my latest reply:

Alright, let me start by saying that I think there is a serious hardware issue with either PCBSD or FreeBSD, likely FreeBSD I suppose. I can't blame the hardware because Windows 7 still works fine. Now, read below.

Can you disable that Marvell controller in the BIOS? Also, did ZFS also fail to boot?
Correct, ZFS also failed to boot with the same error.

Its possible its a bug with the ahci driver, can you turn off ahci or set it to "legacy" in the bios? Does
that give you any different results?
My motherboard has 3 different sata controllers, one for E-sata, one for "SATA 6Gb/s Controller Mode", and one for sata-2 referred to as "On-Chip SATA controller."

The one for E-sata has been set to AHCI, however, there are no E-sata devices and disabling it has no effect on boot-up either.

The one for "SATA 6Gb/s Controller Mode" can be set to disabled, IDE, or AHCI. Disabling it renders my boot-disk and my storage drive unusable, as both of these are attached to SATA-3 ports. Setting it to IDE results in the same error (and slower load times), however, now when I type ? at the mountroot prompt there are no GEOM manages devices listed at all. Setting it to AHCI results in the same error we've been seeing.

Now, the "On-Chip SATA controller" is located in a sub-menu called "On-Chip ATA Devices". It can be either enabled or disabled. Disabling it results in my cd/dvd rom drive and my other storage drive being undetectable, as both of these are attached to standard SATA-2 ports. Now, if it is enabled a RAID mode must be set. I previously ignored this because I'm not using any sort of RAID array. The options are IDE, RAID, and AHCI. This whole time it was set to IDE, which explains why typing ? at the mountroot prompt gives:
Code:
List of GEOM managed disk devices:
cd0  ntfs/Silver  ad2s1  ad2  acd0

Now, if I set it to RAID, the system will not boot and the bios outputs some message like, "No RAID array detected!" which is expected. Setting it to AHCI enables a "AHCI Settings" sub-menu of sata devices, which cannot be viewed if IDE is selected. These devices are the cd/dvd rom and the other storage disk which are attached to regular sata-2 ports. If I set it to AHCI I get the same mountroot error and if I type ? at the mountroot prompt I get:
Code:
List of GEOM managed disk devices:
ntfs/Silver  ada0s1  ada1  acd0

This is a bit more promising. I decided to go ahead and reinstall with AHCI selected for the RAID mode. I installed still with ZFS, with GPT/EFI enabled, I selected the FreeBSD bootloader, and the partition ada1s3 was selected. It installed successfully, but resulted in the same mountroot error. I really thought it would work that time.

I booted up the livecd and now since ZFS was installed, I'm afraid I can't figure out how to mount root to locate /etc/fstab. When I try
# mount /media/disk/boot/boot0 /tmp/myroot
It says
Code:
Block device required.

Windows 7 has no issues whether my controllers are set to AHCI or IDE. My next step is to try installing with straight FreeBSD to see if I get the same problem, that way I can make it an official FreeBSD bug. I may further need to install it to a stand-alone disk to see if this problem is specific to dual-booting, once I find an unused sata-interfaced hard drive that is.

I should also note, this computer system is fairly new and has never had an installation of any BSD-variant.

Man, this problem is such a pain the arse.
 
Alright, I've posted this in the PC-BSD forum but I'll post it here too. The issue is that the ahci_load option is set to "NO" by default in FreeBSD, whereas it is set to "YES" in PC-BSD by default. The module itself was causing the problem, so disabling it fixed the issue.

Here is what I posted in the PC-BSD forum, feel free to comment on it or reply to it here. I'm setting this thread to solved since the issue seems to lie with the fact that PC-BSD auto-enables the feature and FreeBSD doesn't (that I know of).
Alright, the problem is definitely with the ahci module. I've tried just a straight install of FreeBSD 8.2 RC1 and PCBSD 8.2 RC1, and they both work if:

Code:
ahci_load="NO"
In my loader.conf file.

In fact, I'm posting this now from my working PCBSD OS. I couldn't be happier, should I set this thread to "solved"? I'm probably going to reinstall with ZFS, I would just rather be using that file system.

Am I losing anything tremendous by not loading the ahci module? My load time is still rather fast as long as ahci is set in my bios. If there's anything more I can do to help fix this module issue, let me know. It was a pain the butt.
 
Back
Top