~ overflow ~

Tag: umount

umount note

by z3n on Apr.20, 2010, under Linux Happyness, Tips & Hints

I had to umount a drive but it wasn’t working, not even with -f (force) option.

So i looked man pages and found out about lazy option (-l) which solved the issue;


umount -l /path/to/mount/point
Leave a Comment :, , , more...

How to format a disk on linux

by z3n on May.25, 2009, under Linux Happyness

Problem:

So you got that old ass windows disk and want to get rid of windows at once or you just want to format a disk on ext3 since it’s so much better than ntfs/fart32

Solution:

I must say that i wasn’t expecting anything easy as format c: , but this was so much more fun.

First you need to umount the disk you want to format, for me it was a issue, i’m using samba (smb) to share the disk, so i had to stop smb service before umounting it. Make sure you do that first, if you don’t you will fall into funny errors.

Then you need to create new parttitions or remove the old ones using fdisk, if you are familiar with old DOS and windows fdisk CLI this shouldn’t be a problem.

fdisk commands are easy:

p – lists the partittion tables

n – creates a new partittion

d – deletes an partittion

w – write changes (if you don’t write changes before quitting nothing will be changed)

t – file system type

in order you should d all the partittions you don’t want and n a primary or secondary one, depending on your case.

After that you need to choose a file system with t, i like the 8e which is linux LVM, you can also try 83 the default linux one.

Then you do w and quit.

You might see some warnings/notices about kernel only seeing the right partittions after reboot, that’s right, no need to worry.

Now that you created the partittions you need to format the disk with mkfs -t <format> /path/to/dev , format could be a bunch of things, i like ext3.

As recommended by many of the sources i saw, you should do a disk check, it’s importaint, specially when you have an old ass disk that could be broken by windows or time usage.

fsck -f -y /path/to/dev

this will fix and answer yes to all questions.

You should reboot your system in order to kernel regonize the new partittions, however, in my case the partittions i did were the same size just different file system, from fart32 to ext3, for me it worked fine without rebooting.

Sources:

eHow (Warning: spammy site)

Leave a Comment :, , , , , more...

fsck on a partittion in use?

by z3n on May.13, 2009, under Linux Happyness

Problem:

You need to run fsck, however, the partittion in question is in use and you can umount it cuz it’s the same partittion of the critical linux files are.

Solution:

You need to boot into single-user mode, I’m using GRUB so that’s how you do:

GRUB will wait 3 seconds before booting, press enter and edit the linux entry (e) you will see a line that theres a kernel on it, edit this one (e) and in the end, put single

press b to boot and done, linux will boot on a minimal resource mode, wich will allow you to umount anything, then finally run the fsck.

Related commands:

umount -f /dev/… (to forcefully umount a device)

fsck -pyvf /dev/… (to check a device, fix, yes to all queries, verbose mode and force even on clean devices)

Sources:

RedHat Manual

Unix.com

Leave a Comment :, , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!