You are not logged in.

#1 2011-02-23 11:15:31

deF291
Member
Registered: 2010-12-15
Posts: 15

[Solved] how to partition my external hard drive?

I just got a new 750gb external hard drive and want to create 2 partitions on it with arch, but
sudo cfdisk /media/Iomega \HDD \750GB/
just tells me
"Opened disk read-only - you have no permission to write".

So how can I create an ext4 partition with 450 gb and another fat32 partition with 300 gb on it?

thanks for the help in advance
deF

Last edited by deF291 (2011-02-24 05:51:33)

Offline

#2 2011-02-23 11:21:50

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: [Solved] how to partition my external hard drive?

use the device (eg, /dev/sda), and not the mount point (eg, /media/movies)

Last edited by JokerBoy (2011-02-23 12:56:01)

Offline

#3 2011-02-23 12:07:42

deF291
Member
Registered: 2010-12-15
Posts: 15

Re: [Solved] how to partition my external hard drive?

thanks already, I thought so, but how can i see my device-listing?
I read it should work with fdisk -l but that doesn't seem to work for me since I don't get any output.

Offline

#4 2011-02-23 12:14:57

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: [Solved] how to partition my external hard drive?

sudo fdisk -l

should work.

Offline

#5 2011-02-23 12:39:42

deF291
Member
Registered: 2010-12-15
Posts: 15

Re: [Solved] how to partition my external hard drive?

okay I tried it but in my browser (thunar) the device is still mounted under /media/Iomega[...] and the previous files that were on the hdd from the beginning are still there..

sudo fdisk /dev/sdb10 says

Disk /dev/sdb10: 750.0 GB, 750021214208 bytes
255 heads, 63 sectors/track, 91184 cylinders, total 1464885184 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

      Device Boot      Start         End      Blocks   Id  System
/dev/sdb10p1   *          63   878900084   439450011   83  Linux
/dev/sdb10p2       878900085  1464870959   292985437+  86  NTFS volume set

but sudo fdisk -l says

Disk /dev/sdb: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table

why didn't cfdisk write my partitions? or if it did, why can I see but not access them oO

/e: mount says

/dev/sdb10 on /media/Iomega HDD 750GB type hfsplus (ro,nosuid,nodev,uhelper=hal)

Last edited by deF291 (2011-02-23 12:41:38)

Offline

#6 2011-02-23 12:51:20

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: [Solved] how to partition my external hard drive?

ups, i correct myself: use /dev/sda, /dev/sdb, etc. and be sure you unmount your hdd first.

Offline

#7 2011-02-23 13:05:57

deF291
Member
Registered: 2010-12-15
Posts: 15

Re: [Solved] how to partition my external hard drive?

thanks a lot so far everything seemed to work smile
but how can I mount this partition

/dev/sdb1   *          63   878900084   439450011   83  Linux

now? I tried

sudo mount -t ext4 /dev/sdb1 /media/xthddlx

but it says

mount: wrong fs type, bad option, bad superblock on /dev/sdb1

anybody know the correct fs type of Linux (83) from cfdisk?
or how should I do it correctly? -.-
I'm quite sure that the partition will probably get mounted automatically as soon as I reboot, but I want to know how to do it correctly just in case neutral

and sorry for bothering with the noob questions..!

/e: none of the partitions got mounted automatically by rebooting.. should've known better big_smile

Last edited by deF291 (2011-02-23 13:11:04)

Offline

#8 2011-02-23 13:11:49

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: [Solved] how to partition my external hard drive?

but, did you use mkfs.ext4 /dev/sdb1? i also use the -m 1 flag for my external hdd's, and for my /home partition.

if don't plan to install an OS on it, there's no need to make any partition bootable. smile

Last edited by JokerBoy (2011-02-23 13:12:46)

Offline

#9 2011-02-23 13:30:46

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Re: [Solved] how to partition my external hard drive?

1. You need to connect the external hard drive.
2. Use 'dmesg' command to find out it's device id (e.g. /dev/sdc or /dev/sdd)
3. Partition the drive using 'cfdisk /dev/sdx (replace 'x' with whatever letter above)
4. mkfs.ext4 /dev/sdx (this will format your drive and erase all existing data)
5. mkdir /usb
6. chmod 770 /usb && chown root:100 /usb
7. mount /dev/sdx /usb


./

Offline

#10 2011-02-23 13:37:09

s1gma
Member
Registered: 2009-09-29
Posts: 45

Re: [Solved] how to partition my external hard drive?

A more user friendly solution would be to use GParted. Nice front-end for command-line tools.

Offline

#11 2011-02-23 13:39:45

deF291
Member
Registered: 2010-12-15
Posts: 15

Re: [Solved] how to partition my external hard drive?

okay got it working with mkfs.ext4 now, thanks a lot wink
only problem for now is by mounting it this way

sudo mount -t ext4 /dev/sdb1 /media/xthddlx

i can only write on the partition in sudo-mode.
I edited /etc/fstab to

/dev/sdb1 /media/xthddlx ext4 defaults 0 0

but didn't reboot so far so I don't know if it's necessary or correct.
how to avoid this writing-restriction the smartest way? :#

and thanks a lot again JokerBoy the most important part has been managed by now wink

/e: @Carlwill
I tried the chmod && chown thing but i get the answer

chown: changing ownership of `/media/iOmlX/': Operation not permitted

and now I can't even open the created folders on my partition in thunar anymore oO

Last edited by deF291 (2011-02-23 13:46:40)

Offline

#12 2011-02-23 13:57:21

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: [Solved] how to partition my external hard drive?

sudo chmod 755 /media/xthddlx is all i need

Offline

#13 2011-02-23 14:00:36

deF291
Member
Registered: 2010-12-15
Posts: 15

Re: [Solved] how to partition my external hard drive?

now I can access my data again but I still can't write on it in normal user mode yikes

mkdir: cannot create directory `/media/xthddlx/vidZ/Sopranos Season 1/': Permission denied

Offline

#14 2011-02-23 14:07:43

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: [Solved] how to partition my external hard drive?

sudo chown 1000:100 /media/xthddlx
sudo chown -R 1000:100 /media/xthddlx/vidZ

or

sudo chown yourusername:users /media/xthddlx
sudo chown -R yourusername:users /media/xthddlx/vidZ

the -R flag is to operate on files and directories recursively so don't use it directly on your mount point, 'cause you'll overwrite the lost+found permisions also.

Last edited by JokerBoy (2011-02-23 14:08:21)

Offline

#15 2011-02-23 14:14:38

deF291
Member
Registered: 2010-12-15
Posts: 15

Re: [Solved] how to partition my external hard drive?

thanks a lot, everything's working perfectly as it should now wink
I even checked, it gets automatically mounted on bootup without the editing of /etc/fstab so everything's fine smile

thread can be closed now, thanks to everyone

Offline

#16 2011-02-23 16:59:18

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [Solved] how to partition my external hard drive?

Just append [Solved] to the title.

Offline

Board footer

Powered by FluxBB