There's been a bit of conflicting advice here; so here's a new thread,
describing where I am in Alain's original suggested sequence (some of this is
a recap from earlier e-mails):
Boot the machine to give you a desktop.
OK
Open a terminal, become root
OK
Identify the hard disk that contains your system, look at /proc/partitions.
major minor #blocks name
2 0 4 fd0
8 16 1953514584 sdb
8 17 1945125888 sdb1
8 18 1 sdb2
8 21 8385591 sdb5
8 0 2930266584 sda
8 1 15624192 sda1
8 2 1937889280 sda2
11 0 1048575 sr0
11 1 1048575 sr1
9 126 1937757184 md126
I am going to assume that it is /dev/sda with the root file system as /dev/sda1
Based on the above output from /proc/partitions, I think that the root
filesystem is best described as /dev/md126.
mkdir /tmp/RFS
OK
mount /dev/sda1 /tmp/RFS
I changed this to: mount /dev/md126 /tmp/RFS
I note that if I try to execute "mount /dev/sda2 /tmp/RFS" instead, then I get
an error about "linux_raid_member" being an unknown filesystem type. But if I
call that partition "md126", then the mount proceeds OK.
At this point, if I look at the contents of /tmp/RFS, I see (wrapped by the
e-mail agent):
----
total 1384
drwxr-xr-x 18 root root 4096 Jan 20 11:34 .
drwxrwxrwt 17 root root 400 Jan 23 07:47 ..
lrwxrwxrwx 1 root root 7 Feb 28 2020 bin -> usr/bin
drwxr-xr-x 3 root root 12288 Jan 10 08:34 boot
-rw------- 1 root root 10096640 Jan 20 11:34 core.373
drwxr-xr-x 4 root root 4096 Feb 28 2020 dev
drwxr-xr-x 157 root root 12288 Jan 19 07:03 etc
drwxr-xr-x 3 root root 4096 Feb 28 2020 home
lrwxrwxrwx 1 root root 35 Jan 10 08:31 initrd.img ->
boot/initrd.img-6.12.63+deb13-amd64
lrwxrwxrwx 1 root root 35 Jan 10 08:31 initrd.img.old ->
boot/initrd.img-6.12.57+deb13-amd64
lrwxrwxrwx 1 root root 7 Feb 28 2020 lib -> usr/lib
lrwxrwxrwx 1 root root 9 Jul 1 2023 lib32 -> usr/lib32
lrwxrwxrwx 1 root root 9 Feb 28 2020 lib64 -> usr/lib64
lrwxrwxrwx 1 root root 10 Dec 11 2024 libx32 -> usr/libx32
drwx------ 2 root root 16384 Feb 28 2020 lost+found
drwxr-xr-x 4 root root 4096 Feb 28 2020 media
drwxr-xr-x 2 root root 4096 Feb 28 2020 mnt
drwxr-xr-x 2 root root 4096 Feb 28 2020 opt
drwxr-xr-x 2 root root 4096 Feb 1 2020 proc
drwx------ 8 root root 4096 Oct 9 13:41 root
drwxr-xr-x 2 root root 4096 Feb 28 2020 run
lrwxrwxrwx 1 root root 8 Feb 28 2020 sbin -> usr/sbin
drwxr-xr-x 2 root root 4096 Feb 28 2020 srv
drwxr-xr-x 2 root root 4096 Feb 1 2020 sys
drwxrwxrwt 6 root root 24576 Jan 20 12:30 tmp
drwxr-xr-x 14 root root 4096 Dec 11 2024 usr
drwxr-xr-x 11 root root 4096 Sep 8 16:01 var
lrwxrwxrwx 1 root root 32 Jan 10 08:31 vmlinuz ->
boot/vmlinuz-6.12.63+deb13-amd64
lrwxrwxrwx 1 root root 32 Jan 10 08:31 vmlinuz.old ->
boot/vmlinuz-6.12.57+deb13-amd64
----
looking at /tmp/RFS/boot:
----
total 379632
drwxr-xr-x 3 root root 12288 Jan 10 08:34 .
drwxr-xr-x 18 root root 4096 Jan 20 11:34 ..
-rw-r--r-- 1 root root 259557 Aug 2 07:13 config-6.1.0-38-amd64
-rw-r--r-- 1 root root 259590 Aug 26 14:35 config-6.1.0-39-amd64
-rw-r--r-- 1 root root 283278 Aug 27 02:10 config-6.12.43+deb13-amd64
-rw-r--r-- 1 root root 283306 Sep 20 12:41 config-6.12.48+deb13-amd64
-rw-r--r-- 1 root root 283279 Nov 5 07:56 config-6.12.57+deb13-amd64
-rw-r--r-- 1 root root 283288 Dec 30 12:37 config-6.12.63+deb13-amd64
drwxr-xr-x 5 root root 4096 Jan 10 08:32 grub
-rw-r--r-- 1 root root 51166209 Sep 8 15:21 initrd.img-6.1.0-38-amd64
-rw-r--r-- 1 root root 51009110 Sep 8 15:20 initrd.img-6.1.0-39-amd64
-rw-r--r-- 1 root root 54978355 Sep 11 11:30 initrd.img-6.12.43+deb13-amd64
-rw-r--r-- 1 root root 54978780 Sep 23 14:30 initrd.img-6.12.48+deb13-amd64
-rw-r--r-- 1 root root 54991593 Nov 16 16:07 initrd.img-6.12.57+deb13-amd64
-rw-r--r-- 1 root root 55020955 Jan 10 08:34 initrd.img-6.12.63+deb13-amd64
-rw-r--r-- 1 root root 83 Aug 2 07:13 System.map-6.1.0-38-amd64
-rw-r--r-- 1 root root 83 Aug 26 14:35 System.map-6.1.0-39-amd64
-rw-r--r-- 1 root root 83 Aug 27 02:10 System.map-6.12.43+deb13-amd64
-rw-r--r-- 1 root root 83 Sep 20 12:41 System.map-6.12.48+deb13-amd64
-rw-r--r-- 1 root root 83 Nov 5 07:56 System.map-6.12.57+deb13-amd64
-rw-r--r-- 1 root root 83 Dec 30 12:37 System.map-6.12.63+deb13-amd64
-rw-r--r-- 1 root root 8206272 Aug 2 07:13 vmlinuz-6.1.0-38-amd64
-rw-r--r-- 1 root root 8230848 Aug 26 14:35 vmlinuz-6.1.0-39-amd64
-rw-r--r-- 1 root root 12101568 Aug 27 02:10 vmlinuz-6.12.43+deb13-amd64
-rw-r--r-- 1 root root 12109760 Sep 20 12:41 vmlinuz-6.12.48+deb13-amd64
-rw-r--r-- 1 root root 12101568 Nov 5 07:56 vmlinuz-6.12.57+deb13-amd64
-rw-r--r-- 1 root root 12105664 Dec 30 12:37 vmlinuz-6.12.63+deb13-amd64
----
and /tmp/RFS/boot/grub:
----
total 2428
drwxr-xr-x 5 root root 4096 Jan 10 08:32 .
drwxr-xr-x 3 root root 12288 Jan 10 08:34 ..
drwxr-xr-x 2 root root 4096 Feb 28 2020 fonts
-r--r--r-- 1 root root 16758 Jan 10 08:32 grub.cfg
-rw-r--r-- 1 root root 1024 Jan 20 11:44 grubenv
drwxr-xr-x 2 root root 24576 Sep 8 15:25 i386-pc
drwxr-xr-x 2 root root 4096 Sep 8 15:25 locale
-rw-r--r-- 1 root root 2411806 Sep 8 15:25 unicode.pf2
----
To my strictly untutored eyes, that all looks good.
That is where I am right now.
That leaves the following to be executed:
Copy /dev/ to /tmp/RFS/dev/
which I interpret as:
cp -r /dev/ /tmp/RFS/dev/
chroot /tmp/RFS /usr/bin/bash
grub-install /dev/sda
sync
exit
reboot
There was some mention of executing:
mount /dev/sda1 /boot [note the sda1]
after the chroot command, but I don't think that's right, so I propose not to
execute it. The reason for it being suggested was that the sda1 partition is
marked bootable. But there is no mention of the sda1 partition in
/proc/partitions, and if I try to mount it:
mkdir /tmp/burble
mount /sda1 /tmp/burble
I get the error message: "mount failed: Operation not permitted". Further,
"lsblk -f" says that the sda1 partition has no filesystem on it.
I suspect that the sda1 partition was created simply to mirror the geometry of
the other disk in the RAID pair, on which the equivalent partition was
formatted as swap. So I am at least 99% sure that /dev/sda1 should just be
ignored for the purpose of getting everything working again.
So, given all the above, I intend to proceed with:
cp -r /dev/ /tmp/RFS/dev/
chroot /tmp/RFS /usr/bin/bash
grub-install /dev/sda
sync
exit
reboot
after I've given people a bit of time to shout at me not to do that if
something in what I've written above looks bad.
What a great community! Thanks, everyone, for getting me this far.
Doc
--
Web: http://enginehousebooks.com/drevans