Re: [GLLUG] How to repair an unallocated hard drive?
On 21/04/2021 13:06, J Southall via GLLUG wrote: Hi MeJ, I apologise for replying to the wrong message. Poor Chris Bell tries to help me and in return I moan at him. Life is not fair, John Hah is np, we all need an occasional shot in the ARM. Or M1 perhaps? Or a http://www.thesympatheticear.co.uk/? LABATYD TANSTAAFL etc. :) Sorry; sincerely off topic! Will stop it ;) -- Stabilys Ltdwww.stabilys.com 244 Kilburn Lane LONDON W10 4BA 0208 960 0365 -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] How to repair an unallocated hard drive?
On 21/04/2021 11:40, J Southall via GLLUG wrote: I was ill yesterday and so I am trying to book a GP appointment. I waited for 23 minutes as first in the telephone queue before giving up. Does it really take receptionist that long to issue an appointment? No, but it does take that long to rack up an agreeable charge - one neighbour of mine tracked a £10 item on her mobile to an half-hour wait for an appointment. -- Alistair Mann t: 07899 846 648 -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] How to repair an unallocated hard drive?
On 21/04/2021 12:41, James Roberts via GLLUG wrote: In my wife's experience, "you are now 23rd in the queue" - so perhaps, yes! Slower than a check on a 8TiB drive, which does at least, eventually, complete or fail. It's all going to pot (holes, hereabouts) MeJ On 21/04/2021 11:40, J Southall via GLLUG wrote: I was ill yesterday and so I am trying to book a GP appointment. I waited for 23 minutes as first in the telephone queue before giving up. Does it really take receptionist that long to issue an appointment? Thanks, John Hi MeJ, I apologise for replying to the wrong message. Poor Chris Bell tries to help me and in return I moan at him. Life is not fair, John -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] How to repair an unallocated hard drive?
In my wife's experience, "you are now 23rd in the queue" - so perhaps, yes! Slower than a check on a 8TiB drive, which does at least, eventually, complete or fail. It's all going to pot (holes, hereabouts) MeJ On 21/04/2021 11:40, J Southall via GLLUG wrote: I was ill yesterday and so I am trying to book a GP appointment. I waited for 23 minutes as first in the telephone queue before giving up. Does it really take receptionist that long to issue an appointment? Thanks, John -- Stabilys Ltdwww.stabilys.com 244 Kilburn Lane LONDON W10 4BA 0208 960 0365 -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] How to repair an unallocated hard drive?
On 01/01/2021 01:01, Mark Preston via GLLUG wrote: Hi all and I wish you all a happy New Year, I was trying to create a bootable persistent Linux Mint 20 USB stick with EFI support from a linux mint20 .iso downloaded from the internet. but something went wrong and...now I get an unallocated hard drive message. I would like to know how to repair / fix an unallocated hard drive, if possible, preferably without losing the data on it. The computer was was purchased in 2015 from dnuk.com and came as follows: Deskstar D540 R3 sda1 100GB ext4 / sda2 8 GB swap sda3 1700 ext4 /home Raw capacity 2000 GB Intel core i5-4430 GFX Controller NVIDIA GT 610 I might have reduced / to 10 GB, but I can't remember for sure. It was running Linux Mint 19.0 and originally Debian 7.7 I've also had the following: Bad magic number in super block error I'm hoping to make it bootable again and return to using it as before, if possible. It seeems to be advisable to copy the dev/sda disk to another hard drive using GNU ddrescue. Something like ddrescue --no-split /dev/sda /media/usbdrive/image /media/usbdrive/logfile onto a 4 TB portable drive maybe. Just in case anything else goes wrong and so I'll have a copy of what's on the hard drive. Then maybe use parted rescue START END to rescue lost partitions one at a time near START and END. Any suggestions as to how to proceed and hopefully restore the existing data on the "unallocated space" would be welcome. I've used a Knoppix 8.6 USB stick to boot the computer and had the following: knoppix@Microknoppix:~$ df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 1980020 52 1979968 1% / /dev/sdb1 4916840 4521048 395792 92% /mnt-system tmpfs 3170304 0 3170304 0% /ramdisk /dev/cloop 9459128 9459128 0 100% /KNOPPIX /dev/cloop1 2262876 2262876 0 100% /KNOPPIX1 /dev/cloop2 148074 148074 0 100% /KNOPPIX2 /dev/mapper/KNOPPIX-DATA 25545968 43032 25502936 1% /KNOPPIX-DATA unionfs 25545968 43032 25502936 1% /UNIONFS tmpfs 20480 3240 17240 16% /run tmpfs 10240 4 10236 1% /UNIONFS/var/lock tmpfs 102400 76 102324 1% /UNIONFS/var/log tmpfs 2097152 4 2097148 1% /tmp cgroup 12 0 12 0% /sys/fs/cgroup udev 20480 0 20480 0% /dev tmpfs 2097152 0 2097152 0% /dev/shm knoppix@Microknoppix:~$ fdisk -l Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram4: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram5: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram6: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram7: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram8: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram9: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram10: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram11: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size
Re: [GLLUG] How to repair an unallocated hard drive?
On 10/04/2021 16:37, Chris Bell via GLLUG wrote: On Saturday, 10 April 2021 12:54:01 BST Mark Preston via GLLUG wrote: Regards, Mark Preston That looks like hard work! I am currently trying to work out how I am going to upgrade several old boxes to Debian 11 "Bullseye" which it seems should be released soon, most have space reserved, plus a few using derivatives of Debian which should follow soon afterwards. Hi Chris, Thanks for your reply above. It wasn't so much hard work as a slow process. Most of the hard work was done by the processor. Even with fairly modern machines and programs it took about a week for the 6 million plus files which made up the over 1Tb of this particular "home" to be "rescued". Then it was like looking for a few needles in a giant haystack. Scalpel then took a few more hours to isolate the LibreOffice calc files I particularly wanted. The extra cautious approach I took did eventually pay off in that no files were lost. However, the upgrade to Linux Mint 20 didn't turn out as well as I hoped, so now I'm trying Mx Linux (19.3) which so far seems much more satisfactory. -- Regards, Mark -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] How to repair an unallocated hard drive?
On Saturday, 10 April 2021 12:54:01 BST Mark Preston via GLLUG wrote: > Regards, > > Mark Preston That looks like hard work! I am currently trying to work out how I am going to upgrade several old boxes to Debian 11 "Bullseye" which it seems should be released soon, most have space reserved, plus a few using derivatives of Debian which should follow soon afterwards. -- Chris Bell Website https://chrisbell.org.uk -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] How to repair an unallocated hard drive?
On 01/01/2021 16:14, Chris Bell via GLLUG wrote: Hello Mark Knoppix appears to show sda as a 2TB disk partitioned using GPT which will install a GPT partition immediately after the space normally used by the DOS MBR to provide more space for information about multiple main partitions, not just the maximum of 4 physical partitions in the old MS-DOS. Most computers search for the MBR, so it is used to re-direct the BIOS to the GPT partition. The main boot sequence is then controlled from the GPT partition, and none of the other partitions will be labelled as bootable. I often see some unallocated space at either end of the disc space, usually less than 1 sector, but most of sda appears to be a single partition, possibly using a swap file instead of a swap partition. Perhaps the disc was re-partitioned as a GPT disc, which would overwrite the original MS-DOS system, but then just left not further partitioned or formatted. There appears to be more information about sdb and its partitions without mention of corruption. If sda is corrupted do not try to alter it. There was a package "photorec" designed to recover deleted photos which was later enhanced to recover almost anything and may be re-named "testdisk". It is not a quick and easy recovery, but can examine, list, recover, and copy as many directories and files as possible to another formatted disc. Hi all, Just an update to this thread. I found the information posted by Chris above and John Edwards previously very useful. I also found the web-page https://help.ubuntu.com/community/DataRecovery helpful. I took my time to back up the unallocated hard drive in various ways using two 4TB external hard drives, before using scalpel to obtain the spreadsheet files I was really interested in (see https://stackoverflow.com/questions/22542527/recovering-odt-file-using-scalpel for an example of how to do this). Then I used gparted to restore the partition table on the actual hard drive itself. I tried to reboot the hard drive but this failed due, I think, to the lack of a /boot/EFI. I could see all the files on the various other partitions though using Knoppix. So, I resorted to trying various Linux distributions such as Debian, Mint, and eventually Red Hat. All from various Linux Magazine or Linut Format CDs. The Red Hat CD was useful in that it appeared to put the EFI file in a 130GB partition that I had created for a new "home" directory. Nevertheless it still wouldn't boot for some reason. However, after that I was able to use Linux Mint (which hadn't worked previously) to get a bootable system. Eventually I was able to transfer the EFI directory to a much smaller partition, and use the 130GB partition as a new home partition. Currently the disk looks like this: root@mark-H97-HD3:/home/mark# parted -l Model: ATA ST2000DX001-1CM1 (scsi) Disk /dev/sda: 2000GB Sector size (logical/physical): 512B/4096B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 2 1049kB 538MB 537MB primary fat32 1 539MB 149GB 149GB extended 8 539MB 12.0GB 11.5GB logical ext4 5 12.0GB 13.0GB 1023MB logical linux-swap(v1) 6 13.0GB 130GB 117GB logical ext4 7 130GB 149GB 18.8GB logical linux-swap(v1) boot 3 149GB 2000GB 1851GB primary ext4 Number 8 is /dev/sda8 the / directory, and number 3 is /dev/sda3 which is now my "backup" partition and holds all the files that were in my previous home directory. The /dev/sda6 partition contains the new home directory. I'm not too sure what number 1 (/dev/sda1) is doing at the moment. My guess is not a lot, or why the linux-swap(v1) has the boot label, but at least the system is up and running, and the HMRC basic tools is also working. Anyway, thank you GLLUG. -- Regards, Mark Preston -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] How to repair an unallocated hard drive?
On 01/01/21 14:40, John Edwards wrote: Hi On Fri, Jan 01, 2021 at 01:01:11AM +, Mark Preston via GLLUG wrote: I was trying to create a bootable persistent Linux Mint 20 USB stick with EFI support from a linux mint20 .iso downloaded from the internet. but something went wrong and...now I get an unallocated hard drive message. I would like to know how to repair / fix an unallocated hard drive, if possible, preferably without losing the data on it. Most obvious question would be "do you have backups"? I will assume for the moment the answer is "no". Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors Disk model: ST2000DX001-1CM1 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: 855C35AB-DF58-4AD0-A242-58BC6E6BD581 Looks like something has deleted the GPT partition tables on your 2TB hard drive. knoppix@Microknoppix:~$ fsck -y /dev/sda You should not run fsck on a drive device ("sda") but instead run it on the partition that holds the filesystem, but in this case you can't because the partition information has been removed from the drive. You need to get that partiton layout information back before doing any more work on the drive. If you have backups that contain information about the partitions on that drive (eg a hardware report from something like 'lshw') then you can us that. Otherwise you will need to use a hard drive utility to scan the whole hard drive looking for possible partitions and filesystems, and then choose whichever layout seems to look right to you. The main tool I have used for this in the past is 'testdisk', which is available as a Debian and Ubuntu package (and can be installed if you boot from a Live Debian or Ubuntu CD/DVD) and might already be on that Knoppix DVD. There might be better tools developed more recently. If you have no backups and have a spare 2TB drive then you may want to consider making a complete copy of the whole disk (using something like 'dd' or 'clonezilla') and run 'testdisk' on the new drive so that you don't damage any data on the original. Lastly it might worth thinking about how the partition table got removed. This could be a fault with the hard drive (unlikely because there should be 2 GPT partition tables, but run a full SMART test as soon as possible to be safe) or it might be that the wrong device was choosen when you tried to create the bootable USB stick. On 01/01/21 16:14, Chris Bell via GLLUG wrote: Hello Mark Knoppix appears to show sda as a 2TB disk partitioned using GPT which will install a GPT partition immediately after the space normally used by the DOS MBR to provide more space for information about multiple main partitions, not just the maximum of 4 physical partitions in the old MS-DOS. Most computers search for the MBR, so it is used to re-direct the BIOS to the GPT partition. The main boot sequence is then controlled from the GPT partition, and none of the other partitions will be labelled as bootable. I often see some unallocated space at either end of the disc space, usually less than 1 sector, but most of sda appears to be a single partition, possibly using a swap file instead of a swap partition. Perhaps the disc was re-partitioned as a GPT disc, which would overwrite the original MS-DOS system, but then just left not further partitioned or formatted. There appears to be more information about sdb and its partitions without mention of corruption. If sda is corrupted do not try to alter it. There was a package "photorec" designed to recover deleted photos which was later enhanced to recover almost anything and may be re-named "testdisk". It is not a quick and easy recovery, but can examine, list, recover, and copy as many directories and files as possible to another formatted disc. Hi John and Chris, Thank you for your further replies. They are helping me to develop a recovery plan. I have a full backup of the home directory from the end of October which I expect will contain nearly all the files I need. I installed the HMRC Paye Basic Tools system and this is one of my concerns, but it won't be the end of the world. This is a 32 bit program for Linux, but I got it working on this 64 bit machine which I was quite pleased about. Whether I can repeat that trick I'm not sure. I think you're right that the Linux Mint 20 install removed the partitions, but I never installed this on the hard drive, so hopefully most of the previous files are still there somewhere. The computer never had any Windows operating system installed as far as know. It's about time I got a new PC. I think I'll change the hard drive and put Linux Mint 20 on the new drive and copy the existing 2TB disk using GNU ddrescue to an external hard drive before removing it and the copy for further analysis with programs like testdisk. Maybe eventually it can be repartitioned and
Re: [GLLUG] How to repair an unallocated hard drive?
On Friday, 1 January 2021 01:01:11 GMT Mark Preston via GLLUG wrote: > Hi all and I wish you all a happy New Year, > > I was trying to create a bootable persistent Linux Mint 20 USB stick > with EFI support from a linux mint20 .iso downloaded from the internet. > but something went wrong and...now I get an unallocated hard drive message. > > I would like to know how to repair / fix an unallocated hard drive, if > possible, preferably without losing the data on it. > > The computer was was purchased in 2015 from dnuk.com and came as follows: > > Deskstar D540 R3 > sda1 100GB ext4 / > sda2 8 GB swap > sda3 1700 ext4 /home > Raw capacity 2000 GB > Intel core i5-4430 > GFX Controller NVIDIA GT 610 > I might have reduced / to 10 GB, but I can't remember for sure. It was > running Linux Mint 19.0 and originally Debian 7.7 > I've also had the following: > Bad magic number in super block error > > I'm hoping to make it bootable again and return to using it as before, > if possible. It seeems to be advisable to copy the dev/sda disk to > another hard drive using GNU ddrescue. Something like ddrescue > --no-split /dev/sda /media/usbdrive/image /media/usbdrive/logfile onto a > 4 TB portable drive maybe. Just in case anything else goes wrong and so > I'll have a copy of what's on the hard drive. > > Then maybe use parted rescue START END to rescue lost partitions one at > a time near START and END. > > Any suggestions as to how to proceed and hopefully restore the existing > data on the "unallocated space" would be welcome. > > I've used a Knoppix 8.6 USB stick to boot the computer and had the > following: > > knoppix@Microknoppix:~$ df > Filesystem 1K-blocksUsed Available Use% Mounted on > rootfs 1980020 52 1979968 1% / > /dev/sdb1 4916840 4521048395792 92% /mnt-system > tmpfs 3170304 0 3170304 0% /ramdisk > /dev/cloop 9459128 9459128 0 100% /KNOPPIX > /dev/cloop12262876 2262876 0 100% /KNOPPIX1 > /dev/cloop2 148074 148074 0 100% /KNOPPIX2 > /dev/mapper/KNOPPIX-DATA 25545968 43032 25502936 1% /KNOPPIX-DATA > unionfs 25545968 43032 25502936 1% /UNIONFS > tmpfs204803240 17240 16% /run > tmpfs10240 4 10236 1% /UNIONFS/var/lock > tmpfs 102400 76102324 1% /UNIONFS/var/log > tmpfs 2097152 4 2097148 1% /tmp > cgroup 12 012 0% /sys/fs/cgroup > udev 20480 0 20480 0% /dev > tmpfs 2097152 0 2097152 0% /dev/shm > knoppix@Microknoppix:~$ fdisk -l > Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 4096 bytes > I/O size (minimum/optimal): 4096 bytes / 4096 bytes > > > Disk /dev/ram1: 4 MiB, 4194304 bytes, 8192 sectors > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 4096 bytes > I/O size (minimum/optimal): 4096 bytes / 4096 bytes > > > Disk /dev/ram2: 4 MiB, 4194304 bytes, 8192 sectors > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 4096 bytes > I/O size (minimum/optimal): 4096 bytes / 4096 bytes > > > Disk /dev/ram3: 4 MiB, 4194304 bytes, 8192 sectors > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 4096 bytes > I/O size (minimum/optimal): 4096 bytes / 4096 bytes > > > Disk /dev/ram4: 4 MiB, 4194304 bytes, 8192 sectors > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 4096 bytes > I/O size (minimum/optimal): 4096 bytes / 4096 bytes > > > Disk /dev/ram5: 4 MiB, 4194304 bytes, 8192 sectors > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 4096 bytes > I/O size (minimum/optimal): 4096 bytes / 4096 bytes > > > Disk /dev/ram6: 4 MiB, 4194304 bytes, 8192 sectors > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 4096 bytes > I/O size (minimum/optimal): 4096 bytes / 4096 bytes > > > Disk /dev/ram7: 4 MiB, 4194304 bytes, 8192 sectors > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 4096 bytes > I/O size (minimum/optimal): 4096 bytes / 4096 bytes > > > Disk /dev/ram8: 4 MiB, 4194304 bytes, 8192 sectors > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 4096 bytes > I/O size (minimum/optimal): 4096 bytes / 4096 bytes > > > Disk /dev/ram9: 4 MiB, 4194304 bytes, 8192 sectors > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 4096 bytes > I/O size (minimum/optimal): 4096 bytes / 4096 bytes > > > Disk /dev/ram10: 4 MiB, 4194304 bytes, 8192 sectors > Units: sectors of 1 * 512