[systemd-devel] Cannot mount anything after recovering and redoing boot mbr

ccox at endlessnow.com ccox at endlessnow.com
Tue Jul 28 15:39:56 PDT 2015


> On Mon, 27.07.15 16:35, ccox at endlessnow.com (ccox at endlessnow.com) wrote:
>
>> > On Mon, 27.07.15 01:18, Christopher Cox (ccox at endlessnow.com) wrote:
>> >
>> >> I suspect that somebody here knows why, but all mounts now fail...
>> well
>> >> all but /.
>> >>
>> >> Has anyone run across this before?  What did I miss?
>> >>
>> >> I accidentally messed up my boot mbr. and I did a rescue cd and
>> chroot
>> >> in
>> >> order to rerun grub2-mkconfig and do a grub2-install.
>> >>
>> >> Now the system boots to a grub menu and tries to boot, root fileystem
>> >> mounts
>> >> but all other mounts fail so goes into "emergency" mode.  From that
>> >> shell I
>> >> cannot seem to mount anything, they all fail saying that whatever I'm
>> >> trying
>> >> to mount is already mounted or it's "in use".  I can't fsck umounted
>> >> filesystems either.  They all say "in use".
>> >
>> > Maybe your changed the order of your partitions or changed their
>> > partition UUID? If so, then /etc/fstab will reference incorrect
>> > partitions now. Make sure bring /etc/fstab into sync with your actual
>> > partitions.
>>
>> A "root" is getting mounted and I figure it's the same but will double
>> check (away from system right now).  Would some kind of root getting
>> mounted at startup and being different from root in /etc/fstab make some
>> sort of difference?
>
> Nope, mounted is mounted. systemd doesn't really care where something
> is mounted from, it only cares whether it is mounted at all. And the
> mount source it will only use if it needs to mount something because
> nobody else has mounted it yet.
>
>> Would that cause manual mounts of old style nonportable dev
>> shortnames (e.g. mount /dev/sda7 /mnt) to fail with the error of
>> "busy" when done at the command line? (from emergency shell).
>
> Well if you use references such as /dev/sda7 then you are of course
> very vulnerable to partition renumbering if you redoo your partition
> table. Use /dev/disks/by-uuid/ and you should be safe regarding that.
>
> Lennart

Thanks Lennart.  It did turn out that the upgrades to this host over the
years...  that the switch from "ata" names to "scsi" names happened (not
sure why it worked before though).  Once I changed the names from
"ata-blah" to "scsi-blah" in /etc/fstab, all came back to normal.  So
thanks for the tip.

But why would having a failed mount due to a bad name in /etc/fstab cause
nothing to be mountable?  Not even foreign objects could be mounted...
(that is things the system hadn't seen before).

It was an adventure to be sure...   Very cryptic.  Not like
troubleshooting from a couple of years ago.







More information about the systemd-devel mailing list