Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Going crazy with "mount root from" error

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    4

    Going crazy with "mount root from" error

    No matter what I do, I can not get any version of FreeNAS 8 (RELEASE or any of the betas) to boot after the install.

    First, immediately after the install, whether I use a USB stick or actual drive, I get:
    GEOM: ada0: the primary GPT is corrupt
    GEOM: ada0: using secondary instead -- recovery...


    Then, after the reboot, I get the same message, followed by this:

    Screen shot 2011-07-07 at 7.50.27 PM.jpg


    The kicker of it is, no matter what I type: ufs:/dev/ada0p2 ufs:/dev/ada0p1 ada0 /dev/ada0p2, etc etc etc, it still tells me it can't mount the root.


    I have honestly tried everything:

    using a physical computer
    using VirtualBox/Parallels
    using a hard drive
    using two or three different USB sticks
    zeroing the start of the drive with "dd"
    killing the partition table with fdisk
    Zeroing the WHOLE drive

    In fact, the only time it actually installed AND booted was when I created a blank virtual image from within VirtualBox and used that instead of a physical disk.

    Thanks in advance for anybody that can point out what I might be doing wrong.
    Last edited by ulbador; 07-07-2011 at 05:04 PM.

  2. #2
    Senior Moderator ProtoSD's Avatar
    Join Date
    Jul 2011
    Location
    San Diego, California
    Posts
    3,362
    That really sucks, that's pretty much what I went thru trying to get beta3 to work, but it sounds like you've covered almost everything.

    Are you able to boot any other OS from USB flash, say something like Ubuntu?
    I've decided to take a break from the forums for an undetermined amount of time and am *VOLUNTARILY* banning myself as a means to force myself to leave this site. Things have gotten out of hand here and behind the scenes on a lot of levels and I'm fed up with the BS. Since I'm banning myself, that means I won't be able to reply to any PM's either. If I've shared my email with you, please feel free to keep in touch.

    -- Proto

  3. #3
    Junior Member
    Join Date
    Jul 2011
    Posts
    4
    The machine I'm trying to install this on is currently running FreeNAS 7 just fine.

    I suppose that's the next thing to try. Install something like ubuntu to my drive and boot from it, then try to install over it. I am at a total loss.

    I guess one question is, based on that screenshot, what should I actually be typing to boot it? I would think something like:

    ufs:/dev/ada0p1 or 2

  4. #4
    Junior Member
    Join Date
    Jul 2011
    Posts
    4
    After *FAR* too many hours of messing around with this, I found the solution. I'll post it here, so it can hopefully help someone else.

    Basically, in all the formatting, fdisking and everything else, something with the drives I was using (both hard drive and USB sticks) got "corrupted". I've been dealing with computers for a lot of years and while doing a simple "dd" over the partition table SHOULD have fixed it, clearly it didn't. I assume this has something to do with the fact that a normal format usually just rearranges the partition tables; the actual data on the disk stays intact until it is overwritten.

    The solution was simple, download a copy of Ubuntu, install it on the drive, then try to install FreeNAS 8. I have no idea why zeroing the drive didn't work, but clearly this is a much quicker solution. I also don't know why FreeNAS 7 didn't care and FreeNAS 8 threw a fit.

    I have no idea why this worked and everything else above didn't, but now I feel silly for wasting the last 3 or 4 days playing with this.
    Last edited by ulbador; 07-07-2011 at 09:14 PM.

  5. #5
    Senior Moderator ProtoSD's Avatar
    Join Date
    Jul 2011
    Location
    San Diego, California
    Posts
    3,362
    I've been down that same type of rat hole waaay too many times, so I feel for ya. I'm glad your persistence paid off and you're finally able to move on to the more interesting stuff. I don't know why dd didn't work either, I've done the same thing and thought there's no way dd didn't clean it off good enough to keep causing problems and gave up. Keep an eye out, beta 4 should hopefully be out soon, it should hopefully fix a lot of the stuff that broke between beta2 and beta3.
    I've decided to take a break from the forums for an undetermined amount of time and am *VOLUNTARILY* banning myself as a means to force myself to leave this site. Things have gotten out of hand here and behind the scenes on a lot of levels and I'm fed up with the BS. Since I'm banning myself, that means I won't be able to reply to any PM's either. If I've shared my email with you, please feel free to keep in touch.

    -- Proto

  6. #6
    Junior Member
    Join Date
    Jul 2011
    Posts
    4
    I wanted to add to this quickly because I found out the exact reason this happens.

    With GPT partitioning scheme, the partition table is stored at the beginning (primary) and end (backup) of the disk. So if you don't zero out the WHOLE disk, which takes forever, the backup GPT table is loaded.

    So to fix the above problem you have to do something like:

    dd if=/dev/zero of=/dev/theDrive bs=512 count=2

    AND


    dd if=/dev/zero of=/dev/theDrive bs=512 skip=sectors


    where sectors is the length of your disk as reported in fdisk (usually the big long number), minus 1 or 2. These two commands invalidate the primary AND secondary partition tables in a few seconds and saves the time of zeroing the whole disk.

    FreeBSD, and subsequently FreeNAS is NOT very good at doing this. Even going between FreeBSD and FreeNAS versions can be troublesome. I upgraded to FreeBSD 9 temporarily and it would not let me downgrade to a fresh install of 8 or 7 until I did this.

    This is also the cause when the installer tells you it can't find the slice that it supposedly just made.
    Last edited by ProtoSD; 10-12-2011 at 09:46 AM. Reason: highlighted commands

  7. #7
    Senior Moderator ProtoSD's Avatar
    Join Date
    Jul 2011
    Location
    San Diego, California
    Posts
    3,362
    Wow, very helpful, thanks for posting that. I went thru this same game with beta-4, but this time I tried a new flash drive (which was actually a little larger). Both drives were 2GB, but the first one formatted out to 1.8 and the second one 1.9, so I thought I was on to something, but I think your explanation nailed it.

    Maybe your method should be incorporated into the whole installation process just to make sure this problem doesn't occur.
    I've decided to take a break from the forums for an undetermined amount of time and am *VOLUNTARILY* banning myself as a means to force myself to leave this site. Things have gotten out of hand here and behind the scenes on a lot of levels and I'm fed up with the BS. Since I'm banning myself, that means I won't be able to reply to any PM's either. If I've shared my email with you, please feel free to keep in touch.

    -- Proto

  8. #8
    Junior Member
    Join Date
    Sep 2011
    Posts
    20
    I have run into the same problem as part of the learning curve of zfs, e.g. need to start over.

    Tried your commands above, but on the first one I get the following response:
    dd: /dev/ada0: Operation not permitted
    (also tried with sudo in front, but the systems tells me there is no sudo command).

    How do I circumvent this?

    How do I zero the disks (even if it takes days)?

    Is the best way to set up the zpool through the command line, or should the Web Gui be used?

    (Apart from being denied entrance as in the example above, the commands are pretty clear).

    Many thanks for some help along the way,

    peter

  9. #9
    Senior Member
    Join Date
    Aug 2011
    Location
    San Diego, CA
    Posts
    314
    Instead of "sudo", just "su -" and type the root password. This gives you a root shell and you can enter as many privileged commands as you need. The just "exit" to drop back to your own non-privileged shell.

  10. #10
    Junior Member
    Join Date
    Oct 2011
    Posts
    1
    I'm seeing the exact same problem with 8.0.1-RELEASE and am just trying your proposed fix.

    Quote Originally Posted by ulbador View Post
    So to fix the above problem you have to do something like:

    dd if=/dev/zero of=/dev/theDrive bs=512 count=2

    AND

    dd if=/dev/zero of=/dev/theDrive bs=512 skip=sectors

    where sectors is the length of your disk as reported in fdisk (usually the big long number), minus 1 or 2. These two commands invalidate the primary AND secondary partition tables in a few seconds and saves the time of zeroing the whole disk.
    The last command was presumably meant to be
    Code:
    dd if=/dev/zero of=/dev/theDrive bs=512 seek=sectors
    Otherwise it'll skip input blocks (which has no effect for /dev/zero), but zero the entire disk.

    Edit: Alas, that didn't work for me, it's still stuck at
    Code:
    mountroot>
    Last edited by kynan; 10-12-2011 at 09:49 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •