When working with a Linux partition in BootIt BM, Image For Windows, Image For DOS, or Image for Linux, you may get one of the following error messages when attempting to perform an operation -- such as imaging, copying, sliding, or accessing Properties/Details:
The 'data only' request failed because the file system could not be mounted
Unable to mount the file system
Drive not ready
These error messages can occur for essentially two reasons:
- The partition is not yet formatted (meaning there is no file system to mount). When a Linux partition is created in BootIt BM, it will not be formatted until that is later done from within Linux, or while installing Linux. BootIt BM does not format Linux partitions.
- There was a problem found with the file system which prevented it from being safely mounted and accessed for the requested operation. One common reason for this is that the partition was not unmounted after it was last used (due to power failure, forced reset etc.). That will leave the clean/not clean flag in the superblock set to 'not clean', which in turn will result in one of the above error messages. However, the error messages above can also be the result of other problems detected in the file system's superblock.
In the vast majority of cases, the problems described in (2) above will be corrected by running the appropriate file system checker for the file system involved - which for Linux will typically be either Ext2/Ext3/Ext4 or ReiserFS. There are a couple of ways to go about doing that, depending on circumstances and preference:
- Boot from an alternate Linux system and run the file system checker manually. This will work in all cases and is generally the safest way to proceed because you are assured of working under more controlled circumstances (because there will be no automatic file system checks on boot). Typically this means booting from a Live CD or DVD (such as Knoppix) or a floppy disk that contains the Linux file system utilities. Booting from a second Linux installation on the hard drive is another option, if available.
- Boot Linux normally and let it run the file system checker automatically. This will work for any partition that is automatically mounted on boot and whose current status is 'not clean'. In that case, the Linux boot scripts (init scripts) will detect that status and automatically launch the appropriate file system checker to correct any problems found and restore the status to 'clean' (assuming all problems found can be fixed). The automatic check will not occur for any partition that is marked as 'clean' (even though it could still have problems) or any partition that is not automatically mounted on boot. Of course, in those cases you still have the option of running the file system checker manually after booting, assuming that the partition is one that is not required to be mounted. The root partition, for example, always needs to be mounted.
How To Run The File System Checkers Manually (requires root privileges)
- Make sure the partition is NOT mounted by running either the df command, or the mount command. Both commands will show you which partitions are currently mounted.
- If the partition is mounted, you can attempt to unmount it with the umount /dev/hdxx command, where hdxx is the partition in question (such as hda1, hda2, etc.). Note that the spelling of this command is umount, not unmount. If the partition can not be unmounted, you will get a 'device is busy' error message -- in that case, it will be necessary to boot from an alternate Linux system, such as a Knoppix Live CD.
Note: Depending on the version of Linux and the type of drive, sdxx may be used instead of hdxx. For example: /dev/sda1
- Run the appropriate file system checker.
For Ext2/Ext3/Ext4: e2fsck -f /dev/hdxx (see additional notes below)
e2fsck -f /dev/sdxx
For ReiserFS: reiserfsck /dev/hdxx (see additional notes below)
Additional Notes For Working With Ext2/Ext3/Ext4 Partitions:
e2fsck /dev/hdxx -- the basic command that will check the file system only if the clean/not clean flag in the superblock indicates 'not clean'. Adding the -f option (as shown above) forces a check, even if the superblock status is 'clean'.
e2fsck -fn /dev/hdxx -- the 'n' will cause the file system to be opened read-only and it will automatically answer no to all prompts to fix problems. This can be used to determine the extent of the problems, without actually making any changes to the file system.
e2fsck -fy /dev/hdxx -- the 'y' will cause an automatic answer of yes to all prompts to fix problems, instead of having to answer each prompt manually.
tune2fs -l | less -- will display the superblock data, including the current clean/not clean status. No changes to the file system will be made (the l is a lower-case L).
Additional Notes For Working With ReiserFS Partitions:
reiserfsck -y /dev/hdxx -- the 'y' eliminates the need to type "Yes" to perform the check.
debugreiserfs /dev/hdxx -- will display the superblock data, including the current clean/not clean status. No changes to the file system will be made.
Additional Notes For Knoppix:
When booting the Knoppix CD/DVD, typing knoppix 2 at the boot prompt will take you directly to a root console, without loading X Window desktop.
If you need (or want) to mount a partition from the root console, it is suggested that you first create a new directory and then mount the partition there as shown below. This ensures that you get the partition mounted with the mount options you want, without interference from the contents of /etc/fstab.
mkdir /mydirectory (creates directory)
mount /dev/hdxx /mydirectory (mounts partition read-write)
mount -o ro /dev/hdxx /mydirectory (mounts partition read-only)
umount /dev/hdxx (unmounts partition)