Message-ID: <4DED42CF.9000008 at verizon.net>
Roy Strachan
rdstrac at shaw.ca
Fri Jun 10 04:24:45 UTC 2011
This file is getting pretty big so
[snip]
Hi Doug
Read this all the way through before you start so you have and
understanding of what is involved.
> Roy,Your post says if sdc does not show up in fdisk do the following.
> It does show up, then what??
Just add the line as originally suggested -
/dev/sdc1 /mnt vfat ro
It is simpler to do this way, but not always 100% effective. Using the
UUID is a little more work but *will* work if you are having problems
with the simpler method.
>
> I had been typing Getit instead of gedit so kept getting no such
> command. Finally realised it.:-[ I don't understand gedit or fstab
> so I need to do some reading this morning to understand what you are
> having me do. Understanding is likely as important as getting the disk
> working. The first question I have for now is that my 2t drive does not
> show up in fstab at all.
That is the purpose of adding the /dev/sdx1 line. Without it you have
to add all the information in the mount command
> The two internal drives do. Is what you are
> having me do to add the disk to fstab?
The two internal drives are in fstab because the install program found
them when you originally installed Ubuntu. I honestly don't know
whether it would have found a removable drive and installed it (I have
my doubts) during a normal install. At any rate what you now need to do
is tell the system about it which is what the entries for the two
internal drives do for them, and what adding the /dev/sdx1 line will do
for your USB drive.
> Do I add it to fstab anyway?
yes, that is how you can get the system to see the drive.
> Maybe I am being to cautious but Im afraid of loosing all my data.
I don't blame you, but that is the purpose of mounting the drive read
only... as long as you don't write anything to the drive you won't do
any damage.
After you have saved everything and reformatted your drive you will need
to mount it read/write (just change the 'ro' to 'defaults' - no quotes)
in order to copy your data back to the drive.
>
> Doug
Step by step How To
First step -
In a terminal type - mkdir /mnt/2TB do not use sudo, you (not root)
want to be the owner of the 2TB directory. You can confirm that is what
happened with ls -l /mnt.
*********** here is an example using my fstab ***************
*********** Yours will be a little different but the general layout will
be the similar
# Use 'blkid -o value -s UUID' to print the universally unique
identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0
0
# /boot was on /dev/sda1 during installation *****
UUID=b13b8e73-0461-42c8-a805-0eb44a3cc345 /boot ext2
defaults 0 2
# /dev/sda5 *****
UUID=cf086fe0-c994-4d3d-a1b9-b9c71fe94628 / ext4
errors=remount-ro 0 1
# /dev/sda6 *****
UUID=7e550056-d082-4cb3-8ff9-dd8108433dd4 /var ext4 defaults
0 2
# /dev/sda7 *****
UUID=40ab12eb-2ce4-4987-8a6d-9a7b0a8e4a83 none swap sw
0 0
# /dev/sda8 *****
UUID=5441bb18-fcda-47b0-ae35-773edaa14ae3 /home ext4
defaults 0 2
***** The part above is what the installer did *********
***** The next line is what you need to add - the 0 0 / 0 1 / 0 2 are
not needed right now
/dev/sde1 /mnt/2TB vfat ro
# use fdisk -l to make sure that sde is what the system is seeing
# this is the end of the file for now. Ignore what is below. It does
not exist! save and reboot.
-----------------------------------------------------------------------------
After the reboot check /mnt/2TB for your drive. If it didn't show up,
open a terminal window and type -
sudo fdisk -l to get the current device designation for your 2TB drive.
Then type -
sudo blkid -o value -s UUID /dev/sd_whatever_fdisk_gave_for_2TB-drive
The return from the blkid command will be the UUID for your USB drive.
(This may look quite different from what is returned for a Linux
formatted drive)
Change /dev/sde1 in fstab to UUID=
Then Cut and Paste (or manually copy) the returned UUID from the
terminal window to fstab directly after UUID=(no spaces after =)
save and reboot. your drive should be visible and you can copy your
data to a safe place.
After you have saved all your data that you need, format 2TB. Make
sure gparted is installed and execute it from
System->Administration->gparted to format your drive. Then do
everything (except copy your data) again, only this time do your mount
in /media which is the standard place to mount drives in Ubuntu.
Change your mount line for the 2TB drive to what is below (using your
own UUID of course) and if you formatted using anything but ext4 change
that to whatever you used. (don't use FAT or NTFS, they don't know
about Linux permissions and are not nearly as robust as Linux
filesystems)
#
# /dev/sde1 *****
UUID=6782deda-89a1-4655-84e9-f2d34576102a /media/2TB ext4
defaults 0 2
Reboot and copy your data back to 2TB then congratulate yourself on a
job well done!
Roy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20110609/af38424b/attachment.html>
More information about the ubuntu-users
mailing list