Step 1) Connect the drive. Wipe the drive if desired.
a) If you have data on the drive that you need to keep, back it up.
b) Fill the drive with zeros which will blow away the MBR and all data by:
sudo dd if=/dev/zero of=/dev/sdX
**or** if you want a progress report as you wipe the drive use
sudo dc3dd wipe=/dev/sdX
in both cases sdX should be changed to sda, sdb, or whatever drive you are wiping.
If you are not certain, you can identify the drives using fdisk -l
source: Remove lvm to install Ubuntu
Step 2) Partition the drive. I use gparted.
a) open gparted - your password will be required
b) select the drive you are working with in the box on the upper right
You will see similar to this:
c) create a new partition table. I won't be discussing partition table types here as that's beyond the scope of this answer.
From the menu choose device and then create partition table.
Click apply - Gparted will apply the change and rescan the disks
d) format with a filesystem of your choice. I will use ext2 in this example. choose the filesystem that you prefer. ext4 is my preferred filesystem.
Right click on the unallocated line and select new, adjust settings if necessary here then click add.
Step 3) Format the drive (put a file system on it) I used ext2 (the default)
Click the green check mark to apply the format. You will be warned. Click apply
When the process is complete you'll get the below. you can expand details as needed then click close.
source: experience - full manual is here: http://gparted.org/display-doc.php?name=help-manual
Step 4) Mount the drive: Where you mount it is where the space will be. I will mount to the empty directory at /srv using old-school methods. You can use blkid as covered elsewhere on the site if you so choose.
In the image below you can see that I ran fdisk -l
to insure I had the right drive designation prior to running the mount command `sudo mount /dev/sdc1 /srv
Step 5) Set permissions at the mount point properly so that the appropriate users/groups can use the drive - currently only the owner root has full access.
sudo chmod -R 777 /srv
will give full read/write/execute access to the drive for everyone. Restrict as you see fit. for more information on permissions see the chmod man page.
source: experience, man chmod
You can also change ownership on the drive with chown if desired. See the man page for chown by running man chown
in a terminal. If you wish to have the drive mounted every time you boot, you'll need to edit fstab (some would call this a permanent mounting). Editing fstab has been covered in great detail both here and elsewhere on the site. for an example issue the command cat /etc/fstab
which will show you the current list of drives and with what options they are mounted at boot. cat /etc/mtab
will show you all current mounts.
Best Answer
IIRC root is root wherever you're logging in from, be that the CD, another installation or whatever.
If you're having issues, on the CD just load a root instance of nautilus (Alt+F2,
gksu nautilus
) and carry on.If your filesystem has suffered some damage it might be mounting in read-only mode. If you're trying to move things, this won't work. So for the purposes of your backup only try to copy things.