We are overseas enjoying time well spent with a humanitarian organization. I have a couple of LM dual boots here. The organization has several external drives with problems which I believe Spinrite could help. I've been using Linux Mint, for many reasons, and (adding this one to the list) it reads most PC and MAC drive formats. Shabaam ! I came across a post from some time ago, from a user who was attempting the same and I am working to understand and adapt his code:
https://www.linuxquestions.org/question ... 175546458/
I am a retired mechanic, not a programmer, and have a bit to learn. The ISO is in /boot/images and on a cd drive, and neither are working just yet, though I do now have a menu option in Grub2.
Here is my version:
Code: Select all
menuentry "Bootable ISO Image: SpinRite" {
insmod part_msdos
insmod ext2
set root='hd0,ext4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,ext4 --hint-efi=hd0,ext4 --hint-baremetal=sr0,ext2
else
search --no-floppy --fs-uuid --set=root C4DB441B-C4F4-11E3-8028-C67EAAF5D749
fi
linux16 /boot/memdisk iso
initrd16 /boot/images/SpinRite.iso
}
"insmod fat"..... fat appears to be the format the Linux Mint ISO used for my LM installation.
"set root='hd0,fat2' "....... this appears to be the position of the Linux Partition, and where the ISO now resides.
"C4DB441B-C4F4-11E3-8028-C67EAAF5D749" ....... Disk identifier: C4DB441B-C4F4-11E3-8028-C67EAAF5D749
Device Start End Sectors Size Type
/dev/sda1 2048 2099199 2097152 1G Windows recovery environment
/dev/sda2 2099200 2303999 204800 100M EFI System
/dev/sda3 2304000 2566143 262144 128M Microsoft reserved
/dev/sda4 2566144 1729804287 1727238144 823.6G Microsoft basic data
/dev/sda5 1934604288 1953523764 18919477 9G Windows recovery environment
/dev/sda6 1729804288 1934604287 204800000 97.7G Linux filesystem
scottb@scottb-Satellite-S55t-B:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 1G 0 part
├─sda2 8:2 0 100M 0 part /boot/efi
├─sda3 8:3 0 128M 0 part
├─sda4 8:4 0 823.6G 0 part
├─sda5 8:5 0 9G 0 part
└─sda6 8:6 0 97.7G 0 part /
sr0 11:0 1 1.8M 0 rom /media/scottb/SPINRITE_V6_BOOT
scottb@scottb-Satellite-S55t-B:/etc/grub.d$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/60_mint-theme.cfg'
Generating grub configuration file ...
Found theme: /boot/grub/themes/linuxmint/theme.txt
Found linux image: /boot/vmlinuz-5.3.0-53-generic
Found initrd image: /boot/initrd.img-5.3.0-53-generic
Found linux image: /boot/vmlinuz-5.3.0-51-generic
Found initrd image: /boot/initrd.img-5.3.0-51-generic
Found linux image: /boot/vmlinuz-5.3.0-46-generic
Found initrd image: /boot/initrd.img-5.3.0-46-generic
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
Found memdisk: /boot/memdisk
done
scottb@scottb-Satellite-S55t-B:/etc/grub.d$