Going crazy with "mount root from" error

Discussion in 'Bug Reporting' started by ulbador, Jul 7, 2011.

  1. Offline

    ulbador

    Member Since:
    Jul 7, 2011
    Messages:
    4
    Message Count:
    4
    Likes Received:
    1
    Trophy Points:
    0
    ulbador, Jul 7, 2011

    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.
  2. Offline

    ProtoSD FreeNAS Guru

    Member Since:
    Jul 1, 2011
    Messages:
    3,358
    Message Count:
    3,358
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Leaving FreeNAS
    ProtoSD, Jul 7, 2011

    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?
  3. Offline

    ulbador

    Member Since:
    Jul 7, 2011
    Messages:
    4
    Message Count:
    4
    Likes Received:
    1
    Trophy Points:
    0
    ulbador, Jul 7, 2011

    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. Offline

    ulbador

    Member Since:
    Jul 7, 2011
    Messages:
    4
    Message Count:
    4
    Likes Received:
    1
    Trophy Points:
    0
    ulbador, Jul 7, 2011

    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.
  5. Offline

    ProtoSD FreeNAS Guru

    Member Since:
    Jul 1, 2011
    Messages:
    3,358
    Message Count:
    3,358
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Leaving FreeNAS
    ProtoSD, Jul 7, 2011

    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.
  6. Offline

    ulbador

    Member Since:
    Jul 7, 2011
    Messages:
    4
    Message Count:
    4
    Likes Received:
    1
    Trophy Points:
    0
    ulbador, Jul 17, 2011

    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.
    pttymuth likes this.
  7. Offline

    ProtoSD FreeNAS Guru

    Member Since:
    Jul 1, 2011
    Messages:
    3,358
    Message Count:
    3,358
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Leaving FreeNAS
    ProtoSD, Jul 17, 2011

    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.
  8. Offline

    plq

    Member Since:
    Sep 2, 2011
    Messages:
    20
    Message Count:
    20
    Likes Received:
    0
    Trophy Points:
    0
    plq, Sep 7, 2011

    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. Offline

    Durkatlon FreeNAS Aware

    Member Since:
    Aug 19, 2011
    Messages:
    322
    Message Count:
    322
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    San Diego, CA
    Durkatlon, Sep 7, 2011

    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. Offline

    kynan

    Member Since:
    Oct 8, 2011
    Messages:
    1
    Message Count:
    1
    Likes Received:
    0
    Trophy Points:
    0
    kynan, Oct 8, 2011

    I'm seeing the exact same problem with 8.0.1-RELEASE and am just trying your proposed fix.

    The last command was presumably meant to be
    Code (text):
    1. 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 (text):
    1. mountroot>
  11. Offline

    cargobra

    Member Since:
    Oct 10, 2011
    Messages:
    4
    Message Count:
    4
    Likes Received:
    0
    Trophy Points:
    0
    cargobra, Oct 12, 2011

    I went to same problem as yours. To clean the disks I used a live CD of debian and format all partitions. I haven't find a best way to do...
  12. Offline

    zestyboy

    Member Since:
    Mar 17, 2012
    Messages:
    1
    Message Count:
    1
    Likes Received:
    0
    Trophy Points:
    0
    zestyboy, Mar 17, 2012

    Thanks Ulbador. I was having the same problem.
  13. Offline

    heuwitt

    Member Since:
    Oct 3, 2012
    Messages:
    1
    Message Count:
    1
    Likes Received:
    0
    Trophy Points:
    0
    heuwitt, Oct 3, 2012

    me too - but was due to corrupt gpart

    Somehow I had corrupt gpart and I must clean it up before it'd go pass "mountroot>"

    Here is what I did:
    1) reinserted FreeNAS 8.3.0-Beta3, and choose going to shell
    2) gpart show -l ada0 (ada0 is my disk, yours may vary)
    3) gpart destroy -F ada0 (this will destroy your partition - you might want to use 'recover' if you have something important)

    and when exit, I installed FreeNAS 8.3 without a issue.
  14. Offline

    Hobbers

    Member Since:
    Oct 5, 2013
    Messages:
    1
    Message Count:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hobbers, Oct 5, 2013

    Cheers heuwitt - had the same problem and your solution worked. Annoying that the installer doesn't do this in the fist place.
  15. Offline

    dlavigne FreeNAS Core Team

    Member Since:
    May 24, 2011
    Messages:
    2,420
    Message Count:
    2,420
    Likes Received:
    82
    Trophy Points:
    48
    dlavigne, Oct 6, 2013

  16. Offline

    mysticpete Newbie

    Member Since:
    Nov 2, 2013
    Messages:
    57
    Message Count:
    57
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Gold Coast
    mysticpete, Nov 13, 2013

    This exact problem has just happened on a new install of FreeNAS9.1.1 CD Image, thought someone would have fixed this by now in the build image, I mean... It's ONLY Been 2 Years since reported here!!!!

    Cheers Heuwitt, your actions did the trick.
  17. Offline

    dlavigne FreeNAS Core Team

    Member Since:
    May 24, 2011
    Messages:
    2,420
    Message Count:
    2,420
    Likes Received:
    82
    Trophy Points:
    48
    dlavigne, Nov 13, 2013

    And the requested bug report number is?
  18. Offline

    rhinok

    Member Since:
    Mar 22, 2013
    Messages:
    16
    Message Count:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bucharest, Romania
    rhinok, Nov 13, 2013

    Just installed 9.1.1 last night (and 8.3.2 due to some other issues) using the USB image and dd on both used and new USB keys.
    What I did was to unmount the disk and dd the img file to the USB. It works every time, never needed zeroing the disk. For the used USB key, I deleted the 4 partitions and left only one, unmount and dd. If you want to know how is going issue a killall -INFO dd (Mac) on a separate terminal window. It takes a cool 22 minutes (at least in my case, with both a SanDisk and TDK USB keys) to write those 2 GB.

    Hope this helps.
  19. Offline

    mysticpete Newbie

    Member Since:
    Nov 2, 2013
    Messages:
    57
    Message Count:
    57
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Gold Coast
    mysticpete, Nov 13, 2013

    Sorry..... but it's obviously not that important an issue if it's been left for 2 years!
  20. Offline

    mysticpete Newbie

    Member Since:
    Nov 2, 2013
    Messages:
    57
    Message Count:
    57
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Gold Coast
    mysticpete, Nov 13, 2013

    Sorry rhinok but I fail to see the relevance in your situation when as stated I was performing a clean install from an imaged CD of the downloaded software, if FreeNAS is being tuned for the masses then I would have thought that getting the image build right (i.e. working) would be a priority, everyday uses will just shrug and go back to what they know best.

    Anyway at least we All have working versions now.... Thanks to the users contributions on the forums :)

Share This Page