Ubuntu question - any Unix guru out there?

Page may contain affiliate links. Please see terms for details.

Gollom

MB Enthusiast
SUPPORTER
Joined
May 10, 2006
Messages
9,606
Location
Preston, Lancs
Car
S204 C220CDi Sport ED125 (Mr) Kia Picanto Domino 1.1 (Mrs)
Just installing Ubuntu on an old laptop for the first time and need to check/repair the hard disk as it may on it's way out and I suspect some bad sectors.

So need to run a disk check using fsck but to do this I need to "sudo umount /filesystem"

How do I determine the filesystem name? The instructions say use "mount" then look for something like "/dev/mapper/vg0-home on /home type ext3 (rw)" which means the filesystem is called "/home" but I can't see anything that helps.

Or anybody know of an easier utility to use?
 
Assuming you have only one filesystem then you're trying to check tyhe one fromn which you'd run fsck.

Ubuntu will do this on reboot if you:

sudo touch /forcefsck
sudo reboot

However fsck just checks the high level organsiation of the data on duisk. To check the drive you'd be as well getting some 'smart' monitoring utiklity to find out what the drive is doing. That's because modern drives can hide bad sectors and some errors.

Look for something like 'smartmontools' if there's nothing already installed.
 
Don't fsck a mounted filesystem. If you only have a root (and boot) filesystem create a 'live disk', boot to that, and run the fsck on the unmounted filesystem.

Edit. Read this a bit more.
To find which filesystems you have and where the mount points are issue the 'mount' command - this will tell you what to fsck.
The mapper/vg000 malarkey is because you are using a logical volume manager. This is a good thing :)
 
Last edited:
Just installing Ubuntu on an old laptop for the first time and need to check/repair the hard disk as it may on it's way out and I suspect some bad sectors.

So need to run a disk check using fsck but to do this I need to "sudo umount /filesystem"

How do I determine the filesystem name? The instructions say use "mount" then look for something like "/dev/mapper/vg0-home on /home type ext3 (rw)" which means the filesystem is called "/home" but I can't see anything that helps.

Or anybody know of an easier utility to use?

You shouldnt fsck a mounted filesystem unless you are really sure you know what you are doing.

Use the df comand to see whats mounted. If its a filesystem that isnt mounted then look in /etc/fstab which should list all the filesystems and types that are available.

I regularly used to use fsck -f -y to repair corrupted filesystems but this was on filesystems I had backups of.
 
You shouldnt fsck a mounted filesystem unless you are really sure you know what you are doing.

Use the df comand to see whats mounted. If its a filesystem that isnt mounted then look in /etc/fstab which should list all the filesystems and types that are available.

I regularly used to use fsck -f -y to repair corrupted filesystems but this was on filesystems I had backups of.

It is more the disk I need to check/repair as I think there may be some bad sectors. And the owner of the laptop is too tight to shell out £25 or so for a new disk!
 
Fsck -n should do a check without rewriting anything.
 
What's that GUi thingy? Looks a bit complicated to me.
 

Users who are viewing this thread

Back
Top Bottom