On 11/26/26 14:00, Robert Heller wrote:
I know this might sound strange, but here is what happened:
I bought an old Laptop on E-Mail. It has an 80g SATA 2.5" rotating
rust drive -- working fine (still working fine), but it is only
80gb... Today I decided to swap it for a 500G SATA 2.5" SSD. After
moving the files and getting things to boot off the new driver (a
little tricky,,,), I did a apt update and apt full-upgrade. When
updating grub, it produced a message about the fact the boot device
was different (Duh!) and asked me where the original boot driver went
and where it should install grub. So, some how the Debian installer
stashed away some identifing information about where in installed
grub originally. Where is that and what needs to be changed to make
apt happy going forward?
On 11/26/26 17:43, Robert Heller wrote:
The machine boots just fine.
<snip>
This machine to too old for EFI, so there is no EFI partition. It has
an old legacy BIOS. Again that is not the problem.
Some additional detail:
The original disk was partitioned with a /boot partition and a LVM
volume group (with contained /, swap and /home volumes. I made a
new /boot partition on the new disk (giving it a label "boot") and
used tar to do a file copy from the to the new (using a USB <> SATA
adaptor). I then "migrated " the PEs of the LVM volume group from
the old disk to trhe new one. I installed grub on the new disk, made
it bootable then swapped in in. At first grup was wonky, but I
pluged in the old visdk via the USB <> SATA adapto and it booted and
I ran update-grub and install-grub, and that cured that.
Then I enlarged the root file system from 10G (it was getting a bit
"crowded") to 32G and ran resize2fs. Then I did a apt update and apt
full- upgrade. That was when a got the message the bootloader drive moving
or something from the grub update.
Assuming you have a second Debian computer that you can use to work on
the HDD and SSD at the same time:
1. Connect the HDD and the SSD to the second computer.
2. Boot the second computer's Debian disk, not the HDD or SSD.
3. Open a root shell.
4. Invoke script(1) with a meaningful name for the capture file.
5. Use /dev/disk/by-id/* paths to the HDD and to the SSD for all
commands below.
6. Secure erase the SSD, or fill the SSD with zeros if it does not
support secure erase.
7. Use dd(1) to copy the contents of the HDD to the SSD.
8. Exit the script(1) shell.
9. Shutdown the second computer.
10. Disconnect the HDD and the SSD from the second computer.
11. Install SSD in the laptop.
12. Boot the laptop.
13. Open a root shell.
14. Invoke script(1) with a meaningful name for the capture file.
15. Add a new partition to the SSD.
16. Create an LVM physical volume in the new SSD partition.
17. Extend the SSD LVM volume group by adding the new physical volume.
18. Extend the SSD LVM root logical volume so that it uses the
additional space in the volume group.
19. Extend the SSD root filesystem.
If you run into problems, please post the relevant portions of the
script(1) capture file(s) and/or laptop boot messages.
David
[1] https://www.krenger.ch/blog/linux-lvm-how-to-adding-a-new-partition/