Thursday, 24 July 2008

Viewing your Drives

sudo fdisk -l
(For posterity.) I forget this command.

And. Well. Forgetting this command is a little more understandable (I use it to mount my NTFS drive):
sudo mount /dev/hdb1 /media/kat120data/ -t ntfs -o nls=utf8,umask=0222
(all one line)

For those of you who don't know, drives connected with an IDE cable are listed as hda, hdb, (etc.) Their partitions have a number... for example, hda1, hda2, hda3... Drives that are connected via USB (external) or SATA (internal) connectors are labeled with 's', for example: sda1. There are a lot more filesystems than this, and they require different commands for mounting properly.

Be warned that NTFS drives (formatted under Windows NT or Windows 2000) don't necessarily have reliable write access under Linux. They're working on it. You can install some packages to mess around with it. Hard drives formatted with FAT32 (Windows XP, Windows 98, Windows 95...) have reliable read/write access when mounted in Linux.

Because of ext3 (Linux filesystem) benefits, I was really wound up to format my new USB external hard drive in ext3. Upon opening the box and reading the documentation, it is already formatted in FAT32. I've decided to leave it this way because I want my friends to be able to easily read the data off my drive (in case I cart it over to their place). Windows and ext3 don't intrinsically get along.

Most of us have only heard about FAT32 and NTFS, but the amount of computer filesystems is huge.

Sunday, 20 July 2008

CD Will Not Eject, Unmount (again)

Cliff's Notes:
- Close all applications that were referencing the DVD/CD (k3b, kaffeine).
- Close all Konqueror windows.
- use "pkill Konqueror", "pkill k3b", etc. in the command line for good measure.
- THEN try to eject your DVD/CD

Story:

Let. Go. My. DVD.

This time I get
umount: /media/hdd is not in the fstab (and you are not root)
Please check that the disk is entered correctly
I've just been burning DVDs like mad because my primary hard drive indicates it's failing while booting.

The last DVD seemed to burn, but produced an error at the end that it failed anyway. I re-loaded the DVD anyway and it popped up with the DVD name. I was able to open data on the disc. Soon after, I closed the pdf and pressed the button on the drive to eject. It wouldn't let me. The light is not on. The drive is not 'working' (no auditory indications that it is running). Ejecting the CD from the icon on the Desktop does not work and gives me the same error as well. Unmounting from there does the same. I did a search for this to come up with a command line solution.
eject
Will by default eject the cdrom. (By the way, the UNIX manual for eject is very well-written. "man eject | more"). I tried:
eject dvd
(with and without "sudo" beforehand) but it gave me an error
umount: /media/hdd: device is busy
umount: /media/hdd: device is busy
Error: umount failed
eject: unmount of `/media/hdd' failed
Is there a command line way to force the drive to "stop" so I can eject it? Due to advice here, ejecting via the desktop icon should work, so I have to make sure that all programs referring to the cd/dvd are not running. *rolls eyes*
pkill k3b
and then attempting to eject still gives me the same error. I was about to accuse them of being liars, but I started thinking "there can not possibly be another application locking up the DVD. " And then... "A Konqueror window opened when I loaded the DVD. But I closed that." And then... "but there is another Konqueror window open, listing the contents of my hard drive. That was open at that time, and it's still open now."

Huh.
I closed all my Konqueror windows.
I typed "pkill Konqueror" in the command line for good measure.
And yes, now the DVD will eject (via right-clicking the DVD icon on the desktop).