Score:0

How to move file from secondary harddisk to directory in home directory?

de flag

For a friend I finally got ubuntu running on sdd, version 22.04.
When trying to move a file from harddisk to sdd i get an error:

mv: cannot remove 'temp.kop': Read-only file system

Copying works fine.
Just recently I managed to get ubuntu installed on a newly created partition on sdd.
Not sure íf relevant but windows still lives on sdd as well (sudo fdisk -l, looked for /dev/sd):

/dev/sdb1            2048 104859647 104857600  50G  7 HPFS/NTFS/exFAT

That will need to stay there, for now.

Harddisk partition with data to be used is mounted:

/dev/sda2 on **/media/hansl/Data** type fuseblk (ro,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)

Mounted partitions on sdd for ubuntu (where under home destination dir resides):

/dev/sdb4 on / type ext4 (rw,relatime,errors=remount-ro)<br>
/dev/sdb2 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

File to be moved, on harddisk, resides in /media/hansl/Data/Temp/20221115_ubuntu/dextop and is called temp.kop.
So starting in home-dir ~ with these steps i can see the file:

cd /media/hansl/Data/Temp/20221115_ubuntu/dextop<br>

ls -la temp.kop

It shows:

-rwxrwxrwx 1 hansl hansl 5231 nov 18 13:58 temp.kop

Destination is Desktop directory. With this command it is shown

ls -la ~/Desktop<br>
total 16<br>
drwxr-xr-x  2 hansl hansl 4096 nov 20 17:55 .<br>
drwxr-x--- 19 hansl hansl 4096 nov 20 17:50 ..<br>
-rwxrwxrwx  1 hansl hansl 5231 nov 17 14:32 file.tmp<br>
lrwxrwxrwx  1 hansl hansl   21 nov 20 16:20 Temp.tmp -> ../Documents/temp.tmp

The above error is shown after this move command:

mv temp.kop ~/Desktop/

The command from within the Desktop dir gives the same error:

mv: cannot remove '/media/hansl/Data/Temp/20221115_ubuntu/dextop/temp.kop': Read-only file system

How can I make sure files can be moved from harddisk to sdd, in the way described above?

in flag
The options you’ve included for `/dev/sda2` has `ro`, which means “read only”. You cannot remove files while read only as a delete is technically a write. You will need to use `rw` at the very least.
Johan Doe avatar
de flag
Okay, thanx. So although the file itself has `-rwxrwxrwx` files cannot be moved, or deleted, because the partition has `ro`, right? Is `rw` now automatically set for `/dev/sda2/`, when partition is mounted (when i open it with *Files*)? Or better yet, how do is set it myself?
Will avatar
id flag
Did windows shut down completely (ie not hibernate, fast start up disabled)? Windows not shutting down completely can cause file systems to mount read only.
Johan Doe avatar
de flag
We have just checked windows, fast startup is now disabled and windows is/was shutdown completely. We used F11 to get to boot menu and chose the option that started windows (when installing ubuntu it was not aimed at having dual boot, ubuntu + windows, but just ubuntu). Now, after switching pc off and on again, it automatically starts up windows. With F11 the other options (sata1-3, ubuntu 2x, UEFI OS) were tried but starting up ubuntu seems no longer possible. We can use ubuntu live usb, but don't know how to prevent windows from starting up or how to make ubuntu startup.
Johan Doe avatar
de flag
Yes, this is a different question all together. <br>I will post a new question.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.