Another approach to my RO drive issue...
Nils Kassube
kassube at gmx.net
Fri Jan 11 08:23:10 UTC 2008
Anthony Papillion wrote:
> OK, so I've followed everyone's advice and I still can't get RW access
> to my external USB hard drive. I think the issue is that the FS was
> created under WinXP and is either NTFS of FAT32 (can't remember which)
> and that I don't 'own' the FS. So, here's another approach I'd like to
> take but am not sure how: how do I force Ubuntu to format the external
> drive as a Linux fs and take ownership of it?
>
> FYI, the drive is at /mnt/sda5
You will loose all existing data on the disk, but you sure know that
already. The commands would be "sudo umount /dev/sda5" and "sudo
fdisk /dev/sda". Change the file system ID of partition 5 to 83 (= Linux)
with the "t" command and write the partition table to the disk with
the "w" command.
Next use "mke2fs -j /dev/sda5" to format the disk with ext3 file system.
Now the disk is formatted and you can mount it to whatever mount point
you like, e.g. "mkdir -p /mnt/sda5 && mount /dev/sda5 /mnt/sda5".
But the disk still belongs to root only. Therefore make a directory which
belongs to a regular user. I assume, you are still using the live CD,
therefore the regular user is "ubuntu". The commands would be "sudo
mkdir -p /mnt/sda5/mydir" and "sudo chown ubuntu:ubuntu /mnt/sda5/mydir".
Now you can copy files from your Windows disk to the external disk to the
directory /mnt/sda5/mydir.
As the user name is not stored, but the user ID, the files will belong to
the user with the ID 1000, when you later mount the USB disk on a real
system. If necessary you can change the ownership when it is mounted on
the real system then.
Nils
More information about the ubuntu-users
mailing list