1 (edited by SkyMeadow 2012-02-27 01:48:17)

Topic: [SOLVED] Failed to mount, enclosing drive for the volume locked

Running gparted from Salix 13.37 LiveCD.  Please be kind; I'm a total Linux newbie but have spent days reading Linux doc and searching for help for my specific issue.

The hard drive had a Windows NTFS partition 26.91 GiB called IBM_PRELOAD. Plus a small partition for HW diagnostics, creator and purpose unknown.  I wanted to define 4 Linux partitions and keep/resize the Windows NTFS partition.  Could not resize the NTFS partition, as Min and Max sizes were the same.  gparted reported the drive had at at least 3 bad sectors and said what to do (but like an IDIOT I failed to write this down). 

I decided it would be easier to simply blow away the NTFS partition and start clean with Linux only.  I assumed gparted (like Windows fdisk?) could test the drive, mark bad sectors, and do low-level formatting and build a new partition table.  (This assumption may  have been a poor one.)  I selected my Linux partitions sizes, set one as type=swap.  gparted completed 2 of the 4 operations then reported

Failed to mount "%"
The enclosing drive for the volume is locked.

I retried by deleting all partitions except the swap which seemed to be OK.  The same error appeared, this time in addition reporting

Failed to mount "%home"

I studied the Details screen which said "all operations successfully completed" and it listed

Delete /dev/sda1 (ext2, 4.88 GiB) from /dev/sda
Create primary partition #1 (ext2, 4.89 GiB) on /dev/sda
Create primary partition #2 (ext2, 14.65 GiB) on /dev/sda
Create primary partition #3 (ext2, 7.91 GiB) on /dev/sda

I saw no errors in the pull-down details under each operation (but failed to write down all the info provided).  Didn't realize the difficulty of saving details when there is no filesystem other than in memory and didn't realize the importance of writing down all details. 

Then I tried the Salix Installer, gave it all the parameters requested including partition details, it invoked gparted and no errors were reported, and the installation proceeded for about 30 minutes reading the liveCD and writing to the drive (apparently).  The installer then hung and did nothing further and was unresponsive. 

I rebooted and invoked gparted.  Some of the partitions shown graphically appeared to have a small amount of data written to them? (the color was shown partially filled in, I'm not sure what this indicates). 

I tried the Salix Installer again to no avail, same hang after about 30 minutes of intense CD-ROM activity.

Bear in mind I'm a Linux newbie and not familiar at all with Linux console commands.  (Please be kind!)  I wondered if there was a partial file system on the drive that I could access from the graphical file system manager.  That gave me access only to files on the CD-ROM, not the hard drive.  I shut it down for the night (as we are off the grid, and house power is off overnight).

-----------------------

I don't have a Windows recovery disk for this 2003 ThinkPad T23.  It used to be Windows XP Professional SP3 running in a single NTFS partition created by Windows.  I have a Windows recovery disk for a different laptop with newer hardware but have not tried it yet.

Researched the Linux fdisk command to see if fdisk can check the hard drive for errors, mark bad sectors, and low-level format before attempting to repeat partitioning operations. 

At this point some suggestions from people who know what they're doing would be really appreciated.  I don't expect to recover the Windows NTFS partition.  I just want to install Linux on this machine. 

Thank you.

Sky

2

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

It is possible that the hard drive is starting to fail.

Many hard drive manufacturers provide testing software on their web sites.  You might want to download this software and test your laptop hard drive.

Please note that the testing software often overwrites the data on the drive, so if you have any data at all that you want to keep then be sure to back up the data first.

The reasoning behind testing the hard drive is to ensure that the drive is healthy enough to support an operating system.  Otherwise you could end up wasting time on a hard drive that is no longer reliable.

3

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

This looks interesting  http://www.ultimatebootcd.com/ - freeware and lots of utilities that look good.  Haven't tried it yet. 

I am trying a set of Windows "Rescue & Recovery" CDs from a different Win XP/Pro ThinkPad -- because I had them :-) -- to see if I can put enough Windows software back onto this machine to thoroughly test and clean up the hard drive.  My goal is to put the drive back into a good state, then try the Linux install again. 

Before trying this I played around with the 4 partitions to see if one in particular spanned the bad sectors, and maybe I could guess which area of the drive to leave unallocated.  A binary search approach would take an awful long time.  Anyway if it's something wrong with the partition tables, not sure it would be possible to avoid the problem by leaving specific physical areas of the disk unallocated. 

It was weird -- the Linux install had written some 3.4 GB of filesystem data to several partitions of the drive, even though it reported they could not be mounted. 

Thank you,
Sky

4

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

The Windows recovery disk pretended to do a lot of work, and wrote some 4.05 GB to a special FAT32 diagnostics partition labelled IBM_SERVICE (I presume containing the Rescue & Recovery apps).  It also created a large bootable primary FAT32 partition for Windows.  But it wouldn't actually boot Windows -- probably because the R&R disks I had did not quite match the hardware?  The boot hung after loading a particular device driver.

I tried Salix 13.37 liveCD boot again, ran gparted as before, with basically the same results.  "Cannot mount ---, the enclosing drive for the volume is locked".  This time I wrote down ALL the Details output by gparted, with respect to the creation of one of the 4 partitions for Linux.  gparted reported all operations successfully completed -- but then we got the fail-to-mount errors for several of the partitions.

So I am backpedalling and downloading the bootable CD-ROM utilities linked above and hoping there is  drive-specific utility that will save my old 30GB ThinkPad drive (because I can't get really another one).

Meanwhile if anybody thinks they could help if I provided the Save Details, say so and I'll type it all in. 

Thank you.

Sky

5

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

gedakc wrote:

Otherwise you could end up wasting time on a hard drive that is no longer reliable.

Well I already have wasted about 3 full days of time but I'm retired so....  The drive was working fine with Windows XP Pro on it, for the limited set of apps I was using it for (ham radio programs).   

The point is not about wasting time but that any time spent is time well spent if I am starting to learn some things about Linux.  However as a pragmatic retired SW engineer, the light at the end of the tunnel would be to have a system that can again serve in some useful capacity. 

Sky

6

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

Hello gedakc and others interested in solving this puzzle.

I pulled the drive to see what's written on the label: model, part number, cyls, heads and sectors per track.  Then I used utilities on the "Ultimate Boot CD" (link above) to thoroughly test the Hitachi drive.  The utility recognizes the drive model number so I am pretty confident it is the right set of tests made by the drive's manufacturer. 

The Quick Test reports operation completed successfully, code 0x00. 
The Advanced Test works a lot longer but eventually reports the same -- success, return code 0x00. 

Not sure what to try next.  Wipe the drive, try several other partition managers (several are included on the CD), ...

All ideas and expertise welcome....

Thank you.

Sky

7

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

You might try overwriting the entire drive with zeroes.  This might take several hours on a large disk drive.

Note that this will wipe out any data on the drive!

The GNU/Linux command is:

dd if=/dev/zero of=/path-to-disk-device bs=512

Where /path-to-disk-device is something like /dev/sda.

Be sure to pick the correct disk device!

Another option you might try is to use GParted Live.  The latest stable release is 0.12.0-2, and enables all of the features of the GParted application.  Using this version might help if the one on Sabayon is missing any of the GParted requirements.

8

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

Sorry, our posts crossed in the night and here I am reporting on what I did before last night's sleep. 

After taking several further steps with hard drive utilities, gparted still reports "Failed to mount - The enclosing drive for the volume is locked".  Here's what I tried before going to bed last night. 

  • A drive erasure utility called PC Inspector e-MAXX was used to write zeros to all 58605120 sectors of the drive from starting LBA:0 to end LBA:58605199.  This completed without error.  The utility identifies the drive as Model: IC25N030ATCS04-0 with Serial: CSH308DHHGSZ1B.

  • A utility called Feature Tool v2.15 (IBM/Hitachi) inspected the drive's CMOS settings and can change these settings.  I did not make any changes to these.

  • A utility called Ranish Partition Manager read the partition table and found something that I thought was rather strange.

# What                       Cyl Head Sec  Cyl Head Sec    Size KB
0 Master Boot Record   0    0       1     0     0    1         0
1 Pri Unused                 0    0       2   3875  239 63
2 >Pri 4 Hidden (0xFF) 284058 164 4  284058 164 2    2,147,483,647

  • Do you see that?  There is a partition whose end is less than its start, that indicates a size of >2 TB (but this is a 30 GB drive).  This partition does not make any sense.  Ranesh says the partition addreses are out of range; I agree!  So I cleared that bad partition and wrote the partition table to disk.  I rebooted, rechecked the drive, and the weird partition is gone.

  • Then retried the Salix liveCD installer, invoked gparted, defined the same 4  Linux partitions that I wanted, all operations completed successfully, but then again the

Failed to mount "%"
The enclosing drive of the volume is locked.

  • And the same mount failure occurs with respect to the swap partition and the /home partition.

  • I then checked the partition data written by gparted using the Ranesh utility, and it showed the same information that gparted had shown.  I.e. the partitioning looks perfect.

And now, I need to read posts that arrived overnight.   

Regards,
Sky

9

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

SkyMeadow wrote:

A drive erasure utility called PC Inspector e-MAXX was used to write zeros to all 58605120 sectors of the drive from starting LBA:0 to end LBA:58605199.  This completed without error.  The utility identifies the drive as Model: IC25N030ATCS04-0 with Serial: CSH308DHHGSZ1B.

It seems strange that the utility to overwrite the drive with zeroes failed to overwrite the partition table.  This is odd.

10

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

Hmmm, you have a good point there.  My notes do not reflect my doing anything between the PC Inspector utility writing zeros to the disk, reading the CMOS, and checking the partition table with the Ranesh utility.  Frankly I do not rememer, though, if I tried to partition it again in between those steps.  In a nightmare everything sort of blurs together... :-) 

Well I need to try the Linux command to write all zeros to the drive.  I wonder if that will work even though the drive is not mounted?  I'll get that started and see how it goes. 

Thank you for your gracious and knowledgeable advice. 

Sky

11

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

SkyMeadow wrote:

Well I need to try the Linux command to write all zeros to the drive.  I wonder if that will work even though the drive is not mounted?

The drive should not be mounted when this command is issued.

12

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

Last night I ran the command to overwrite the entire drive with zeros, to completion (84 min.) and the result was "30 GB copied, 5057.35s, 5.9 MB/s". 

(I don't have the gparted live distro - didn't find it on a torrent - can't download such a large file without bandwidth  management or my satellite ISP reboots the modem to punish me)

  • I booted the Salix LiveCD distro and ran gparted.  It showed the entire drive unallocated, with size 27.95 GiB (I expected to see 30.0 GB), total sectors 58605121 agrees with the sector count shown by utilities.

  • The partition table did not exist - had been completely overwritten, as expected.

  • I created a partition table of the default type, MS-DOS.  Success.

  • I defined primary partition #1 4.88 GiB, type ext4 filesystem, for my linux root.  Success.  No messages pertaining to mount, no error messages.

  • I created a 512 MB partition #2 for swap space, ext4.  Success.

  • Then the "Failed to mount "%", "The enclosing drive for the volume is locked" error messages started appearing as  before.

  • I studied all the Details under creation of each partition and no errors were reported and the sequence of steps looked normal and the sector counts etc.  looked normal as far as I could tell.

  • I deleted the new swap partition - success.

  • Then "Failed to mount "%", Enclosing drive for the volume is locked" appeared again.

Then I shut down and went to bed. 

I am now exploring the hypothesis that the Salix + Xfce Live CD distribution is too big for this PC's 256 MB RAM.  To test the hypothesis I am downloading a distro with smaller memory footprint - AntiX.  This download should be ready to try later today. 

This is a dandy Linux learning experience.  Hey - some people pay money to go to school and learn these things.  Here I am learning for free, at only the cost of sacrificing an old PC that may or may not resume a useful life. 

Best wishes,
Sky

13

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

It is certainly possible that your PC might be short on RAM for running Salix.

The GParted Live CD will run in as little as 128 MB of RAM.

14

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

It showed the entire drive unallocated, with size 27.95 GiB (I expected to see 30.0 GB)

27.95 GiB is the same as 30.0 GB. GiB is binary, GB is decimal. No lost space.

However, I think about this "3 bad sectors". Drives with hardware problems behave often strangely.
It seems that this hard drive model, even if it is labelled Hitachi, was designed by IBM in the old "Deathstar" era (the real name was Deskstar, but people gave this name because of the high failure rates). Due to these problems, IBM did withdraw from that sector and sold the hard drive department to Hitachi.
There is a related report in this link.

So, you could perhaps perform a deeper check of the drive surface, I mean test that destroys actual data on the drive.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

15

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

Further thoughts, on the "Failed to mount "%", "The enclosing drive for the volume is locked" error:
I found that this appears often with GParted running from within various Linux distributions, and suspected that it has to do with them rather than with GParted it self. They try to mount partitions. The GParted livecd doesn't mount any partition by default. So, it could be related to some "automount" feature in Salix. I already found it related to Fedora, Xubuntu, Ubuntu, and salinelinux.
The solution was to temporary disable the automount feature before running GParted. Look at the link, please.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

16

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

Thank you, class413!  The Salix+Xfce LiveCD full install is proceeding as we speak. 

Exactly as per the link you referenced, by turning off "automatically mount removable devices" and so forth in the Xfce Settings for Removable Devices and Media, then running gparted manually to create the partitions needed for install, then turn the "automatically mount..." settings back on, then running Salix Installer without modifying the partition scheme, no "Unable to Mount, drive locked" error messages were generated and it seems the installer is quite happy. 

I don't have a clue as to why the Thinkpad T23's internal hard drive is considered removable media, as it's not in the UltraBay and cannot really be removed dynamically while the laptop is running, but evidently that is how the device drivers/BIOS portray it to the O/S.  Possibly because power-saving settings exist which can power off the drive after a timer expires, therefore it would be necessary to treat the drive as temporarily being "away" from the system somehow. Or possibly because the same device drivers also support pop-out drives that ARE in the UltraBay. 

Again, I feel this IS the right solution to the problem.  After a few days of my barking up all the wrong trees, you nailed it.  Thank you very much!

Regards,
Sky

P.S. The title of this thread is not quite correct anymore, because there are NO bad sectors according to thorough diagnostics.

17

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

We are glad to hear that the problem is solved!
It is quite strange that this issue was never reported before, although it is already some years old. In fact it is related to the operating system rather than to GParted code.

The title of this thread is not quite correct anymore, because there are NO bad sectors according to thorough diagnostics.

So, you can fix the title by editing your initial post, remove "3 bad sectors" and add [SOLVED] to help other forum users with any similar problem.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

18

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

Done!

It just booted Linux from the HDD for the first time, kinda exciting!

There was one other install issue I'll mention here, as it may affect other users and distros.  The Thinkpad has various power-saving options in the BIOS with system parameters stored in CMOS and accessible either from BIOS setup, from Windows power management, or a Thinkpad system settings utility.  So depending on how these are set when you try to install Linux, you might run into this as I did.

I left the install running and went outside for a while.  When I came back, install had progressed about 60% but had stopped.  The screen blanking timer had blanked the screen, which came back when I pressed a key, but apparently some other timer had stopped the hard drive or some other internal peripheral(s) needed to complete the install.  The installer wasn't coded to handle this so it just sat there doing nothing.

I fixed it by rebooting into BIOS setup, and changing all power-saving parameters to ones that would not power off anything.  Then I repeated the Linux setup.  Just to make sure nothing happened, I sat by and pressed a key every 1 minute or so for the 45+ minutes it took to install full software package. 

Anyway this guess was apparently correct and the install completed without incident! 

Best wishes to all, and thanks again for your help and support.  Bye, and happy computing!

Sky

19

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

happy computing!

smile   smile

*** It is highly recommended to backup any important files before doing resize/move operations. ***

20

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

Yes, Happy computing.  smile

21

Re: [SOLVED] Failed to mount, enclosing drive for the volume locked

I had this problem too, on my HP Compaq nx9110 and thanks to SkyMeadow, gedakc and class413 it was resolved within minutes.
A big thank you.