[NTLUG:Discuss] systemd, mbr boot record recovery, but now can't mount anything (?)
Leroy Tennison
leroy.tennison at verizon.net
Thu Jul 30 00:31:09 CDT 2015
Well, after starting to write I see the problem is solved - and was due
to the same thing which has happened to me, maybe a little additional
information will help someone else. I've booted to emergency mode twice
(openSuSE 13.1), both times (once each on two machines) it was due to
fstab. First time I had reformatted a partition to NTFS, probably from
ext3 or 4, to make a shared partition for that other OS. Needless to
say, that changed the UUID which had to be fixed in fstab.
Second time I had dd'ed a 160GB drive onto a 1TB drive and fstab was
using /dev/disk/by-id/... Of course, the drive model changed. However,
even replacing the drive model with the new one didn't help, had to
switch to UUIDs. In both of my cases I booted to a DVD and was able to
mount partitions and gather information using blkid.
Point of all this is that no method of referencing partitions is safe:
Both /dev/[hd?|sd?] and /dev/disk/by-id/ are vulnerable to hardware
changes. UUID is vulnerable to partition changes. If only we had a
better way, maybe systemd v2 (I'm JOKING, I fully despise systemd for
the same reason Chris does).
One other option had you needed it would have been to get a trial
version of a disk recovery program and see what that tells you. I did
this a few years back and discovered the partition contents were
thoroughly scrambled. The trial only allowed reading but that was
enough to discover that buying it was useless because there was nothing
significant to recover. In that situation what I finally discovered the
hard way was that something on the motherboard was trashing drives
(first troubleshooting step was to swap drives, then it happened again a
month later, new motherboard and the problem disappeared).
On 07/27/2015 03:09 AM, Christopher Cox wrote:
> So, I needed to reconstruct my boot record. I booted into rescue mode
> and mounted my root (/mnt), mounted (bind) the special dirs: dev, proc
> and sys and then did a chroot to /mnt.
>
> Then I could recreate a grub2 grub.cnf file with grub2-mkconfig. I
> then wrote a new grub using grub2-install.
>
> No errors.
>
> On boot, it starts to load by the goes to emergency mode (systemd) and
> I see my / is mounted ok, but the reason for the failure was because
> none of the other filesystems would mount. Swap won't mount, and my
> /home won't mount. In fact, nothing will mount even in "emergency"
> mode. Nothing will fsck either.
>
> All attempts to get at filesystems for mounting or doing an fsck says
> "no" because "it's already mounted" or "it's busy"... but nothing
> except / is actually mounted.
>
> (I am sooooo very glad that booting is a complete mess now)
>
> Anybody else have this happen to them and figure a way out?
>
> You won't have this issue unless you're on a newer system using
> systemd and grub2 (IMHO).... In this case it's openSUSE 13.2.
>
> Hints welcome.
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>
More information about the Discuss
mailing list