• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

UFS Root Mount Error on FreeBSD boot up.

antoniog120

Member

Thanks: 3
Messages: 81

#1
Hello FreeBSD community,

I recently completed a backup and restore of a FreeBSD server successfully however I am having a problem on the FreeBSD boot up. It gives me a Root Mount Error on boot up. The error does provide some suggestions on how to fix the problem and I do follow them but again I receive the same error. I also tried some changes to the loader variables but again I receive the same error. I also noticed that the loader variable vfs.root.mountfrom=ufs:/dev/mirror/root is not correct and when I make the change to the correct root parition in the freebsd loader the change is only temporary it goes back to the same device file upon the next reboot. How do you make that change permanent? Or is there a way to reset the loader as the loader is referencing an old disk? I have attached a screenshot of the error message.Has anyone seen this error and has completed a solution to it? There also two small messages above this ROOT MOUNT ERROR about the drive having GPT corruption I ran the gpart recover command on that drive ad0 using the FreeBSD disc shell and it stated that no recovery was needed also when I ran the restore the command gave no errors about a corrupt restore so I think that message is not even relevant. Look forward to your response and possible solution to my Root Mount Error problem.

Regards,

Antonio Gandara
 

Attachments

k.jacker

Well-Known Member

Thanks: 205
Messages: 400

#2
It looks like that disk you are trying to boot off, has been part of a soft raid through GEOM or something like this earlier?!
I've never seen a disk with a device name /dev/ad0. They should be /dev/daN (e.g. external USB) or the common /dev/adaN for SATA connected disks.
But I've never used a GEOM raid so it might be ok and is most likely build on top of the original provider.
So try booting using the most obvious device names....

A single disk connected to sata (assuming no other disks connected to other SATA ports) would be
ufs:/dev/ada0p2 or
ufs:/dev/ada0p3 if there is a swap partition in between.

If that does not work, you might want to boot into a live shell again and then post the output of gpart show here.
 

antoniog120

Member

Thanks: 3
Messages: 81

#4
It looks like that disk you are trying to boot off, has been part of a soft raid through GEOM or something like this earlier?!
I've never seen a disk with a device name /dev/ad0. They should be /dev/daN (e.g. external USB) or the common /dev/adaN for SATA connected disks.
But I've never used a GEOM raid so it might be ok and is most likely build on top of the original provider.
So try booting using the most obvious device names....

A single disk connected to sata (assuming no other disks connected to other SATA ports) would be
ufs:/dev/ada0p2 or
ufs:/dev/ada0p3 if there is a swap partition in between.

If that does not work, you might want to boot into a live shell again and then post the output of gpart show here.
Thanks for the reply. Yes this drive was using vinum which can act as software raid but it no longer is since during the restore we used GPT style partitioning and we abandoned vimun all together as this is a single drive and using vinum with a single hard drive provides no benefit. That was a setup I inherited as I did not set this up in vinum but it doesn't matter anymore since it is not using vinum currently. As far as the hard drive name you are correct as I set this drive up using GPT style partitioning and when I ran the gpart command to set it up it did refer to the hard drive as da0 not ad0. I did find that unusual and it's funny you pointed that out. But you stated that isn't a problem or something that would be causing this Root Mount error? I did setup the /etc/fstab file to use ad0 since that is how it found it while booting off the hard drive but using the gpart command during a shell showed the drive as da0. Yes this is a single hard drive. Right I created the root parition on parition 2. So you are saying to use the ufs:/dev/ada0p2 device file name? I actually tried ufs:/dev/ad0p2 but it did not fix the root mount error. Where did you get the extra "a" character from? I will try your suggestion of using ufs:/dev/ada0p2 this tuesday February 6 as that is when I will work with this server again. If that does not fix the root mount error I will post the gpart show output on here Tuesday night for further troubleshooting. Thanks for your response and suggestions.
 

antoniog120

Member

Thanks: 3
Messages: 81

#6
I will do k.jackers suggestions on Tuesday as that is when I will have access to the server again and respond then. If I get too many questions or suggestions from different forum members things get a bit confusing.
 

Snurg

Aspiring Daemon

Thanks: 325
Messages: 794

#7
tobik@ The change to the new naming caused some confusion to me back then, too. :O Was it a consequence of changing to GPT?
antoniog120 I'd suggest you to bother answering @tobik's question, and also tell what version you were using for rescue/recovery booting. He is very competent and helpful, but if you don't care, why should he?
Just in addition, back then the partition scheming was usually ad0s<n>, while the actual slice name to mount was usually ad0s<n>a iirc.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,098
Messages: 26,991

#8
Or used SAS or SCSI disks.

Code:
root@hosaka:~ # mptutil show drives
mpt0 Physical Drives:
 da0 (  559G) ONLINE <TOSHIBA MBF2600RC 0109> SAS bus 0 id 2
 da1 (  559G) ONLINE <TOSHIBA MBF2600RC 0109> SAS bus 0 id 3
 da2 (  559G) ONLINE <TOSHIBA MBF2600RC 0109> SAS bus 0 id 1
 da3 (  559G) ONLINE <TOSHIBA MBF2600RC 0109> SAS bus 0 id 4
root@hosaka:~ # freebsd-version -u
11.1-STABLE
SATA disks typically use ada*, SCSI/SAS or USB harddisks/memory sticks all use da*. A really, really long time ago IDE disks showed up as wd*.
 

antoniog120

Member

Thanks: 3
Messages: 81

#9
It looks like that disk you are trying to boot off, has been part of a soft raid through GEOM or something like this earlier?!
I've never seen a disk with a device name /dev/ad0. They should be /dev/daN (e.g. external USB) or the common /dev/adaN for SATA connected disks.
But I've never used a GEOM raid so it might be ok and is most likely build on top of the original provider.
So try booting using the most obvious device names....

A single disk connected to sata (assuming no other disks connected to other SATA ports) would be
ufs:/dev/ada0p2 or
ufs:/dev/ada0p3 if there is a swap partition in between.

If that does not work, you might want to boot into a live shell again and then post the output of gpart show here.
k.jacker I tried your suggestion of ufs:/dev/ada0p2 but I received the same error. I booted into a live shell and have posted the output of gpart show here. Let me know if you any other possible solutions.
gpartshow.png
 

antoniog120

Member

Thanks: 3
Messages: 81

#10
Or used SAS or SCSI disks.

Code:
root@hosaka:~ # mptutil show drives
mpt0 Physical Drives:
 da0 (  559G) ONLINE <TOSHIBA MBF2600RC 0109> SAS bus 0 id 2
 da1 (  559G) ONLINE <TOSHIBA MBF2600RC 0109> SAS bus 0 id 3
 da2 (  559G) ONLINE <TOSHIBA MBF2600RC 0109> SAS bus 0 id 1
 da3 (  559G) ONLINE <TOSHIBA MBF2600RC 0109> SAS bus 0 id 4
root@hosaka:~ # freebsd-version -u
11.1-STABLE
SATA disks typically use ada*, SCSI/SAS or USB harddisks/memory sticks all use da*. A really, really long time ago IDE disks showed up as wd*.
This command mptutil show drives did now work in the freebsd setup we have. When I read the mptutil man page it takes about a utility for managing LSI Fusion-MPT controllers. I do not what LSI Fusion-MPT controllers have to do with this error that I have or setup that I have. But thanks for the clarifying the hard drive naming conventions.
 

antoniog120

Member

Thanks: 3
Messages: 81

#12
tobik@ The change to the new naming caused some confusion to me back then, too. :O Was it a consequence of changing to GPT?
antoniog120 I'd suggest you to bother answering @tobik's question, and also tell what version you were using for rescue/recovery booting. He is very competent and helpful, but if you don't care, why should he?
Just in addition, back then the partition scheming was usually ad0s<n>, while the actual slice name to mount was usually ad0s<n>a iirc.
I haven't made one statement about any specific forum member on here I have discussed a prior problem with k.jacker on these fourms and he responded first which is why I took his course of action. You can read my prior statement of If I get too many questions or suggestions from different forum members things get a bit confusing. That is why I did not respond.
 

Snurg

Aspiring Daemon

Thanks: 325
Messages: 794

#13
If I were in your place, I'd first take the disk out of the computer, make a backup copy of it using dd, and then try to boot it according to the instructions shown in your first photo using the physical path (/dev/ad0s2a or ...c), supposing that this one is the root filesystem.
To me it looks like that the disk label has got corrupted. But I am by no means a qualified guru like SirDice or tobik@.
And I'd suggest to get a new drive, as 60GB indicates it being very very old, maybe about breaking down. So backing up it as a first step might be a good idea.
 

antoniog120

Member

Thanks: 3
Messages: 81

#16
I'll work with 2 to 3 forum members maximum. Once I get into 4 to 5 forum members posting suggestions and solutions things get out of hand. No disrespect to any forum member.
 

k.jacker

Well-Known Member

Thanks: 205
Messages: 400

#17
Sorry for the delay. Your disk is /dev/da0 so the partition to boot from is hopefully the first one: ufs:/dev/da0p2
 

antoniog120

Member

Thanks: 3
Messages: 81

#19
Sorry for the delay. Your disk is /dev/da0 so the partition to boot from is hopefully the first one: ufs:/dev/da0p2
Ok so from the gpart show I posted you concluded I should mount the root partition from ufs:/dev/da0p2 right? Can you clarify this da0 or ad0 naming difference for me? SirDice stated da0 for SAS/USB hard drives for SATA hard drives ada0. Where is this ad0 hard drive name come from? I think you mentioned before that you hadn't seen that before.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,098
Messages: 26,991

#20
At the top of your gpart show output it's showing da0, so that should be the correct device name. As it's the only drive that's shown ( gpart show typically shows information for all known drives, regardless if they're SAS/SCSI/SATA/IDE/USB). The only thing that's still a bit unclear is which partition from da0 is the correct partition to boot from. Most of the time it's going to be the first freebsd-ufs partition, so it's a safe assumption da0p2 is the partition you need to boot from.
 

k.jacker

Well-Known Member

Thanks: 205
Messages: 400

#21
Totally right, that's what I assumed.
The naming difference occurs because the device names are not related to the disk (in most cases) but to the controller it is connected to.
So if you take a disk from an sata controller (where it will be adaN) and move it to an external usb enclosure it will become daN.
I said, not related in most cases, because you can of course not move an old parallel SCSI disk to e.g. an sata controller.
I don't know what type of controller /dev/adN relates to but as tobik@ mentioned it's from before FreeBSD 9.x but I can't remember.

tobik@ thanks for making me a newby :D I'm in reality on FreeBSD since 4.3 I just have bad memory as it seems.
 

antoniog120

Member

Thanks: 3
Messages: 81

#22
At the top of your gpart show output it's showing da0, so that should be the correct device name. As it's the only drive that's shown ( gpart show typically shows information for all known drives, regardless if they're SAS/SCSI/SATA/IDE/USB). The only thing that's still a bit unclear is which partition from da0 is the correct partition to boot from. Most of the time it's going to be the first freebsd-ufs partition, so it's a safe assumption da0p2 is the partition you need to boot from.
Ok SirDice so since gpart show only shows da0 that is the drive to boot from. I created and restored the root parition on da0p2. I will follow k.jacker and your advice SirDice when I work with this server this evening.
 

antoniog120

Member

Thanks: 3
Messages: 81

#23
Totally right, that's what I assumed.
The naming difference occurs because the device names are not related to the disk (in most cases) but to the controller it is connected to.
So if you take a disk from an sata controller (where it will be adaN) and move it to an external usb enclosure it will become daN.
I said, not related in most cases, because you can of course not move an old parallel SCSI disk to e.g. an sata controller.
I don't know what type of controller /dev/adN relates to but as tobik@ mentioned it's from before FreeBSD 9.x but I can't remember.

tobik@ thanks for making me a newby :D I'm in reality on FreeBSD since 4.3 I just have bad memory as it seems.
k.jacker and SirDice I followed your instructions to the letter and I still receive the same error message? Still receiving this message after everything is correct makes no sense at all to me. Do you have any other opinions about this matter or how to resolve it since I do not see anything left to do here?
 

Attachments

k.jacker

Well-Known Member

Thanks: 205
Messages: 400

#24
Still receiving this message after everything is correct makes no sense at all to me.
Remeber your system has several problems, from broken GEOM raid to GPT corruption and the partition layout is none standard.
In addition you don't know much about that system and we do not neither.
This can result in a process that takes some time to figure out. It's just like that.



Since /dev/ada0p2 doesn't seem to be partition to boot from, I don't see another way then
to boot into a live shell again and try to mount all that partitions one by one and take a look what they contain.One last thing you could try before mounting the partition by hand is gpart show -l to see if the partition have been labeled.

If you stumble onto the / partition write down it’s device name. Should you first stumble over /etc (in case it is on a separate partition) take a look at the fstab to get an idea of the partition layout.
That said, we can only guess the layout of your disk.

Boot a live shell and then start by mount /dev/da0p2 /mnt and ls /mnt. I would then write down whats on it and umount /mnt.
The same process with the next partition (/dev/da0p3) and so on.
 

antoniog120

Member

Thanks: 3
Messages: 81

#25
Remeber your system has several problems, from broken GEOM raid to GPT corruption and the partition layout is none standard.
In addition you don't know much about that system and we do not neither.
This can result in a process that takes some time to figure out. It's just like that.



Since /dev/ada0p2 doesn't seem to be partition to boot from, I don't see another way then
to boot into a live shell again and try to mount all that partitions one by one and take a look what they contain.One last thing you could try before mounting the partition by hand is gpart show -l to see if the partition have been labeled.

If you stumble onto the / partition write down it’s device name. Should you first stumble over /etc (in case it is on a separate partition) take a look at the fstab to get an idea of the partition layout.
That said, we can only guess the layout of your disk.

Boot a live shell and then start by mount /dev/da0p2 /mnt and ls /mnt. I would then write down whats on it and umount /mnt.
The same process with the next partition (/dev/da0p3) and so on.
k.jacker to your response the only problem I am aware that this system has is that I am unable to mount the root filesystem to complete the boot process. This is the last stage in the boot process according to the freebsd.org handbook after this I should receive a multi-user prompt to login. There is no broken geom nor is there any GPT corruption I addressed those problems earlier and no corruption was found. What is non-standard about this parition layout? I used GPT to create 15 paritions I do not know what is not standard about that. The /dev/da0p2 is the root parition that is what this error message says is the problem and the one I should mount. Why are you using the ada0 controller/drive names again in your response? We've already concluded that da0 is the correct drive/controller name to use from the gpart show output so I do not know why you are bringing that up again when I received the responses from you and SirDice. I even looked up the FreeBSD device names in this book I have "The complete FreeBSD" by Greg Lehey and in that table it only lists da0 and wd0 as FreeBSD hard drive/controller device names as SirDice mentioned earlier. I already verified the data on the partitions when I did the restore and it's fine before I even posted on this board. This error message doesn't say anything about data corruption or files missing. What exactly do labels have to do with this error message? The /etc/fstab file already has the correct devices that was the suggestion of this message and I've already done that. Why do you need to know the entire layout of my disk? This error message only pertains to the root partition. We already know what the root parition is /dev/da0p2. That last statement you made I've already done when I completed the restore before I even posted on this forum. If you look at that screenshot that I posted everything is correct and root partition still does not mount. Aside from these statements I made in response to you telling you I already addresses these problems do you see anything else missing in those error message suggestions because I do not. Look forward to your response.
 
Top