1

File system is mounted readonly, so I boot into recovery mode to run fsck, and I get the following message:

mountall: /lib/i386-linux-gnu/libc.so.6: version 'GLIBC_2.17' not found (required by /lib/i386-linux-gnu/libudev.so.1)

... so I'm thinking, it failed to completely download a package. Well, I'll update the dpkg... except the network is not enabled.

... so I enable the network, to get a message:

failed to open lockfile...

of course, because it's a readonly filesystem.

How do I get around this catch-22?

This is on an ESXi instance, if that matters.

4

2 Answers 2

1

I presume you do not have a backup. First make a backup. Use Clonezilla and create an image. You can do more damage if you try to repair things.

Make sure you have enough disk space before proceeding

Now to repair your installation, you have a couple of options:

  • boot a Ubuntu live CD and chroot into the root folder of your install, and install the proper glibc dpkg
  • Upgrade install of Ubuntu over the current one.

Or you could just create a new VM. Install Ubuntu, then migrate the applications and configs from the old one. Use a live CD to access the broken VM. Document everything and configure backups.

3
  • How would I do an upgrade install over the current readonly FS? Aug 4, 2014 at 15:11
  • @JeremyHolovacs When you boot the ISO image and choose "Upgrade" it will mount the filesystem read-write.
    – bain
    Aug 4, 2014 at 15:53
  • @bain I don't see an upgrade option. I see Install Ubuntu Server, Multiple server install with MAAS, check disc for defects, Test memory, Boot from first hard disk, and Rescue a broken system. The "rescue" option seemed most likely but did not seem to offer a "repair file system" option like I was hoping for. Aug 4, 2014 at 15:59
0

Thanks to @bain, I got on the right track by downloading the Live CD iso, and mounting that in my VM, booting up my machine in "trial" mode, and doing the following:

  • First, I opened a terminal window with ctrl-alt-t
  • Changed my login to super user with sudo su -
  • Installed the LVM management tools with apt-get install lvm2
  • Started the logical volume manager with vgchange -a y dev. This created two references to my LVM volumes in /dev/mapper, with the names of dev-root and dev-swap_1. Obviously I was more interested in /dev/mapper/dev-root.
  • I ran fsck /dev/mapper/dev-root and got back a clean FS (? I wasn't expecting that)
  • I created a mount point with mkdir /sda5 (which is probably more confusing than necessary, but I knew the data I wanted was on sda5)
  • I mounted the FS with mount /dev/mapper/dev-root /sda5
  • I was then able to traverse my FS and grab the stuff I wanted.
  • Then I blew it away and rebuilt the thing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .