LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I format a second HDD (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-format-a-second-hdd-823977/)

jacatone 08-03-2010 07:59 PM

How do I format a second HDD
 
I'm running Ubuntu 9.10 Main. I installed a second backup HDD to my system which is formatted in NTFS. Ubuntu sees it OK, but I'd like to format it in ext 3 or 4 as well.

Gparted does see it but only gives me formats like win98,beOS, and sun as a default format. If I try to unmount it I get: "Unable to unmount location. Daemon is inhibited." If I select load into terminal it shows: "/media/14G Western Digital HD$". Is there a way to format it within the command line? Thanks.

kaz2100 08-03-2010 08:13 PM

Hya,

fdisk, mkfs will be your friend.

Happy Penguins!

jacatone 08-03-2010 08:17 PM

I was able to format it with ext 4, but when I try changing the permissions (say's I don't have it), with sudo chmod 777 I get "chmod: missing operand after `777'". How do I fix this?

GrapefruiTgirl 08-03-2010 08:18 PM

chmod requires arguments - check the man page for proper syntax.

jacatone 08-03-2010 08:49 PM

I did. Didn't find the answer. Anyone know it?

GrapefruiTgirl 08-03-2010 08:54 PM

Here's an example:
Code:

sasha@reactor: touch BLARG
sasha@reactor: chmod 777
chmod: missing operand after `777'
Try `chmod --help' for more information.
sasha@reactor: chmod 777 BLARG
sasha@reactor:

Did you specify what to chmod? :)

jacatone 08-03-2010 10:50 PM

"BLARG"? I don't know what an operand is. I just want to make my backup HDD accessible. Right now it just says I don't have permission to copy files to it. Why does this have to be so complicated?

krasl 08-03-2010 11:12 PM

Using chmod: you first specify the permissions you wish to set. In this case, 777 (readable, writable, executable by everyone).
After that, you specify the file or directory to which these permissions are to be applied.

For example, if you have mounted your hard drive as /mnt/hd2, you could change permission to that drive by:
sudo chmod 777 /mnt/hd2

If there are files on the drive, you could recursively change all their permissions to 777 simultaneously by:
sudo chmod -R 777 /mnt/hd2

NOTE: it sounds like something isn't right if you have formatted the drive as ext4 but are not able to access it. Did you mount it after creating the filesystem?
sudo mount -t ext4 /dev/[device name here] /mnt/[directory to mount into]
replace [device name here] with the device name for this hard drive (you can get a list of devices with 'sudo fdisk -l'
replace [directory to mount into] with the directory you want to attach the drive to. (create this directory first!)

BTW: an 'operand' is just a bit of information which is fed into a command. "An input value or parameter."

jacatone 08-04-2010 12:39 PM

It auto mounts. When I right click to "Open in Terminal", it shows as "jacatone@Dell /media/c5f7e03b-2c9c-4c76-abb1-a51ed7e05a14 $". So, what operand would I use to make it accessible? BTW, it has a Lost and Found file in it already. Thanks.

tealio 08-04-2010 01:30 PM

Try
Code:

sudo chown -R yourusername:yourusername /path/to/mount/point

jacatone 08-04-2010 06:11 PM

Thanks tealio, that did it.


All times are GMT -5. The time now is 01:53 AM.