HDD failure imminent. What to do?

Using applications, configuring, problems
Message
Author
User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

#41 Post by nubc »

What bootloader for GPT disk?

I've installed Lagacy GRUB which operates in two stages. I installed Legacy GRUB 2013 Configuration from Slacko 6.3.

The difference between booting MBR and GPT with GRUB
https://www.anchor.com.au/blog/2012/10/ ... with-grub/

Booting from GPT, by Rod Smith
http://www.rodsbooks.com/gdisk/booting.html

Booting GPT disk on BIOS systems
http://www.lightofdawn.org/wiki/wiki.cgi/BIOSBootGPT

Hybrid MBRs, by Rod Smith
[http://www.rodsbooks.com/gdisk/hybrid.html

GRUB2: Heal your bootloader
https://www.linuxvoice.com/grub-2-heal-your-bootloader/
Last edited by nubc on Tue 12 Sep 2017, 16:38, edited 1 time in total.

User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

#42 Post by nubc »

Question: Does a frugal install avoid this booting GPT disk issue?
Last edited by nubc on Tue 12 Sep 2017, 16:06, edited 2 times in total.

jd7654
Posts: 296
Joined: Mon 06 Apr 2015, 16:10

#43 Post by jd7654 »

nubc wrote:Question: Does a frugal install avoid this booting GPT disk issue?
No, it's a bootloader issue. As you found in your research above, Grub2 is the proper solution for GPT booting, and most Linux distros have moved on to Grub2.
Puppy doesn't have an official Grub2 solution. There are rumors of workarounds for older Grub but I haven't tested any. Maybe someone else has.

User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

#44 Post by nubc »

What is the strategy for booting a GPT disk? If I can't boot the GPT disk, maybe I need to attach a device to the computer that will boot, like a USB flash drive.

I am looking at the new drive from a frugal linstall that boots from CD and stores a savefile on a USB drive. Are you saying that if I instead place the savefile on sda1, the 30-GB partition on the new 4TB hdd, that it won't boot up?

Could I not transfer the savefile that is currently running on the flashdrive to the new partition sda1, and have a frugal install that boots from CD?

Maybe I could install a distro with GRUB2, then surgically remove the OS and substitute Puppy Slacko. Or if could find a distro that installs GRUB2 as an independent operation. Any suggestions for a distro? Ubuntu?

You'd think that Hiren's bootCD or some specialty utility distro (eg SystemRescueCD) would be able to install GRUB2.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#45 Post by rcrsn51 »

The legacy GRUB installer is here.

It will work with a GPT partition table.

How have you formatted the drive? I can't remember if legacy GRUB will boot from an ext4 partition. Also, I don't know how it will react to very large partitions.

jd7654
Posts: 296
Joined: Mon 06 Apr 2015, 16:10

#46 Post by jd7654 »

nubc wrote:Maybe I could install a distro with GRUB2, then surgically remove the OS and substitute Puppy Slacko. Or if could find a distro that installs GRUB2 as an independent operation. Any suggestions for a distro? Ubuntu?

You'd think that Hiren's bootCD or some specialty utility distro (eg SystemRescueCD) would be able to install GRUB2.
Grub2 is kinda tied to the OS, you can look around for standalone Grub2 options, but defeats the purpose somewhat.
You can install a basic netinstall Debian 9 in less than 1GB that has Base OS minus Xwin and full Grub2. Ubuntu base install is bigger but also works.
Unlike you, I don't have any >2TB drives so I never needed to switch off Grub4DOS, which is simple and easy. The Grub2 bloatware I leave on the other distros PBR.(such as Arch, Debian, Fedora)

User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

#47 Post by nubc »

That's good news, rcrsn51. I have installed Legacy Grub 2013 from Slacko 6.3. It doesn't work, possibly because of the (hd0,0) lettering options. Do you have any suggestions? Here's my menu.lst from grub.

Code: Select all

timeout 4
default 0
#
title Puppy Linux Full on sda1
root (hd0,0)
kernel /boot/vmlinuz root=/dev/sda1 ro vga=normal
I didn't like the Slacko 5.7 grub, so I used a DOS floppy to rewrite the MBR.

Code: Select all

C:/ fdisk /mbr

Then I installed Legacy Grub 2013 from Slacko 6.3, Still no luck.

I notice that Slacko 5.7 Legacy GRUB 2013 has an extra line

Code: Select all

initrd /initrd.gz 
Is this significant?

I just tried to boot from the hard drive, and got this message

Code: Select all

No boot device available

jd7654
Posts: 296
Joined: Mon 06 Apr 2015, 16:10

#48 Post by jd7654 »

rcrsn51 wrote:The legacy GRUB installer is here.

It will work with a GPT partition table.
Just out of curiosity, I did a test on VBox and could not get that Grub Legacy to work on a GPT disk. No valid boot device error. Grub2 worked fine though.

Is this Grub Legacy package the same as what is in Slacko 6.3.2? I tried that too and it also did not work. Maybe it would on real hardware, but I have no spare drives/systems to test at the moment.

EDIT: Never mind, operator error. Forgot that my Vbox test setup install was using 64-bit Ext4. 32-bit Ext4 on GPT worked OK with Grub Legacy.
Last edited by jd7654 on Wed 13 Sep 2017, 08:02, edited 1 time in total.

User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

#49 Post by nubc »

Thanks for that test, jd. I'm still waiting for a follow-up from rcrsn51 on this matter Even if menu.lst is the same for 5.7 and 6.3, there could still be differences in Stage1 and Stage2.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#50 Post by rcrsn51 »

@nubc: Once you wrote a new MBR with the DOS boot diskette, it's impossible to know where you are at.

What does Gparted say about the drive?

User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

#51 Post by nubc »

/dev/sda (3.64 TB)
sda1 (29.30 GB) ext3 is boot partition (locked)
sda2 (3.61 TB) ext3
sda3 (4.88 GB) is swap
partition table gpt
heads 255
sectors/track 63
sector size 512

Any specific information you need?

After I rewrote the MBR, I deleted the contents of the boot directory before reinstalling Legacy GRUB 2013

I'd be happy to format the drives, or redo the partitions.

User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

#52 Post by nubc »

I am running a frugal install that boots from CD, and stores a savefile on USB flashdrive. RAM is being written to the savefile every half hour, causing the computer to freeze for the duration of the write. This is ridiculous. How do I disable the automatic writing to savefile? Or at least make it reasonable, like every 3 hours.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#53 Post by Sylvander »

nubc wrote:How do I disable the automatic writing to savefile?
See this post.

User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

#54 Post by nubc »

That's long enough on the full install. I'll have to put that off for another day. I transferred the save file and sfs files from the flashdrive to root of the OS partition on the new hard drive, sda1. Booting is much faster.

Now I must apply myself to the task of saving the data on the old 2 TB hard drive. Currently, the computer is not seeing this drive when it's connected, so I have a difficult task ahead, before I can transfer the 1.8 TB of data to the new 4 TB hard drive. I don't think circumstances call for dd rescue yet, but I am open to suggestions for recovering the filesystem.

jd7654
Posts: 296
Joined: Mon 06 Apr 2015, 16:10

#55 Post by jd7654 »

nubc wrote:I don't think circumstances call for dd rescue yet, but I am open to suggestions for recovering the filesystem.
I've used Minitool Partition Wizard successfully before. It recovered a drive that even GParted itself corrupted. Its mainly a Windows program, but they also have bootable ISO which is Linux based, but looks like they don't offer that for download anymore, have to get it thru application. Though you can still find old versions for download in various places.

User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

#56 Post by nubc »

GParted does not see the drive. The hard drive is spinning, with a little startup chatter. I put the drive in another computer, with same negative results. I am stumped. Maybe I'll have to clone the drive. Actually, I only want to clone the one data partition, sda2. I might have perhaps 70% of the drive in duplication, accidental backup.

jd7654
Posts: 296
Joined: Mon 06 Apr 2015, 16:10

#57 Post by jd7654 »

That sounds bad, definite hardware issue. Always best to quickly get data off a problem HD at the first sign of trouble. It is usually degenerative. You may only have low level options left.(like ddrescue, if that even works now)

User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

#58 Post by nubc »

I have recovered a deleted directory containing AV files, and I can say from that experience it is very important that the entire file be recovered including the title. If I recover only anonymous files, the work involved in naming these files would simply be overwhelming. So a recovered file must include title.

User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

#59 Post by nubc »

I tried to download Ubuntu iso (1.5 GB) to thumbdrive, and for some reason the download filled up my personal space. Okay, how do I resize the savefile? What is the maximum size I can make it? Right now, it's 2 GB, and probably almost full.

jd7654
Posts: 296
Joined: Mon 06 Apr 2015, 16:10

#60 Post by jd7654 »

nubc wrote:I have recovered a deleted directory containing AV files, and I can say from that experience it is very important that the entire file be recovered including the title. If I recover only anonymous files, the work involved in naming these files would simply be overwhelming. So a recovered file must include title.
The situation is different now. Not just a deleted files situation, you have a bad/failing hard drive situation. Time is against you. Seems like the high level copy data has failed. If saving the data is most important, I'd concentrate on that rather than setting up the new 4TB drive OS situation. The more you try and read the old 2TB drive it can be getting worse and more corrupted data and finally just stop working. I hope it's not there now, but sounds like it.

If it were mine. I'd clone the 2TB onto the 4TB with ddrescue and then setup its OS and booting later. It depends on your priority.

Post Reply