Format a "read only" drive

Forumite Members General Topics Tech Linux Talk Format a "read only" drive

Viewing 20 posts - 1 through 20 (of 32 total)
  • Author
    Posts
  • #37454
    Les.Les.
    Participant
      @oldles
      Forumite Points: 42

      I just bought a used LaCie drive. It contains a 1TB SATA drive unit. i connected up via Firewire 400, it mounted and opened to show an empty drive. It had been wiped, being previously use in a Windoze environment I believe.

      I attempted to copy a few of my folders onto it, but I was rebuffed with the message “Read only”. I then right-clicked and attempted to reformat (with EXT4) but could not proceed with that. It seems I don’t have permission to do anything except read.

      I assume there is a killer command thro terminal which will get rid of the “no permission” and format it as well.  I don’t know what that is.

      Help please.    Les.

      #37456
      Dave RiceDave Rice
      Participant
        @ricedg
        Forumite Points: 7

        Use GParted. It should let you do anything you want – but you may have to wipe out what’s there first.

        #37457
        Ed PEd P
        Participant
          @edps
          Forumite Points: 39

          Use GParted. It should let you do anything you want – but you may have to wipe out what’s there first.

          +1 but do not forget to unmount (right click on the partitions) anything it finds on the drive before attempting to delete all the partitions.

          If you are not familiar with GParted run it without the LaCie drive connected just to familiarise yourself and note the details of the drive you do not want to remove. Mistaking similar size drives can be a disaster – been there and done it!

          #37459
          Wheels-Of-FireWheels-Of-Fire
          Participant
            @grahamdearsley
            Forumite Points: 4

            If the drive was wiped under Windows and then the Clear drive command in Disk Management was used then it will not be partitioned. As mentioned above GParted should sort you out 😁

            #37460
            Wheels-Of-FireWheels-Of-Fire
            Participant
              @grahamdearsley
              Forumite Points: 4

              Out of interest, if Windows detects an unpartitioned drive then it will mount it with the RAW file system driver. The RAW driver will let you, or more likely an app, read any individual sector on a disk but it will only allow writing to sector 0 so partitioning information can be established.

              #37463
              Les.Les.
              Participant
                @oldles
                Forumite Points: 42

                Yesterday (before I asked this question), after getting the refusal to copy, I removed the drive from carrier, and connected via my little “connect any HDD and do something” device. I got the same refusal response.

                This morning, I disconnected  my PC’s SDD’s SATA lead and connected that to the 1TB drive out of the LaCie.

                Booted with a GPARTED disc and fathomed my way through the programme, deleting partitions, creating one partition (though there was 1MB before it and 1MB after it), as EXT4. That seemed OK. Next I formatted the drive with an EXT4 format.

                All seemed OK, so shut down, returned everything to normal including the 1TB back in the enclosure.

                booted up PC, connected LaCie and again tried to copy across some folders.

                Permission refused.

                Have I done something wrong, or just not done everything I should have done?

                Les.

                #37464
                Wheels-Of-FireWheels-Of-Fire
                Participant
                  @grahamdearsley
                  Forumite Points: 4

                  And just for completeness, there is also a file system type of RAW that lets an app manage its partitions without using any Windows supported file system.

                  Windows will never attempt to auto mount a partition that has its file system type set to RAW but an app can mount it with the RAW driver and perform any sort of sector level I/O it likes on any sector.

                  #37465
                  Ed PEd P
                  Participant
                    @edps
                    Forumite Points: 39

                    I get a little confused on your setup – I assume that you are using the LaCie as some sort of supplement to your home drive. Try following this procedure.

                    btw the fdisk command in the procedure is followed by a lower case L (for list)

                    #37467
                    Dave RiceDave Rice
                    Participant
                      @ricedg
                      Forumite Points: 7

                      Les, it looks like the connection method is causing the issue.

                      I think we’ve mentioned before (when you decided on Firewire)? that not all connections are equal. It’s probably the Firewire “driver” causing the problem, we know it’s not the drive itself.

                      I have no idea what the resolution is apart from changing the caddy to a USB one, preferably USB 3.

                      BTW the 1MB padding isn’t an issue, indeed it’s necessary as the MBR table needs to go on first, then the partition needs to start (and end)? on a MB boundary.

                      #37469
                      Wheels-Of-FireWheels-Of-Fire
                      Participant
                        @grahamdearsley
                        Forumite Points: 4

                        I seem to have crossed posts with you there less.

                        I am not a real expert with GParted so I will have to let someone else answer, sorry. You did say there was still a partition on the disk before the new one you created though. I wonder if GParted has a Clear Disk command like Windows Disk management does ?

                        #37470
                        Les.Les.
                        Participant
                          @oldles
                          Forumite Points: 42

                          Edp, this is a backup drive for connecting as and when. As long as I can write to it and read it, that is what I need. When I first tried yesterday, it was in its “box” and connected by firewire 400. When that failed, I removed it and connected it via a USB connected gizmo. Again I could see the drive (it mounted), and I could un-mount it, but was not allowed to write to it.

                          Dave, after reading the replies, I fitted the drive only in my PC using normal SATA.  I refitted in the enclosure and connected again by Firewire 400, with no write permission as I said.

                          However, this particular LaCie has FW400, FW800, USB and SATA (an “external” sata, NOT an “ESATA” if I understand correctly). I had noticed when I tried a right click “Format” that it was a USB formatter which may be relevant. I will try again shortly using the USB connection.

                          Thanks all, Les.

                          #37471
                          Wheels-Of-FireWheels-Of-Fire
                          Participant
                            @grahamdearsley
                            Forumite Points: 4

                            I seem to have crossed posts with you too Dave 😁

                            Im not sure that the first partition that is appearing on the disk IS nothing to worry about. There must be something in sector 0 for that to appear and it may not be correct.

                            #37473
                            Wheels-Of-FireWheels-Of-Fire
                            Participant
                              @grahamdearsley
                              Forumite Points: 4

                              https://askubuntu.com/questions/746323/using-gparted-to-completely-clear-a-drive/746373

                              There is info in the above link on how to get a disk partitioned into just one large empty partition that you can then format as you like. There are methods for GParted an built in Linux tools.

                              You never know, it may help 😂

                              #37475
                              Ed PEd P
                              Participant
                                @edps
                                Forumite Points: 39

                                Les I would recommend that you start again with the LaCie drive connected to your PC then work through the earlier linked procedure. GParted includes routines to format the drive in ext4, so no need to use another formatter (usb formatters often use a fat32 format).  The vital steps I think you are missing are the ‘mount’ steps included in the link.

                                #37546
                                Les.Les.
                                Participant
                                  @oldles
                                  Forumite Points: 42

                                  Edp, I tried yesterday running the commands to which you linked.  When I got to   sudo vim /etc/fstab    i got vim   command not found.    I have heard many refs to VI and VIM, but they are not really on my radar. On the off chance it was simply a matter of installing, I went to synaptic, but it was not found, so I am left confused once more.

                                  Cheers, Les.

                                  #37552
                                  Ed PEd P
                                  Participant
                                    @edps
                                    Forumite Points: 39

                                    Use nano instead of vim. Follow the instructions then use CTRL+o (i.e Oh not zero) to save then CTRL +x to quit.

                                    [edit] I probably should have said that both vi/vim and nano are just command line editors. If these freak you out then you can use the frowned on gui editor for ubuntu use “sudo gedit  /etc/fstab” to launch the gui text editor and open fstab. Ubuntu will probably issue a bunch of warnings as they really try to discourage this for some silly idea that you are more liable to make mistakes in a gui than in a command line!

                                     

                                    #37638
                                    Les.Les.
                                    Participant
                                      @oldles
                                      Forumite Points: 42

                                      Damn, damn, damn! After writing rather a lot, it all disappeared. Start again!

                                      HELP! Last night I tried and failed using nano. I won’t go thro it all right now, not sure I can remember any longer.

                                      This morning I switch on and the PC would not boot! Discounting time spent searching my shed for an electric motor, commissioning the leaf blower for SWMBO, trying to make jam, the rest of the day has been spent trying to get things back to normality. NOT SUCCEEDED!

                                      I suspect that my failed attempts to mound the recalcitrant hard drive caused my SSD boot drive to become unmounted. what followed was too convoluted to explain in detail, so I won’t. I booted up from the Linux install disc (but NOT installed) and when I searched for the boot drive, it could not be mounted! i removed it and fitted the new 240GB SSD I bought for my No.2 machine months ago, still without an install. I rebooted with the Linux disc, and installed a new full Mint on that SSD.

                                      I then shut down, plugged in my OLD LaCie backup drive and my “OK yesterday” SSD and rebooted with linux disc. Now I could see both the SSD and the LaCie, so I set about copying all my docs etc to a new “21-09-2019” folder on the LaCie.

                                      Apart from a couple of jpg and pdf files, everything copied OK. Now for the hidden files. SOME of these, including .thunderbird and .mozilla were locked! These are the two most important, esp the .thunderbird..

                                      I need EITHER to learn how to copy these two locked hidden files, or how to mount my “OK yesterday” drive, presumably working from the Linux RAM install. WITHOUT LOSING my thunderbird!

                                      Les.

                                      #37651
                                      Les.Les.
                                      Participant
                                        @oldles
                                        Forumite Points: 42

                                        Ed, Dan, nobody?

                                        I realise it is only a matter of mounting, or alternatively getting higher privileges to copy the two hidden folders. If I try anything, I fear losing the lot.

                                        Les.

                                        #37655
                                        Wheels-Of-FireWheels-Of-Fire
                                        Participant
                                          @grahamdearsley
                                          Forumite Points: 4

                                          I hear your plea Les but I don’t know what’s going on there. If I was sitting in front of your PC I might have a chance of working things out but I am only average with Linux.

                                          Hopefully a real expert will reply, good luck 😁

                                          #37657
                                          Ed PEd P
                                          Participant
                                            @edps
                                            Forumite Points: 39

                                            I have to guess what your problem is. Did it go t-up after messing with fstab and rebooting? If so, use a Live CD/USB. Wait until you get the Live Desktop then dive into your main drive. Then to be safe from vim/nano errors use the normal Ubuntu graphical text editor to look inside fstab and undo the things you did wrong.

                                            I suspect that you have somehow put a totally fictitious uuid for your external drive and it is hunting around for a non-existant item!

                                            A ‘good’ fstab looks something like the following:

                                            # <device file system> <mount point> <type> <options> <dump> <pass>
                                            UUID=ad662d33-6934-459c-a128-bdf0393e0f44 / ext4 defaults 1 1

                                            UUID=30ebb8eb-8f22-460c-b8dd-59140274829d /home ext4 defaults 1 1

                                            UUID=7014f66f-6cdf-4fe1-83da-9cab7b6fab1a swap swap defaults 0 0

                                            where the uuid are the specific uuids for your hardware.

                                            If you made a copy of fstab before playing with it, rename and use that instead!

                                            [edit] once you have zapped out your external drive from fstab, you could try autofs for a fairly foolproof mount, but I do not think it will automount on boot you will have to select the drive to get it going.

                                          Viewing 20 posts - 1 through 20 (of 32 total)
                                          • You must be logged in to reply to this topic.